diff --git a/code/__defines/materials.dm b/code/__defines/materials.dm index 2ab6e59073..e714c46dad 100644 --- a/code/__defines/materials.dm +++ b/code/__defines/materials.dm @@ -68,6 +68,7 @@ #define MAT_FLESH "flesh" #define MAT_FANCYBLACK "fancyblack" #define MAT_FOAM "foam" +#define MAT_FLOKIUM "flockium" // cloth materials #define MAT_WOOL "wool" diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index 9b7647917c..1480bf3d39 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -99,6 +99,8 @@ #define LANGUAGE_ZADDAT "Vedahq" #define LANGUAGE_PROMETHEAN "Promethean Biolinguistics" #define LANGUAGE_GIBBERISH "Babel" +#define LANGUAGE_ROBOT_TALK "Robot Talk" +#define LANGUAGE_DRONE_TALK "Drone Talk" // Language flags. #define WHITELISTED 1 // Language is available if the speaker is whitelisted. diff --git a/code/__defines/species_languages_vr.dm b/code/__defines/species_languages_vr.dm index aa0d97e5ed..76a8d7e0f8 100644 --- a/code/__defines/species_languages_vr.dm +++ b/code/__defines/species_languages_vr.dm @@ -21,3 +21,6 @@ #define LANGUAGE_LLEILL "Glamour Speak" #define LANGUAGE_SPARKLE "Sparkle" + +#define LANGUAGE_XENOLINGUA "Xenomorph" +#define LANGUAGE_HIVEMIND "Hivemind" diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index ce4dd583ad..9d74c4338c 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -157,6 +157,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_TICKER -50 #define INIT_ORDER_MAPRENAME -60 //Initiating after Ticker to ensure everything is loaded and everything we rely on us working #define INIT_ORDER_WIKI -61 +#define INIT_ORDER_ATC -70 #define INIT_ORDER_STATPANELS -98 #define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. diff --git a/code/_helpers/turfs.dm b/code/_helpers/turfs.dm index 515370c50d..47d6995e4d 100644 --- a/code/_helpers/turfs.dm +++ b/code/_helpers/turfs.dm @@ -121,7 +121,7 @@ if(istype(T,/turf/simulated/shuttle)) shuttlework = 1 var/turf/simulated/shuttle/SS = T - if(!SS.landed_holder) SS.landed_holder = new(turf = SS) + if(!SS.landed_holder) SS.landed_holder = new(SS) X = SS.landed_holder.land_on(B) //Generic non-shuttle turf move. diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index b9c7fca4bd..5158b76f6c 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -757,7 +757,7 @@ Turf and target are seperate in case you want to teleport some distance from a t if(istype(T,/turf/simulated/shuttle)) shuttlework = 1 var/turf/simulated/shuttle/SS = T - if(!SS.landed_holder) SS.landed_holder = new(turf = SS) + if(!SS.landed_holder) SS.landed_holder = new(SS) X = SS.landed_holder.land_on(B) //Generic non-shuttle turf move. diff --git a/code/controllers/subsystems/air_traffic.dm b/code/controllers/subsystems/air_traffic.dm index d39362a38d..a4e094eece 100644 --- a/code/controllers/subsystems/air_traffic.dm +++ b/code/controllers/subsystems/air_traffic.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(atc) priority = FIRE_PRIORITY_ATC runlevels = RUNLEVEL_GAME wait = 2 SECONDS + init_order = INIT_ORDER_ATC flags = SS_BACKGROUND VAR_PRIVATE/next_tick = 0 diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 9df8da605f..941529e67d 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -60,7 +60,7 @@ var/global/datum/controller/subsystem/ticker/ticker "url" = get_world_url() ) ) - GLOB.autospeaker = new (null, null, null, 1) //Set up Global Announcer + GLOB.autospeaker = new (null, FALSE, null, null, TRUE) //Set up Global Announcer return SS_INIT_SUCCESS /datum/controller/subsystem/ticker/fire(resumed = FALSE) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index a6f844c79d..702004d2ba 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -92,6 +92,7 @@ // Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE // Must return an Initialize hint. Defined in code/__defines/subsystems.dm /atom/proc/Initialize(mapload, ...) + SHOULD_CALL_PARENT(TRUE) if(QDELETED(src)) stack_trace("GC: -- [type] had initialize() called after qdel() --") if(flags & ATOM_INITIALIZED) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index d6e0e25369..57c6ab6dde 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -739,7 +739,7 @@ var/global/datum/controller/occupations/job_master confirm = tgui_alert(pred, "[C.prefs.real_name] is attempting to spawn into your [vore_spawn_gut]. Let them?", "Confirm", list("No", "Yes")) if(confirm != "Yes") to_chat(C, span_warning("[pred] has declined your spawn request.")) - var/message = sanitizeSafe(input(pred,"Do you want to leave them a message?")as text|null) + var/message = sanitizeSafe(tgui_input_text(pred,"Do you want to leave them a message?", "Notify Prey")) if(message) to_chat(C, span_notice("[pred] message : [message]")) return @@ -816,7 +816,7 @@ var/global/datum/controller/occupations/job_master confirm = tgui_alert(prey, "[C.prefs.real_name] is attempting to televore you into their [vore_spawn_gut]. Let them?", "Confirm", list("No", "Yes")) if(confirm != "Yes") to_chat(C, span_warning("[prey] has declined your spawn request.")) - var/message = sanitizeSafe(input(prey,"Do you want to leave them a message?")as text|null) + var/message = sanitizeSafe(tgui_input_text(prey,"Do you want to leave them a message?", "Notify Pred")) if(message) to_chat(C, span_notice("[prey] message : [message]")) return @@ -900,7 +900,7 @@ var/global/datum/controller/occupations/job_master var/confirm = tgui_alert(carrier, "[C.prefs.real_name] is attempting to join as the [item_name] in your possession.", "Confirm", list("No", "Yes")) if(confirm != "Yes") to_chat(C, span_warning("[carrier] has declined your spawn request.")) - var/message = sanitizeSafe(input(carrier,"Do you want to leave them a message?")as text|null) + var/message = sanitizeSafe(tgui_input_text(carrier,"Do you want to leave them a message?", "Notify Spawner")) if(message) to_chat(C, span_notice("[carrier] message : [message]")) return diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index fe58ac783c..797314db07 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -179,7 +179,7 @@ if(open_for_latejoin) empty_playable_ai_cores += D else - var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain ) + var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, FALSE, laws, brain) if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created A.rename_self("ai", 1) for(var/datum/language/L in brain.brainmob.languages) diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index 55c5d751d9..a3c6d9c827 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -191,7 +191,7 @@ /datum/file/program/card_comp/proc/authenticate() if(access_change_ids in reader.GetAccess()) return 1 - if(istype(usr,/mob/living/silicon/ai)) + if(isAI(usr)) return 1 return 0 diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index e3031bffcf..3a1f6a08ca 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -40,7 +40,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED var/power_per_hologram = 500 //per usage per hologram idle_power_usage = 5 use_power = USE_POWER_IDLE - var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad + var/list/mob/living/silicon/ai/masters = list() //List of AIs that use the holopad var/last_request = 0 //to prevent request spam. ~Carn var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. diff --git a/code/game/machinery/upgrade_machinery.dm b/code/game/machinery/upgrade_machinery.dm deleted file mode 100644 index 110832244d..0000000000 --- a/code/game/machinery/upgrade_machinery.dm +++ /dev/null @@ -1,39 +0,0 @@ -// Handles automagically upgrades to machines based on components placed on a machine during map init -/obj/machinery/Initialize(mapload) - . = ..() - // Handles automagically upgrades to machines based on components placed on a machine during map init - if(mapload) - spawn(100) - // Sanity checks - if(!QDELETED(src) && isturf(loc)) - handle_mapped_upgrades() -// This is meant to be overridden per machine -/obj/machinery/proc/handle_mapped_upgrades() - return -// Each machine is a special snowflake... sadly. -/obj/machinery/power/smes/buildable/handle_mapped_upgrades() - // Detect new coils placed by mappers - var/list/parts_found = list() - for(var/i = 1, i <= loc.contents.len, i++) - var/obj/item/W = loc.contents[i] - if(istype(W, /obj/item/smes_coil)) - parts_found.Add(W) - // If any coils are on us, clear base coils and rebuild using these ones - if(parts_found.len == 0) - return - while(TRUE) - var/obj/item/smes_coil/C = locate(/obj/item/smes_coil) in component_parts - if(isnull(C)) - break - component_parts.Remove(C) - C.forceMove(src.loc) - qdel(C) - cur_coils-- - // Rebuild from mapper's coils - for(var/i = 1, i <= parts_found.len, i++) - if (cur_coils < max_coils) - var/obj/item/W = parts_found[i] - cur_coils++ - component_parts.Add(W) - W.forceMove(src) - RefreshParts() diff --git a/code/game/objects/effects/decals/Cleanable/vore.dm b/code/game/objects/effects/decals/Cleanable/vore.dm index 904eed546c..6378cfb4b5 100644 --- a/code/game/objects/effects/decals/Cleanable/vore.dm +++ b/code/game/objects/effects/decals/Cleanable/vore.dm @@ -13,7 +13,8 @@ var/custombasedesc = null var/custombasecolor = null -/obj/effect/decal/cleanable/blood/reagent/New(var/spill_name, var/spill_color, var/spill_reagentid, var/new_amount, var/ckey_user, var/ckey_spawn) +/obj/effect/decal/cleanable/blood/reagent/Initialize(mapload, var/spill_name, var/spill_color, var/spill_reagentid, var/new_amount, var/ckey_user, var/ckey_spawn) + . = ..() switch(spill_reagentid) //To ensure that if people spill some liquids, it wont cause issues with spawning, like spilling blood. Also allow for spilling of certain things to if("blood") return diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 2f0afcffca..e76574afe6 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -18,14 +18,14 @@ var/poster_type = /obj/structure/sign/poster -/obj/item/contraband/poster/New(turf/loc, var/given_serial = 0) +/obj/item/contraband/poster/Initialize(mapload, var/given_serial = 0) if(!serial_number) if(given_serial == 0) serial_number = rand(1, poster_designs.len) else serial_number = given_serial name += " - No. [serial_number]" - ..(loc) + . = ..() //Places the poster on a wall /obj/item/contraband/poster/afterattack(var/atom/A, var/mob/user, var/adjacent, var/clickparams) @@ -83,12 +83,12 @@ icon_state = "rolled_poster_nt" poster_type = /obj/structure/sign/poster/nanotrasen -/obj/item/contraband/poster/nanotrasen/New(turf/loc, var/given_serial = 0) +/obj/item/contraband/poster/nanotrasen/Initialize(mapload, var/given_serial = 0) if(given_serial == 0) serial_number = rand(1, NT_poster_designs.len) else serial_number = given_serial - ..(loc) + . = ..() //Selectable subtype /obj/item/contraband/poster/custom @@ -96,12 +96,12 @@ desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. This one is made from some kind of e-paper, and could display almost anything!" poster_type = /obj/structure/sign/poster/custom -/obj/item/contraband/poster/custom/New(turf/loc, var/given_serial = 0) +/obj/item/contraband/poster/custom/Initialize(mapload, var/given_serial = 0) if(given_serial == 0) serial_number = 1 //Decidedly unrandom else serial_number = given_serial - ..(loc) + . = ..() /obj/item/contraband/poster/custom/verb/select_poster() set name = "Set Poster type" @@ -137,8 +137,8 @@ var/roll_type var/poster_set = FALSE -/obj/structure/sign/poster/New(var/newloc, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster) - ..(newloc) +/obj/structure/sign/poster/Initialize(mapload, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster) + . = ..() if(!serial) serial = rand(1, poster_designs.len) //use a random serial if none is given @@ -226,7 +226,7 @@ /obj/structure/sign/poster/nanotrasen roll_type = /obj/item/contraband/poster/nanotrasen -/obj/structure/sign/poster/nanotrasen/New(var/newloc, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster/nanotrasen) +/obj/structure/sign/poster/nanotrasen/Initialize(mapload, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster/nanotrasen) if(!serial) serial = rand(1, NT_poster_designs.len) @@ -234,7 +234,7 @@ var/datum/poster/design = NT_poster_designs[serial_number] set_poster(design) - ..(newloc, placement_dir, serial, itemtype) + . = ..(mapload, placement_dir, serial, itemtype) //Non-Random Posters diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 43a4a87240..6ebc3cbb7b 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -71,13 +71,13 @@ delete_me = TRUE //VORE Station Add End - landmarks_list += src - if(delete_me) return INITIALIZE_HINT_QDEL + else + landmarks_list += src /obj/effect/landmark/Destroy(var/force = FALSE) - if(delete_me || force) + if(force) landmarks_list -= src return ..() return QDEL_HINT_LETMELIVE diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index 14fd9fe349..9f40bbca89 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -44,14 +44,14 @@ name = "TTV bomb - proximity" assembly_type = /obj/item/assembly/prox_sensor -/obj/effect/spawner/newbomb/radio/custom/New(var/newloc, ph, ox, co) +/obj/effect/spawner/newbomb/radio/custom/Initialize(mapload, ph, ox, co) if(ph != null) phoron_amt = ph if(ox != null) oxygen_amt = ox if(co != null) carbon_amt = co - ..() + . = ..() /obj/effect/spawner/newbomb/Initialize(mapload) - ..() + . = ..() var/obj/item/transfer_valve/V = new(src.loc) var/obj/item/tank/phoron/PT = new(V) var/obj/item/tank/oxygen/OT = new(V) @@ -100,8 +100,8 @@ var/phoron_amt = 0 var/oxygen_amt = 0 -/obj/effect/spawner/onetankbomb/New(newloc) //just needs an assembly. - ..(newloc) +/obj/effect/spawner/onetankbomb/Initialize(mapload) //just needs an assembly. + . = ..() var/type = pick(/obj/item/tank/phoron/onetankbomb, /obj/item/tank/oxygen/onetankbomb) new type(src.loc) @@ -116,8 +116,8 @@ // var/assembly_type = /obj/item/assembly/signaler //Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol. -/obj/effect/spawner/onetankbomb/full/New(newloc) //just needs an assembly. - ..(newloc) +/obj/effect/spawner/onetankbomb/full/Initialize(mapload) //just needs an assembly. + . = ..() var/type = pick(/obj/item/tank/phoron/onetankbomb/full, /obj/item/tank/oxygen/onetankbomb/full) new type(src.loc) @@ -132,8 +132,8 @@ // var/assembly_type = /obj/item/assembly/signaler //Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol. -/obj/effect/spawner/onetankbomb/full/New(newloc) //just needs an assembly. - ..(newloc) +/obj/effect/spawner/onetankbomb/full/Initialize(mapload) //just needs an assembly. + . = ..() var/type = pick(/obj/item/tank/phoron/onetankbomb/full, /obj/item/tank/oxygen/onetankbomb/full) new type(src.loc) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index acc74efbd0..65fd34b9a8 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -287,7 +287,7 @@ But for now, for what it's been used for, it works. return if(Mtarget) H.forceMove(Mtarget.loc) - var/obj/locker = new /obj/structure/closet/secure_closet/mind(target.loc, mind_target = H.mind) + var/obj/locker = new /obj/structure/closet/secure_closet/mind(target.loc, H.mind) for(var/obj/item/W in H) if(istype(W, /obj/item/implant/backup || istype(W, /obj/item/nif))) continue @@ -345,5 +345,6 @@ But for now, for what it's been used for, it works. name = "Autostrip target to send mobs to." /obj/effect/autostriptarget/mob/Initialize(mapload) + . = ..() if(targetid) GLOB.mapped_autostrips_mob[targetid] = src diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 28fcf7ef40..d8bbc60462 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -50,11 +50,11 @@ /obj/item/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel) if(channel == "special") if(translate_binary) - var/datum/language/binary = GLOB.all_languages["Robot Talk"] + var/datum/language/binary = GLOB.all_languages[LANGUAGE_ROBOT_TALK] binary.broadcast(M, M.strip_prefixes(multilingual_to_message(message_pieces))) return RADIO_CONNECTION_NON_SUBSPACE if(translate_hive) - var/datum/language/hivemind = GLOB.all_languages["Hivemind"] + var/datum/language/hivemind = GLOB.all_languages[LANGUAGE_HIVEMIND] hivemind.broadcast(M, M.strip_prefixes(multilingual_to_message(message_pieces))) return RADIO_CONNECTION_NON_SUBSPACE return RADIO_CONNECTION_FAIL diff --git a/code/game/objects/items/falling_object_attack_vr.dm b/code/game/objects/items/falling_object_attack_vr.dm index bfd9dc22dd..b9537f7ca0 100644 --- a/code/game/objects/items/falling_object_attack_vr.dm +++ b/code/game/objects/items/falling_object_attack_vr.dm @@ -7,6 +7,7 @@ icon_state = "drop_marker" /obj/effect/calldown_attack/Initialize(mapload) + . = ..() var/delay = rand(25, 30) addtimer(CALLBACK(src, PROC_REF(spawn_object)), delay-7) @@ -26,7 +27,7 @@ icon = 'icons/effects/random_stuff_vr.dmi' /obj/effect/illusionary_fall/Initialize(mapload) - .=..() + . = ..() icon_state = "[rand(1,33)]" /obj/effect/illusionary_fall/end_fall(var/crushing = FALSE) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 77a550ee3d..7c5d4bc617 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -192,7 +192,7 @@ to_chat(user, span_warning("This [W] does not seem to fit.")) return - var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1) + var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), FALSE, TRUE) if(!O) return user.drop_item() diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 445820d220..f8023ae8e3 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -37,7 +37,8 @@ light_impact = 7 flash_range = 7 -/obj/item/syndie/c4explosive/New() +/obj/item/syndie/c4explosive/Initialize(mapload) + . = ..() var/K = rand(1,2000) K = md5(num2text(K)+name) K = copytext(K,1,7) @@ -51,8 +52,11 @@ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1) for(var/mob/O in hearers(src, null)) O.show_message("[icon2html(src, O.client)] " + span_warning(" The [src.name] beeps!")) - sleep(50) - explosion(get_turf(src), devastate, heavy_impact, light_impact, flash_range) + addtimer(CALLBACK(src, PROC_REF(do_detonate)), 5 SECONDS, TIMER_DELETE_ME) + +/obj/item/syndie/c4explosive/proc/do_detonate() + SHOULD_NOT_OVERRIDE(TRUE) + PRIVATE_PROC(TRUE) for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. var/turf/simulated/wall/T = get_step(src,dirn) if(locate(/obj/machinery/door/airlock) in T) diff --git a/code/game/objects/structures/barricades.dm b/code/game/objects/structures/barricades.dm index 0883fd26ad..209cc0cf79 100644 --- a/code/game/objects/structures/barricades.dm +++ b/code/game/objects/structures/barricades.dm @@ -10,14 +10,13 @@ var/maxhealth = 100 var/datum/material/material -/obj/structure/barricade/New(var/newloc, var/material_name) - ..(newloc) +/obj/structure/barricade/Initialize(mapload, var/material_name) + . = ..() if(!material_name) material_name = MAT_WOOD material = get_material_by_name("[material_name]") if(!material) - qdel(src) - return + return INITIALIZE_HINT_QDEL name = "[material.display_name] barricade" desc = "This space is blocked off by a barricade made of [material.display_name]." color = material.icon_colour @@ -116,16 +115,11 @@ icon = 'icons/obj/sandbags.dmi' icon_state = "blank" -/obj/structure/barricade/sandbag/New(var/newloc, var/material_name) +/obj/structure/barricade/sandbag/Initialize(mapload, var/material_name) if(!material_name) material_name = MAT_CLOTH - ..(newloc, material_name) - material = get_material_by_name("[material_name]") - if(!material) - qdel(src) - return + . = ..(mapload, material_name) name = "[material.display_name] [initial(name)]" - desc = "This space is blocked off by a barricade made of [material.display_name]." color = null maxhealth = material.integrity * 2 // These things are, commonly, used to stop bullets where possible. health = maxhealth diff --git a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm index 055b544310..1c434fac44 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm @@ -49,15 +49,13 @@ else add_overlay("open") -//VOREStation Add Start /obj/structure/closet/secure_closet/guncabinet/excursion name = "expedition weaponry cabinet" req_one_access = list(access_armory) -/obj/structure/closet/secure_closet/guncabinet/excursion/New() - ..() +/obj/structure/closet/secure_closet/guncabinet/excursion/Initialize(mapload) + . = ..() for(var/i = 1 to 2) new /obj/item/gun/energy/locked/frontier(src) for(var/i = 1 to 2) new /obj/item/gun/energy/locked/frontier/holdout(src) -//VOREStation Add End diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index e49720f98f..47f8b0602f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -163,8 +163,8 @@ var/self_del = 1 anchored = 0 -/obj/structure/closet/secure_closet/mind/New(var/datum/mind/mind_target, var/del_self = 1) - .=..() +/obj/structure/closet/secure_closet/mind/Initialize(mapload, var/datum/mind/mind_target, var/del_self = 1) + . = ..() self_del = del_self if(mind_target) owner = mind_target diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 9f948265fd..f4926d1ed3 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -13,7 +13,8 @@ var/intialOxy = 0 var/timer = 240 //eventually the person will be freed -/obj/structure/closet/statue/New(loc, var/mob/living/L) +/obj/structure/closet/statue/Initialize(mapload, var/mob/living/L) + . = ..() if(L && (ishuman(L) || L.isMonkey() || iscorgi(L))) if(L.buckled) L.buckled = 0 @@ -41,11 +42,9 @@ desc = "If it takes forever, I will wait for you..." if(health == 0) //meaning if the statue didn't find a valid target - qdel(src) - return + return INITIALIZE_HINT_QDEL START_PROCESSING(SSobj, src) - ..() /obj/structure/closet/statue/process() timer-- diff --git a/code/game/objects/structures/droppod.dm b/code/game/objects/structures/droppod.dm index eb50e18563..f53ac2bbdf 100644 --- a/code/game/objects/structures/droppod.dm +++ b/code/game/objects/structures/droppod.dm @@ -13,8 +13,8 @@ /obj/structure/drop_pod/polite polite = TRUE -/obj/structure/drop_pod/New(newloc, atom/movable/A, auto_open = FALSE) - ..() +/obj/structure/drop_pod/Initialize(mapload, atom/movable/A, auto_open = FALSE) + . = ..() if(A) A.forceMove(src) // helo podfall(auto_open) @@ -25,8 +25,6 @@ qdel_null(air) /obj/structure/drop_pod/proc/podfall(auto_open) - set waitfor = FALSE // sleeping in new otherwise - var/turf/T = get_turf(src) if(!T) warning("Drop pod wasn't spawned on a turf") @@ -40,9 +38,11 @@ for(var/turf/TN in turfs_nearby) new /obj/effect/temporary_effect/shuttle_landing(TN) - // Wait a minute - sleep(4 SECONDS) + addtimer(CALLBACK(src, PROC_REF(do_fall), auto_open, T), 4 SECONDS, TIMER_DELETE_ME) +/obj/structure/drop_pod/proc/do_fall(auto_open, turf/T) + SHOULD_NOT_OVERRIDE(TRUE) + PRIVATE_PROC(TRUE) // Wheeeeeee plane = ABOVE_PLANE pixel_y = 300 @@ -53,10 +53,18 @@ animate(src, alpha = 255, time = 1 SECOND, flags = ANIMATION_PARALLEL) filters += filter(type="drop_shadow", x=-64, y=100, size=10) animate(filters[filters.len], x=0, y=0, size=0, time=3 SECONDS, flags=ANIMATION_PARALLEL, easing=SINE_EASING|EASE_OUT) - sleep(2 SECONDS) + addtimer(CALLBACK(src, PROC_REF(after_fall), auto_open, T), 2 SECONDS, TIMER_DELETE_ME) + +/obj/structure/drop_pod/proc/after_fall(auto_open, turf/T) + SHOULD_NOT_OVERRIDE(TRUE) + PRIVATE_PROC(TRUE) new /obj/effect/effect/smoke(T) T.hotspot_expose(900) - sleep(1 SECOND) + addtimer(CALLBACK(src, PROC_REF(on_impact), auto_open, T), 1 SECOND, TIMER_DELETE_ME) + +/obj/structure/drop_pod/proc/on_impact(auto_open, turf/T) + SHOULD_NOT_OVERRIDE(TRUE) + PRIVATE_PROC(TRUE) filters = null // CRONCH @@ -82,14 +90,14 @@ icon_state = "[initial(icon_state)]" if(auto_open) - sleep(2 SECONDS) - open_pod() - visible_message("\The [src] pops open!") + addtimer(CALLBACK(src, PROC_REF(open_pod), TRUE), 2 SECONDS, TIMER_DELETE_ME) else for(var/mob/M in src) to_chat(M, span_danger("You've landed! Open the hatch if you think it's safe! \The [src] has enough air to last for a while...")) -/obj/structure/drop_pod/proc/open_pod() +/obj/structure/drop_pod/proc/open_pod(dropped) + if(dropped) + visible_message("\The [src] pops open!") if(finished) return icon_state = "[initial(icon_state)]_open" diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 6948383ffe..267788ec39 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -19,15 +19,18 @@ var/applies_material_colour = 1 var/wall_type = /turf/simulated/wall -/obj/structure/girder/New(var/newloc, var/material_key) - ..(newloc) +/obj/structure/girder/Initialize(mapload, var/material_key) + . = ..() if(!material_key) material_key = default_material - set_material(material_key) + var/our_material = get_material_by_name(material_key) + if(!our_material) + return INITIALIZE_HINT_QDEL + set_material(our_material) update_icon() /obj/structure/girder/Destroy() - if(girder_material.products_need_process()) + if(girder_material && girder_material.products_need_process()) STOP_PROCESSING(SSobj, src) . = ..() @@ -45,10 +48,10 @@ return total_radiation -/obj/structure/girder/proc/set_material(var/new_material) - girder_material = get_material_by_name(new_material) +/obj/structure/girder/proc/set_material(var/datum/material/new_material) if(!girder_material) qdel(src) + girder_material = new_material name = "[girder_material.display_name] [initial(name)]" max_health = round(girder_material.integrity) //Should be 150 with default integrity (steel). Weaker than ye-olden Girders now. health = max_health @@ -75,8 +78,8 @@ health = 50 cover = 25 -/obj/structure/girder/displaced/New(var/newloc, var/material_key) - ..(newloc, material_key) +/obj/structure/girder/displaced/Initialize(mapload, material_key) + . = ..() displace() /obj/structure/girder/proc/displace() diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index bd642a6f8c..e376467ae9 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -19,14 +19,13 @@ var/datum/material/material -/obj/structure/gravemarker/New(var/newloc, var/material_name) - ..(newloc) +/obj/structure/gravemarker/Initialize(mapload, var/material_name) + . = ..() if(!material_name) material_name = MAT_WOOD material = get_material_by_name("[material_name]") if(!material) - qdel(src) - return + return INITIALIZE_HINT_QDEL color = material.icon_colour /obj/structure/gravemarker/examine(mob/user) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 513cd6a026..fac255fda3 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -385,10 +385,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) var/callme = "pimpin' ride" //how do people refer to it? -/obj/structure/bed/chair/janicart/New() +/obj/structure/bed/chair/janicart/Initialize(mapload, new_material, new_padding_material) + . = ..() create_reagents(300) - update_layer() - /obj/structure/bed/chair/janicart/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 761dc3ca6f..2ee3f1fa65 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -22,8 +22,8 @@ icon_modifier = "grey_" icon_state = "grey_railing0" -/obj/structure/railing/New(loc, constructed = 0) - ..() +/obj/structure/railing/Initialize(mapload, constructed = 0) + . = ..() // TODO - "constructed" is not passed to us. We need to find a way to do this safely. if (constructed) // player-constructed railings anchored = FALSE diff --git a/code/game/objects/structures/simple_doors_vr.dm b/code/game/objects/structures/simple_doors_vr.dm index e45608ca2c..033b86d430 100644 --- a/code/game/objects/structures/simple_doors_vr.dm +++ b/code/game/objects/structures/simple_doors_vr.dm @@ -1,5 +1,5 @@ /datum/material/flockium - name = "flockium" + name = MAT_FLOKIUM //stack_type = /obj/item/stack/material/sandstone icon_base = "flock" icon_reinf = "flock" @@ -20,5 +20,5 @@ icon = 'icons/goonstation/featherzone.dmi' icon_state = "flockdoor" -/obj/structure/simple_door/flock/New(var/newloc, var/newmat) - ..(newloc, "flockium") +/obj/structure/simple_door/flock/Initialize(mapload, var/newmat) + . = ..(mapload, MAT_FLOKIUM) diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 0092f0d166..bcefabcc1d 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -19,21 +19,20 @@ var/global/list/stool_cache = list() //haha stool /obj/item/stool/padded icon_state = "stool_padded_preview" //set for the map -/obj/item/stool/New(var/newloc, var/new_material, var/new_padding_material) - ..(newloc) +/obj/item/stool/Initialize(mapload, var/new_material, var/new_padding_material) + . = ..() if(!new_material) new_material = MAT_STEEL material = get_material_by_name(new_material) if(new_padding_material) padding_material = get_material_by_name(new_padding_material) if(!istype(material)) - qdel(src) - return + return INITIALIZE_HINT_QDEL force = round(material.get_blunt_damage()*0.4) update_icon() -/obj/item/stool/padded/New(var/newloc, var/new_material) - ..(newloc, MAT_STEEL, MAT_CARPET) +/obj/item/stool/padded/Initialize(mapload, var/new_material) + . = ..(mapload, MAT_STEEL, MAT_CARPET) /obj/item/stool/update_icon() // Prep icon. diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools_vr.dm b/code/game/objects/structures/stool_bed_chair_nest/stools_vr.dm index b13b72bf03..6e9cfe35e9 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools_vr.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools_vr.dm @@ -15,5 +15,5 @@ /obj/item/stool/baystool/padded icon_state = "bar_stool_padded_preview" //set for the map -/obj/item/stool/baystool/padded/New(var/newloc, var/new_material) - ..(newloc, MAT_STEEL, MAT_CARPET) +/obj/item/stool/baystool/padded/Initialize(mapload, var/new_material) + . = ..(mapload, MAT_STEEL, MAT_CARPET) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 702146f13a..74e70ff83e 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -32,8 +32,8 @@ secure = "secure_" icon_state = "l_secure_windoor_assembly01" -/obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0) - ..() +/obj/structure/windoor_assembly/Initialize(mapload, start_dir=NORTH, constructed=0) + . = ..() if(constructed) state = "01" anchored = FALSE diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 977906fd85..110361f707 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -386,8 +386,8 @@ update_nearby_tiles(need_rebuild=1) return -/obj/structure/window/New(Loc, start_dir=null, constructed=0) - ..() +/obj/structure/window/Initialize(mapload, start_dir=null, constructed=0) + . = ..() if (start_dir) set_dir(start_dir) diff --git a/code/game/turfs/flooring/flooring_decals.dm b/code/game/turfs/flooring/flooring_decals.dm index 4126db3cfe..46c86fc397 100644 --- a/code/game/turfs/flooring/flooring_decals.dm +++ b/code/game/turfs/flooring/flooring_decals.dm @@ -10,18 +10,12 @@ var/list/floor_decals = list() layer = DECAL_LAYER var/supplied_dir -/obj/effect/floor_decal/New(var/newloc, var/newdir, var/newcolour) +/obj/effect/floor_decal/Initialize(mapload, var/newdir, var/newcolour) supplied_dir = newdir if(newcolour) color = newcolour - ..(newloc) - -// TODO: identify what is causing these atoms to be qdeleted in New()/Initialize(mapload) -// somewhere in this chain. Alternatively repath to /obj/floor_decal or some other -// abstract handler that explicitly doesn't invoke any obj behavior. -/obj/effect/floor_decal/Initialize(mapload) add_to_turf_decals() - flags |= ATOM_INITIALIZED + ..() return INITIALIZE_HINT_QDEL // This is a separate proc from initialize() to facilitiate its caching and other stuff. Look into it someday. @@ -626,9 +620,9 @@ var/list/floor_decals = list() name = "random asteroid rubble" icon_state = "asteroid0" -/obj/effect/floor_decal/asteroid/New() +/obj/effect/floor_decal/asteroid/Initialize(mapload, newdir, newcolour) icon_state = "asteroid[rand(0,9)]" - ..() + . = ..() /obj/effect/floor_decal/chapel name = "chapel" diff --git a/code/game/turfs/simulated/fancy_shuttles.dm b/code/game/turfs/simulated/fancy_shuttles.dm index 995a3ad128..fed77912a0 100644 --- a/code/game/turfs/simulated/fancy_shuttles.dm +++ b/code/game/turfs/simulated/fancy_shuttles.dm @@ -25,7 +25,8 @@ GLOBAL_LIST_EMPTY(fancy_shuttles) var/icon/split_icon var/fancy_shuttle_tag -/obj/effect/fancy_shuttle/New() // has to be very early so others can grab it +INITIALIZE_IMMEDIATE(/obj/effect/fancy_shuttle) +/obj/effect/fancy_shuttle/Initialize(mapload) // has to be very early so others can grab it . = ..() if(!fancy_shuttle_tag) error("Fancy shuttle with no tag at [x],[y],[z]! Type is: [type]") diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index ffe62377f8..aaae23d89b 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -14,9 +14,11 @@ var/image/turf_image var/list/decals -/obj/landed_holder/New(var/location = null, var/turf/simulated/shuttle/turf) - ..(null) - my_turf = turf +/obj/landed_holder/Initialize(mapload) + . = ..() + if(loc) + my_turf = get_turf(src) + moveToNullspace() /obj/landed_holder/proc/land_on(var/turf/T) //Gather destination information diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 249d3b0a8e..b0d73fdf22 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -117,9 +117,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /obj/effect/statclick/ticket_list var/current_state -/obj/effect/statclick/ticket_list/New(loc, name, state) - current_state = state - ..() +/obj/effect/statclick/ticket_list/Initialize(mapload, text, target) + . = ..() + current_state = target /obj/effect/statclick/ticket_list/Click() GLOB.ahelp_tickets.BrowseTickets(current_state) @@ -577,9 +577,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /obj/effect/statclick/ahelp var/datum/admin_help/ahelp_datum -/obj/effect/statclick/ahelp/New(loc, datum/admin_help/AH) - ahelp_datum = AH - ..(loc) +/obj/effect/statclick/ahelp/Initialize(mapload, text, target) + . = ..() + ahelp_datum = target /obj/effect/statclick/ahelp/update() return ..(ahelp_datum.name) diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index c8753d66f8..747684e39f 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -28,7 +28,8 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging) icon = 'icons/480x480.dmi' icon_state = "25percent" -/obj/effect/debugging/camera_range/New() +/obj/effect/debugging/camera_range/Initialize(mapload, ...) + . = ..() src.pixel_x = -224 src.pixel_y = -224 diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm index 50b3d43df6..0cbf49be77 100644 --- a/code/modules/awaymissions/loot_vr.dm +++ b/code/modules/awaymissions/loot_vr.dm @@ -11,8 +11,9 @@ name = "low prob loot spawner" icon_state = "grabbed" low_probability = 1 + delete_me = TRUE -/obj/effect/landmark/loot_spawn/New() +/obj/effect/landmark/loot_spawn/Initialize(mapload) switch(pick( \ low_probability * 1000;"nothing", \ @@ -345,7 +346,7 @@ //for(var/i=0,i 1) - src.set_dir(get_dir(src,my_target)) - step_towards(src,my_target) - updateimage() - else - if(prob(15)) - if(weapon_name) - my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')) - my_target.show_message(span_bolddanger("[my_target] has been attacked with [weapon_name] by [src.name]!"), 1) - my_target.halloss += 8 - if(prob(20)) my_target.eye_blurry += 3 - if(prob(33)) - if(!locate(/obj/effect/overlay) in my_target.loc) - fake_blood(my_target) - else - my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')) - my_target.show_message(span_bolddanger("[src.name] has punched [my_target]!"), 1) - my_target.halloss += 4 - if(prob(33)) - if(!locate(/obj/effect/overlay) in my_target.loc) - fake_blood(my_target) - + if(src.health < 0) + collapse() + addtimer(CALLBACK(src, PROC_REF(attack_loop)), rand(5, 10), TIMER_DELETE_ME) + return + if(get_dist(src,my_target) > 1) + src.set_dir(get_dir(src,my_target)) + step_towards(src,my_target) + updateimage() + else if(prob(15)) - step_away(src,my_target,2) + if(weapon_name) + my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')) + my_target.show_message(span_bolddanger("[my_target] has been attacked with [weapon_name] by [src.name]!"), 1) + my_target.halloss += 8 + if(prob(20)) my_target.eye_blurry += 3 + if(prob(33)) + if(!locate(/obj/effect/overlay) in my_target.loc) + fake_blood(my_target) + else + my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')) + my_target.show_message(span_bolddanger("[src.name] has punched [my_target]!"), 1) + my_target.halloss += 4 + if(prob(33)) + if(!locate(/obj/effect/overlay) in my_target.loc) + fake_blood(my_target) + + if(prob(15)) + step_away(src,my_target,2) + addtimer(CALLBACK(src, PROC_REF(attack_loop)), rand(5, 10), TIMER_DELETE_ME) /obj/effect/fake_attacker/proc/collapse() collapse = 1 @@ -330,9 +330,7 @@ Gunshots/explosions/opening doors/less rare audio (done) O.name = "blood" var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1) target << I - spawn(300) - qdel(O) - return + QDEL_IN(O, 30 SECONDS) var/list/non_fakeattack_weapons = list(/obj/item/gun/projectile, /obj/item/ammo_magazine/s357,\ /obj/item/gun/energy/crossbow, /obj/item/melee/energy/sword,\ diff --git a/code/modules/food/kitchen/icecream.dm b/code/modules/food/kitchen/icecream.dm index 159904544d..48ea0f68e6 100644 --- a/code/modules/food/kitchen/icecream.dm +++ b/code/modules/food/kitchen/icecream.dm @@ -177,7 +177,8 @@ var/ice_creamed = 0 var/cone_type -/obj/item/reagent_containers/food/snacks/icecream/New() +/obj/item/reagent_containers/food/snacks/icecream/Initialize(mapload) + . = ..() create_reagents(20) reagents.add_reagent(REAGENT_ID_NUTRIMENT, 5) diff --git a/code/modules/games/cah.dm b/code/modules/games/cah.dm index 7545ffc1f2..3215883912 100644 --- a/code/modules/games/cah.dm +++ b/code/modules/games/cah.dm @@ -14,8 +14,8 @@ icon_state = "cag_black" blanks = 0 -/obj/item/deck/cah/New() - ..() +/obj/item/deck/cah/Initialize(mapload) + . = ..() var/datum/playingcard/P for(var/cardtext in card_text_list) P = new() diff --git a/code/modules/games/spaceball_cards.dm b/code/modules/games/spaceball_cards.dm index a564c83b36..8706a3f67a 100644 --- a/code/modules/games/spaceball_cards.dm +++ b/code/modules/games/spaceball_cards.dm @@ -7,8 +7,8 @@ icon_state = "card_pack_spaceball" parentdeck = "spaceball" -/obj/item/pack/spaceball/New() - ..() +/obj/item/pack/spaceball/Initialize(mapload) + . = ..() var/datum/playingcard/P var/i var/year = 300 + text2num(time2text(world.timeofday, "YYYY")) //VOREStation Edit diff --git a/code/modules/games/tarot.dm b/code/modules/games/tarot.dm index 5489bb05fd..4b16249084 100644 --- a/code/modules/games/tarot.dm +++ b/code/modules/games/tarot.dm @@ -6,8 +6,8 @@ desc = "For all your occult needs!" icon_state = "deck_tarot" -/obj/item/deck/tarot/New() - ..() +/obj/item/deck/tarot/Initialize(mapload) + . = ..() var/datum/playingcard/P for(var/name in list("Fool","Magician","High Priestess","Empress","Emperor","Hierophant","Lovers","Chariot","Strength","Hermit","Wheel of Fortune","Justice","Hanged Man","Death","Temperance","Devil","Tower","Star","Moon","Sun","Judgement","World")) @@ -49,8 +49,8 @@ desc = "A limited edition tarot deck for the scene-girl inclined!" icon_state = "dark_tarot" -/obj/item/deck/dark_tarot/New() - ..() +/obj/item/deck/dark_tarot/Initialize(mapload) + . = ..() var/datum/playingcard/P for(var/name in list("fool","magician","high priestess","empress","emperor","hierophant","lovers","chariot","strength","hermit","wheel of fortune","justice","hanged man","death","temperance","devil","tower","star","moon","sun","judgement","world","white dragon with blue eyes","charred lizard","dark lotus","bash","reverse","rules","acid","abyss","maw")) diff --git a/code/modules/games/wizoff.dm b/code/modules/games/wizoff.dm index b6dd9bde9b..3035552fc2 100644 --- a/code/modules/games/wizoff.dm +++ b/code/modules/games/wizoff.dm @@ -15,8 +15,8 @@ desc = "A Wiz-Off deck. Fight an arcane battle for the fate of the universe: Draw 5! Play 5! Best of 5!" icon_state = "wizoff" -/obj/item/deck/wizoff/New() - ..() +/obj/item/deck/wizoff/Initialize(mapload) + . = ..() var/datum/playingcard/P for(var/cardtext in card_wiz_list) P = new() @@ -64,9 +64,6 @@ title = "WizOff Guide" drop_sound = 'sound/items/drop/paper.ogg' pickup_sound = 'sound/items/pickup/paper.ogg' - -/obj/item/book/manual/wizzoffguide/New() - ..() dat = {" diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index f3bd60c674..2d8ffa3a86 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -8,8 +8,8 @@ var/list/genes = list() var/genesource = "unknown" -/obj/item/disk/botany/New() - ..() +/obj/item/disk/botany/Initialize(mapload) + . = ..() pixel_x = rand(-5,5) pixel_y = rand(-5,5) @@ -27,8 +27,8 @@ name = "flora disk box" desc = "A box of flora data disks, apparently." -/obj/item/storage/box/botanydisk/New() - ..() +/obj/item/storage/box/botanydisk/Initialize(mapload) + . = ..() for(var/i = 0;i<7;i++) new /obj/item/disk/botany(src) diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index b901f52dbe..6a2117ba4b 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -6,10 +6,10 @@ var/obj/item/electronic_assembly/device/EA -/obj/item/assembly/electronic_assembly/New() +/obj/item/assembly/electronic_assembly/Initialize(mapload) + . = ..() EA = new(src) EA.holder = src - ..() /obj/item/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob) if (I.has_tool_quality(TOOL_CROWBAR)) @@ -70,8 +70,8 @@ max_complexity = IC_COMPLEXITY_BASE * 3/4 -/obj/item/electronic_assembly/device/New() - ..() +/obj/item/electronic_assembly/device/Initialize(mapload) + . = ..() var/obj/item/integrated_circuit/built_in/device_input/input = new(src) var/obj/item/integrated_circuit/built_in/device_output/output = new(src) input.assembly = src diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index 2e39b8958a..7e375637b0 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -31,14 +31,14 @@ a creative player the means to solve many problems. Circuits are held inside an /obj/item/integrated_circuit/proc/any_examine(mob/user) return -/obj/item/integrated_circuit/New() +/obj/item/integrated_circuit/Initialize(mapload) + . = ..() displayed_name = name if(!size) size = w_class if(size == -1) size = 0 setup_io(inputs, /datum/integrated_io, inputs_default) setup_io(outputs, /datum/integrated_io, outputs_default) setup_io(activators, /datum/integrated_io/activate) - ..() /obj/item/integrated_circuit/proc/on_data_written() //Override this for special behaviour when new data gets pushed to the circuit. return diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 3c3cf2c2e2..f0493ed6f8 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -337,8 +337,8 @@ /obj/item/storage/bag/circuits/mini/arithmetic/all // Don't believe this will ever be needed. spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/arithmetic/New() - ..() +/obj/item/storage/bag/circuits/mini/arithmetic/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -354,8 +354,8 @@ /obj/item/storage/bag/circuits/mini/trig/all // Ditto spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/trig/New() - ..() +/obj/item/storage/bag/circuits/mini/trig/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -371,8 +371,8 @@ /obj/item/storage/bag/circuits/mini/input/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/input/New() - ..() +/obj/item/storage/bag/circuits/mini/input/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -388,8 +388,8 @@ /obj/item/storage/bag/circuits/mini/output/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/output/New() - ..() +/obj/item/storage/bag/circuits/mini/output/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -405,8 +405,8 @@ /obj/item/storage/bag/circuits/mini/memory/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/memory/New() - ..() +/obj/item/storage/bag/circuits/mini/memory/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -422,8 +422,8 @@ /obj/item/storage/bag/circuits/mini/logic/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/logic/New() - ..() +/obj/item/storage/bag/circuits/mini/logic/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -439,8 +439,8 @@ /obj/item/storage/bag/circuits/mini/time/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/time/New() - ..() +/obj/item/storage/bag/circuits/mini/time/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -456,8 +456,8 @@ /obj/item/storage/bag/circuits/mini/reagents/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/reagents/New() - ..() +/obj/item/storage/bag/circuits/mini/reagents/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -473,8 +473,8 @@ /obj/item/storage/bag/circuits/mini/transfer/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/transfer/New() - ..() +/obj/item/storage/bag/circuits/mini/transfer/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -490,8 +490,8 @@ /obj/item/storage/bag/circuits/mini/converter/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/converter/New() - ..() +/obj/item/storage/bag/circuits/mini/converter/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -506,8 +506,8 @@ /obj/item/storage/bag/circuits/mini/smart/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/smart/New() - ..() +/obj/item/storage/bag/circuits/mini/smart/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -522,8 +522,8 @@ /obj/item/storage/bag/circuits/mini/manipulation/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/manipulation/New() - ..() +/obj/item/storage/bag/circuits/mini/manipulation/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) @@ -539,8 +539,8 @@ /obj/item/storage/bag/circuits/mini/power/all spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/storage/bag/circuits/mini/power/New() - ..() +/obj/item/storage/bag/circuits/mini/power/Initialize(mapload) + . = ..() for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits) if(IC.spawn_flags & spawn_flags_to_use) for(var/i = 1 to 4) diff --git a/code/modules/integrated_electronics/passive/power.dm b/code/modules/integrated_electronics/passive/power.dm index a2f992c8e2..c59a6bf19d 100644 --- a/code/modules/integrated_electronics/passive/power.dm +++ b/code/modules/integrated_electronics/passive/power.dm @@ -120,8 +120,8 @@ var/volume = 60 var/list/fuel = list(REAGENT_ID_PHORON = 50000, REAGENT_ID_SLIMEJELLY = 25000, REAGENT_ID_FUEL = 15000, REAGENT_ID_CARBON = 10000, REAGENT_ID_ETHANOL= 10000, REAGENT_ID_NUTRIMENT = 8000, REAGENT_ID_BLOOD = 5000) -/obj/item/integrated_circuit/passive/power/chemical_cell/New() - ..() +/obj/item/integrated_circuit/passive/power/chemical_cell/Initialize(mapload) + . = ..() create_reagents(volume) /obj/item/integrated_circuit/passive/power/chemical_cell/interact(mob/user) diff --git a/code/modules/integrated_electronics/subtypes/data_transfer.dm b/code/modules/integrated_electronics/subtypes/data_transfer.dm index 1a6496868d..457277c5b6 100644 --- a/code/modules/integrated_electronics/subtypes/data_transfer.dm +++ b/code/modules/integrated_electronics/subtypes/data_transfer.dm @@ -16,12 +16,12 @@ power_draw_per_use = 4 var/number_of_inputs = 2 -/obj/item/integrated_circuit/transfer/multiplexer/New() +/obj/item/integrated_circuit/transfer/multiplexer/Initialize(mapload) for(var/i = 1 to number_of_inputs) inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called. // inputs += "input [i]" complexity = number_of_inputs - ..() + . = ..() desc += " It has [number_of_inputs] input pins." extended_desc += " This multiplexer has a range from 1 to [inputs.len - 1]." @@ -64,13 +64,13 @@ power_draw_per_use = 4 var/number_of_outputs = 2 -/obj/item/integrated_circuit/transfer/demultiplexer/New() +/obj/item/integrated_circuit/transfer/demultiplexer/Initialize(mapload) for(var/i = 1 to number_of_outputs) // outputs += "output [i]" outputs["output [i]"] = IC_PINTYPE_ANY complexity = number_of_outputs - ..() + . = ..() desc += " It has [number_of_outputs] output pins." extended_desc += " This demultiplexer has a range from 1 to [outputs.len]." @@ -112,13 +112,13 @@ power_draw_per_use = 4 var/number_of_outputs = 2 -/obj/item/integrated_circuit/transfer/pulsedemultiplexer/New() +/obj/item/integrated_circuit/transfer/pulsedemultiplexer/Initialize(mapload) for(var/i = 1 to number_of_outputs) // outputs += "output [i]" activators["output [i]"] = IC_PINTYPE_PULSE_OUT complexity = number_of_outputs - ..() + . = ..() desc += " It has [number_of_outputs] output pins." extended_desc += " This pulse demultiplexer has a range from 1 to [activators.len - 1]." diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index e9cc02de1a..d1cbcb7dde 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -540,9 +540,9 @@ spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH power_draw_per_use = 15 -/obj/item/integrated_circuit/input/microphone/New() - ..() - listening_objects |= src +/obj/item/integrated_circuit/input/microphone/Initialize(mapload) + . = ..() + listening_objects += src /obj/item/integrated_circuit/input/microphone/Destroy() listening_objects -= src diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 37eaf44b56..2aaf6b36c0 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -145,8 +145,8 @@ var/obj/item/grenade/attached_grenade var/pre_attached_grenade_type -/obj/item/integrated_circuit/manipulation/grenade/New() - ..() +/obj/item/integrated_circuit/manipulation/grenade/Initialize(mapload) + . = ..() if(pre_attached_grenade_type) var/grenade = new pre_attached_grenade_type(src) attach_grenade(grenade) diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 0fb72e7088..f577b39981 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -11,12 +11,12 @@ power_draw_per_use = 1 var/number_of_pins = 1 -/obj/item/integrated_circuit/memory/New() +/obj/item/integrated_circuit/memory/Initialize(mapload) for(var/i = 1 to number_of_pins) inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called. outputs["output [i]"] = IC_PINTYPE_ANY + . = ..() complexity = number_of_pins - ..() /obj/item/integrated_circuit/memory/examine(mob/user) . = ..() diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index d902368282..3d7c43be78 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -4,8 +4,8 @@ unacidable = TRUE origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) -/obj/item/integrated_circuit/reagent/New() - ..() +/obj/item/integrated_circuit/reagent/Initialize(mapload) + . = ..() if(volume) create_reagents(volume) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index a00f099146..e6a55c7852 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -127,20 +127,18 @@ Book Cart End /obj/structure/bookcase/manuals/medical name = "Medical Manuals bookcase" -/obj/structure/bookcase/manuals/medical/New() - ..() +/obj/structure/bookcase/manuals/medical/Initialize(mapload) new /obj/item/book/manual/medical_cloning(src) new /obj/item/book/manual/wiki/medical_diagnostics_manual(src) new /obj/item/book/manual/wiki/medical_diagnostics_manual(src) new /obj/item/book/manual/wiki/medical_diagnostics_manual(src) - update_icon() + . = ..() /obj/structure/bookcase/manuals/engineering name = "Engineering Manuals bookcase" -/obj/structure/bookcase/manuals/engineering/New() - ..() +/obj/structure/bookcase/manuals/engineering/Initialize(mapload) new /obj/item/book/manual/wiki/engineering_construction(src) new /obj/item/book/manual/engineering_particle_accelerator(src) new /obj/item/book/manual/wiki/engineering_hacking(src) @@ -148,15 +146,14 @@ Book Cart End new /obj/item/book/manual/atmospipes(src) new /obj/item/book/manual/engineering_singularity_safety(src) new /obj/item/book/manual/evaguide(src) - update_icon() + . = ..() /obj/structure/bookcase/manuals/research_and_development name = "R&D Manuals bookcase" -/obj/structure/bookcase/manuals/research_and_development/New() - ..() +/obj/structure/bookcase/manuals/research_and_development/Initialize(mapload) new /obj/item/book/manual/research_and_development(src) - update_icon() + . = ..() /* diff --git a/code/modules/lighting/lighting_area.dm b/code/modules/lighting/lighting_area.dm index 490a62473d..2a7b8040b9 100644 --- a/code/modules/lighting/lighting_area.dm +++ b/code/modules/lighting/lighting_area.dm @@ -1,9 +1,3 @@ /area luminosity = TRUE var/dynamic_lighting = TRUE - -/area/New() - . = ..() - - if(dynamic_lighting) - luminosity = FALSE diff --git a/code/modules/lighting/sunlight_handler.dm b/code/modules/lighting/sunlight_handler.dm index 26a6bfac8f..32641a73f2 100644 --- a/code/modules/lighting/sunlight_handler.dm +++ b/code/modules/lighting/sunlight_handler.dm @@ -1,17 +1,9 @@ -/turf/New(loc, ..., is_turfchange=FALSE) - . = ..(args) - /turf/simulated var/datum/sunlight_handler/shandler var/shandler_noinit = FALSE -/turf/simulated/New(loc, ..., is_turfchange=FALSE) //This is so fucking awful have mercy on my soul for writing this - if(is_turfchange) - shandler_noinit = TRUE - . = ..(args) - /turf/simulated/Initialize(mapload) - . = ..(args) + . = ..() if(mapload) return INITIALIZE_HINT_LATELOAD diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index d9ea76cda9..0e08ac5897 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -317,8 +317,6 @@ var/list/name_to_material G.reinf_material = reinf_material G.reinforce_girder() if(girder_material) - if(istype(girder_material, /datum/material)) - girder_material = girder_material.name G.set_material(girder_material) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 81f229c8e5..6ae7e6960c 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -93,9 +93,9 @@ var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns -/mob/observer/dead/New(mob/body, aghost = FALSE) +/mob/observer/dead/Initialize(mapload, aghost = FALSE) - appearance = body + appearance = loc invisibility = INVISIBILITY_OBSERVER layer = BELOW_MOB_LAYER plane = PLANE_GHOSTS @@ -107,30 +107,31 @@ see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but... var/turf/T - if(ismob(body)) - T = get_turf(body) //Where is the body located? - attack_log = body.attack_log //preserve our attack logs by copying them to our ghost - gender = body.gender - if(body.mind && body.mind.name) - name = body.mind.name + if(ismob(loc)) + var/mob/M = loc + T = get_turf(M) //Where is the body located? + attack_log = M.attack_log //preserve our attack logs by copying them to our ghost + gender = M.gender + if(M.mind && M.mind.name) + name = M.mind.name else - if(body.real_name) - name = body.real_name + if(M.real_name) + name = M.real_name else if(gender == MALE) name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) else name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) - mind = body.mind //we don't transfer the mind but we keep a reference to it. + mind = M.mind //we don't transfer the mind but we keep a reference to it. // Fix for naked ghosts. // Unclear why this isn't being grabbed by appearance. - if(ishuman(body)) - var/mob/living/carbon/human/H = body + if(ishuman(M)) + var/mob/living/carbon/human/H = M add_overlay(H.overlays_standing) - default_pixel_x = body.default_pixel_x - default_pixel_y = body.default_pixel_y + default_pixel_x = M.default_pixel_x + default_pixel_y = M.default_pixel_y if(!T && length(latejoin)) T = get_turf(pick(latejoin)) //Safety in case we cannot find the body's position if(T) @@ -145,7 +146,7 @@ animate(src, pixel_y = 2, time = 10, loop = -1) animate(pixel_y = default_pixel_y, time = 10, loop = -1) observer_mob_list += src - ..() + . = ..() visualnet = ghostnet /mob/observer/dead/proc/checkStatic() diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index f3843f052d..023a1e2a25 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -7,8 +7,8 @@ name = "Inactive AI Eye" icon_state = "AI-eye" -/mob/observer/eye/aiEye/New() - ..() +/mob/observer/eye/aiEye/Initialize(mapload) + . = ..() visualnet = cameranet /mob/observer/eye/aiEye/Destroy() @@ -74,17 +74,6 @@ client.eye = eyeobj SetName(src.name) -// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us. -/mob/living/silicon/ai/Initialize(mapload) - . = ..() - create_eyeobj() - if(eyeobj) - eyeobj.loc = src.loc - -/mob/living/silicon/ai/Destroy() - destroy_eyeobj() - return ..() - /atom/proc/move_camera_by_click() if(isAI(usr)) var/mob/living/silicon/ai/AI = usr diff --git a/code/modules/mob/freelook/mask/eye.dm b/code/modules/mob/freelook/mask/eye.dm index 4fcbc35149..253196e343 100644 --- a/code/modules/mob/freelook/mask/eye.dm +++ b/code/modules/mob/freelook/mask/eye.dm @@ -8,6 +8,6 @@ acceleration = 0 owner_follows_eye = 1 -/mob/observer/eye/maskEye/New() - ..() +/mob/observer/eye/maskEye/Initialize(mapload) + . = ..() visualnet = cultnet diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index d257dfc173..493e8f3e0a 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -18,8 +18,8 @@ #undef CULT_UPDATE_BUFFER -/mob/living/New() - ..() +/mob/living/Initialize(mapload) + . = ..() cultnet.updateVisibility(src, 0) /mob/living/rejuvenate() diff --git a/code/modules/mob/language/outsider.dm b/code/modules/mob/language/outsider.dm index 928088abcc..e11e3401e5 100644 --- a/code/modules/mob/language/outsider.dm +++ b/code/modules/mob/language/outsider.dm @@ -86,7 +86,7 @@ syllables = list("sss","sSs","SSS") /datum/language/xenos - name = "Hivemind" + name = LANGUAGE_HIVEMIND desc = "Xenomorphs have the strange ability to commune over a psychic hivemind." speech_verb = "hisses" ask_verb = "hisses" diff --git a/code/modules/mob/language/synthetic.dm b/code/modules/mob/language/synthetic.dm index d6186b153a..1eb140d7b8 100644 --- a/code/modules/mob/language/synthetic.dm +++ b/code/modules/mob/language/synthetic.dm @@ -1,5 +1,5 @@ /datum/language/binary - name = "Robot Talk" + name = LANGUAGE_ROBOT_TALK desc = "Most human stations support free-use communications protocols and routing hubs for synthetic use." colour = "say_quote_italics" speech_verb = "states" @@ -58,7 +58,7 @@ R.cell_use_power(C.active_usage) /datum/language/binary/drone - name = "Drone Talk" + name = LANGUAGE_DRONE_TALK desc = "A heavily encoded damage control coordination stream." speech_verb = "transmits" ask_verb = "transmits" diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 65fd5085e2..4e0ccec8a2 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -338,8 +338,8 @@ w_class = ITEMSIZE_NORMAL -/obj/item/farmbot_arm_assembly/New(var/newloc, var/theTank) - ..(newloc) +/obj/item/farmbot_arm_assembly/Initialize(mapload, var/theTank) + . = ..() if(!theTank) // If an admin spawned it, it won't have a watertank it, so lets make one for em! tank = new /obj/structure/reagent_dispensers/watertank(src) else diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 17e75fcf1f..dcdd74e8f7 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -52,7 +52,7 @@ /mob/living/carbon/alien/get_default_language() if(default_language) return default_language - return GLOB.all_languages["Xenomorph"] + return GLOB.all_languages[LANGUAGE_XENOLINGUA] /mob/living/carbon/alien/say_quote(var/message, var/datum/language/speaking = null) var/verb = "hisses" diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 87f8f2175d..0bd06c2149 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -4,7 +4,7 @@ adult_form = /mob/living/carbon/human speak_emote = list("hisses") icon_state = "larva" - language = "Hivemind" + language = LANGUAGE_HIVEMIND maxHealth = 50 health = 50 faction = FACTION_XENO @@ -12,5 +12,5 @@ /mob/living/carbon/alien/larva/Initialize(mapload) . = ..() - add_language("Xenomorph") //Bonus language. + add_language(LANGUAGE_XENOLINGUA) //Bonus language. internal_organs |= new /obj/item/organ/internal/xenos/hivenode(src) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index d6ac428b60..29775f0f1e 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -20,7 +20,8 @@ var/obj/item/radio/headset/mmi_radio/radio = null//Let's give it a radio. var/mob/living/body_backup = null //add reforming -/obj/item/mmi/New() +/obj/item/mmi/Initialize(mapload) + . = ..() radio = new(src)//Spawns a radio inside the MMI. /obj/item/mmi/verb/toggle_radio() @@ -185,16 +186,16 @@ var/ghost_query_type = null var/datum/ghost_query/Q //This is used so we can unregister ourself. -/obj/item/mmi/digital/New() +/obj/item/mmi/digital/Initialize(mapload) + . = ..() src.brainmob = new(src) -// src.brainmob.add_language("Robot Talk")//No binary without a binary communication device +// src.brainmob.add_language(LANGUAGE_ROBOT_TALK)//No binary without a binary communication device src.brainmob.add_language(LANGUAGE_GALCOM) src.brainmob.add_language(LANGUAGE_EAL) src.brainmob.loc = src src.brainmob.container = src src.brainmob.set_stat(CONSCIOUS) src.brainmob.silent = 0 - radio = new(src) dead_mob_list -= src.brainmob /obj/item/mmi/digital/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -300,8 +301,8 @@ origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4) ghost_query_type = /datum/ghost_query/drone_brain -/obj/item/mmi/digital/robot/New() - ..() +/obj/item/mmi/digital/robot/Initialize(mapload) + . = ..() src.brainmob.name = "[pick(list("ADA","DOS","GNU","MAC","WIN","NJS","SKS","DRD","IOS","CRM","IBM","TEX","LVM","BSD",))]-[rand(1000, 9999)]" src.brainmob.real_name = src.brainmob.name @@ -343,8 +344,8 @@ ..() icon_state = "posibrain" -/obj/item/mmi/digital/posibrain/New() - ..() +/obj/item/mmi/digital/posibrain/Initialize(mapload) + . = ..() src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" src.brainmob.real_name = src.brainmob.name diff --git a/code/modules/mob/living/carbon/human/human_species_vr.dm b/code/modules/mob/living/carbon/human/human_species_vr.dm index 4a018a2ed3..be2d418ddb 100644 --- a/code/modules/mob/living/carbon/human/human_species_vr.dm +++ b/code/modules/mob/living/carbon/human/human_species_vr.dm @@ -1,42 +1,42 @@ /mob/living/carbon/human/dummy no_vore = TRUE //Dummies don't need bellies. -/mob/living/carbon/human/sergal/New(var/new_loc) +/mob/living/carbon/human/sergal/Initialize(mapload) h_style = "Sergal Plain" - ..(new_loc, SPECIES_SERGAL) + . = ..(mapload, SPECIES_SERGAL) -/mob/living/carbon/human/akula/New(var/new_loc) - ..(new_loc, SPECIES_AKULA) +/mob/living/carbon/human/akula/Initialize(mapload) + . = ..(mapload, SPECIES_AKULA) -/mob/living/carbon/human/nevrean/New(var/new_loc) - ..(new_loc, SPECIES_NEVREAN) +/mob/living/carbon/human/nevrean/Initialize(mapload) + . = ..(mapload, SPECIES_NEVREAN) -/mob/living/carbon/human/xenochimera/New(var/new_loc) - ..(new_loc, SPECIES_XENOCHIMERA) +/mob/living/carbon/human/xenochimera/Initialize(mapload) + . = ..(mapload, SPECIES_XENOCHIMERA) -/mob/living/carbon/human/spider/New(var/new_loc) - ..(new_loc, SPECIES_VASILISSAN) +/mob/living/carbon/human/spider/Initialize(mapload) + . = ..(mapload, SPECIES_VASILISSAN) -/mob/living/carbon/human/vulpkanin/New(var/new_loc) - ..(new_loc, SPECIES_VULPKANIN) +/mob/living/carbon/human/vulpkanin/Initialize(mapload) + . = ..(mapload, SPECIES_VULPKANIN) -/mob/living/carbon/human/protean/New(var/new_loc) - ..(new_loc, SPECIES_PROTEAN) +/mob/living/carbon/human/protean/Initialize(mapload) + . = ..(mapload, SPECIES_PROTEAN) -/mob/living/carbon/human/alraune/New(var/new_loc) - ..(new_loc, SPECIES_ALRAUNE) +/mob/living/carbon/human/alraune/Initialize(mapload) + . = ..(mapload, SPECIES_ALRAUNE) -/mob/living/carbon/human/shadekin/New(var/new_loc) - ..(new_loc, SPECIES_SHADEKIN) +/mob/living/carbon/human/shadekin/Initialize(mapload) + . = ..(mapload, SPECIES_SHADEKIN) -/mob/living/carbon/human/altevian/New(var/new_loc) - ..(new_loc, SPECIES_ALTEVIAN) +/mob/living/carbon/human/altevian/Initialize(mapload) + . = ..(mapload, SPECIES_ALTEVIAN) -/mob/living/carbon/human/lleill/New(var/new_loc) - ..(new_loc, SPECIES_LLEILL) +/mob/living/carbon/human/lleill/Initialize(mapload) + . = ..(mapload, SPECIES_LLEILL) -/mob/living/carbon/human/hanner/New(var/new_loc) - ..(new_loc, SPECIES_HANNER) +/mob/living/carbon/human/hanner/Initialize(mapload) + . = ..(mapload, SPECIES_HANNER) -/mob/living/carbon/human/sparkledog/New(var/new_loc) - ..(new_loc, SPECIES_SPARKLE) +/mob/living/carbon/human/sparkledog/Initialize(mapload) + . = ..(mapload, SPECIES_SPARKLE) diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index bd1a913214..fc852b91f2 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -101,14 +101,13 @@ return //Constructor allows passing the human to sync damages -/mob/living/simple_mob/slime/promethean/New(var/newloc, var/mob/living/carbon/human/H) - ..() - if(H) - humanform = H - updatehealth() +/mob/living/simple_mob/slime/promethean/Initialize(mapload, var/mob/living/carbon/human/H) + . = ..() + if(!H) + return INITIALIZE_HINT_QDEL - else - qdel(src) + humanform = H + updatehealth() /mob/living/simple_mob/slime/promethean/updatehealth() if(!humanform) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index e59d021f63..c8e4696175 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -3,8 +3,8 @@ name = SPECIES_XENO name_plural = "Xenomorphs" - default_language = "Xenomorph" - language = "Hivemind" + default_language = LANGUAGE_XENOLINGUA + language = LANGUAGE_HIVEMIND assisted_langs = list() unarmed_types = list(/datum/unarmed_attack/claws/strong/xeno, /datum/unarmed_attack/bite/strong/xeno) hud_type = /datum/hud_data/alien diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm index 8dcf913c65..7e9a524b46 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm @@ -7,24 +7,24 @@ new_alien.set_species("Xenomorph [alien_caste]") return new_alien -/mob/living/carbon/human/xdrone/New(var/new_loc) +/mob/living/carbon/human/xdrone/Initialize(mapload) h_style = "Bald" faction = FACTION_XENO - ..(new_loc, SPECIES_XENO_DRONE) + . = ..(mapload, SPECIES_XENO_DRONE) -/mob/living/carbon/human/xsentinel/New(var/new_loc) +/mob/living/carbon/human/xsentinel/Initialize(mapload) h_style = "Bald" faction = FACTION_XENO - ..(new_loc, SPECIES_XENO_SENTINEL) + . = ..(mapload, SPECIES_XENO_SENTINEL) -/mob/living/carbon/human/xhunter/New(var/new_loc) +/mob/living/carbon/human/xhunter/Initialize(mapload) h_style = "Bald" faction = FACTION_XENO - ..(new_loc, SPECIES_XENO_HUNTER) + . = ..(mapload, SPECIES_XENO_HUNTER) -/mob/living/carbon/human/xqueen/New(var/new_loc) +/mob/living/carbon/human/xqueen/Initialize(mapload) h_style = "Bald" faction = FACTION_XENO - ..(new_loc, SPECIES_XENO_QUEEN) + . = ..(mapload, SPECIES_XENO_QUEEN) //Removed AddInfectionImages, no longer required. diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index aba22fd9da..5d1df59e49 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -26,8 +26,8 @@ enhanced = 1 qdel(O) */ -/obj/item/slime_extract/New() - ..() +/obj/item/slime_extract/Initialize(mapload) + . = ..() create_reagents(5) // reagents.add_reagent(REAGENT_ID_SLIMEJELLY, 30) @@ -326,8 +326,8 @@ var/Flush = 30 var/Uses = 5 // uses before it goes inert -/obj/item/slime_core/New() - ..() +/obj/item/slime_core/Initialize(mapload) + . = ..() create_reagents(100) POWERFLAG = rand(1,10) Uses = rand(7, 25) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e9c4ea2f7b..0bd7041750 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,5 +1,5 @@ -/mob/living/New() - ..() +/mob/living/Initialize(mapload) + . = ..() //Prime this list if we need it. if(has_huds) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c8c88f5816..42a24b0fb4 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -106,7 +106,8 @@ var/list/ai_verbs_default = list( remove_verb(src, ai_verbs_default) remove_verb(src, silicon_subsystems) -/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/mmi/B, var/safety = 0) +/mob/living/silicon/ai/Initialize(mapload, is_decoy, datum/ai_laws/L, obj/item/mmi/B, safety = FALSE) + announcement = new() announcement.title = "A.I. Announcement" announcement.announcement_type = "A.I. Announcement" @@ -128,7 +129,6 @@ var/list/ai_verbs_default = list( anchored = TRUE canmove = 0 density = TRUE - loc = loc if(!is_dummy) aiCommunicator = new /obj/item/communicator/integrated(src) @@ -156,7 +156,7 @@ var/list/ai_verbs_default = list( add_ai_verbs(src) //Languages - add_language("Robot Talk", 1) + add_language(LANGUAGE_ROBOT_TALK, 1) add_language(LANGUAGE_GALCOM, 1) add_language(LANGUAGE_SOL_COMMON, 1) add_language(LANGUAGE_UNATHI, 1) @@ -175,20 +175,25 @@ var/list/ai_verbs_default = list( if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal. - qdel(src)//Delete AI. - return - else - if (B.brainmob.mind) - B.brainmob.mind.transfer_to(src) + return INITIALIZE_HINT_QDEL //Delete AI. - on_mob_init() + if (B.brainmob.mind) + B.brainmob.mind.transfer_to(src) + + on_mob_init() - spawn(5) - new /obj/machinery/ai_powersupply(src) ai_list += src - ..() - return + . = ..() + + new /obj/machinery/ai_powersupply(src) + + if(CONFIG_GET(flag/allow_ai_shells)) + add_verb(src, /mob/living/silicon/ai/proc/deploy_to_shell_act) + + create_eyeobj() + if(eyeobj) + eyeobj.loc = src.loc /mob/living/silicon/ai/proc/on_mob_init() var/init_text = list(span_bold("You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras)."), @@ -235,6 +240,7 @@ var/list/ai_verbs_default = list( QDEL_NULL(aiCamera) hack = null + destroy_eyeobj() return ..() diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm index 797716d9a5..aea17471ae 100644 --- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm +++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm @@ -1,11 +1,6 @@ /mob/living/silicon/ai var/mob/living/silicon/robot/deployed_shell = null //For shell control -/mob/living/silicon/ai/Initialize(mapload) - if(CONFIG_GET(flag/allow_ai_shells)) - add_verb(src, /mob/living/silicon/ai/proc/deploy_to_shell_act) - return ..() - /mob/living/silicon/ai/proc/deploy_to_shell(var/mob/living/silicon/robot/target) if(!CONFIG_GET(flag/allow_ai_shells)) to_chat(src, span_warning("AI Shells are not allowed on this server. You shouldn't have this verb because of it, so consider making a bug report.")) diff --git a/code/modules/mob/living/silicon/ai/ai_vr.dm b/code/modules/mob/living/silicon/ai/ai_vr.dm index 1002308971..622fcd0b4e 100644 --- a/code/modules/mob/living/silicon/ai/ai_vr.dm +++ b/code/modules/mob/living/silicon/ai/ai_vr.dm @@ -1,5 +1,5 @@ -/mob/living/silicon/ai/Initialize(mapload, var/datum/ai_laws/L, var/obj/item/mmi/B, var/safety = 0) - . = ..(mapload, L, B, safety) +/mob/living/silicon/ai/Initialize(mapload, is_decoy, var/datum/ai_laws/L, var/obj/item/mmi/B, var/safety = FALSE) + . = ..() add_language(LANGUAGE_BIRDSONG, 1) add_language(LANGUAGE_SAGARU, 1) add_language(LANGUAGE_CANILUNZT, 1) diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm index 3a43ef2bb2..c859d9d3ac 100644 --- a/code/modules/mob/living/silicon/decoy/decoy.dm +++ b/code/modules/mob/living/silicon/decoy/decoy.dm @@ -5,8 +5,5 @@ anchored = TRUE // -- TLE canmove = 0 -/mob/living/silicon/decoy/New() - src.icon = 'icons/mob/AI.dmi' - src.icon_state = "ai" - src.anchored = TRUE - src.canmove = 0 +/mob/living/silicon/decoy/Initialize(mapload) + . = ..(mapload, TRUE) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index c00cdb0802..11d45ff662 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -112,9 +112,13 @@ var/our_icon_rotation = 0 -/mob/living/silicon/pai/New(var/obj/item/paicard) - src.loc = paicard - card = paicard +/mob/living/silicon/pai/Initialize(mapload) + . = ..() + + card = loc + if(!istype(card)) + return INITIALIZE_HINT_QDEL + sradio = new(src) communicator = new(src) if(card) @@ -135,15 +139,14 @@ //PDA pda = new(src) - spawn(5) - pda.ownjob = "Personal Assistant" - pda.owner = text("[]", src) - pda.name = pda.owner + " (" + pda.ownjob + ")" + pda.ownjob = "Personal Assistant" + pda.owner = text("[]", src) + pda.name = pda.owner + " (" + pda.ownjob + ")" - var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger) - if(M) - M.toff = FALSE - ..() + var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger) + if(M) + M.toff = FALSE + . = ..() /mob/living/silicon/pai/Login() ..() diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm index f339247cf8..ed42e2cf95 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm @@ -8,10 +8,7 @@ throwforce = 0 attack_verb = list("nuzzled", "nosed", "booped") w_class = ITEMSIZE_TINY - -/obj/item/boop_module/New() - ..() - flags |= NOBLUDGEON //No more attack messages + flags = NOBLUDGEON //No more attack messages /obj/item/boop_module/attack_self(mob/user) if (!( istype(user.loc, /turf) )) @@ -130,10 +127,7 @@ hitsound = 'sound/effects/attackblob.ogg' var/emagged = 0 var/busy = 0 //prevents abuse and runtimes - -/obj/item/robot_tongue/New() - ..() - flags |= NOBLUDGEON //No more attack messages + flags = NOBLUDGEON //No more attack messages /obj/item/robot_tongue/attack_self(mob/user) var/mob/living/silicon/robot/R = user @@ -213,10 +207,7 @@ icon = 'icons/mob/dogborg_vr.dmi' icon_state = "scrub0" var/enabled = FALSE - -/obj/item/pupscrubber/New() - ..() - flags |= NOBLUDGEON + flags = NOBLUDGEON /obj/item/pupscrubber/attack_self(mob/user) var/mob/living/silicon/robot/R = user @@ -320,10 +311,7 @@ force = 0 throwforce = 0 var/bluespace = FALSE - -/obj/item/dogborg/pounce/New() - ..() - flags |= NOBLUDGEON + flags = NOBLUDGEON /obj/item/dogborg/pounce/attack_self(mob/user) var/mob/living/silicon/robot/R = user diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm index 56b59b3b03..2e46709dff 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm @@ -43,10 +43,10 @@ var/recycles = FALSE var/medsensor = TRUE //Does belly sprite come with patient ok/dead light? var/obj/item/healthanalyzer/med_analyzer = null + flags = NOBLUDGEON -/obj/item/dogborg/sleeper/New() - ..() - flags |= NOBLUDGEON //No more attack messages +/obj/item/dogborg/sleeper/Initialize(mapload) + . = ..() files = new /datum/research/techonly(src) med_analyzer = new /obj/item/healthanalyzer diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 241ce186f6..d8bb48352d 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -102,22 +102,19 @@ var/list/mob_hat_cache = list() can_pick_shell = FALSE shell_accessories = list("eyes-miningdrone") -/mob/living/silicon/robot/drone/New() - ..() +/mob/living/silicon/robot/drone/Initialize(mapload, is_decoy) + . = ..(mapload, is_decoy, FALSE, TRUE) add_verb(src, /mob/living/proc/ventcrawl) add_verb(src, /mob/living/proc/hide) - remove_language("Robot Talk") - add_language("Robot Talk", 0) - add_language("Drone Talk", 1) + remove_language(LANGUAGE_ROBOT_TALK) + add_language(LANGUAGE_ROBOT_TALK, 0) + add_language(LANGUAGE_DRONE_TALK, 1) serial_number = rand(0,999) //They are unable to be upgraded, so let's give them a bit of a better battery. cell.maxcharge = 10000 cell.charge = 10000 - // NO BRAIN. - mmi = null - //We need to screw with their HP a bit. They have around one fifth as much HP as a full borg. for(var/V in components) if(V != "power cell") var/datum/robot_component/C = components[V] diff --git a/code/modules/mob/living/silicon/robot/drone/drone_say.dm b/code/modules/mob/living/silicon/robot/drone/drone_say.dm index c16ea267ac..286124b355 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_say.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_say.dm @@ -14,7 +14,7 @@ return emote(copytext(message,2)) if(copytext(message,1,2) == ";") - var/datum/language/L = GLOB.all_languages["Drone Talk"] + var/datum/language/L = GLOB.all_languages[LANGUAGE_DRONE_TALK] if(istype(L)) return L.broadcast(src,trim(copytext(message,2))) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 63525a83e0..0533ef79d7 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -140,13 +140,13 @@ vore_fullness_ex = list() vore_icon_bellies = list() -/mob/living/silicon/robot/New(loc, var/unfinished = 0) +/mob/living/silicon/robot/Initialize(mapload, is_decoy, unfinished = FALSE) spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) robotact = new(src) - add_language("Robot Talk", 1) + add_language(LANGUAGE_ROBOT_TALK, 1) add_language(LANGUAGE_GALCOM, 1) add_language(LANGUAGE_EAL, 1) @@ -183,7 +183,7 @@ else if(ispath(cell)) cell = new cell(src) - ..() + . = ..() if(cell) var/datum/robot_component/cell_component = components["power cell"] @@ -315,7 +315,7 @@ mmi.brainmob.languages = M.original_languages else mmi.brainmob.languages = languages - mmi.brainmob.remove_language("Robot Talk") + mmi.brainmob.remove_language(LANGUAGE_ROBOT_TALK) mind.transfer_to(mmi.brainmob) else if(!shell) // Shells don't have brainmbos in their MMIs. to_chat(src, span_danger("Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.")) diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 181bd148fc..cd04086258 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -12,10 +12,14 @@ var/obj/item/loaded_item //What is currently inside the analyzer. -/obj/item/portable_destructive_analyzer/New() - ..() +/obj/item/portable_destructive_analyzer/Initialize(mapload) + . = ..() files = new /datum/research/techonly(src) //Setup the research data holder. +/obj/item/portable_destructive_analyzer/Destroy() + qdel_null(files) + . = ..() + /obj/item/portable_destructive_analyzer/attack_self(user as mob) var/response = tgui_alert(user, "Analyzing the item inside will *DESTROY* the item for good.\n\ Syncing to the research server will send the data that is stored inside to research.\n\ @@ -606,9 +610,9 @@ var/overload_time = 0 //Stores the time of overload var/last_flash = 0 //Stores the time of last flash -/obj/item/borg/combat/shield/New() +/obj/item/borg/combat/shield/Initialize(mapload) + . = ..() START_PROCESSING(SSobj, src) - ..() /obj/item/borg/combat/shield/Destroy() STOP_PROCESSING(SSobj, src) diff --git a/code/modules/mob/living/silicon/robot/sprites/standard.dm b/code/modules/mob/living/silicon/robot/sprites/standard.dm index 01a8f6efd2..bbc2cac30f 100644 --- a/code/modules/mob/living/silicon/robot/sprites/standard.dm +++ b/code/modules/mob/living/silicon/robot/sprites/standard.dm @@ -169,7 +169,7 @@ can_be_pushed = 0 -/obj/item/robot_module/robot/standard/hound/New(var/mob/living/silicon/robot/R) +/obj/item/robot_module/robot/standard/hound/create_equipment(mob/living/silicon/robot/robot) ..() src.modules += new /obj/item/melee/baton/loaded(src) src.modules += new /obj/item/tool/wrench/cyborg(src) @@ -203,5 +203,4 @@ add_verb(R,/mob/living/proc/toggle_rider_reins) add_verb(R,/mob/living/proc/shred_limb) add_verb(R,/mob/living/silicon/robot/proc/rest_style) - ..() */ diff --git a/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm b/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm index 78253a9ec4..b1a1655670 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/boozeborg.dm @@ -46,7 +46,8 @@ What Borgs are available is sadly handled in the above file in the proc "Vampire's Aid" = "boozeborg(red)", "Vodka Komrade" = "boozeborg(vodka)" ) -/obj/item/robot_module/robot/booze/New(var/mob/living/silicon/robot/R) +/obj/item/robot_module/robot/booze/create_equipment(mob/living/silicon/robot/robot) + ..() src.modules += new /obj/item/gripper/service(src) //src.modules += new /obj/item/reagent_containers/glass/bucket(src) //src.modules += new /obj/item/material/minihoe(src) @@ -111,7 +112,6 @@ What Borgs are available is sadly handled in the above file in the proc R.vore_capacity_ex = list("stomach" = 1) R.wideborg = TRUE add_verb(R,/mob/living/silicon/robot/proc/ex_reserve_refill) //TGPanel - ..() /obj/item/robot_module/robot/booze/respawn_consumable(var/mob/living/silicon/robot/R, var/amount) var/obj/item/reagent_containers/food/condiment/enzyme/E = locate() in src.modules 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 0cae32e274..9a6f45fb3f 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 @@ -27,7 +27,8 @@ /obj/item/robot_module/robot/exploration can_be_pushed = 0 -/obj/item/robot_module/robot/exploration/New(var/mob/living/silicon/robot/R) +/obj/item/robot_module/robot/exploration/create_equipment(mob/living/silicon/robot/robot) + ..() src.modules += new /obj/item/dogborg/sleeper/exploration(src) src.modules += new /obj/item/cataloguer(src) src.modules += new /obj/item/gun/energy/robotic/flare(src) @@ -40,5 +41,3 @@ src.modules += new /obj/item/card/id/exploration/borg(src) src.emag += new /obj/item/melee/robotic/jaws/big/explojaws(src) - - ..() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 2e090e2598..9d9cba77b3 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -29,15 +29,16 @@ var/hudmode = null -/mob/living/silicon/New() +/mob/living/silicon/Initialize(mapload, is_decoy = FALSE) + . = ..() silicon_mob_list += src - ..() - add_language(LANGUAGE_GALCOM) - apply_default_language(GLOB.all_languages[LANGUAGE_GALCOM]) - init_id() - init_subsystems() + if(!is_decoy) + add_language(LANGUAGE_GALCOM) + apply_default_language(GLOB.all_languages[LANGUAGE_GALCOM]) + init_id() + init_subsystems() - AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 1, -6) + AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 1, -6) /mob/living/silicon/Destroy() silicon_mob_list -= src diff --git a/code/modules/mob/living/simple_mob/overmap_mob_vr.dm b/code/modules/mob/living/simple_mob/overmap_mob_vr.dm index 32b3cfa37c..9f07f077da 100644 --- a/code/modules/mob/living/simple_mob/overmap_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/overmap_mob_vr.dm @@ -30,13 +30,9 @@ var/mob/living/simple_mob/vore/overmap/parent_mob_type var/mob/living/simple_mob/vore/overmap/parent -/obj/effect/overmap/visitable/simplemob/New(newloc, new_parent) - if(new_parent) - parent = new_parent - return ..() - -/obj/effect/overmap/visitable/simplemob/Initialize(mapload) +/obj/effect/overmap/visitable/simplemob/Initialize(mapload, new_parent) . = ..() + parent = new_parent if(!parent_mob_type && !parent) log_and_message_admins("An improperly configured OM mob event tried to spawn, and was deleted.") return INITIALIZE_HINT_QDEL @@ -140,13 +136,9 @@ var/om_child_type var/shipvore = FALSE //Enable this to allow the mob to eat spaceships by dragging them onto its sprite. -/mob/living/simple_mob/vore/overmap/New(mapload, new_child) - if(new_child) - child_om_marker = new_child - return ..() - -/mob/living/simple_mob/vore/overmap/Initialize(mapload) +/mob/living/simple_mob/vore/overmap/Initialize(mapload, new_child) . = ..() + child_om_marker = new_child if(!om_child_type) log_and_message_admins("An improperly configured OM mob tried to spawn, and was deleted.") return INITIALIZE_HINT_QDEL @@ -174,13 +166,9 @@ var/mob/living/simple_mob/vore/overmap/parent_mob_type var/mob/living/simple_mob/vore/overmap/parent -/obj/effect/overmap/visitable/ship/simplemob/New(newloc, new_parent) - if(new_parent) - parent = new_parent - return ..() - -/obj/effect/overmap/visitable/ship/simplemob/Initialize(mapload) +/obj/effect/overmap/visitable/ship/simplemob/Initialize(mapload, new_parent) . = ..() + parent = new_parent if(!parent_mob_type && !parent) log_and_message_admins("An improperly configured OM mob event tried to spawn, and was deleted.") return INITIALIZE_HINT_QDEL diff --git a/code/modules/mob/living/simple_mob/sd_pets.dm b/code/modules/mob/living/simple_mob/sd_pets.dm index 3e3ea4cd66..1878c74a72 100644 --- a/code/modules/mob/living/simple_mob/sd_pets.dm +++ b/code/modules/mob/living/simple_mob/sd_pets.dm @@ -38,20 +38,16 @@ desc = "Don't make fun, they have a condition." digestable = 0 -/mob/living/simple_mob/animal/passive/mouse/jerboa/leggy/New() - ..() - name = initial(name) - desc = initial(desc) +/mob/living/simple_mob/animal/passive/mouse/jerboa/leggy/Initialize(mapload) + . = ..(mapload, TRUE) /mob/living/simple_mob/animal/passive/mouse/brown/feivel name = "Feivel" desc = "Heading out west wasn't far enough, so he's going to space!" digestable = 0 -/mob/living/simple_mob/animal/passive/mouse/brown/feivel/New() - ..() - name = initial(name) - desc = initial(desc) +/mob/living/simple_mob/animal/passive/mouse/brown/feivel/Initialize(mapload) + . = ..(mapload, TRUE) /mob/living/simple_mob/animal/passive/cat/jones name = "Jones" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/jellyfish.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/jellyfish.dm index 4c49f016e9..0ef823a7c8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/jellyfish.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/jellyfish.dm @@ -122,12 +122,12 @@ GLOBAL_VAR_INIT(jellyfish_count, 0) if(prob(25)) L.adjustHalLoss(leech) -/mob/living/simple_mob/vore/alienanimals/space_jellyfish/New(newloc, jellyfish) +/mob/living/simple_mob/vore/alienanimals/space_jellyfish/Initialize(mapload, jellyfish) + . = ..() GLOB.jellyfish_count ++ var/mob/living/simple_mob/vore/alienanimals/space_jellyfish/parent = jellyfish if(parent) parent.faction = faction - ..() /mob/living/simple_mob/vore/alienanimals/space_jellyfish/death() . = ..() @@ -176,11 +176,7 @@ GLOBAL_VAR_INIT(jellyfish_count, 0) var/inherited_nutriment = 0 -/obj/item/reagent_containers/food/snacks/jellyfishcore/New(newloc, inherit) - inherited_nutriment = inherit - . = ..() - -/obj/item/reagent_containers/food/snacks/jellyfishcore/Initialize(mapload) - nutriment_amt += inherited_nutriment +/obj/item/reagent_containers/food/snacks/jellyfishcore/Initialize(mapload, inherit) . = ..() + nutriment_amt += inherit reagents.add_reagent(REAGENT_ID_NUTRIMENT, nutriment_amt, nutriment_desc) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm index bcd3e15331..c3683c74f7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/teppi.dm @@ -687,7 +687,6 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? var/nutrition_cost = 500 + (nutrition / 2) adjust_nutrition(-nutrition_cost) new /mob/living/simple_mob/vore/alienanimals/teppi(loc, src) - qdel(src) else visible_message("\The [src] whines pathetically...", runemessage = "whines") if(prob(50)) @@ -762,13 +761,14 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? return TRUE //Handles both growing up from a baby and also passing parent details to new babies. -/mob/living/simple_mob/vore/alienanimals/teppi/New(newloc, teppi1, teppi2) +/mob/living/simple_mob/vore/alienanimals/teppi/Initialize(mapload, teppi1, teppi2) GLOB.teppi_count ++ if(teppi1 && !teppi2) inherit_from_baby(teppi1) + qdel(teppi1) else if (teppi1 && teppi2) inherit_from_parents(teppi1, teppi2) - ..() + . = ..() /mob/living/simple_mob/vore/alienanimals/teppi/Destroy() GLOB.teppi_count -- @@ -1134,13 +1134,13 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? return //This a teppi with funny colors will spawn! -/mob/living/simple_mob/vore/alienanimals/teppi/mutant/New() +/mob/living/simple_mob/vore/alienanimals/teppi/mutant/Initialize(mapload) teppi_mutate = TRUE . = ..() //Custom teppi colors! For funzies. -/mob/living/simple_mob/vore/alienanimals/teppi/cass/New() +/mob/living/simple_mob/vore/alienanimals/teppi/cass/Initialize(mapload) inherit_colors = TRUE color = "#c69c85" marking_color = "#eeb698" @@ -1151,7 +1151,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? horn_type = "0" . = ..() -/mob/living/simple_mob/vore/alienanimals/teppi/baby/cass/New() +/mob/living/simple_mob/vore/alienanimals/teppi/baby/cass/Initialize(mapload) inherit_colors = TRUE color = "#c69c85" marking_color = "#eeb698" @@ -1162,7 +1162,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? horn_type = "0" . = ..() -/mob/living/simple_mob/vore/alienanimals/teppi/aronai/New() +/mob/living/simple_mob/vore/alienanimals/teppi/aronai/Initialize(mapload) inherit_colors = TRUE color = "#404040" marking_color = "#222222" @@ -1173,7 +1173,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have? horn_type = "1" . = ..() -/mob/living/simple_mob/vore/alienanimals/teppi/lira/New() +/mob/living/simple_mob/vore/alienanimals/teppi/lira/Initialize(mapload) inherit_colors = TRUE color = "#fdfae9" marking_color = "#ffffc0" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/chicken.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/chicken.dm index c4ccbac387..28a70575f9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/chicken.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/chicken.dm @@ -32,8 +32,8 @@ GLOBAL_VAR_INIT(chicken_count, 0) // How mant chickens DO we have? var/eggsleft = 0 var/body_color -/mob/living/simple_mob/animal/passive/chicken/New() - ..() +/mob/living/simple_mob/animal/passive/chicken/Initialize(mapload) + . = ..() if(!body_color) body_color = pick( list("brown","black","white") ) icon_state = "chicken_[body_color]" @@ -132,8 +132,8 @@ GLOBAL_VAR_INIT(chicken_count, 0) // How mant chickens DO we have? var/amount_grown = 0 -/mob/living/simple_mob/animal/passive/chick/New() - ..() +/mob/living/simple_mob/animal/passive/chick/Initialize(mapload) + . = ..() pixel_x = rand(-6, 6) pixel_y = rand(0, 10) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm index 556d10d678..b3065ebd23 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/cow.dm @@ -24,10 +24,11 @@ var/datum/reagents/udder = null -/mob/living/simple_mob/animal/passive/cow/New() +/mob/living/simple_mob/animal/passive/cow/Initialize(mapload) + . = ..() + udder = new(50) udder.my_atom = src - ..() /mob/living/simple_mob/animal/passive/cow/attackby(var/obj/item/O as obj, var/mob/user as mob) var/obj/item/reagent_containers/glass/G = O diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm index 4b949d687f..28f527494e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm @@ -27,10 +27,10 @@ var/datum/reagents/udder = null -/mob/living/simple_mob/animal/goat/New() +/mob/living/simple_mob/animal/goat/Initialize(mapload) + . = ..() udder = new(50) udder.my_atom = src - ..() /mob/living/simple_mob/animal/goat/Life() . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm index 8826e97a42..534be53c10 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse.dm @@ -44,13 +44,13 @@ var/body_color //brown, gray, white and black, leave blank for random -/mob/living/simple_mob/animal/passive/mouse/New() - ..() +/mob/living/simple_mob/animal/passive/mouse/Initialize(mapload, keep_parent_data) + . = ..() add_verb(src, /mob/living/proc/ventcrawl) add_verb(src, /mob/living/proc/hide) - if(name == initial(name)) + if(!keep_parent_data && name == initial(name)) name = "[name] ([rand(1, 1000)])" real_name = name @@ -61,7 +61,7 @@ icon_living = "mouse_[body_color]" icon_dead = "mouse_[body_color]_dead" icon_rest = "mouse_[body_color]_sleep" - if (body_color != "rat") + if (!keep_parent_data && body_color != "rat") desc = "A small [body_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself." holder_type = /obj/item/holder/mouse/rat if (body_color == "operative") @@ -131,10 +131,8 @@ name = "Tom" desc = "Jerry the cat is not amused." -/mob/living/simple_mob/animal/passive/mouse/brown/Tom/New() - ..() - // Change my name back, don't want to be named Tom (666) - name = initial(name) +/mob/living/simple_mob/animal/passive/mouse/brown/Tom/Initialize(mapload) + . = ..(mapload, TRUE) /mob/living/simple_mob/animal/passive/mouse/black body_color = "black" @@ -184,10 +182,8 @@ name = "Agent Cheese" desc = "I like my cheese Swiss... not American." -/mob/living/simple_mob/animal/passive/mouse/operative/agent_cheese/New() - ..() - // Change my name back, don't want to be named agent_cheese (666) - name = initial(name) +/mob/living/simple_mob/animal/passive/mouse/operative/agent_cheese/Initialize(mapload) + . = ..(mapload, TRUE) // Mouse noises /datum/say_list/mouse diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm index 45aab4c716..25fa2dc865 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm @@ -56,11 +56,8 @@ desc = "Dainty, well groomed and cared for, her eyes glitter with untold knowledge..." gender = FEMALE -/mob/living/simple_mob/animal/passive/mouse/white/apple/New() - ..() - // Change my name back, don't want to be named Apple (666) - name = initial(name) - desc = initial(desc) +/mob/living/simple_mob/animal/passive/mouse/white/apple/Initialize(mapload, keep_parent_data) + . = ..(mapload, TRUE) /obj/item/holder/mouse/attack_self(mob/living/carbon/user) user.setClickCooldown(user.get_attack_speed()) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/snake_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/snake_vr.dm index ffc79cee70..db6d1ebb8b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/snake_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/snake_vr.dm @@ -212,7 +212,7 @@ icon_state = "sneksnakbox" storage_slots = 7 -/obj/item/storage/box/snakesnackbox/New() +/obj/item/storage/box/snakesnackbox/Initialize(mapload) new /obj/item/reagent_containers/food/snacks/snakesnack(src) new /obj/item/reagent_containers/food/snacks/snakesnack(src) new /obj/item/reagent_containers/food/snacks/snakesnack(src) @@ -220,4 +220,4 @@ new /obj/item/reagent_containers/food/snacks/snakesnack(src) new /obj/item/reagent_containers/food/snacks/snakesnack(src) new /obj/item/reagent_containers/food/snacks/snakesnack(src) - ..() + . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm index 7f01d15787..a0ce4d5a41 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm @@ -19,17 +19,13 @@ var/prey_ooc_likes var/prey_ooc_dislikes -/mob/living/dominated_brain/New(loc, var/mob/living/pred, preyname, var/mob/living/prey) - . = ..() +/mob/living/dominated_brain/Initialize(mapload, var/mob/living/pred, preyname, var/mob/living/prey) prey_name = preyname if(prey) prey_body = prey pred_body = pred - -/mob/living/dominated_brain/Initialize(mapload) if(!isliving(loc)) - qdel(src) - return + return INITIALIZE_HINT_QDEL . = ..() lets_register_our_signals() add_verb(src, /mob/living/dominated_brain/proc/resist_control) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm index 58fdaa323b..caeebf9c17 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm @@ -341,7 +341,8 @@ GLOBAL_LIST_INIT(valid_random_lamias, list( )) /mob/living/simple_mob/vore/lamia/random -/mob/living/simple_mob/vore/lamia/random/New() + +/mob/living/simple_mob/vore/lamia/random/Initialize(mapload) var/mob/living/simple_mob/vore/lamia/new_attrs = pick(GLOB.valid_random_lamias) name = initial(new_attrs.name) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm index d7a867fbaf..f7d6fdcdca 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm @@ -312,23 +312,22 @@ var/prey_ckey -/mob/living/simple_mob/vore/morph/dominated_prey/New(loc, pckey, parent, prey) +/mob/living/simple_mob/vore/morph/dominated_prey/Initialize(mapload, pckey, parent, prey) . = ..() - if(pckey) - prey_ckey = pckey - parent_morph = parent - prey_body = prey - prey_body.forceMove(get_turf(parent_morph)) - prey_body.muffled = FALSE - prey_body.absorbed = FALSE - absorbed = TRUE - ckey = prey_ckey - prey_body.ckey = parent_morph.original_ckey - parent_morph.forceMove(src) - name = "[prey_body.name]" - to_chat(prey_body, span_notice("You have completely assumed the form of [prey_body]. Your form is now unable to change anymore until you restore control back to them. You can do this by 'ejecting' them from your [prey_body.vore_selected]. This will not actually release them from your body in this state, but instead return control to them, and restore you to your original form.")) - else - qdel(src) + if(!pckey) + return INITIALIZE_HINT_QDEL + prey_ckey = pckey + parent_morph = parent + prey_body = prey + prey_body.forceMove(get_turf(parent_morph)) + prey_body.muffled = FALSE + prey_body.absorbed = FALSE + absorbed = TRUE + ckey = prey_ckey + prey_body.ckey = parent_morph.original_ckey + parent_morph.forceMove(src) + name = "[prey_body.name]" + to_chat(prey_body, span_notice("You have completely assumed the form of [prey_body]. Your form is now unable to change anymore until you restore control back to them. You can do this by 'ejecting' them from your [prey_body.vore_selected]. This will not actually release them from your body in this state, but instead return control to them, and restore you to your original form.")) /mob/living/simple_mob/vore/morph/dominated_prey/death(gibbed) . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/succubi.dm b/code/modules/mob/living/simple_mob/subtypes/vore/succubi.dm index 17dc8122cd..61ca1c4279 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/succubi.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/succubi.dm @@ -31,8 +31,8 @@ faction = FACTION_SUCCUBUS -/mob/living/simple_mob/vore/succubus/New() - ..() +/mob/living/simple_mob/vore/succubus/Initialize(mapload) + . = ..() if(random_skin) icon_living = pick(skins) icon_rest = "[icon_living]asleep" diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/wolftaur.dm b/code/modules/mob/living/simple_mob/subtypes/vore/wolftaur.dm index 95e413ca15..295dfe677b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/wolftaur.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/wolftaur.dm @@ -38,8 +38,8 @@ pixel_y = 0 faction = FACTION_WOLFTAUR -/mob/living/simple_mob/vore/wolftaur/New() - ..() +/mob/living/simple_mob/vore/wolftaur/Initialize(mapload) + . = ..() if(random_skin) icon_living = pick(skins) icon_rest = "[icon_living]_rest" diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 7cc296d9e1..7a7c50ab8e 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -36,15 +36,13 @@ destroy_on_drop = TRUE //VOREStation Edit -/obj/item/grab/New(mob/user, mob/victim) - ..() - loc = user - assailant = user +/obj/item/grab/Initialize(mapload, mob/victim) + . = ..() + assailant = loc affecting = victim - if(affecting.anchored || !assailant.Adjacent(victim)) - qdel(src) - return + if(!istype(assailant) || !istype(affecting) || affecting.anchored || !assailant.Adjacent(victim)) + return INITIALIZE_HINT_QDEL affecting.grabbed_by += src affecting.reveal(span_warning("You are revealed as [assailant] grabs you.")) diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index 99a9df9ad9..ae629be708 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -130,10 +130,8 @@ var/invis_toggle = FALSE var/list/sub_planes -/obj/screen/plane_master/New() - ..(null) //Never be in anything ever. - /obj/screen/plane_master/proc/backdrop(mob/mymob) + return /obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha) if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255) diff --git a/code/modules/mob/mob_planes_vr.dm b/code/modules/mob/mob_planes_vr.dm index 0cfc934109..291d6a2c13 100644 --- a/code/modules/mob/mob_planes_vr.dm +++ b/code/modules/mob/mob_planes_vr.dm @@ -4,10 +4,10 @@ plane_masters[VIS_CH_HEALTH_VR] = new /obj/screen/plane_master{plane = PLANE_CH_HEALTH_VR} //Health bar but transparent at 100 plane_masters[VIS_CH_BACKUP] = new /obj/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status plane_masters[VIS_CH_VANTAG] = new /obj/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags - plane_masters[VIS_CH_STOMACH] = new /obj/screen/plane_master{plane = PLANE_CH_STOMACH} //Stomach - plane_masters[VIS_SOULCATCHER] = new /obj/screen/plane_master{plane = PLANE_SOULCATCHER} // Soulcatcher + plane_masters[VIS_CH_STOMACH] = new /obj/screen/plane_master{plane = PLANE_CH_STOMACH} //Stomach + plane_masters[VIS_SOULCATCHER] = new /obj/screen/plane_master{plane = PLANE_SOULCATCHER} // Soulcatcher - plane_masters[VIS_AUGMENTED] = new /obj/screen/plane_master/augmented(M = my_mob) //Augmented reality + plane_masters[VIS_AUGMENTED] = new /obj/screen/plane_master/augmented(null, my_mob) //Augmented reality ..() ///////////////// @@ -17,8 +17,8 @@ var/state = FALSE //Saves cost with the lists var/mob/my_mob -/obj/screen/plane_master/augmented/New(null, var/mob/M) - ..() +/obj/screen/plane_master/augmented/Initialize(mapload, var/mob/M) + . = ..() my_mob = M /obj/screen/plane_master/augmented/Destroy() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a3dbaae7f6..6bbfb0b2df 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -22,11 +22,9 @@ var/created_for -/mob/new_player/New() - mob_list += src +/mob/new_player/Initialize(mapload) + . = ..() add_verb(src, /mob/proc/insidePanel) - flags |= ATOM_INITIALIZED // Explicitly don't use Initialize(). New players join super early and use New() - /mob/new_player/Destroy() if(panel) @@ -249,7 +247,6 @@ voted = 1 break qdel(query) - //This is a safety switch, so only valid options pass through var/option = "UNKNOWN" switch(href_list["privacy_poll"]) @@ -447,6 +444,30 @@ spawning = 1 close_spawn_windows() + var/obj/item/itemtf = join_props["itemtf"] + if(itemtf && istype(itemtf, /obj/item/capture_crystal)) + var/obj/item/capture_crystal/cryst = itemtf + if(cryst.spawn_mob_type) + // We want to be a spawned mob instead of a person aaaaa + var/mob/living/carrier = join_props["carrier"] + var/vorgans = join_props["vorgans"] + cryst.bound_mob = new cryst.spawn_mob_type(cryst) + cryst.spawn_mob_type = null + cryst.bound_mob.ai_holder_type = /datum/ai_holder/simple_mob/inert + cryst.bound_mob.key = src.key + log_and_message_admins("[key_name_admin(src)] joined [cryst.bound_mob] inside a capture crystal [ADMIN_FLW(cryst.bound_mob)]") + if(vorgans) + cryst.bound_mob.copy_from_prefs_vr() + if(istype(carrier)) + cryst.capture(cryst.bound_mob, carrier) + else + //Something went wrong, but lets try to do as much as we can. + cryst.bound_mob.capture_caught = TRUE + cryst.persist_storable = FALSE + cryst.update_icon() + qdel(src) + return + job_master.AssignRole(src, rank, 1) var/mob/living/character = create_character(T) //creates the human and transfers vars and mind @@ -484,7 +505,15 @@ ticker.mode.latespawn(character) - if(J.mob_type & JOB_SILICON) + if(rank == JOB_OUTSIDER) + log_and_message_admins("has joined the round as non-crew. (JMP)",character) + if(!(J.mob_type & JOB_SILICON)) + ticker.minds += character.mind + else if(rank == JOB_ANOMALY) + log_and_message_admins("has joined the round as anomaly. (JMP)",character) + if(!(J.mob_type & JOB_SILICON)) + ticker.minds += character.mind + else if(J.mob_type & JOB_SILICON) AnnounceCyborg(character, rank, join_message, announce_channel, character.z) else AnnounceArrival(character, rank, join_message, announce_channel, character.z) @@ -496,6 +525,41 @@ if(imp.handle_implant(character,character.zone_sel.selecting)) imp.post_implant(character) + var/gut = join_props["voreny"] + var/start_absorbed = join_props["absorb"] + var/mob/living/prey = join_props["prey"] + if(itemtf && istype(itemtf, /obj/item/capture_crystal)) + //We want to be in the crystal, not actually possessing the crystal. + var/obj/item/capture_crystal/cryst = itemtf + var/mob/living/carrier = join_props["carrier"] + cryst.capture(character, carrier) + character.forceMove(cryst) + cryst.update_icon() + else if(itemtf) + itemtf.inhabit_item(character, itemtf.name, character) + var/mob/living/possessed_voice = itemtf.possessed_voice + itemtf.trash_eatable = character.devourable + itemtf.unacidable = !character.digestable + character.forceMove(possessed_voice) + else if(prey) + character.copy_from_prefs_vr(1,1) //Yes I know we're reloading these, shut up + var/obj/belly/gut_to_enter + for(var/obj/belly/B in character.vore_organs) + if(B.name == gut) + gut_to_enter = B + character.vore_selected = B + var/datum/effect/effect/system/teleport_greyscale/tele = new /datum/effect/effect/system/teleport_greyscale() + tele.set_up("#00FFFF", get_turf(prey)) + tele.start() + character.forceMove(get_turf(prey)) + if(start_absorbed) + prey.absorbed = 1 + prey.forceMove(gut_to_enter) + else + if(gut) + if(start_absorbed) + character.absorbed = 1 + character.forceMove(gut) character.client.init_verbs() qdel(src) // Delete new_player mob diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 69043ad8aa..99dbfc11a6 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -105,7 +105,7 @@ O.key = key //Languages - add_language("Robot Talk", 1) + add_language(LANGUAGE_ROBOT_TALK, 1) add_language(LANGUAGE_GALCOM, 1) add_language(LANGUAGE_SOL_COMMON, 1) add_language(LANGUAGE_UNATHI, 1) @@ -151,7 +151,7 @@ for(var/t in organs) qdel(t) - var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc ) + var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(loc) O.gender = gender O.invisibility = 0 diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm index f4ff407fe1..a51d0be7b4 100644 --- a/code/modules/modular_computers/hardware/_hardware.dm +++ b/code/modules/modular_computers/hardware/_hardware.dm @@ -59,12 +59,11 @@ /obj/item/computer_hardware/proc/diagnostics(var/mob/user) to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]") -/obj/item/computer_hardware/New(var/obj/L) - ..() +/obj/item/computer_hardware/Initialize(mapload) + . = ..() w_class = hardware_size - if(istype(L, /obj/item/modular_computer)) - holder2 = L - return + if(istype(loc, /obj/item/modular_computer)) + holder2 = loc /obj/item/computer_hardware/Destroy() holder2 = null diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index 7d69ea8bcf..6aa08685a6 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -56,19 +56,21 @@ hardware_size = 1 battery_rating = 30000 -/obj/item/computer_hardware/battery_module/lambda/New() - ..() - battery = new/obj/item/cell/infinite(src) +/obj/item/computer_hardware/battery_module/lambda/Initialize(mapload) + . = ..(mapload, /obj/item/cell/infinite) /obj/item/computer_hardware/battery_module/diagnostics(var/mob/user) ..() to_chat(user, "Internal battery charge: [battery.charge]/[battery.maxcharge] CU") -/obj/item/computer_hardware/battery_module/New() - battery = new/obj/item/cell(src) +/obj/item/computer_hardware/battery_module/Initialize(mapload, cell_type) + if(ispath(cell_type)) + battery = new cell_type(src) + else + battery = new/obj/item/cell(src) battery.maxcharge = battery_rating battery.charge = 0 - ..() + . = ..() /obj/item/computer_hardware/battery_module/Destroy() qdel_null(battery) diff --git a/code/modules/modular_computers/hardware/hard_drive.dm b/code/modules/modular_computers/hardware/hard_drive.dm index e78bf0eafa..8e74350ac1 100644 --- a/code/modules/modular_computers/hardware/hard_drive.dm +++ b/code/modules/modular_computers/hardware/hard_drive.dm @@ -182,6 +182,6 @@ stored_files = null return ..() -/obj/item/computer_hardware/hard_drive/New() +/obj/item/computer_hardware/hard_drive/Initialize(mapload) + . = ..() install_default_programs() - ..() diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index 6cb5fc0dd3..f1f2e942e4 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -33,8 +33,8 @@ var/global/ntnet_card_uid = 1 if(ethernet) to_chat(user, "OpenEth (Physical Connection) - Physical network connection port") -/obj/item/computer_hardware/network_card/New(var/l) - ..(l) +/obj/item/computer_hardware/network_card/Initialize(mapload) + . = ..() identification_id = ntnet_card_uid ntnet_card_uid++ diff --git a/code/modules/modular_computers/hardware/portable_hard_drive.dm b/code/modules/modular_computers/hardware/portable_hard_drive.dm index f627b2671a..e40791b3b0 100644 --- a/code/modules/modular_computers/hardware/portable_hard_drive.dm +++ b/code/modules/modular_computers/hardware/portable_hard_drive.dm @@ -26,8 +26,8 @@ max_capacity = 256 origin_tech = list(TECH_DATA = 4) -/obj/item/computer_hardware/hard_drive/portable/New() - ..() +/obj/item/computer_hardware/hard_drive/portable/Initialize(mapload) + . = ..() stored_files = list() recalculate_size() diff --git a/code/modules/multiz/basic.dm b/code/modules/multiz/basic.dm index 0b4b5e4e21..f46785562c 100644 --- a/code/modules/multiz/basic.dm +++ b/code/modules/multiz/basic.dm @@ -2,13 +2,12 @@ var/list/z_levels = list()// Each bit re... haha just kidding this is a list of bools now // If the height is more than 1, we mark all contained levels as connected. -/obj/effect/landmark/map_data/New() +INITIALIZE_IMMEDIATE(/obj/effect/landmark/map_data) +/obj/effect/landmark/map_data/Initialize(mapload) for(var/i = (z - height + 1) to (z-1)) if (z_levels.len { } const dispatch = useDispatch(); return ( - <> - - - + + + + + + + + ); }; diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerColors.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerColors.tsx new file mode 100644 index 0000000000..5a7c15702c --- /dev/null +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerColors.tsx @@ -0,0 +1,220 @@ +import { useBackend } from 'tgui/backend'; +import { + Button, + ColorBox, + Dropdown, + NumberInput, + Section, + Stack, +} from 'tgui-core/components'; + +import { SPRITE_ACCESSORY_COLOR_CHANNEL_NAMES } from './constants'; +import type { Data } from './types'; + +export const AppearanceChangerColors = (props) => { + const { act, data } = useBackend(); + + const { + change_eye_color, + change_skin_tone, + change_skin_color, + change_hair_color, + change_facial_hair_color, + eye_color, + skin_color, + hair_color, + hair_grad, + hair_color_grad, + facial_hair_color, + ears_color, + ears2_color, + ears_alpha, + secondary_ears_alpha, + tail_color, + tail2_color, + tail3_color, + tail_alpha, + wing_color, + wing2_color, + wing3_color, + wing_alpha, + ear_secondary_colors, + hair_grads, + } = data; + + return ( +
+ + {change_eye_color ? ( + + + + + ) : ( + '' + )} + {change_skin_tone ? ( + + + + ) : ( + '' + )} + {change_skin_color ? ( + + + + + ) : ( + '' + )} + {change_hair_color ? ( + <> + + + + + + + + + + + + { + return { + displayText: key, + value: key, + }; + })} + onSelected={(val: string) => + act('hair_grad', { picked: val }) + } + /> + + + + + + + + + + + + + Ears Alpha:{' '} + act('ears_alpha', { ears_alpha: val })} + /> + + {ear_secondary_colors.map((color, index) => ( + + + + + ))} + + Horns Alpha:{' '} + + act('secondary_ears_alpha', { secondary_ears_alpha: val }) + } + /> + + + + + + + + + + + + + + + Tail Alpha:{' '} + act('tail_alpha', { tail_alpha: val })} + /> + + + + + + + + + + + + + + + Wing Alpha:{' '} + act('wing_alpha', { wing_alpha: val })} + /> + + + ) : null} + {change_facial_hair_color ? ( + + + + + ) : null} + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx deleted file mode 100644 index deffbbf458..0000000000 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerDetails.tsx +++ /dev/null @@ -1,340 +0,0 @@ -import { useState } from 'react'; -import { useBackend } from 'tgui/backend'; -import { - Box, - Button, - ColorBox, - Dropdown, - ImageButton, - Input, - LabeledList, - NumberInput, - Section, - Stack, - Tabs, -} from 'tgui-core/components'; -import { createSearch } from 'tgui-core/string'; - -import { - MARKINGS_PER_PAGE, - SPRITE_ACCESSORY_COLOR_CHANNEL_NAMES, -} from './constants'; -import type { bodyStyle, Data } from './types'; - -export const AppearanceChangerColors = (props) => { - const { act, data } = useBackend(); - - const { - change_eye_color, - change_skin_tone, - change_skin_color, - change_hair_color, - change_facial_hair_color, - eye_color, - skin_color, - hair_color, - hair_grad, - hair_color_grad, - facial_hair_color, - ears_color, - ears2_color, - ears_alpha, - secondary_ears_alpha, - tail_color, - tail2_color, - tail3_color, - tail_alpha, - wing_color, - wing2_color, - wing3_color, - wing_alpha, - ear_secondary_colors, - hair_grads, - } = data; - - return ( -
- {change_eye_color ? ( - - - - - ) : ( - '' - )} - {change_skin_tone ? ( - - - - ) : ( - '' - )} - {change_skin_color ? ( - - - - - ) : ( - '' - )} - {change_hair_color ? ( - <> - - - - - - - - { - return { - displayText: key, - value: key, - }; - })} - onSelected={(val: string) => act('hair_grad', { picked: val })} - /> - - - - - - - - - - - Ears Alpha:{' '} - act('ears_alpha', { ears_alpha: val })} - /> - - {ear_secondary_colors.map((color, index) => ( - - - - - ))} - - Horns Alpha:{' '} - - act('secondary_ears_alpha', { secondary_ears_alpha: val }) - } - /> - - - - - - - - - - - - - - - Tail Alpha:{' '} - act('tail_alpha', { tail_alpha: val })} - /> - - - - - - - - - - - - - - - Wing Alpha:{' '} - act('wing_alpha', { wing_alpha: val })} - /> - - - ) : null} - {change_facial_hair_color ? ( - - - - - ) : null} -
- ); -}; - -export const AppearanceChangerMarkings = (props) => { - const { act, data } = useBackend(); - - const { markings, marking_styles } = data; - - const [searchText, setSearchText] = useState(''); - const [tabIndex, setTabIndex] = useState(0); - - const searcher = createSearch(searchText, (style: bodyStyle) => { - return style.name; - }); - - const filteredStyles = marking_styles.filter(searcher); - - filteredStyles.sort((a, b) => - a.name.toLowerCase().localeCompare(b.name.toLowerCase()), - ); - const styleTabCount = Math.ceil(filteredStyles.length / MARKINGS_PER_PAGE); - - const shownStyles: bodyStyle[][] = []; - - for (let i = 0; i < styleTabCount; i++) { - shownStyles[i] = filteredStyles.slice( - i * MARKINGS_PER_PAGE, - i * MARKINGS_PER_PAGE + MARKINGS_PER_PAGE, - ); - } - - return ( -
- - - - {markings.map((m) => ( - - - - - - - - - - - - - - - - - - - - - ))} - - - - setSearchText(val)} - /> - - - - - {shownStyles.map((_, i) => ( - - setTabIndex(i)} - > - Page {i + 1} - - - ))} - - - - - {shownStyles[tabIndex]?.map((style) => ( - { - act('marking', { todo: 1, name: style.name }); - }} - > - {style.name} - - ))} - - -
- ); -}; diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerMarkings.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerMarkings.tsx new file mode 100644 index 0000000000..2963a3d10b --- /dev/null +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerMarkings.tsx @@ -0,0 +1,148 @@ +import { useState } from 'react'; +import { useBackend } from 'tgui/backend'; +import { + Button, + ColorBox, + ImageButton, + Input, + LabeledList, + Section, + Stack, + Tabs, +} from 'tgui-core/components'; +import { createSearch } from 'tgui-core/string'; + +import { MARKINGS_PER_PAGE } from './constants'; +import type { bodyStyle, Data } from './types'; + +export const AppearanceChangerMarkings = (props) => { + const { act, data } = useBackend(); + + const { markings, marking_styles } = data; + + const [searchText, setSearchText] = useState(''); + const [tabIndex, setTabIndex] = useState(0); + + const searcher = createSearch(searchText, (style: bodyStyle) => { + return style.name; + }); + + const filteredStyles = marking_styles.filter(searcher); + + filteredStyles.sort((a, b) => + a.name.toLowerCase().localeCompare(b.name.toLowerCase()), + ); + const styleTabCount = Math.ceil(filteredStyles.length / MARKINGS_PER_PAGE); + + const shownStyles: bodyStyle[][] = []; + + for (let i = 0; i < styleTabCount; i++) { + shownStyles[i] = filteredStyles.slice( + i * MARKINGS_PER_PAGE, + i * MARKINGS_PER_PAGE + MARKINGS_PER_PAGE, + ); + } + + return ( + + + setSearchText(val)} + /> + + +
+ + + + {markings.map((m) => ( + + + + + + + + + + + + + + + + + + + + + ))} + + + + + + {shownStyles.map((_, i) => ( + + setTabIndex(i)} + > + Page {i + 1} + + + ))} + + + + + + {shownStyles[tabIndex]?.map((style) => ( + + { + act('marking', { todo: 1, name: style.name }); + }} + > + {style.name} + + + ))} + + + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx index 24872b5411..a4e8c7d89a 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx @@ -45,29 +45,31 @@ export const AppearanceChangerParts = (props: {
- {canClear && ( - act(actions[i], { clear: true })} - selected={currentStyle[i] === null} - > - -- Not Set -- - - )} - {selectableStyles[i].map((style) => ( - { - act(actions[i], { ref: style.instance }); - }} - selected={style.name === currentStyle[i]} - > - {style.name} - - ))} + + {canClear && ( + act(actions[i], { clear: true })} + selected={currentStyle[i] === null} + > + -- Not Set -- + + )} + {selectableStyles[i].map((style) => ( + { + act(actions[i], { ref: style.instance }); + }} + selected={style.name === currentStyle[i]} + > + {style.name} + + ))} +
@@ -112,20 +114,22 @@ export const AppearanceChangerHair = (props: {
- {selectableStyles[i].map((style) => ( - { - act(actions[i], { name: style.name }); - }} - selected={style.name === currentStyle[i]} - > - {style.name} - - ))} + + {selectableStyles[i].map((style) => ( + { + act(actions[i], { name: style.name }); + }} + selected={style.name === currentStyle[i]} + > + {style.name} + + ))} +
diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/index.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/index.tsx index 4c721cf640..78b581621e 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/index.tsx +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/index.tsx @@ -17,12 +17,10 @@ import { AppearanceChangerSpecies, } from './AppearanceChangerBody'; import { AppearanceChangerBodyRecords } from './AppearanceChangerBodyRecords'; -import { - AppearanceChangerColors, - AppearanceChangerMarkings, -} from './AppearanceChangerDetails'; +import { AppearanceChangerColors } from './AppearanceChangerColors'; import { AppearanceChangerFlavor } from './AppearanceChangerFlavor'; import { AppearanceChangerHeader } from './AppearanceChangerHeader'; +import { AppearanceChangerMarkings } from './AppearanceChangerMarkings'; import { AppearanceChangerHair, AppearanceChangerParts, diff --git a/tgui/packages/tgui/styles/main.scss b/tgui/packages/tgui/styles/main.scss index fc29b25e92..6a93fc8062 100644 --- a/tgui/packages/tgui/styles/main.scss +++ b/tgui/packages/tgui/styles/main.scss @@ -21,6 +21,9 @@ @include meta.load-css('./atomic/outline.scss'); @include meta.load-css('./atomic/text.scss'); +// Components +@include meta.load-css('./components/NanoMap.scss'); + // Interfaces @include meta.load-css('./interfaces/AutomatedTellerMachine.scss'); @include meta.load-css('./interfaces/ListInput.scss'); diff --git a/tools/ci/validate_files.sh b/tools/ci/validate_files.sh index ede4ed04b4..217896c1de 100755 --- a/tools/ci/validate_files.sh +++ b/tools/ci/validate_files.sh @@ -32,7 +32,7 @@ else map_files="-r --include=maps/**/**.dmm" # shuttle_map_files="-r --include=_maps/shuttles/**.dmm" code_x_515="-r --include=code/**/!(__byond_version_compat).dm" -fi +fi; echo -e "${BLUE}Using grep provider at $(which $grep)${NC}" @@ -71,7 +71,7 @@ retVal=$? if [ $retVal -ne 0 ]; then echo -e "${RED}The variables 'step_x' and 'step_y' are present on a map, and they 'break' movement ingame.${NC}" FAILED=1 -fi +fi; part "wrongly offset APCs" if grep -Pzo '/obj/structure/machinery/power/apc[/\w]*?\{\n[^}]*?pixel_[xy] = -?[013-9]\d*?[^\d]*?\s*?\},?\n' $map_files || @@ -101,7 +101,7 @@ retVal=$? if [ $retVal -ne 0 ]; then echo -e "${RED}A map containing the word 'test' is included. This is not allowed to be committed.${NC}" FAILED=1 -fi +fi; section "code issues" @@ -143,7 +143,7 @@ retVal=$? if [ $retVal -ne 0 ]; then echo -e "${RED}Do not modify the example.yml changelog file.${NC}" FAILED=1 -fi +fi; part "color macros" #Checking for color macros @@ -152,7 +152,7 @@ retVal=$? if [ $retVal -ne 0 ]; then echo -e "${RED}Do not use any byond color macros (such as \blue), they are deprecated.${NC}" FAILED=1 -fi +fi; part "typescript react files" if ls -1 tgui/**/*.jsx 2>/dev/null; then @@ -202,7 +202,7 @@ retVal=$? if [ $retVal -ne 0 ]; then echo -e "${RED}Some HTML tags are missing their opening/closing partners. Please correct this.${NC}" FAILED=1 -fi +fi; part "proc ref syntax" if $grep '\.proc/' $code_x_515 ; then @@ -240,14 +240,14 @@ if [ "$pcre2_support" -eq 1 ]; then echo echo -e "${RED}ERROR: TIMER_OVERRIDE used without TIMER_UNIQUE.${NC}" FAILED=1 - fi + fi; part "trailing newlines" if $grep -PU '[^\n]$(?!\n)' $code_files; then echo echo -e "${RED}ERROR: File(s) with no trailing newline detected, please add one.${NC}" FAILED=1 - fi + fi; part "improper atom initialize args" if $grep -P '^/(obj|mob|turf|area|atom)/.+/Initialize\((?!mapload).*\)' $code_files; then @@ -256,6 +256,14 @@ if [ "$pcre2_support" -eq 1 ]; then FAILED=1 fi; + part "improper atom New usage" + (num=`$grep -n '^/?(obj|mob|turf|area|atom)/?.*/New\(' $code_files | wc -l`; echo "$num New (expecting 2 or less)"; [ $num -le 2 ]) + retVal=$? + if [ $retVal -ne 0 ]; then + echo -e "${RED}Do not use any New() calls, they've been replaced by Initialize(mapload).${NC}" + FAILED=1 + fi; + part "tag" #Checking for 'tag' set to something on maps (! $grep -Pn '( |\t|;|{)tag( ?)=' $map_files) @@ -263,7 +271,7 @@ if [ "$pcre2_support" -eq 1 ]; then if [ $retVal -ne 0 ]; then echo -e "${RED}A map has 'tag' set on an atom. It may cause problems and should be removed.${NC}" FAILED=1 - fi + fi; part "broken html" # echo -e "${RED}DISABLED" @@ -273,7 +281,7 @@ if [ "$pcre2_support" -eq 1 ]; then if [ $retVal -ne 0 ]; then echo -e "${RED}A broken span tag class is present (check quotes).${NC}" FAILED=1 - fi + fi; part "old style hrefs" (! $grep -Pn "href[\s='\"\\ ]*\?" $code_files) @@ -281,11 +289,11 @@ if [ "$pcre2_support" -eq 1 ]; then if [ $retVal -ne 0 ]; then echo -e "${RED}old-style hrefs detected, see ripgrep output.${NC}" FAILED=1 - fi + fi; else echo -e "${RED}pcre2 not supported, skipping checks requiring pcre2" echo -e "if you want to run these checks install ripgrep with pcre2 support.${NC}" -fi +fi; if [ $FAILED = 0 ]; then echo @@ -293,7 +301,7 @@ if [ $FAILED = 0 ]; then else echo echo -e "${RED}Errors found, please fix them and try again.${NC}" -fi +fi; # Quit with our status code exit $FAILED diff --git a/vorestation.dme b/vorestation.dme index 1acb894759..3cf117fc95 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1051,7 +1051,6 @@ #include "code\game\machinery\teleporter.dm" #include "code\game\machinery\transportpod.dm" #include "code\game\machinery\turret_control.dm" -#include "code\game\machinery\upgrade_machinery.dm" #include "code\game\machinery\vitals_monitor.dm" #include "code\game\machinery\wall_frames.dm" #include "code\game\machinery\washing_machine.dm"