mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
migrate all /obj/item from /New() to /Initialize() (#31232)
* migrate all /obj/item from /New() to /Initialize() * move GLOB.chemical_reagents_list creation to /world/New() * review * oops * autodoc a smart var
This commit is contained in:
@@ -199,18 +199,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
|
||||
scatter_distance = 5
|
||||
|
||||
/obj/item/New()
|
||||
..()
|
||||
|
||||
if(!hitsound)
|
||||
if(damtype == "fire")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
LAZYINITLIST(attack_verb)
|
||||
if(!move_resist)
|
||||
determine_move_resist()
|
||||
|
||||
/obj/item/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/path in actions_types)
|
||||
@@ -219,6 +207,14 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
in_storage = TRUE
|
||||
if(sharp)
|
||||
AddComponent(/datum/component/surgery_initiator)
|
||||
if(!hitsound)
|
||||
if(damtype == "fire")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
LAZYINITLIST(attack_verb)
|
||||
if(!move_resist)
|
||||
determine_move_resist()
|
||||
|
||||
/// This proc is used to add text for items with ABSTRACT flag after default examine text.
|
||||
/obj/item/proc/customised_abstract_text(mob/living/carbon/owner)
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
last = loaded.place_turf(get_turf(loc), user, turn(user.dir, 180))
|
||||
is_empty(user) //If we've run out, display message
|
||||
|
||||
/obj/item/rcl/pre_loaded/New() //Comes preloaded with cable, for testing stuff
|
||||
..()
|
||||
/obj/item/rcl/pre_loaded/Initialize(mapload) // Comes preloaded with cable, for testing stuff
|
||||
. = ..()
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
var/start_lit = FALSE
|
||||
var/flickering = FALSE
|
||||
|
||||
/obj/item/candle/New()
|
||||
..()
|
||||
/obj/item/candle/Initialize(mapload)
|
||||
. = ..()
|
||||
if(start_lit)
|
||||
// No visible message
|
||||
light(show_message = 0)
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
|
||||
var/obj/item/card/id/guest/guest_pass = null // Guest pass attached to the ID
|
||||
|
||||
/obj/item/card/id/New()
|
||||
..()
|
||||
/obj/item/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
spawn(30)
|
||||
if(ishuman(loc) && blood_type == "\[UNSET\]")
|
||||
var/mob/living/carbon/human/H = loc
|
||||
@@ -403,9 +403,9 @@
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
|
||||
/obj/item/card/id/captains_spare/New()
|
||||
/obj/item/card/id/captains_spare/Initialize(mapload)
|
||||
. = ..()
|
||||
access = get_all_accesses()
|
||||
..()
|
||||
|
||||
/obj/item/card/id/admin
|
||||
name = "admin ID card"
|
||||
@@ -415,9 +415,9 @@
|
||||
assignment = "Testing Shit"
|
||||
untrackable = TRUE
|
||||
|
||||
/obj/item/card/id/admin/New()
|
||||
/obj/item/card/id/admin/Initialize(mapload)
|
||||
. = ..()
|
||||
access = get_absolutely_all_accesses()
|
||||
..()
|
||||
|
||||
/obj/item/card/id/centcom
|
||||
name = "central command ID card"
|
||||
@@ -426,9 +426,9 @@
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
|
||||
/obj/item/card/id/centcom/New()
|
||||
/obj/item/card/id/centcom/Initialize(mapload)
|
||||
. = ..()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
// MARK: Security
|
||||
/obj/item/card/id/prisoner
|
||||
@@ -482,8 +482,8 @@
|
||||
registered_name = "Prisoner #13-007"
|
||||
|
||||
/obj/item/card/id/prisoner/random
|
||||
/obj/item/card/id/prisoner/random/New()
|
||||
..()
|
||||
/obj/item/card/id/prisoner/random/Initialize(mapload)
|
||||
. = ..()
|
||||
var/random_number = "#[rand(0, 99)]-[rand(0, 999)]"
|
||||
name = "Prisoner [random_number]"
|
||||
registered_name = name
|
||||
|
||||
@@ -334,11 +334,11 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
|
||||
/obj/item/clothing/mask/cigarette/random
|
||||
|
||||
/obj/item/clothing/mask/cigarette/random/New()
|
||||
/obj/item/clothing/mask/cigarette/random/Initialize(mapload)
|
||||
list_reagents = list("nicotine" = 40, pick("fuel", "saltpetre", "synaptizine", "green_vomit", "potass_iodide", "msg", "lexorin", "mannitol", \
|
||||
"spaceacillin" ,"cryoxadone" ,"holywater", "tea" ,"egg" ,"haloperidol" ,"mutagen" ,"omnizine", "carpet", "aranesp", "cryostylane", "chocolate", \
|
||||
"bilk", "cheese", "rum", "blood", "charcoal", "coffee", "ectoplasm", "space_drugs", "milk", "mutadone", "antihol", "teporone", "insulin", "salbutamol", "toxin") = 20)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/candy
|
||||
name = "candy cigarette"
|
||||
@@ -428,9 +428,9 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
icon_state = "death_cig"
|
||||
butt_type = /obj/item/cigbutt/death
|
||||
|
||||
/obj/item/clothing/mask/cigarette/carcinoma/New()
|
||||
/obj/item/clothing/mask/cigarette/carcinoma/Initialize(mapload)
|
||||
list_reagents = list("nicotine" = 40, "dnicotine" = 10, pick("carpotoxin", "toxin", "atrazine") = 1)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/cigbutt
|
||||
name = "cigarette butt"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/obj/item/decorations/sticky_decorations
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/decorations/sticky_decorations/New()
|
||||
/obj/item/decorations/sticky_decorations/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/ducttape, src, null, 0, 0, TRUE)//add this to something to make it sticky but without the tape overlay
|
||||
|
||||
@@ -275,5 +275,3 @@
|
||||
name = "lava land display"
|
||||
desc = "The tomb of many a miner and possibly a home for much worse things."
|
||||
icon_state = "lava_land_display"
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/defibrillator/Initialize(mapload) // Base version starts without a cell for rnd
|
||||
. = ..()
|
||||
paddles = new paddle_type(src)
|
||||
paddles = new paddle_type(src, src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/loaded/Initialize(mapload) // Loaded version starts with high-capacity cell.
|
||||
@@ -308,7 +308,7 @@
|
||||
var/on_cooldown = FALSE
|
||||
|
||||
|
||||
/obj/item/shockpaddles/New(mainunit)
|
||||
/obj/item/shockpaddles/Initialize(mapload, mainunit)
|
||||
. = ..()
|
||||
|
||||
if(check_defib_exists(mainunit, null, src))
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
/obj/item/bodyanalyzer/borg/syndicate
|
||||
scan_cd = 20 SECONDS
|
||||
|
||||
/obj/item/bodyanalyzer/New()
|
||||
..()
|
||||
/obj/item/bodyanalyzer/Initialize(mapload)
|
||||
. = ..()
|
||||
cell = new cell_type(src)
|
||||
cell.give(cell.maxcharge)
|
||||
update_icon()
|
||||
|
||||
@@ -237,8 +237,8 @@
|
||||
/obj/item/flash/cameraflash/burn_out() //stops from burning out
|
||||
return
|
||||
|
||||
/obj/item/flash/cameraflash/New()
|
||||
..()
|
||||
/obj/item/flash/cameraflash/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flash/cameraflash/Destroy()
|
||||
|
||||
@@ -163,15 +163,19 @@
|
||||
icon_state = "flare"
|
||||
inhand_icon_state = "flare"
|
||||
togglesound = 'sound/goonstation/misc/matchstick_light.ogg'
|
||||
var/fuel = 0
|
||||
/// This var will get checked in Initialize() and if it's true, it'll get set to a randomized fuel value.
|
||||
/// If it's 0, it'll simply remain a used up flare.
|
||||
var/fuel = TRUE
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
var/fuel_lower = 800
|
||||
var/fuel_upp = 1000
|
||||
|
||||
/obj/item/flashlight/flare/New()
|
||||
fuel = rand(fuel_lower, fuel_upp)
|
||||
..()
|
||||
/obj/item/flashlight/flare/Initialize(mapload)
|
||||
. = ..()
|
||||
if(fuel)
|
||||
fuel = rand(fuel_lower, fuel_upp)
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/flare/update_icon_state()
|
||||
inhand_icon_state = "[initial(inhand_icon_state)][on ? "-on" : ""]"
|
||||
@@ -222,20 +226,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/flare/used
|
||||
|
||||
/obj/item/flashlight/flare/used/Initialize(mapload)
|
||||
. = ..()
|
||||
// fuel gets set on New which is annoying so these can't just be vars
|
||||
fuel = 0
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/flare/glowstick/used/Initialize(mapload)
|
||||
. = ..()
|
||||
// fuel gets set on New which is annoying so these can't just be vars
|
||||
/obj/item/flashlight/flare/glowstick/used
|
||||
fuel = 0
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/flare/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(isdrone(user) && !fuel)
|
||||
@@ -334,8 +328,8 @@
|
||||
materials = list()
|
||||
on = TRUE //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/flashlight/slime/New()
|
||||
..()
|
||||
/obj/item/flashlight/slime/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
@@ -358,8 +352,8 @@
|
||||
var/emp_cur_charges = 4
|
||||
var/charge_tick = 0
|
||||
|
||||
/obj/item/flashlight/emp/New()
|
||||
..()
|
||||
/obj/item/flashlight/emp/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/emp/Destroy()
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
/obj/item/laser_pointer/purple
|
||||
pointer_icon_state = "purple_laser"
|
||||
|
||||
/obj/item/laser_pointer/New()
|
||||
..()
|
||||
diode = new(src)
|
||||
/obj/item/laser_pointer/Initialize(mapload)
|
||||
. = ..()
|
||||
create_diode()
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
QDEL_NULL(diode)
|
||||
return ..()
|
||||
|
||||
/obj/item/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/stock_parts/micro_laser/ultra
|
||||
|
||||
/obj/item/laser_pointer/proc/create_diode()
|
||||
diode = new(src)
|
||||
|
||||
/obj/item/laser_pointer/upgraded/create_diode()
|
||||
diode = new /obj/item/stock_parts/micro_laser/ultra(src)
|
||||
|
||||
/obj/item/laser_pointer/attack__legacy__attackchain(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
name = "syndicate personal AI device"
|
||||
faction = list("syndicate")
|
||||
|
||||
/obj/item/paicard/New()
|
||||
..()
|
||||
/obj/item/paicard/Initialize(mapload)
|
||||
. = ..()
|
||||
overlays += "pai-off"
|
||||
|
||||
/obj/item/paicard/Destroy()
|
||||
|
||||
@@ -23,13 +23,10 @@
|
||||
dog_fashion = null
|
||||
requires_tcomms = TRUE
|
||||
|
||||
/obj/item/radio/headset/New()
|
||||
..()
|
||||
internal_channels.Cut()
|
||||
|
||||
/obj/item/radio/headset/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
internal_channels.Cut()
|
||||
if(ks1type)
|
||||
keyslot1 = new ks1type(src)
|
||||
if(keyslot1.syndie)
|
||||
@@ -125,7 +122,7 @@
|
||||
/obj/item/radio/headset/syndicate/alt/nocommon
|
||||
name = "syndicate researcher headset"
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt/nocommon/New()
|
||||
/obj/item/radio/headset/syndicate/alt/nocommon/Initialize(mapload)
|
||||
. = ..()
|
||||
set_frequency(SYND_FREQ)
|
||||
|
||||
|
||||
@@ -49,8 +49,11 @@
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, direction, building = 3)
|
||||
/obj/item/radio/intercom/Initialize(mapload, direction, building = 3)
|
||||
. = ..()
|
||||
if(!custom_name)
|
||||
name = "station intercom (General)"
|
||||
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
update_operating_status()
|
||||
@@ -63,17 +66,12 @@
|
||||
GLOB.global_intercoms.Add(src)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/radio/intercom/Initialize(mapload)
|
||||
/obj/item/radio/intercom/department/medbay/Initialize(mapload, direction, building)
|
||||
. = ..()
|
||||
if(!custom_name)
|
||||
name = "station intercom (General)"
|
||||
|
||||
/obj/item/radio/intercom/department/medbay/New()
|
||||
..()
|
||||
internal_channels = GLOB.default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/intercom/department/security/New()
|
||||
..()
|
||||
/obj/item/radio/intercom/department/security/Initialize(mapload, direction, building)
|
||||
. = ..()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ) = list(ACCESS_SECURITY)
|
||||
@@ -85,16 +83,16 @@
|
||||
frequency = SYND_FREQ
|
||||
syndiekey = new /obj/item/encryptionkey/syndicate/nukeops
|
||||
|
||||
/obj/item/radio/intercom/syndicate/New()
|
||||
..()
|
||||
/obj/item/radio/intercom/syndicate/Initialize(mapload, direction, building)
|
||||
. = ..()
|
||||
internal_channels[num2text(SYND_FREQ)] = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/item/radio/intercom/pirate
|
||||
name = "pirate radio intercom"
|
||||
desc = "You wouldn't steal a space shuttle. Piracy. It's a crime!"
|
||||
|
||||
/obj/item/radio/intercom/pirate/New()
|
||||
..()
|
||||
/obj/item/radio/intercom/pirate/Initialize(mapload, direction, building)
|
||||
. = ..()
|
||||
internal_channels.Cut()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
@@ -298,6 +296,6 @@
|
||||
name = "prison intercom"
|
||||
desc = "A reliable form of communication even during local communication blackouts. It looks like it has been modified to not broadcast. Not so reliable, I guess..."
|
||||
|
||||
/obj/item/radio/intercom/locked/prison/New()
|
||||
..()
|
||||
/obj/item/radio/intercom/locked/prison/Initialize(mapload, direction, building)
|
||||
. = ..()
|
||||
wires.cut(WIRE_RADIO_TRANSMIT)
|
||||
|
||||
@@ -89,13 +89,6 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/radio/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
|
||||
internal_channels = GLOB.default_internal_channels.Copy()
|
||||
GLOB.global_radios |= src
|
||||
|
||||
/obj/item/radio/Destroy()
|
||||
SStgui.close_uis(wires)
|
||||
QDEL_NULL(wires)
|
||||
@@ -110,6 +103,10 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
|
||||
/obj/item/radio/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
internal_channels = GLOB.default_internal_channels.Copy()
|
||||
GLOB.global_radios |= src
|
||||
|
||||
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
|
||||
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||
set_frequency(frequency)
|
||||
@@ -646,24 +643,24 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
myborg = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/borg/syndicate/New()
|
||||
..()
|
||||
/obj/item/radio/borg/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
syndiekey = keyslot
|
||||
set_frequency(SYND_FREQ)
|
||||
freqlock = TRUE
|
||||
|
||||
/obj/item/radio/borg/deathsquad
|
||||
|
||||
/obj/item/radio/borg/deathsquad/New()
|
||||
..()
|
||||
/obj/item/radio/borg/deathsquad/Initialize(mapload)
|
||||
. = ..()
|
||||
set_frequency(DTH_FREQ)
|
||||
freqlock = TRUE
|
||||
|
||||
/obj/item/radio/borg/ert
|
||||
keyslot = new /obj/item/encryptionkey/ert
|
||||
|
||||
/obj/item/radio/borg/ert/New()
|
||||
..()
|
||||
/obj/item/radio/borg/ert/Initialize(mapload)
|
||||
. = ..()
|
||||
set_frequency(ERT_FREQ)
|
||||
freqlock = TRUE
|
||||
|
||||
@@ -773,8 +770,8 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
/obj/item/radio/phone/medbay
|
||||
frequency = MED_I_FREQ
|
||||
|
||||
/obj/item/radio/phone/medbay/New()
|
||||
..()
|
||||
/obj/item/radio/phone/medbay/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels = GLOB.default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/proc/attempt_send_deadsay_message(mob/subject, message)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
origin_tech = "programming=3;materials=3;magnets=3"
|
||||
var/datum/ui_module/crew_monitor/crew_monitor
|
||||
|
||||
/obj/item/sensor_device/New()
|
||||
..()
|
||||
/obj/item/sensor_device/Initialize(mapload)
|
||||
. = ..()
|
||||
crew_monitor = new(src)
|
||||
|
||||
/obj/item/sensor_device/Destroy()
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
. += SPAN_NOTICE("[mytape] has [seconds_to_time(mytape.remaining_capacity)] remaining.")
|
||||
. += SPAN_NOTICE("Alt-Click to access the tape.")
|
||||
|
||||
/obj/item/taperecorder/New()
|
||||
..()
|
||||
/obj/item/taperecorder/Initialize(mapload)
|
||||
. = ..()
|
||||
if(starts_with_tape)
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
@@ -360,6 +360,6 @@
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/tape/random/New()
|
||||
..()
|
||||
/obj/item/tape/random/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/song/song
|
||||
|
||||
/obj/item/thermal_drill/New()
|
||||
..()
|
||||
/obj/item/thermal_drill/Initialize(mapload)
|
||||
. = ..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(1, 0, src)
|
||||
|
||||
@@ -37,8 +37,8 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
/obj/item/uplink/proc/update_uplink_type(new_uplink_type)
|
||||
uplink_type = new_uplink_type
|
||||
|
||||
/obj/item/uplink/New()
|
||||
..()
|
||||
/obj/item/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
uses = 100
|
||||
GLOB.world_uplinks += src
|
||||
|
||||
@@ -183,10 +183,10 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
var/list/lucky_numbers
|
||||
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/uplink/hidden/New(loc)
|
||||
/obj/item/uplink/hidden/Initialize(mapload)
|
||||
if(!isitem(loc))
|
||||
qdel(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/uplink/hidden/proc/toggle()
|
||||
@@ -431,8 +431,8 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
// Includes normal radio uplink, multitool uplink,
|
||||
// implant uplink (not the implant tool) and a preset headset uplink.
|
||||
|
||||
/obj/item/radio/uplink/New()
|
||||
..()
|
||||
/obj/item/radio/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
icon_state = "radio"
|
||||
|
||||
@@ -449,8 +449,8 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/radio/uplink/nuclear/New()
|
||||
..()
|
||||
/obj/item/radio/uplink/nuclear/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_NUCLEAR)
|
||||
GLOB.nuclear_uplink_list += src
|
||||
@@ -459,19 +459,19 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
GLOB.nuclear_uplink_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/uplink/sst/New()
|
||||
..()
|
||||
/obj/item/radio/uplink/sst/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_SST)
|
||||
|
||||
/obj/item/radio/uplink/admin/New()
|
||||
..()
|
||||
/obj/item/radio/uplink/admin/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_ADMIN)
|
||||
hidden_uplink.uses = 2500
|
||||
|
||||
/obj/item/multitool/uplink/New()
|
||||
..()
|
||||
/obj/item/multitool/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/multitool/uplink/activate_self(mob/user as mob)
|
||||
@@ -482,7 +482,7 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
/obj/item/radio/headset/uplink
|
||||
traitor_frequency = 1445
|
||||
|
||||
/obj/item/radio/headset/uplink/New()
|
||||
..()
|
||||
/obj/item/radio/headset/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 100
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/voice
|
||||
var/active
|
||||
|
||||
/obj/item/voice_changer/New()
|
||||
/obj/item/voice_changer/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(isitem(loc))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
name = "data disk - 'God Emperor of Mankind'"
|
||||
read_only = TRUE
|
||||
|
||||
/obj/item/disk/data/demo/New()
|
||||
/obj/item/disk/data/demo/Initialize(mapload)
|
||||
. = ..()
|
||||
initialize_data()
|
||||
buf.types = DNA2_BUF_UE|DNA2_BUF_UI
|
||||
@@ -40,7 +40,7 @@
|
||||
name = "data disk - 'Mr. Muggles'"
|
||||
read_only = 1
|
||||
|
||||
/obj/item/disk/data/monkey/New()
|
||||
/obj/item/disk/data/monkey/Initialize(mapload)
|
||||
. = ..()
|
||||
initialize_data()
|
||||
buf.types = DNA2_BUF_SE
|
||||
@@ -51,7 +51,7 @@
|
||||
buf.dna.SetSEValueRange(GLOB.monkeyblock, 0xDAC, 0xFFF)
|
||||
|
||||
//Disk stuff.
|
||||
/obj/item/disk/data/New()
|
||||
/obj/item/disk/data/Initialize(mapload)
|
||||
. = ..()
|
||||
var/diskcolor = pick(0, 1, 2, 3, 4, 5)
|
||||
icon_state = "datadisk[diskcolor]"
|
||||
|
||||
@@ -214,9 +214,9 @@
|
||||
var/obj/item/grenade/boobytrap = null
|
||||
var/mob/trapper = null
|
||||
|
||||
/obj/item/flag/chameleon/New()
|
||||
/obj/item/flag/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
updated_icon_state = icon_state
|
||||
..()
|
||||
|
||||
/obj/item/flag/chameleon/attack_self__legacy__attackchain(mob/user)
|
||||
if(used)
|
||||
@@ -294,6 +294,6 @@
|
||||
/obj/item/flag/chameleon/get_flag_icon()
|
||||
return updated_icon_state
|
||||
|
||||
/obj/item/flag/chameleon/depot/New()
|
||||
..()
|
||||
/obj/item/flag/chameleon/depot/Initialize(mapload)
|
||||
. = ..()
|
||||
boobytrap = new /obj/item/grenade/gas/plasma(src)
|
||||
|
||||
@@ -370,8 +370,8 @@
|
||||
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
|
||||
smoketime = 20 //40 seconds
|
||||
|
||||
/obj/item/match/firebrand/New()
|
||||
..()
|
||||
/obj/item/match/firebrand/Initialize(mapload)
|
||||
. = ..()
|
||||
matchignite()
|
||||
|
||||
/obj/item/match/unathi
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
var/sabotaged = FALSE //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
var/model_info = "Unbranded"
|
||||
|
||||
/obj/item/robot_parts/New(newloc, model)
|
||||
..(newloc)
|
||||
/obj/item/robot_parts/Initialize(mapload, model)
|
||||
. = ..()
|
||||
if(model_info && model)
|
||||
model_info = model
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[model]
|
||||
@@ -101,8 +101,8 @@
|
||||
var/aisync = 1
|
||||
var/panel_locked = 1
|
||||
|
||||
/obj/item/robot_parts/robot_suit/New()
|
||||
..()
|
||||
/obj/item/robot_parts/robot_suit/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/robot_parts/robot_suit/Destroy()
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
/obj/item/storage/internal
|
||||
var/obj/item/master_item
|
||||
|
||||
/obj/item/storage/internal/New(obj/item/MI)
|
||||
/obj/item/storage/internal/Initialize(mapload, obj/item/MI)
|
||||
. = ..()
|
||||
master_item = MI
|
||||
loc = master_item
|
||||
name = master_item.name
|
||||
..()
|
||||
|
||||
/obj/item/storage/internal/Destroy()
|
||||
master_item = null
|
||||
|
||||
@@ -195,8 +195,8 @@
|
||||
var/obj/item/tank/internals/tank = null
|
||||
var/mob/living/carbon/human/cur_user
|
||||
|
||||
/obj/item/tank/jetpack/suit/New()
|
||||
..()
|
||||
/obj/item/tank/jetpack/suit/Initialize(mapload)
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
temp_air_contents = air_contents
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
var/on = FALSE
|
||||
var/volume = 500
|
||||
|
||||
/obj/item/watertank/New()
|
||||
..()
|
||||
/obj/item/watertank/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(volume)
|
||||
noz = make_noz()
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
desc = "A janitorial watertank backpack with nozzle to clean dirt and graffiti."
|
||||
icon_state = "waterbackpackjani"
|
||||
|
||||
/obj/item/watertank/janitor/New()
|
||||
..()
|
||||
/obj/item/watertank/janitor/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent("cleaner", 500)
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/janitor
|
||||
@@ -186,8 +186,8 @@
|
||||
worn_icon_state = "waterbackpackatmos"
|
||||
inhand_icon_state = "waterbackpackatmos"
|
||||
|
||||
/obj/item/watertank/atmos/New()
|
||||
..()
|
||||
/obj/item/watertank/atmos/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent("water", 500)
|
||||
|
||||
/obj/item/watertank/atmos/make_noz()
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
|
||||
/obj/item/stack/tape_roll/New(loc, amount=null)
|
||||
..()
|
||||
/obj/item/stack/tape_roll/Initialize(mapload, loc, amount)
|
||||
. = ..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/tape_roll/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user)
|
||||
|
||||
@@ -24,8 +24,17 @@
|
||||
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/screwdriver/Initialize(mapload)
|
||||
/obj/item/screwdriver/Initialize(mapload, param_color = null)
|
||||
. = ..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("red", "blue", "pink", "brown", "green", "cyan", "yellow")
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
belt_icon = "screwdriver_[param_color]"
|
||||
|
||||
if(prob(75))
|
||||
pixel_y = rand(0, 16)
|
||||
|
||||
AddComponent(/datum/component/surgery_initiator/robo)
|
||||
RegisterSignal(src, COMSIG_ATTACK, PROC_REF(on_attack))
|
||||
RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit))
|
||||
@@ -42,17 +51,6 @@
|
||||
user.visible_message(SPAN_SUICIDE("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/New(loc, param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
belt_icon = "screwdriver_[param_color]"
|
||||
|
||||
if(prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/proc/on_attack(datum/source, mob/living/carbon/target, mob/living/user)
|
||||
if(!istype(target) || user.a_intent == INTENT_HELP)
|
||||
return
|
||||
|
||||
@@ -24,18 +24,15 @@
|
||||
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/wirecutters/Initialize(mapload)
|
||||
/obj/item/wirecutters/Initialize(mapload, param_color = null)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit))
|
||||
RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(remove_bit))
|
||||
|
||||
/obj/item/wirecutters/New(loc, param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("yellow", "red")
|
||||
belt_icon = "wirecutters_[param_color]"
|
||||
icon_state = "cutters_[param_color]"
|
||||
RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit))
|
||||
RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(remove_bit))
|
||||
|
||||
/obj/item/wirecutters/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
var/mob/living/carbon/mob = target
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "waterballoon-e"
|
||||
|
||||
/obj/item/toy/balloon/New()
|
||||
..()
|
||||
/obj/item/toy/balloon/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(10)
|
||||
|
||||
/obj/item/toy/balloon/pre_attack(atom/target, mob/living/user, params)
|
||||
@@ -1513,8 +1513,8 @@
|
||||
playsound(loc, 'sound/weapons/gunshots/gunshot_strong.ogg', 50, 1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/toy/russian_revolver/New()
|
||||
..()
|
||||
/obj/item/toy/russian_revolver/Initialize(mapload)
|
||||
. = ..()
|
||||
spin_cylinder()
|
||||
|
||||
/obj/item/toy/russian_revolver/activate_self(mob/user)
|
||||
|
||||
@@ -15,14 +15,13 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
scatter_distance = 10
|
||||
|
||||
/obj/item/a_gift/New()
|
||||
..()
|
||||
/obj/item/a_gift/Initialize(mapload)
|
||||
. = ..()
|
||||
scatter_atom()
|
||||
if(w_class > 0 && w_class < 4)
|
||||
icon_state = "gift[w_class]"
|
||||
else
|
||||
icon_state = "gift[pick(1, 2, 3)]"
|
||||
return
|
||||
|
||||
/obj/item/gift/attack_self__legacy__attackchain(mob/user as mob)
|
||||
user.drop_item()
|
||||
|
||||
@@ -187,9 +187,9 @@
|
||||
/obj/item/restraints/handcuffs/cable/white
|
||||
color = COLOR_WHITE
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/random/New()
|
||||
/obj/item/restraints/handcuffs/cable/random/Initialize(mapload)
|
||||
. = ..()
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE)
|
||||
..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/proc/cable_color(colorC)
|
||||
if(!colorC)
|
||||
|
||||
@@ -521,8 +521,8 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/nullrod/tribal_knife/New()
|
||||
..()
|
||||
/obj/item/nullrod/tribal_knife/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Destroy()
|
||||
@@ -713,8 +713,8 @@
|
||||
. += "<span class='warning'>This seemingly standard holy staff is actually a disguised neurotransmitter capable of inducing blind zealotry in its victims. It must be allowed to recharge in the presence of a linked set of missionary robes. \
|
||||
<b>Use the staff in hand</b> while wearing robes to link them both, then aim the staff at your victim to try and convert them.</span>"
|
||||
|
||||
/obj/item/nullrod/missionary_staff/New()
|
||||
..()
|
||||
/obj/item/nullrod/missionary_staff/Initialize(mapload)
|
||||
. = ..()
|
||||
team_color = pick("red", "blue")
|
||||
icon_state = "godstaff-[team_color]"
|
||||
name = "[team_color] holy staff"
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 50, ACID = 30)
|
||||
var/max_contents = 1
|
||||
|
||||
/obj/item/kitchen/utensil/New()
|
||||
..()
|
||||
/obj/item/kitchen/utensil/Initialize(mapload)
|
||||
. = ..()
|
||||
if(prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
flags = DROPDEL
|
||||
breakouttime = 6 SECONDS
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/New()
|
||||
..()
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, PROC_REF(dissipate)), 100)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
|
||||
@@ -203,8 +203,8 @@
|
||||
icon_state = "lightning"
|
||||
desc = "test lightning."
|
||||
|
||||
/obj/item/lightning/New()
|
||||
..()
|
||||
/obj/item/lightning/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "1"
|
||||
|
||||
/obj/item/lightning/afterattack__legacy__attackchain(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
/// The cooldown between each mopping sound effect
|
||||
var/mop_sound_cooldown
|
||||
|
||||
/obj/item/mop/New()
|
||||
..()
|
||||
/obj/item/mop/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(mopcap)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
/// Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
|
||||
var/refill_reagent = "water"
|
||||
|
||||
/obj/item/mop/advanced/New()
|
||||
..()
|
||||
/obj/item/mop/advanced/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/mop/advanced/activate_self(mob/user)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
var/integrity = 3
|
||||
var/volume = 70
|
||||
|
||||
/obj/item/tank/New()
|
||||
..()
|
||||
/obj/item/tank/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
air_contents = new /datum/gas_mixture()
|
||||
air_contents.volume = volume //liters
|
||||
@@ -26,7 +26,6 @@
|
||||
populate_gas()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
/obj/item/tank/Destroy()
|
||||
QDEL_NULL(air_contents)
|
||||
|
||||
@@ -63,11 +63,8 @@
|
||||
/obj/item/fireaxe/energized/Initialize(mapload)
|
||||
. = ..()
|
||||
// only update the new args
|
||||
AddComponent(/datum/component/two_handed, force_wielded = force_wielded, icon_wielded = "[base_icon_state]2")
|
||||
|
||||
/obj/item/fireaxe/energized/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/two_handed, force_wielded = force_wielded, icon_wielded = "[base_icon_state]2")
|
||||
|
||||
/obj/item/fireaxe/energized/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -263,9 +263,12 @@
|
||||
var/obj/item/roller/held
|
||||
var/obj/carry_holo = FALSE
|
||||
|
||||
/obj/item/roller_holder/New()
|
||||
..()
|
||||
held = new /obj/item/roller(src)
|
||||
/obj/item/roller_holder/Initialize(mapload)
|
||||
. = ..()
|
||||
create_roller()
|
||||
|
||||
/obj/item/roller_holder/proc/create_roller()
|
||||
held = new(src)
|
||||
|
||||
/obj/item/roller_holder/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!istype(target, /obj/item/roller))
|
||||
@@ -306,8 +309,7 @@
|
||||
icon_state = "holo_retracted"
|
||||
carry_holo = TRUE
|
||||
|
||||
/obj/item/roller_holder/holo/New()
|
||||
..()
|
||||
/obj/item/roller_holder/holo/create_roller()
|
||||
held = new /obj/item/roller/holo(src)
|
||||
|
||||
/*
|
||||
|
||||
@@ -720,8 +720,8 @@ MAPPING_DIRECTIONAL_HELPERS_CUSTOM(/obj/structure/sink/kitchen/old, 18, -4, 0, 0
|
||||
result = /obj/structure/sink
|
||||
result_name = "sink"
|
||||
|
||||
/obj/item/bathroom_parts/New()
|
||||
..()
|
||||
/obj/item/bathroom_parts/Initialize(mapload)
|
||||
. = ..()
|
||||
desc = "An entire [result_name] in a box, straight from Space Sweden. It has an [pick("unpronounceable", "overly accented", "entirely gibberish", "oddly normal-sounding")] name."
|
||||
|
||||
/obj/item/bathroom_parts/activate_self(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user