From bba55977a1cef14b445b450c78a84314e2ed2bc0 Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Wed, 29 Oct 2025 20:25:51 -0400 Subject: [PATCH] Polaris Hook Removal Part 1 (#18672) * starting cleanup * thankyou vsc very cool * resleeving mind signal * id card modifier signals * fix * borgifying mob signal * button and brain * death * explosions, mob init * oooop * semantic * payment account revoke and status * missed hook listener * wip for now * fixes * round signals * only remaining * doppler arrays behave with z levels * audible message it is * wizard spells applied correctly to mind datum --- code/__defines/dcs/signals.dm | 30 ++++++- code/_helpers/global_lists.dm | 1 + code/_helpers/time.dm | 4 - code/controllers/hooks-defs.dm | 78 +------------------ code/controllers/subsystems/explosions.dm | 22 +++--- code/controllers/subsystems/supply.dm | 11 +-- code/controllers/subsystems/ticker.dm | 32 +++++++- code/controllers/subsystems/webhooks.dm | 4 - code/datums/mind.dm | 16 +++- code/game/machinery/buttons_vr.dm | 1 + code/game/machinery/cloning.dm | 6 +- code/game/machinery/computer/card.dm | 5 +- code/game/machinery/computer/timeclock_vr.dm | 4 +- .../machinery/computer3/computers/card.dm | 4 +- code/game/machinery/doppler_array.dm | 46 +++++------ .../items/devices/scanners/sleevemate.dm | 1 + code/game/objects/items/robot/robot_parts.dm | 2 +- code/game/objects/random/_random.dm | 9 --- code/game/sound.dm | 7 -- code/modules/economy/Accounts_DB.dm | 4 +- code/modules/events/supply_demand_vr.dm | 17 ++-- code/modules/mob/dead/observer/free_vr.dm | 6 -- code/modules/mob/death.dm | 2 + code/modules/mob/living/carbon/human/death.dm | 15 +++- .../mob/living/carbon/human/death_vr.dm | 19 ----- .../modules/mob/living/silicon/ai/latejoin.dm | 10 --- .../living/silicon/robot/sprites/standard.dm | 6 -- .../silicon/robot/subtypes/boozeborg.dm | 13 ---- .../exploration/exploration-modules.dm | 6 -- code/modules/mob/mob.dm | 1 + code/modules/mob/transform_procs.dm | 2 +- .../nifsoft/software/13_soulcatcher.dm | 38 ++++----- code/modules/organs/internal/brain.dm | 2 +- code/modules/power/solar.dm | 6 -- code/modules/resleeving/autoresleever.dm | 1 + code/modules/resleeving/machines.dm | 2 + code/modules/shuttles/shuttle_console.dm | 7 -- code/modules/spells/spells.dm | 9 +-- .../modules/tgui/modules/ntos-only/cardmod.dm | 4 +- 39 files changed, 180 insertions(+), 273 deletions(-) diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index a973c0afd1..c03f322ca1 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -6,23 +6,45 @@ // These are signals which can be listened to by any component on any parent // start global signals with "!", this used to be necessary but now it's just a formatting choice +/// /datum/controller/subsystem/ticker/proc/setup() : () +#define COMSIG_GLOB_ROUND_START "!round_start" +/// /datum/controller/subsystem/ticker/proc/post_game_tick() : () +#define COMSIG_GLOB_ROUND_END "!round_end" ///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args) #define COMSIG_GLOB_NEW_Z "!new_z" /// called after a successful var edit somewhere in the world: (list/args) #define COMSIG_GLOB_VAR_EDIT "!var_edit" -/// called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range) +/// called after an explosion happened, called by /datum/controller/subsystem/explosions/proc/end_resolve() : (epicenter, devastation_range, heavy_impact_range, light_impact_range, seconds_taken) #define COMSIG_GLOB_EXPLOSION "!explosion" -/// mob was created somewhere : (mob) +/// mob was created somewhere, called by /mob/Initialize() : (mob) #define COMSIG_GLOB_MOB_CREATED "!mob_created" -/// mob died somewhere : (mob , gibbed) +/// mob died somewhere, called by /mob/proc/death(gibbed,deathmessage) : (mob , gibbed) #define COMSIG_GLOB_MOB_DEATH "!mob_death" /// global living say plug - use sparingly: (mob/speaker , message) #define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" /// called by datum/cinematic/play() : (datum/cinematic/new_cinematic) #define COMSIG_GLOB_PLAY_CINEMATIC "!play_cinematic" #define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) -/// ingame button pressed (/obj/machinery/button/button) +/// ingame button pressed, called by /obj/machinery/button/attack_hand() : (obj/machinery/button/button, mob/user) #define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed" +/// Supply shuttle selling, before all items are sold, called by /datum/controller/subsystem/supply/proc/sell() : (/list/area/supply_shuttle_areas) +#define COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART "!sell_supply_shuttle" +/// Supply shuttle selling, for each item sold, called by /datum/controller/subsystem/supply/proc/sell() : (atom/movable/sold_item, sold_successfully, datum/exported_crate/export_data, area/shuttle_subarea) +#define COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM "!supply_shuttle_sell_item" +/// Mind inserted into body: (mob/new_owner, /datum/mind/assigned_mind) +#define COMSIG_GLOB_RESLEEVED_MIND "!resleeved_mind_into_body" +/// ID card modified: (obj/item/card/id/modified_card) +#define COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD "!modified_employee_idcard" +/// ID card terminated: (obj/item/card/id/terminated_card) +#define COMSIG_GLOB_TERMINATE_EMPLOYEE_IDCARD "!modified_terminated_idcard" +/// payment account status changed /obj/machinery/account_database/tgui_act() : (datum/money_account/account) +#define COMSIG_GLOB_PAYMENT_ACCOUNT_STATUS "!payment_account_change_status" +/// payment account status changed /obj/machinery/account_database/tgui_act() : (datum/money_account/account) +#define COMSIG_GLOB_PAYMENT_ACCOUNT_REVOKE "!payment_account_revoke_payroll" +/// borg created: (mob/living/silicon/robot/new_robot) +#define COMSIG_GLOB_BORGIFY "!borgify_mob" +/// brain removed from body, called by /obj/item/organ/internal/brain/proc/transfer_identity() : (mob/living/carbon/brain/brainmob) +#define COMSIG_GLOB_BRAIN_REMOVED "!brain_removed_from_mob" /// signals from globally accessible objects diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index c0c62dc3c9..79e259b88f 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -1624,6 +1624,7 @@ GLOBAL_LIST_INIT(suitable_fish_turf_types, list( /turf/simulated/floor/water )) +GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/paper/dockingcodes) //Chamelion clothing was all stupid so it's done here instead. //Jumpsuit diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 8500b7b3b8..8d3867480b 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -83,10 +83,6 @@ var/next_duration_update = 0 var/last_round_duration = 0 GLOBAL_VAR_INIT(round_start_time, 0) -/hook/roundstart/proc/start_timer() - GLOB.round_start_time = REALTIMEOFDAY - return 1 - /proc/roundduration2text() if(!GLOB.round_start_time) return "00:00" diff --git a/code/controllers/hooks-defs.dm b/code/controllers/hooks-defs.dm index 0c468b358c..cf65a01415 100644 --- a/code/controllers/hooks-defs.dm +++ b/code/controllers/hooks-defs.dm @@ -5,79 +5,7 @@ /hook/startup /** - * Roundstart hook. - * Called in gameticker.dm when a round starts. + * Roundend hook. + * Called in gameticker.dm when a round ends. */ -/hook/roundstart - -/** - * Death hook. - * Called in death.dm when someone dies. - * Parameters: var/mob/living/carbon/human, var/gibbed - */ -/hook/death - -/** - * Cloning hook. - * Called in cloning.dm when someone is brought back by the wonders of modern science. - * Parameters: var/mob/living/carbon/human - */ -/hook/clone - -/** - * Debrained hook. - * Called in brain_item.dm when someone gets debrained. - * Parameters: var/obj/item/organ/brain - */ -/hook/debrain - -/** - * Borged hook. - * Called in robot_parts.dm when someone gets turned into a cyborg. - * Parameters: var/mob/living/silicon/robot - */ -/hook/borgify - -/** - * Payroll revoked hook. - * Called in Accounts_DB.dm when someone's payroll is stolen at the Accounts terminal. - * Parameters: var/datum/money_account - */ -/hook/revoke_payroll - -/** - * Account suspension hook. - * Called in Accounts_DB.dm when someone's account is suspended or unsuspended at the Accounts terminal. - * Parameters: var/datum/money_account - */ -/hook/change_account_status - -/** - * Employee reassignment hook. - * Called in card.dm when someone's card is reassigned at the HoP's desk. - * Parameters: var/obj/item/card/id - */ -/hook/reassign_employee - -/** - * Employee terminated hook. - * Called in card.dm when someone's card is terminated at the HoP's desk. - * Parameters: var/obj/item/card/id - */ -/hook/terminate_employee - -/** - * Crate sold hook. - * Called in supplyshuttle.dm when a crate is sold on the shuttle. - * Parameters: var/obj/structure/closet/crate/sold, var/area/shuttle - */ -/hook/sell_crate - -/** - * Supply Shuttle sold hook. - * Called in supplyshuttle.dm when the shuttle contents are sold. - * This hook is called _before_ the crates are processed for normal - * phoron/metal sale (and before the sell_crate hooks) - * Parameters: var/area/area_shuttle - */ -/hook/sell_shuttle +/hook/roundend diff --git a/code/controllers/subsystems/explosions.dm b/code/controllers/subsystems/explosions.dm index df7d019a84..2c7677cda7 100644 --- a/code/controllers/subsystems/explosions.dm +++ b/code/controllers/subsystems/explosions.dm @@ -79,17 +79,17 @@ SUBSYSTEM_DEF(explosions) // We've handled the actual explosions, it's time to wrap up everything else. // send signals to all machines scanning for them for(var/list/time_dat in currentsignals) - var/x0 = time_dat[1] - var/y0 = time_dat[2] - var/z0 = time_dat[3] + var/turf/epicenter = locate(time_dat[1],time_dat[2],time_dat[3]) + if(!epicenter) + continue + var/z_transfer = time_dat[8] + if(z_transfer != (UP|DOWN)) // Only the initial explosion in a multiz explosion transfers both up and down! + continue var/devastation_range = time_dat[4] var/heavy_impact_range = time_dat[5] var/light_impact_range = time_dat[6] - var/tim = time_dat[7] - for(var/i,i<=GLOB.doppler_arrays.len,i++) - var/obj/machinery/doppler_array/Array = GLOB.doppler_arrays[i] - if(Array) - Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range, tim - world.time) + var/took = (world.time - time_dat[7]) / (1 SECOND) // Horrifyingly, this has always been server performance dependant. Should really only be used for cosmetic stuff. + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_EXPLOSION, epicenter, devastation_range, heavy_impact_range, light_impact_range, took) currentsignals.Cut() // return to setup mode... Unless... @@ -217,7 +217,7 @@ SUBSYSTEM_DEF(explosions) currentrun["[x0].[y0].[z0]"] = list(x0,y0,z0,pwr,direction,max_starting) // Queue explosion event, call this from explosion() ONLY -/datum/controller/subsystem/explosions/proc/append_explosion(var/turf/epicenter,var/pwr,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/flash_range) +/datum/controller/subsystem/explosions/proc/append_explosion(turf/epicenter, pwr, devastation_range, heavy_impact_range, light_impact_range, flash_range, z_transfer) SHOULD_NOT_OVERRIDE(TRUE) if(pwr <= 0) return @@ -245,7 +245,7 @@ SUBSYSTEM_DEF(explosions) pending_explosions["[T.x].[T.y].[T.z]"] = list(T.x,T.y,T.z,rad_power,direction,max_starting) // send signals to dopplers - explosion_signals.Add(list( list(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,world.time) )) // append a list in a list. Needed so that the data list doesn't get merged into the list of datalists + explosion_signals.Add(list( list(x0, y0, z0, devastation_range, heavy_impact_range, light_impact_range, world.time, z_transfer))) // append a list in a list. Needed so that the data list doesn't get merged into the list of datalists // BOINK! Time to wake up sleeping beauty! wake_and_defer_subsystem_updates(devastation_range >= 8 || heavy_impact_range >= 16 || light_impact_range >= 20) @@ -336,4 +336,4 @@ SUBSYSTEM_DEF(explosions) // Queue explosion event var/power = devastation_range * 2 + heavy_impact_range + light_impact_range //The ranges add up, ie light 14 includes both heavy 7 and devestation 3. So this calculation means devestation counts for 4, heavy for 2 and light for 1 power, giving us a cap of 27 power. - SSexplosions.append_explosion(epicenter,power,devastation_range,heavy_impact_range,light_impact_range,flash_range) + SSexplosions.append_explosion(epicenter,power,devastation_range,heavy_impact_range,light_impact_range,flash_range,z_transfer) diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm index 05a3e34028..d77185a617 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -65,8 +65,8 @@ SUBSYSTEM_DEF(supply) //Selling /datum/controller/subsystem/supply/proc/sell() // Loop over each area in the supply shuttle + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART, shuttle.shuttle_area) for(var/area/subarea in shuttle.shuttle_area) - callHook("sell_shuttle", list(subarea)); for(var/atom/movable/MA in subarea) if(MA.anchored) continue @@ -77,10 +77,10 @@ SUBSYSTEM_DEF(supply) EC.contents = list() var/base_value = 0 - // Must be in a crate! + // Most items must be in a crate! + var/sold_successfully = FALSE if(istype(MA,/obj/structure/closet/crate)) var/obj/structure/closet/crate/CR = MA - callHook("sell_crate", list(CR, subarea)) points += CR.points_per_crate if(CR.points_per_crate) @@ -88,11 +88,12 @@ SUBSYSTEM_DEF(supply) // For each thing in the crate, get the value and quantity for(var/atom/A in CR) - SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE) + sold_successfully = SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE) else // Selling things that are not in crates. // Usually it just makes a log that it wasn't shipped properly, and so isn't worth anything - SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE) + sold_successfully = SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM, MA, sold_successfully, EC, subarea) exported_crates += EC points += EC.value diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 5f94f93234..386b83729b 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -208,9 +208,34 @@ SUBSYSTEM_DEF(ticker) cb.InvokeAsync() LAZYCLEARLIST(round_start_events) - round_start_time = world.time //otherwise round_start_time would be 0 for the signals + //otherwise round_start_time would be 0 for the signals + round_start_time = world.time + GLOB.round_start_time = REALTIMEOFDAY SEND_SIGNAL(src, COMSIG_TICKER_ROUND_STARTING, world.time) - callHook("roundstart") + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_ROUND_START) + SSwebhooks.send(WEBHOOK_ROUNDSTART, list("url" = get_world_url())) + + // Spawn randomized items + for(var/id in multi_point_spawns) + var/list/spawn_points = multi_point_spawns[id] + var/obj/random_multi/rm = pickweight(spawn_points) + rm.generate_items() + for(var/entry in spawn_points) + qdel(entry) + + // Place empty AI cores once we know who is playing AI + for(var/obj/effect/landmark/start/S in GLOB.landmarks_list) + if(S.name != JOB_AI) + continue + if(locate(/mob/living) in S.loc) + continue + GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S)) + + // Final init, these things need round to start for their info to be ready + for(var/obj/item/paper/dockingcodes/dcp as anything in GLOB.papers_dockingcode) + dcp.populate_info() + for(var/obj/machinery/power/solar_control/SC as anything in GLOB.solars_list) + SC.auto_start() log_world("Game start took [(world.timeofday - init_start)/10]s") INVOKE_ASYNC(SSdbcore, TYPE_PROC_REF(/datum/controller/subsystem/dbcore,SetRoundStart)) @@ -321,7 +346,8 @@ SUBSYSTEM_DEF(ticker) /datum/controller/subsystem/ticker/proc/post_game_tick() switch(end_game_state) if(END_GAME_READY_TO_END) - callHook("roundend") + callHook("roundend") // TODO, remove all hooks that use this in favor of global signal + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_ROUND_END) if (mode.station_was_nuked) feedback_set_details("end_proper", "nuke") diff --git a/code/controllers/subsystems/webhooks.dm b/code/controllers/subsystems/webhooks.dm index 9b9d53bbe3..20daac0cea 100644 --- a/code/controllers/subsystems/webhooks.dm +++ b/code/controllers/subsystems/webhooks.dm @@ -90,7 +90,3 @@ SUBSYSTEM_DEF(webhooks) log_and_message_admins("has pinged webhook [choice].", usr) log_world("[usr.key] has pinged webhook [choice].") webhook.send() - -/hook/roundstart/proc/run_webhook() - SSwebhooks.send(WEBHOOK_ROUNDSTART, list("url" = get_world_url())) - return 1 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index fd34288e90..a62a2a5159 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -77,10 +77,10 @@ /datum/mind/proc/transfer_to(mob/living/new_character, force = FALSE) if(!istype(new_character)) log_world("## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn") - var/datum/component/antag/changeling/comp + var/datum/component/antag/changeling/changeling_comp if(current) - comp = is_changeling(current) //remove ourself from our old body's mind variable - if(comp) + changeling_comp = is_changeling(current) //remove ourself from our old body's mind variable + if(changeling_comp) current.remove_changeling_powers() remove_verb(current, /mob/proc/EvolutionMenu) current.mind = null @@ -91,15 +91,23 @@ current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself - if(comp) + // Handle mode/antag specific respawns + if(changeling_comp) new_character.make_changeling() + if(learned_spells) + for(var/spell/spell_to_add in learned_spells) + new_character.add_spell(spell_to_add) + if(active || force) new_character.key = key //now transfer the key to link the client to our new body if(new_character.client) new_character.client.init_verbs() // re-initialize character specific verbs + update_antag_icons(src) + + /datum/mind/proc/store_memory(new_text) memory += "[new_text]
" diff --git a/code/game/machinery/buttons_vr.dm b/code/game/machinery/buttons_vr.dm index c38c2786f6..095fb7b6df 100644 --- a/code/game/machinery/buttons_vr.dm +++ b/code/game/machinery/buttons_vr.dm @@ -1,5 +1,6 @@ /obj/machinery/button/attack_hand(obj/item/W, mob/user as mob) if(..()) return 1 + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_BUTTON_PRESSED, src, user) playsound(src, 'sound/machines/button.ogg', 100, 1) /obj/machinery/button/windowtint/multitint diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 4e3eb5b332..de7a320e22 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -131,11 +131,7 @@ H.ckey = BR.ckey to_chat(H, span_warning(span_bold("Consciousness slowly creeps over you as your body regenerates.") + "
" + span_bold(span_large("Your recent memories are fuzzy, and it's hard to remember anything from today...")) + \ "
" + span_notice(span_italics("So this is what cloning feels like?")))) - - // -- Mode/mind specific stuff goes here - callHook("clone", list(H)) - update_antag_icons(H.mind) - // -- End mode specific stuff + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_RESLEEVED_MIND, H, clonemind) // A modifier is added which makes the new clone be unrobust. // Upgraded cloners can reduce the time of the modifier, up to 80% diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index d1b0185243..7bc72ead75 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -224,7 +224,7 @@ modify.assignment = t1 modify.rank = t1 - callHook("reassign_employee", list(modify)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, modify) . = TRUE if("reg") @@ -280,8 +280,7 @@ if(is_authenticated()) modify.assignment = "Dismissed" //VOREStation Edit: setting adjustment modify.access = list() - - callHook("terminate_employee", list(modify)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_TERMINATE_EMPLOYEE_IDCARD, modify) . = TRUE diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 7d96d4f07b..bfb874dd36 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -179,7 +179,7 @@ card.name = text("[card.registered_name]'s ID Card ([card.assignment])") GLOB.data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time - callHook("reassign_employee", list(card)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, card) newjob.current_positions++ var/mob/living/carbon/human/H = user H.mind.assigned_role = card.rank @@ -205,7 +205,7 @@ card.name = text("[card.registered_name]'s ID Card ([card.assignment])") GLOB.data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time - callHook("reassign_employee", list(card)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, card) var/mob/living/carbon/human/H = user H.mind.assigned_role = ptojob.title H.mind.role_alt_title = ptojob.title diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index c2fcc4ec8d..cc4ab1116a 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -313,14 +313,14 @@ writer.assignment = t1 writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])") data_core.manifest_modify(writer.registered_name, writer.assignment, writer.rank) - callHook("reassign_employee", list(writer)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, writer) if("reg" in href_list) if(auth) writer.registered_name = href_list["reg"] writer.name = text("[writer.registered_name]'s ID Card ([writer.assignment])") data_core.manifest_modify(writer.registered_name, writer.assignment, writer.rank) - callHook("reassign_employee", list(writer)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, writer) computer.updateUsrDialog(usr) return diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index ec110438cd..1169201120 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(doppler_arrays) - /obj/machinery/doppler_array anchored = TRUE name = "tachyon-doppler array" @@ -11,37 +9,35 @@ GLOBAL_LIST_EMPTY(doppler_arrays) /obj/machinery/doppler_array/Initialize(mapload) . = ..() - GLOB.doppler_arrays += src + RegisterSignal(SSdcs, COMSIG_GLOB_EXPLOSION, PROC_REF(sense_explosion)) /obj/machinery/doppler_array/Destroy() - GLOB.doppler_arrays -= src + UnregisterSignal(SSdcs, COMSIG_GLOB_EXPLOSION) . = ..() -/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took) - if(stat & NOPOWER) return - if(z != z0) return +/obj/machinery/doppler_array/proc/sense_explosion(datum/source, turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, seconds_taken) + SIGNAL_HANDLER - var/dx = abs(x0-x) - var/dy = abs(y0-y) - var/distance - var/direct + if(stat & NOPOWER) + return - if(dx > dy) - distance = dx - if(x0 > x) direct = EAST - else direct = WEST - else - distance = dy - if(y0 > y) direct = NORTH - else direct = SOUTH + var/x0 = epicenter.x + var/y0 = epicenter.y + var/z0 = epicenter.z + if(!(z0 in GetConnectedZlevels(z))) + return + var/turf/our_turf = get_turf(src) + if(our_turf.Distance(epicenter) > 100) + return - if(distance > 100) return - if(!(direct & dir)) return + /* There is no way to rotate these... Why? + var/direct = get_dir(our_turf,epicenter) + if(!(direct & dir)) + return + */ - var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took]seconds." - - for(var/mob/O in hearers(src, null)) - O.show_message(span_npc_say(span_name("[src]") + " states coldly, \"[message]\""),2) + var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0],[z0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [seconds_taken] seconds." + audible_message(span_npc_say(span_name("[src]") + " states coldly, \"[message]\"")) /obj/machinery/doppler_array/power_change() ..() diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm index 1e621988d1..356c7291eb 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -65,6 +65,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob M.ooc_notes_favs = ooc_notes_favs M.ooc_notes_maybes = ooc_notes_maybes M.ooc_notes_style = ooc_notes_style + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_RESLEEVED_MIND, M, stored_mind) clear_mind() diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 7af7d39b6d..1d7207b9b0 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -221,7 +221,7 @@ cell_component.installed = 1 feedback_inc("cyborg_birth",1) - callHook("borgify", list(O)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_BORGIFY, O) qdel(src) else diff --git a/code/game/objects/random/_random.dm b/code/game/objects/random/_random.dm index 5293ce43d6..a2a18a07bf 100644 --- a/code/game/objects/random/_random.dm +++ b/code/game/objects/random/_random.dm @@ -137,12 +137,3 @@ var/list/multi_point_spawns /obj/random_multi/single_item/generate_items() new item_path(loc) - -/hook/roundstart/proc/generate_multi_spawn_items() - for(var/id in multi_point_spawns) - var/list/spawn_points = multi_point_spawns[id] - var/obj/random_multi/rm = pickweight(spawn_points) - rm.generate_items() - for(var/entry in spawn_points) - qdel(entry) - return 1 diff --git a/code/game/sound.dm b/code/game/sound.dm index 124fed98b1..42d9e7e578 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -394,13 +394,6 @@ var/list/species_sound_map = list( "Unset" = use_default ) -/* // Not sure we even really need this -/hook/startup/proc/Init_species_sounds() // The entries we're checking over MUST have unique keys. - for(var/i in species_sound_map) - species_sounds |= species_sound_map[i] - return 1 -*/ - /* * Call this for when you need a sound from an already-identified list - IE, "Canine". pick() cannot parse procs. * Indexes must be pre-calculated by the time it reaches here - for instance; diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 80a629e47e..76d2272503 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -139,7 +139,7 @@ if("toggle_suspension") if(detailed_account_view) detailed_account_view.suspended = !detailed_account_view.suspended - callHook("change_account_status", list(detailed_account_view)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PAYMENT_ACCOUNT_STATUS, detailed_account_view) if("finalise_create_account") var/account_name = params["holder_name"] @@ -196,7 +196,7 @@ detailed_account_view.transaction_log.Add(account_trx) GLOB.station_account.transaction_log.Add(station_trx) - callHook("revoke_payroll", list(detailed_account_view)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PAYMENT_ACCOUNT_REVOKE, detailed_account_view) if("print") print() diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index 447d9025c3..8e0133ac8f 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -1,10 +1,5 @@ /var/global/running_demand_events = list() -/hook/sell_shuttle/proc/supply_demand_sell_shuttle(var/area/area_shuttle) - for(var/datum/event/supply_demand/E in running_demand_events) - E.handle_sold_shuttle(area_shuttle) - return 1 // All hooks must return one to show success. - // // The Supply Demand Event - CentCom asks for us to put some stuff on the shuttle // @@ -63,6 +58,7 @@ // Also announce over main comms so people know to look command_announcement.Announce("An order for the [using_map.facility_type] to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department) + RegisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART, PROC_REF(handle_supply_demand_sell_shuttle)) /datum/event/supply_demand/tick() if(required_items.len == 0) @@ -70,6 +66,7 @@ /datum/event/supply_demand/end() running_demand_events -= src + UnregisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART) // Check if the crew succeeded or failed! if(required_items.len == 0) // Success! @@ -86,6 +83,16 @@ for(var/datum/supply_demand_order/req in required_items) message += req.describe() + "
" post_comm_message("'[my_department] Mission Summary'", message) + +/** + * Signal Handler for when the shuttle fires COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART + */ +/datum/event/supply_demand/proc/handle_supply_demand_sell_shuttle(datum/source, list/area/supply_shuttle_areas) + SIGNAL_HANDLER + for(var/datum/event/supply_demand/E in running_demand_events) + // I don't think multiple supply shuttles have ever been used, but retaining support regardless... + for(var/area/sub_area in supply_shuttle_areas) + E.handle_sold_shuttle(sub_area) /** * Event Handler for responding to the supply shuttle arriving at centcom. */ diff --git a/code/modules/mob/dead/observer/free_vr.dm b/code/modules/mob/dead/observer/free_vr.dm index 64d232b0fa..f0b2f98720 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -1,11 +1,5 @@ GLOBAL_LIST_EMPTY(prevent_respawns) -/hook/death/proc/quit_notify(mob/dead) - if(ishuman(dead)) - to_chat(dead,span_notice("You're dead! If you don't intend to continue playing this round as this character, please use the Quit This Round verb in the OOC tab to free your job slot. Otherwise, you can use the Notify Transcore verb to let medical know you need resleeving, or Find Auto Resleever verb to be taken to an auto resleever, which you can click on to be resleeved automatically after a time.")) - - return TRUE - /mob/observer/dead/verb/cleanup() set name = "Quit This Round" set category = "OOC.Game" diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 6ba8bbc4c2..fd0918a97e 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -72,6 +72,8 @@ if(stat == DEAD) return 0 SEND_SIGNAL(src, COMSIG_MOB_DEATH, gibbed) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_DEATH, src, gibbed) + if(src.loc && istype(loc,/obj/belly) || istype(loc,/obj/item/dogborg/sleeper)) deathmessage = "no message" //VOREStation Add - Prevents death messages from inside mobs facing_dir = null diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 885d60686f..32b5c9eb54 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -79,11 +79,22 @@ remove_verb(src, /mob/living/carbon/proc/release_control) - callHook("death", list(src, gibbed)) - + // Handle vorny + if(isbelly(loc)) + //Were they digesting and we have a mind you can update? + //Technically allows metagaming by allowing buddies to turn on digestion for like 2 seconds + // to finish off critically wounded friends to avoid resleeving sickness, but like + // *kill those people* ok? + var/obj/belly/in_belly = loc + if(in_belly.digest_mode == DM_DIGEST || in_belly.digest_mode == DM_SELECT) + mind?.vore_death = TRUE + soulcatcher_on_mob_death() if(istype(loc, /obj/item/clothing/shoes)) mind?.vore_death = TRUE + // Let them know we died! + to_chat(src, span_notice("You're dead! If you don't intend to continue playing this round as this character, please use the Quit This Round verb in the OOC tab to free your job slot. Otherwise, you can use the Notify Transcore verb to let medical know you need resleeving, or Find Auto Resleever verb to be taken to an auto resleever, which you can click on to be resleeved automatically after a time.")) + if(mind) var/area/A = get_area(src) if(!(A?.flag_check(AREA_BLOCK_SUIT_SENSORS)) && isbelly(loc)) diff --git a/code/modules/mob/living/carbon/human/death_vr.dm b/code/modules/mob/living/carbon/human/death_vr.dm index 70afe4c60e..0b547ac4a9 100644 --- a/code/modules/mob/living/carbon/human/death_vr.dm +++ b/code/modules/mob/living/carbon/human/death_vr.dm @@ -12,25 +12,6 @@ . = ..() -//Surprisingly this is only called for humans, but whatever! -/hook/death/proc/digestion_check(var/mob/living/carbon/human/H, var/gibbed) - //Not in a belly? Well, too bad! - if(!isbelly(H.loc)) - return TRUE - - //What belly! - var/obj/belly/B = H.loc - - //Were they digesting and we have a mind you can update? - //Technically allows metagaming by allowing buddies to turn on digestion for like 2 seconds - // to finish off critically wounded friends to avoid resleeving sickness, but like - // *kill those people* ok? - if(B.digest_mode == DM_DIGEST || B.digest_mode == DM_SELECT) - H.mind?.vore_death = TRUE - - //Hooks need to return true otherwise they're considered having failed - return TRUE - //For making sure that if a mob is able to be joined by ghosts, that ghosts can't join it if it dies /mob/living/simple_mob/death() ..() diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index 654178a1cb..3ad71d0ab8 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -1,15 +1,5 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores) -/hook/roundstart/proc/spawn_empty_ai() - for(var/obj/effect/landmark/start/S in GLOB.landmarks_list) - if(S.name != JOB_AI) - continue - if(locate(/mob/living) in S.loc) - continue - GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S)) - - return 1 - /mob/living/silicon/ai/verb/store_core() set name = "Store Core" set category = "OOC.Game" diff --git a/code/modules/mob/living/silicon/robot/sprites/standard.dm b/code/modules/mob/living/silicon/robot/sprites/standard.dm index cb6a1c75bf..2161e6e35c 100644 --- a/code/modules/mob/living/silicon/robot/sprites/standard.dm +++ b/code/modules/mob/living/silicon/robot/sprites/standard.dm @@ -177,12 +177,6 @@ //INCOMPLETE and not ready, no sprites other than tall and basically useless, also lacking a belly -//Add ourselves to the borg list -/hook/startup/proc/Modular_Borg_init_standardhound() - //robot_modules["Honk-Hound"] = /obj/item/robot_module/robot/clerical/honkborg - done in station_vr modular chomp for ordering reasons - robot_module_types += "Standard-Hound" //Add ourselves to global - return 1 - /obj/item/robot_module/robot/standard/hound name = "Standard-Hound" sprites = list( diff --git a/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm b/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm index 13c4c34446..2350f79543 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm @@ -3,19 +3,6 @@ // code/modules/mob/living/silicon/robot/robot_modules/station_vr.dm //tag so it shows up in gitsearch -/* -What Borgs are available is sadly handled in the above file in the proc - -/hook/startup/proc/robot_modules_vr() - robot_modules["Medihound"] = /obj/item/robot_module/robot/medihound - robot_modules["K9"] = /obj/item/robot_module/robot/knine - robot_modules["ERT"] = /obj/item/robot_module/robot/ert - robot_modules["Janihound"] = /obj/item/robot_module/robot/scrubpup - robot_modules["Sci-borg"] = /obj/item/robot_module/robot/science - robot_modules["Pupdozer"] = /obj/item/robot_module/robot/engiedog - return 1 -*/ - /obj/item/robot_module/robot/booze name = "BoozeHound robot module" channels = list("Service" = 1) diff --git a/code/modules/mob/living/silicon/robot/subtypes/exploration/exploration-modules.dm b/code/modules/mob/living/silicon/robot/subtypes/exploration/exploration-modules.dm index 9a6f45fb3f..0c8d639a7b 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/exploration/exploration-modules.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/exploration/exploration-modules.dm @@ -1,9 +1,3 @@ -/* //Uncomment the exploration modules in code\global.dm -/hook/startup/proc/Modular_Borg_init_Exploration() - robot_modules["Exploration"] = /obj/item/robot_module/robot/exploration //add to array - robot_module_types += "Exploration" //Add to global list - return 1 -*/ //Explo doggos /obj/item/robot_module/robot/exploration name = "exploration robot module" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9cc7e0e48f..318d9e11b3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -75,6 +75,7 @@ zone_sel = null /mob/Initialize(mapload) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_CREATED, src) GLOB.mob_list += src if(stat == DEAD) GLOB.dead_mob_list += src diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 83833764c0..e45b61bb87 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -185,7 +185,7 @@ O.fuzzy = B.fuzzy O.custom_speech_bubble = B.custom_speech_bubble - callHook("borgify", list(O)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_BORGIFY, O) spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned qdel(src) diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 31d66cf175..28030d3334 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -491,39 +491,41 @@ /////////////////// //The catching hook -/hook/death/proc/nif_soulcatcher(var/mob/living/L) - if(!istype(L) || !L.mind) return TRUE //Hooks must return TRUE +/mob/living/proc/soulcatcher_on_mob_death() + if(!mind) + return - if(isbelly(L.loc)) //Died in someone - var/obj/belly/B = L.loc + if(isbelly(loc)) //Died in someone + var/obj/belly/B = loc var/mob/living/owner = B.owner var/obj/soulgem/gem = owner.soulgem if(gem && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_OTHERS, TRUE)) var/to_use_custom_name = null - if(isanimal(L)) - to_use_custom_name = L.name - gem.catch_mob(L, to_use_custom_name) - return TRUE + if(isanimal(src)) + to_use_custom_name = name + gem.catch_mob(src, to_use_custom_name) + return var/mob/living/carbon/human/HP = B.owner - var/mob/living/carbon/human/H = L - if(!istype(H)) return TRUE + var/mob/living/carbon/human/H = src + if(!istype(H)) + return if(istype(HP) && HP.nif && HP.nif.flag_check(NIF_O_SCOTHERS,NIF_FLAGS_OTHER)) var/datum/nifsoft/soulcatcher/SC = HP.nif.imp_check(NIF_SOULCATCHER) SC.catch_mob(H) else - var/obj/soulgem/gem = L.soulgem + var/obj/soulgem/gem = soulgem if(gem && gem.flag_check(SOULGEM_ACTIVE | NIF_SC_CATCHING_ME, TRUE)) var/to_use_custom_name = null - if(isanimal(L)) - to_use_custom_name = L.name - gem.catch_mob(L, to_use_custom_name) - return TRUE - var/mob/living/carbon/human/H = L - if(!istype(H)) return TRUE + if(isanimal(src)) + to_use_custom_name = name + gem.catch_mob(src, to_use_custom_name) + return + var/mob/living/carbon/human/H = src + if(!istype(H)) + return if(H.nif && H.nif.flag_check(NIF_O_SCMYSELF,NIF_FLAGS_OTHER)) //They are caught in their own NIF var/datum/nifsoft/soulcatcher/SC = H.nif.imp_check(NIF_SOULCATCHER) SC.catch_mob(H) - return TRUE /////////////////// //Verbs for humans diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index 04c68aa167..68f208039e 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -125,7 +125,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) brainmob.languages = H.languages to_chat(brainmob, span_notice("You feel slightly disoriented. That's normal when you're just \a [initial(src.name)].")) - callHook("debrain", list(brainmob)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_BRAIN_REMOVED, brainmob) /obj/item/organ/internal/brain/examine(mob/user) // -- TLE . = ..() diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index e9840670c3..f9cd772d2d 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -308,12 +308,6 @@ GLOBAL_LIST_EMPTY(solars_list) connected_tracker.set_angle(SSsun.sun.angle) set_panels(cdir) -// This would use LateInitialize(), however the powernet does not appear to exist during that time. -/hook/roundstart/proc/auto_start_solars() - for(var/obj/machinery/power/solar_control/SC as anything in GLOB.solars_list) - SC.auto_start() - return TRUE - /obj/machinery/power/solar_control/proc/add_panel(var/obj/machinery/power/solar/P) var/sgen = P.get_power_supplied() connected_power -= connected_panels[P] // Just in case it was already in there diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index a6f34021f8..bfb0ea280a 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -201,6 +201,7 @@ GLOBAL_LIST_EMPTY(active_autoresleevers) new_character.default_language = def_lang SEND_SIGNAL(new_character, COMSIG_HUMAN_DNA_FINALIZED) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_RESLEEVED_MIND, new_character, new_character.mind) //If desired, apply equipment. if(equip_body) diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index 947873903d..b63ad9714c 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -480,6 +480,8 @@ if(new_imp.handle_implant(occupant, BP_HEAD)) new_imp.post_implant(occupant) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_RESLEEVED_MIND, occupant, MR.mind_ref) + //Inform them and make them a little dizzy. if(confuse_amount + blur_amount <= 16) to_chat(occupant, span_notice("You feel a small pain in your head as you're given a new backup implant. Your new body feels comfortable already, however.")) diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index db63125e4a..1628ace5ba 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -155,13 +155,6 @@ /obj/machinery/computer/shuttle_control/emp_act() return - -GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/paper/dockingcodes) -/hook/roundstart/proc/populate_dockingcodes() - for(var/obj/item/paper/dockingcodes/dcp as anything in GLOB.papers_dockingcode) - dcp.populate_info() - return TRUE - /obj/item/paper/dockingcodes name = "Docking Codes" var/codes_from_z = null //So you can put codes from the station other places to give to antags or whatever diff --git a/code/modules/spells/spells.dm b/code/modules/spells/spells.dm index bd188d37fe..8af418b1c0 100644 --- a/code/modules/spells/spells.dm +++ b/code/modules/spells/spells.dm @@ -29,11 +29,6 @@ // if(Sp_HOLDVAR) // statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S.connected_button) -/hook/clone/proc/restore_spells(var/mob/H) - if(H.mind && H.mind.learned_spells) - for(var/spell/spell_to_add in H.mind.learned_spells) - H.add_spell(spell_to_add) - /mob/proc/add_spell(var/spell/spell_to_add, var/spell_base = "wiz_spell_ready", var/master_type = /atom/movable/screen/movable/spell_master) if(!spell_masters) spell_masters = list() @@ -43,6 +38,10 @@ if(spell_master.type == master_type) spell_list.Add(spell_to_add) spell_master.add_spell(spell_to_add) + if(mind) + if(!mind.learned_spells) + mind.learned_spells = list() + mind.learned_spells += spell_to_add return 1 var/atom/movable/screen/movable/spell_master/new_spell_master = new master_type //we're here because either we didn't find our type, or we have no spell masters to attach to diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index 2b2518b893..842fa9e8ec 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -173,7 +173,7 @@ if(computer && program.can_run(ui.user, 1)) id_card.assignment = "Dismissed" //VOREStation Edit: setting adjustment id_card.access = list() - callHook("terminate_employee", list(id_card)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_TERMINATE_EMPLOYEE_IDCARD, id_card) . = TRUE if("reg") if(computer && program.can_run(ui.user, 1)) @@ -217,7 +217,7 @@ id_card.assignment = t1 id_card.rank = t1 - callHook("reassign_employee", list(id_card)) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_REASSIGN_EMPLOYEE_IDCARD, id_card) . = TRUE if("access") if(computer && program.can_run(ui.user, 1))