Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

node drones hard deletes #82927

Merged
merged 1 commit into from Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 11 additions & 5 deletions code/game/objects/structures/lavaland/ore_vent.dm
Expand Up @@ -261,6 +261,8 @@
* Also gives xp and mining points to all nearby miners in equal measure.
*/
/obj/structure/ore_vent/proc/handle_wave_conclusion()
SIGNAL_HANDLER

SEND_SIGNAL(src, COMSIG_VENT_WAVE_CONCLUDED)
COOLDOWN_RESET(src, wave_cooldown)
particles = null
Expand All @@ -275,7 +277,8 @@
visible_message(span_danger("\the [src] creaks and groans as the mining attempt fails, and the vent closes back up."))
icon_state = initial(icon_state)
update_appearance(UPDATE_ICON_STATE)
return FALSE //Bad end, try again.
node = null
return //Bad end, try again.

for(var/mob/living/miner in range(7, src)) //Give the miners who are near the vent points and xp.
var/obj/item/card/id/user_id_card = miner.get_idcard(TRUE)
Expand All @@ -284,9 +287,11 @@
if(!user_id_card)
continue
var/point_reward_val = (MINER_POINT_MULTIPLIER * boulder_size) - MINER_POINT_MULTIPLIER // We remove the base value of discovering the vent
user_id_card.registered_account.mining_points += point_reward_val
user_id_card.registered_account.bank_card_talk("You have been awarded [point_reward_val] mining points for your efforts.")
if(user_id_card.registered_account)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't all ID cards have an account? Even just as a placeholder one that can be overriden later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've no clue just something I noticed while investigating the harddel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw a lot of other places in code check for account Id so I assumed it's necessary

user_id_card.registered_account.mining_points += point_reward_val
user_id_card.registered_account.bank_card_talk("You have been awarded [point_reward_val] mining points for your efforts.")
node.pre_escape() //Visually show the drone is done and flies away.
node = null
add_overlay(mutable_appearance('icons/obj/mining_zones/terrain.dmi', "well", ABOVE_MOB_LAYER))

/**
Expand Down Expand Up @@ -327,8 +332,9 @@
var/obj/item/card/id/user_id_card = user.get_idcard(TRUE)
if(isnull(user_id_card))
return
user_id_card.registered_account.mining_points += (MINER_POINT_MULTIPLIER)
user_id_card.registered_account.bank_card_talk("You've been awarded [MINER_POINT_MULTIPLIER] mining points for discovery of an ore vent.")
if(user_id_card.registered_account)
user_id_card.registered_account.mining_points += (MINER_POINT_MULTIPLIER)
user_id_card.registered_account.bank_card_talk("You've been awarded [MINER_POINT_MULTIPLIER] mining points for discovery of an ore vent.")
return
if(scan_only)
return
Expand Down