mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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() + "<br>"
|
||||
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.
|
||||
*/
|
||||
|
||||
@@ -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 <b>Quit This Round</b> verb in the OOC tab to free your job slot. Otherwise, you can use the <b>Notify Transcore</b> verb to let medical know you need resleeving, or <b>Find Auto Resleever</b> 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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 <b>Quit This Round</b> verb in the OOC tab to free your job slot. Otherwise, you can use the <b>Notify Transcore</b> verb to let medical know you need resleeving, or <b>Find Auto Resleever</b> 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))
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user