From d82d0807a528dd2076d73ddaaaf34f6b333036af Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:40:35 -0700 Subject: [PATCH] [MIRROR] Polaris Hook Removal Part 1 (#11887) Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: C.L. --- 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/aurora_caelus.dm | 2 +- code/modules/events/ian_storm_vr.dm | 4 +- code/modules/events/prison_break.dm | 2 +- code/modules/events/radiation_storm.dm | 4 +- code/modules/events/rogue_drones.dm | 2 +- code/modules/events/solar_storm.dm | 6 +- code/modules/events/supply_demand_vr.dm | 19 +++-- code/modules/events/wallrot.dm | 2 +- code/modules/events/wormholes.dm | 2 +- 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 +- maps/~map_system/maps.dm | 1 + modular_chomp/maps/cetus/cetus_defines.dm | 1 + .../maps/soluna_nexus/soluna_nexus_defines.dm | 1 + .../southern_cross/southern_cross_defines.dm | 1 + modular_chomp/maps/~map_system/maps.dm | 1 + 52 files changed, 198 insertions(+), 286 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 cedd9e1b44..3088a8e4b9 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -1653,6 +1653,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 cb923220f3..359e7cffe6 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -85,10 +85,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 0b4bd89943..7deb155103 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 d3788fbfe4..7221fc31a8 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -67,8 +67,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 @@ -79,10 +79,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) @@ -90,11 +90,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 55030637cb..1fde558fb6 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -213,9 +213,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)) @@ -326,7 +351,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 072de4d747..f6c6c77b52 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 ec2aabb2f3..ecea942976 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -194,7 +194,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 @@ -220,7 +220,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 633dc87033..6228227c9c 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -392,14 +392,14 @@ var/list/whitelisted_positions = list( 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 d616f76d02..3ecc53270b 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -70,6 +70,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/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 899b72f5de..673cf4cfe3 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -5,7 +5,7 @@ endWhen = 126 /datum/event/aurora_caelus/announce() - command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull. \ + command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your [using_map.facility_type], and will exhaust their energy battering the hull. \ Nanotrasen has approved a short break for all employees to relax and observe this very rare event. \ During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \ Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \ diff --git a/code/modules/events/ian_storm_vr.dm b/code/modules/events/ian_storm_vr.dm index a3a2642157..6b10cde357 100644 --- a/code/modules/events/ian_storm_vr.dm +++ b/code/modules/events/ian_storm_vr.dm @@ -4,9 +4,9 @@ endWhen = 3 /datum/event/ianstorm/announce() - command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") //CHOMPedit: removes announcement .ogg + command_announcement.Announce("It has come to our attention that the [using_map.facility_type] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") //CHOMPedit: removes announcement .ogg spawn(7 SECONDS) - command_announcement.Announce("Wait. No, that's wrong. The station passed through an IAN storm!.", "Ian Alert") + command_announcement.Announce("Wait. No, that's wrong. The [using_map.facility_type] passed through an IAN storm!.", "Ian Alert") /datum/event/ianstorm/start() spawn() diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 6b9acf43e5..757253bc0c 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -37,7 +37,7 @@ /datum/event/prison_break/announce() if(areas && areas.len > 0) - command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert") + command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Involvement of [using_map.facility_type] AI is recommended.", "[eventDept] Alert") /datum/event/prison_break/start() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 7aba84cf65..c3f2e520d0 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -16,7 +16,7 @@ /datum/event/radiation_storm/tick() if(activeFor == enterBelt) - command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") //CHOMPEdit: Restored original message + command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") //CHOMPEdit: Restored original message radiate() if(activeFor >= enterBelt && activeFor <= leaveBelt) @@ -27,7 +27,7 @@ radiate() else if(activeFor == leaveBelt) - command_announcement.Announce("The station has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") //CHOMPEdit: Restored original message + command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") //CHOMPEdit: Restored original message /datum/event/radiation_storm/proc/radiate() var/radiation_level = rand(15, 35) for(var/z in using_map.station_levels) diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 57805fcd7a..726d889dd0 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -35,7 +35,7 @@ if(4) msg = "A passing derelict ship's drone defense systems have just activated. If any are sighted in the area, use caution." //CHOMPStation Edit: Restored original message. if(5) - msg = "We're detecting a swarm of small objects approaching your station. Most likely a bunch of drones. Please exercise caution if you see any." + msg = "We're detecting a swarm of small objects approaching your [using_map.facility_type]. Most likely a bunch of drones. Please exercise caution if you see any." //CHOMPStation Edit End command_announcement.Announce(msg, "Rogue drone alert") diff --git a/code/modules/events/solar_storm.dm b/code/modules/events/solar_storm.dm index 3443e056cc..f5daf76fe3 100644 --- a/code/modules/events/solar_storm.dm +++ b/code/modules/events/solar_storm.dm @@ -9,7 +9,7 @@ endWhen = startWhen + rand(30,90) + rand(30,90) //2-6 minute duration /datum/event/solar_storm/announce() - command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the station.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') + command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the [using_map.facility_type].", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') adjust_solar_output(1.5) /datum/event/solar_storm/proc/adjust_solar_output(var/mult = 1) @@ -18,7 +18,7 @@ /datum/event/solar_storm/start() - command_announcement.Announce("The solar storm has reached the station. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert") + command_announcement.Announce("The solar storm has reached the [using_map.facility_type]. Please refrain from EVA and remain inside the [using_map.facility_type] until it has passed.", "Anomaly Alert") adjust_solar_output(5) @@ -40,7 +40,7 @@ L.rad_act(rand(15, 30)) /datum/event/solar_storm/end() - command_announcement.Announce("The solar storm has passed the station. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert") + command_announcement.Announce("The solar storm has passed the [using_map.facility_type]. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert") adjust_solar_output() diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index d4205a4527..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 // @@ -62,7 +57,8 @@ send_console_message(message, dpt); // Also announce over main comms so people know to look - command_announcement.Announce("An order for the station to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department) + 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/events/wallrot.dm b/code/modules/events/wallrot.dm index 0cce794536..f25c917a67 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -18,7 +18,7 @@ /datum/event/wallrot/announce() if(center) - command_announcement.Announce("Harmful fungi detected on \the [station_name()]. Hull integrity near [center.loc.name] may be compromised.", "Hazardous Biomass") + command_announcement.Announce("Harmful fungi detected on \the [station_name()]. Hull integrity near [center.loc.name] may be compromised.", "Hazardous Biomass") //CHOMPEdit - Wording // Chomp edit - Better wording as to what the hell it actually does. /datum/event/wallrot/start() diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index a9581341c5..3ff2cf6b7b 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -6,4 +6,4 @@ wormhole_event() /datum/event/wormholes/end() - command_announcement.Announce("There are no more space-time anomalies detected on the station.", "Anomaly Alert") + command_announcement.Announce("There are no more space-time anomalies detected on the [using_map.facility_type].", "Anomaly Alert") 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 c60615a4f2..c7acb4e306 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) || istype(loc, /obj/item/clothing/shoes)) deathmessage = "no message" //VOREStation Add - Prevents death messages from inside mobs - CHOMPEdit: Added in-shoe as well //CHOMPAdd Start - Muffle original body death on Mob TF death if(src.loc && isliving(loc)) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index a725390b18..d07542e221 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 53ea364334..2a10807e16 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 8ab4f57d69..620ce48d64 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -189,7 +189,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 1fc4574ab6..3c00b47b58 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 12346cd151..63899e88ab 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 296a2220ed..1b1c2c1db2 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 2b34798d9e..6df86920fe 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -202,6 +202,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 1c2a470577..6752d6f1cd 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 342495a61a..1fc90ab0ea 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)) diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 7c317f60bb..08fb5d5463 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -85,6 +85,7 @@ var/list/all_maps = list() var/station_name = "BAD Station" var/station_short = "Baddy" + var/facility_type = "facility" var/dock_name = "THE PirateBay" var/dock_type = "station" //VOREStation Edit - for a list of valid types see the switch block in air_traffic.dm at line 148 var/boss_name = "Captain Roger" diff --git a/modular_chomp/maps/cetus/cetus_defines.dm b/modular_chomp/maps/cetus/cetus_defines.dm index ad9faf0176..bc23b09703 100644 --- a/modular_chomp/maps/cetus/cetus_defines.dm +++ b/modular_chomp/maps/cetus/cetus_defines.dm @@ -16,6 +16,7 @@ station_name = "NSS Cetus" station_short = "Cetus Station" + facility_type = "station" dock_name = "NCS Northern Star" boss_name = "Central Command" boss_short = "Centcom" diff --git a/modular_chomp/maps/soluna_nexus/soluna_nexus_defines.dm b/modular_chomp/maps/soluna_nexus/soluna_nexus_defines.dm index e827e9e4cf..5a9c2e8aa5 100644 --- a/modular_chomp/maps/soluna_nexus/soluna_nexus_defines.dm +++ b/modular_chomp/maps/soluna_nexus/soluna_nexus_defines.dm @@ -17,6 +17,7 @@ station_name = "NLS Soluna Nexus" station_short = "Soluna Nexus" + facility_type = "station" dock_name = "NCS Northern Star" // Now we're the centcom! boss_name = "Central Command" boss_short = "Centcom" diff --git a/modular_chomp/maps/southern_cross/southern_cross_defines.dm b/modular_chomp/maps/southern_cross/southern_cross_defines.dm index 5719c38f7f..3df63460b1 100644 --- a/modular_chomp/maps/southern_cross/southern_cross_defines.dm +++ b/modular_chomp/maps/southern_cross/southern_cross_defines.dm @@ -18,6 +18,7 @@ station_name = "NLS Southern Cross" station_short = "Southern Cross" + facility_type = "station" dock_name = "NCS Northern Star" // Now we're the centcom! boss_name = "Central Command" boss_short = "Centcom" diff --git a/modular_chomp/maps/~map_system/maps.dm b/modular_chomp/maps/~map_system/maps.dm index b4e2e1ae80..8000a859bb 100644 --- a/modular_chomp/maps/~map_system/maps.dm +++ b/modular_chomp/maps/~map_system/maps.dm @@ -84,6 +84,7 @@ var/list/all_maps = list() var/station_name = "BAD Station" var/station_short = "Baddy" + var/facility_type = "station" //CHOMPEdit - Default to station instead of "facility" var/dock_name = "THE PirateBay" var/dock_type = "station" //VOREStation Edit - for a list of valid types see the switch block in air_traffic.dm at line 148 var/boss_name = "Captain Roger"