From 11a33956907689b631889e4545f319c6b11c0c31 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Mon, 25 Sep 2017 01:41:48 +0300 Subject: [PATCH] Tiny batch of Initialize() fixes, mostly stuff that isn't around at roundstart --- .../miniantags/abduction/abduction_gear.dm | 2 +- code/game/objects/effects/spawners/bundle.dm | 2 +- .../effects/spawners/xeno_egg_delivery.dm | 2 +- code/game/objects/items/holy_weapons.dm | 6 +- .../objects/structures/ghost_role_spawners.dm | 2 +- code/game/turfs/simulated/chasm.dm | 2 +- code/modules/jobs/job_types/security.dm | 88 +++++++++++++++++++ .../mob/living/simple_animal/parrot.dm | 2 +- 8 files changed, 96 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index c55b4db407..8c6bf1a8aa 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -532,7 +532,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/abductor/Initialize(mapload) - ..() + . = ..() make_syndie() /obj/item/device/radio/headset/abductor/attackby(obj/item/W, mob/user, params) diff --git a/code/game/objects/effects/spawners/bundle.dm b/code/game/objects/effects/spawners/bundle.dm index cfe8761b84..be32f0df19 100644 --- a/code/game/objects/effects/spawners/bundle.dm +++ b/code/game/objects/effects/spawners/bundle.dm @@ -12,7 +12,7 @@ var/turf/T = get_turf(src) for(var/path in items) new path(T) - qdel(src) + return INITIALIZE_HINT_QDEL /obj/effect/spawner/bundle/costume/chicken name = "chicken costume spawner" diff --git a/code/game/objects/effects/spawners/xeno_egg_delivery.dm b/code/game/objects/effects/spawners/xeno_egg_delivery.dm index a452dae749..593c953adf 100644 --- a/code/game/objects/effects/spawners/xeno_egg_delivery.dm +++ b/code/game/objects/effects/spawners/xeno_egg_delivery.dm @@ -17,4 +17,4 @@ log_game("An alien egg has been delivered to [A] at [COORD(T)]") var/message = "Attention [station_name()], we have entrusted you with a research specimen in [A]. Remember to follow all safety precautions when dealing with the specimen." SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/addtimer, CALLBACK(GLOBAL_PROC, /.proc/print_command_report, message), announcement_time)) - qdel(src) + return INITIALIZE_HINT_QDEL diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 417fa670cc..1badef90cf 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -383,12 +383,10 @@ flags_2 = SLOWS_WHILE_IN_HAND_2 /obj/item/nullrod/tribal_knife/Initialize(mapload) - ..() - -/obj/item/nullrod/tribal_knife/New() - ..() + . = ..() START_PROCESSING(SSobj, src) + /obj/item/nullrod/tribal_knife/Destroy() STOP_PROCESSING(SSobj, src) . = ..() diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 3bc5c2e762..59aaaca12b 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -122,7 +122,7 @@ golems, so that no golem may ever be forced to serve again." /obj/effect/mob_spawn/human/golem/Initialize(mapload, datum/species/golem/species = null, mob/creator = null) - ..() + . = ..() if(species) name += " ([initial(species.prefix)])" mob_species = species diff --git a/code/game/turfs/simulated/chasm.dm b/code/game/turfs/simulated/chasm.dm index da92d6b9dd..3fdd6b1cc9 100644 --- a/code/game/turfs/simulated/chasm.dm +++ b/code/game/turfs/simulated/chasm.dm @@ -125,7 +125,7 @@ /turf/open/chasm/straight_down/Initialize() - ..() + . = ..() drop_x = x drop_y = y if(z+1 <= world.maxz) diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm index 84623873e8..a64d6e5387 100644 --- a/code/modules/jobs/job_types/security.dm +++ b/code/modules/jobs/job_types/security.dm @@ -230,6 +230,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S if(SEC_DEPT_SCIENCE) ears = /obj/item/device/radio/headset/headset_sec/alt/department/sci dep_access = list(ACCESS_RESEARCH) +<<<<<<< HEAD destination = /area/security/checkpoint/science spawn_point = locate(/obj/effect/landmark/start/depsec/science) in GLOB.department_security_spawns accessory = /obj/item/clothing/accessory/armband/science @@ -315,3 +316,90 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S /obj/item/device/radio/headset/headset_sec/alt/department/sci keyslot = new /obj/item/device/encryptionkey/headset_sec keyslot2 = new /obj/item/device/encryptionkey/headset_sci +======= + destination = /area/security/checkpoint/science + spawn_point = locate(/obj/effect/landmark/start/depsec/science) in GLOB.department_security_spawns + accessory = /obj/item/clothing/accessory/armband/science + + if(accessory) + var/obj/item/clothing/under/U = H.w_uniform + U.attach_accessory(new accessory) + if(ears) + if(H.ears) + qdel(H.ears) + H.equip_to_slot_or_del(new ears(H),slot_ears) + + var/obj/item/card/id/W = H.wear_id + W.access |= dep_access + + var/teleport = 0 + if(!config.sec_start_brig) + if(destination || spawn_point) + teleport = 1 + if(teleport) + var/turf/T + if(spawn_point) + T = get_turf(spawn_point) + H.Move(T) + else + var/safety = 0 + while(safety < 25) + T = safepick(get_area_turfs(destination)) + if(T && !H.Move(T)) + safety += 1 + continue + else + break + if(department) + to_chat(M, "You have been assigned to [department]!") + else + to_chat(M, "You have not been assigned to any department. Patrol the halls and help where needed.") + + + +/datum/outfit/job/security + name = "Security Officer" + jobtype = /datum/job/officer + + belt = /obj/item/device/pda/security + ears = /obj/item/device/radio/headset/headset_sec/alt + uniform = /obj/item/clothing/under/rank/security + gloves = /obj/item/clothing/gloves/color/black + head = /obj/item/clothing/head/helmet/sec + suit = /obj/item/clothing/suit/armor/vest/alt + shoes = /obj/item/clothing/shoes/jackboots + l_pocket = /obj/item/restraints/handcuffs + r_pocket = /obj/item/device/assembly/flash/handheld + suit_store = /obj/item/gun/energy/e_gun/advtaser + backpack_contents = list(/obj/item/melee/baton/loaded=1) + + backpack = /obj/item/storage/backpack/security + satchel = /obj/item/storage/backpack/satchel/sec + duffelbag = /obj/item/storage/backpack/duffelbag/sec + box = /obj/item/storage/box/security + + implants = list(/obj/item/implant/mindshield) + + +/obj/item/device/radio/headset/headset_sec/alt/department/Initialize() + . = ..() + wires = new/datum/wires/radio(src) + secure_radio_connections = new + recalculateChannels() + +/obj/item/device/radio/headset/headset_sec/alt/department/engi + keyslot = new /obj/item/device/encryptionkey/headset_sec + keyslot2 = new /obj/item/device/encryptionkey/headset_eng + +/obj/item/device/radio/headset/headset_sec/alt/department/supply + keyslot = new /obj/item/device/encryptionkey/headset_sec + keyslot2 = new /obj/item/device/encryptionkey/headset_cargo + +/obj/item/device/radio/headset/headset_sec/alt/department/med + keyslot = new /obj/item/device/encryptionkey/headset_sec + keyslot2 = new /obj/item/device/encryptionkey/headset_med + +/obj/item/device/radio/headset/headset_sec/alt/department/sci + keyslot = new /obj/item/device/encryptionkey/headset_sec + keyslot2 = new /obj/item/device/encryptionkey/headset_sci +>>>>>>> f14c719... Tiny batch of Initialize() fixes, mostly stuff that isn't around at roundstart (#30980) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 8f08742f78..6357f83286 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -972,7 +972,7 @@ /mob/living/simple_animal/parrot/Poly/ghost/Initialize() memory_saved = TRUE //At this point nothing is saved - ..() + . = ..() /mob/living/simple_animal/parrot/Poly/ghost/handle_automated_speech() if(ismob(loc))