mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 15:47:04 +01:00
Finish Machinery new to init (#17334)
* Finish Machinery new to init * fix that --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -89,10 +89,11 @@
|
||||
name = "Catacombs"
|
||||
desc = "In a temple like this, these doors could be booby trapped..."
|
||||
|
||||
/obj/machinery/door/airlock/vault/temple/New()
|
||||
/obj/machinery/door/airlock/vault/temple/Initialize(mapload)
|
||||
. = ..()
|
||||
if(prob(33))
|
||||
new /obj/structure/falsewall/cultspecial(src.loc)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
if(prob(33))
|
||||
safe = 0
|
||||
if(prob(33))
|
||||
|
||||
@@ -5,9 +5,9 @@ var/global/list/latejoin_talon = list()
|
||||
name = "JoinLateTalon"
|
||||
delete_me = 1
|
||||
|
||||
/obj/effect/landmark/talon/New()
|
||||
/obj/effect/landmark/talon/Initialize(mapload)
|
||||
. = ..()
|
||||
latejoin_talon += loc // Register this turf as tram latejoin.
|
||||
..()
|
||||
|
||||
/datum/spawnpoint/talon
|
||||
display_name = "ITV Talon Cryo"
|
||||
@@ -175,8 +175,8 @@ Once in open space, consider disabling nonessential power-consuming electronics
|
||||
. = ..()
|
||||
access = list(access_talon, access_synth)
|
||||
|
||||
/obj/machinery/power/smes/buildable/offmap_spawn/New()
|
||||
..(1)
|
||||
/obj/machinery/power/smes/buildable/offmap_spawn/Initialize(mapload)
|
||||
. = ..()
|
||||
charge = 1e7
|
||||
RCon = TRUE
|
||||
input_level = input_level_max
|
||||
|
||||
@@ -707,17 +707,20 @@
|
||||
plane = PLANE_PLAYER_HUD_ABOVE
|
||||
var/client/holder
|
||||
|
||||
/obj/screen/splash/New(client/C, visible)
|
||||
INITIALIZE_IMMEDIATE(/obj/screen/splash)
|
||||
/obj/screen/splash/Initialize(mapload, visible)
|
||||
. = ..()
|
||||
|
||||
holder = C
|
||||
if(!isclient(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
holder = loc
|
||||
|
||||
if(!visible)
|
||||
alpha = 0
|
||||
|
||||
if(!lobby_image)
|
||||
qdel(src)
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
icon = lobby_image.icon
|
||||
icon_state = lobby_image.icon_state
|
||||
|
||||
@@ -18,26 +18,34 @@
|
||||
// maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
|
||||
|
||||
/obj/item/inserted_spell/asphyxiation/on_insert()
|
||||
spawn(1)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
if(H.isSynthetic() || H.does_not_breathe) // It's hard to choke a robot or something that doesn't breathe.
|
||||
on_expire()
|
||||
return
|
||||
to_chat(H, span_warning("You are having difficulty breathing!"))
|
||||
var/pulses = 3
|
||||
var/warned_victim = 0
|
||||
while(pulses)
|
||||
if(!warned_victim)
|
||||
warned_victim = predict_crit(pulses, H, 0)
|
||||
sleep(4 SECONDS)
|
||||
H.adjustOxyLoss(5)
|
||||
var/health_lost = H.getMaxHealth() - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
|
||||
H.adjustOxyLoss(round(abs(health_lost * 0.25)))
|
||||
//to_world("Inflicted [round(abs(health_lost * 0.25))] damage!")
|
||||
pulses--
|
||||
if(src) //We might've been dispelled at this point and deleted, better safe than sorry.
|
||||
on_expire()
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
if(H.isSynthetic() || H.does_not_breathe) // It's hard to choke a robot or something that doesn't breathe.
|
||||
on_expire()
|
||||
return
|
||||
to_chat(H, span_warning("You are having difficulty breathing!"))
|
||||
var/pulses = 3
|
||||
var/warned_victim = 0
|
||||
if(!warned_victim)
|
||||
warned_victim = predict_crit(pulses, H, 0)
|
||||
|
||||
looped_insert(3, H, warned_victim)
|
||||
|
||||
|
||||
/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H, var/warned)
|
||||
if(H)
|
||||
remaining_callbacks --
|
||||
H.adjustOxyLoss(5)
|
||||
var/health_lost = H.getMaxHealth() - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
|
||||
H.adjustOxyLoss(round(abs(health_lost * 0.25)))
|
||||
|
||||
if(remaining_callbacks > 0)
|
||||
if(!warned)
|
||||
warned = predict_crit(pulses, H, 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H, warned), 4 SECONDS, TIMER_DELETE_ME)
|
||||
return
|
||||
|
||||
on_expire()
|
||||
|
||||
/obj/item/inserted_spell/asphyxiation/on_expire()
|
||||
..()
|
||||
|
||||
@@ -20,18 +20,21 @@
|
||||
var/mob/living/host = null
|
||||
var/spell_power_at_creation = 1.0 // This is here because the spell object that made this object probably won't exist.
|
||||
|
||||
/obj/item/inserted_spell/New(var/newloc, var/user, var/obj/item/spell/insert/inserter)
|
||||
..(newloc)
|
||||
host = newloc
|
||||
/obj/item/inserted_spell/Initialize(mapload, var/user, var/obj/item/spell/insert/inserter)
|
||||
. = ..()
|
||||
host = loc
|
||||
origin = user
|
||||
if(light_color)
|
||||
spawn(1)
|
||||
set_light(inserter.spell_light_range, inserter.spell_light_intensity, inserter.spell_color)
|
||||
set_light(inserter.spell_light_range, inserter.spell_light_intensity, inserter.spell_color)
|
||||
on_insert()
|
||||
|
||||
/obj/item/inserted_spell/proc/on_insert()
|
||||
return
|
||||
|
||||
/obj/item/inserted_spell/proc/looped_insert(var/remaining_callbacks, var/mob/living/carbon/human/H)
|
||||
PROTECTED_RPOC(TRUE)
|
||||
return
|
||||
|
||||
/obj/item/inserted_spell/proc/on_expire(var/dispelled = 0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -17,14 +17,21 @@
|
||||
inserting = /obj/item/inserted_spell/mend_burns
|
||||
|
||||
/obj/item/inserted_spell/mend_burns/on_insert()
|
||||
spawn(1)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
for(var/i = 0, i<5,i++)
|
||||
if(H)
|
||||
H.adjustFireLoss(-heal_power / 5)
|
||||
sleep(1 SECOND)
|
||||
on_expire()
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
looped_insert(5, H)
|
||||
|
||||
|
||||
/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
|
||||
if(H)
|
||||
remaining_callbacks --
|
||||
H.adjustFireLoss(-heal_power / 5)
|
||||
|
||||
if(remaining_callbacks > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
|
||||
return
|
||||
|
||||
on_expire()
|
||||
|
||||
@@ -17,17 +17,24 @@
|
||||
inserting = /obj/item/inserted_spell/mend_metal
|
||||
|
||||
/obj/item/inserted_spell/mend_metal/on_insert()
|
||||
spawn(1)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
for(var/i = 0, i<5,i++)
|
||||
if(H)
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
|
||||
continue
|
||||
O.heal_damage(heal_power / 5, 0, internal = 1, robo_repair = 1)
|
||||
sleep(1 SECOND)
|
||||
on_expire()
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
looped_insert(5, H)
|
||||
|
||||
|
||||
/obj/item/inserted_spell/mend_metal/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
|
||||
if(H)
|
||||
remaining_callbacks --
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
|
||||
continue
|
||||
O.heal_damage(heal_power / 5, 0, internal = 1, robo_repair = 1)
|
||||
|
||||
if(remaining_callbacks > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
|
||||
return
|
||||
|
||||
on_expire()
|
||||
|
||||
@@ -18,39 +18,45 @@
|
||||
inserting = /obj/item/inserted_spell/mend_organs
|
||||
|
||||
/obj/item/inserted_spell/mend_organs/on_insert()
|
||||
spawn(1)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 2 : 5
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(15)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 2 : 5
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(15)
|
||||
|
||||
for(var/i = 0, i<5,i++)
|
||||
if(H)
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
if(O.damage > 0) // Fix internal damage
|
||||
O.damage = max(O.damage - (heal_power / 5), 0)
|
||||
if(O.damage <= 5 && O.organ_tag == O_EYES) // Fix eyes
|
||||
H.sdisabilities &= ~BLIND
|
||||
looped_insert(5, H)
|
||||
|
||||
for(var/obj/item/organ/external/O in H.organs) // Fix limbs
|
||||
if(!O.robotic < ORGAN_ROBOT) // No robot parts for this.
|
||||
continue
|
||||
O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 0)
|
||||
|
||||
for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
|
||||
var/obj/item/organ/external/affected = E
|
||||
if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
|
||||
if(H)
|
||||
remaining_callbacks --
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
if(O.damage > 0) // Fix internal damage
|
||||
O.damage = max(O.damage - (heal_power / 5), 0)
|
||||
if(O.damage <= 5 && O.organ_tag == O_EYES) // Fix eyes
|
||||
H.sdisabilities &= ~BLIND
|
||||
|
||||
for(var/datum/wound/W in affected.wounds) // Fix IB
|
||||
if(istype(W, /datum/wound/internal_bleeding))
|
||||
affected.wounds -= W
|
||||
affected.update_damages()
|
||||
for(var/obj/item/organ/external/O in H.organs) // Fix limbs
|
||||
if(!O.robotic < ORGAN_ROBOT) // No robot parts for this.
|
||||
continue
|
||||
O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 0)
|
||||
|
||||
H.restore_blood() // Fix bloodloss
|
||||
for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
|
||||
var/obj/item/organ/external/affected = E
|
||||
if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
|
||||
H.adjustBruteLoss(-heal_power)
|
||||
for(var/datum/wound/W in affected.wounds) // Fix IB
|
||||
if(istype(W, /datum/wound/internal_bleeding))
|
||||
affected.wounds -= W
|
||||
affected.update_damages()
|
||||
|
||||
sleep(1 SECOND)
|
||||
on_expire()
|
||||
H.restore_blood() // Fix bloodloss
|
||||
|
||||
H.adjustBruteLoss(-heal_power)
|
||||
|
||||
if(remaining_callbacks > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
|
||||
return
|
||||
|
||||
on_expire()
|
||||
|
||||
@@ -17,17 +17,23 @@
|
||||
inserting = /obj/item/inserted_spell/mend_wires
|
||||
|
||||
/obj/item/inserted_spell/mend_wires/on_insert()
|
||||
spawn(1)
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
for(var/i = 0, i<5,i++)
|
||||
if(H)
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
|
||||
continue
|
||||
O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 1)
|
||||
sleep(1 SECOND)
|
||||
on_expire()
|
||||
if(ishuman(host))
|
||||
var/mob/living/carbon/human/H = host
|
||||
var/heal_power = host == origin ? 10 : 30
|
||||
heal_power = round(heal_power * spell_power_at_creation, 1)
|
||||
origin.adjust_instability(10)
|
||||
looped_insert(5, H)
|
||||
|
||||
/obj/item/inserted_spell/mend_wires/looped_insert(remaining_callbacks, mob/living/carbon/human/H)
|
||||
if(H)
|
||||
remaining_callbacks --
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
|
||||
continue
|
||||
O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 1)
|
||||
|
||||
if(remaining_callbacks > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(looped_insert), remaining_callbacks, H), 1 SECOND, TIMER_DELETE_ME)
|
||||
return
|
||||
|
||||
on_expire()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
var/list/camera_computers_using_this = list()
|
||||
|
||||
/obj/machinery/camera/New()
|
||||
/obj/machinery/camera/Initialize(mapload)
|
||||
wires = new(src)
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
@@ -65,7 +65,9 @@
|
||||
if(!c_tag)
|
||||
var/area/A = get_area(src)
|
||||
c_tag = "[A ? A.name : "Unknown"] #[rand(111,999)]"
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
|
||||
if (dir == NORTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
// VOREStation Edit End
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
var/healthAlarm = 50
|
||||
var/oxy = 1 //oxygen beeping toggle
|
||||
|
||||
/obj/machinery/computer/operating/New()
|
||||
..()
|
||||
/obj/machinery/computer/operating/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/direction in list(NORTH,EAST,SOUTH,WEST))
|
||||
table = locate(/obj/machinery/optable, get_step(src, direction))
|
||||
if(table)
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
var/list/monitored_alarm_ids = null
|
||||
var/datum/tgui_module/atmos_control/atmos_control
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/laptop //[TO DO] Change name to PCU and update mapdata to include replacement computers
|
||||
name = "\improper Atmospherics PCU"
|
||||
desc = "A personal computer unit. It seems to have only the Atmosphereics Control program installed."
|
||||
|
||||
@@ -246,8 +246,8 @@
|
||||
/obj/item/card/id
|
||||
var/last_job_switch
|
||||
|
||||
/obj/item/card/id/New()
|
||||
.=..()
|
||||
/obj/item/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
last_job_switch = world.time
|
||||
|
||||
//
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
var/image/fluid
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/New()
|
||||
..()
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/Initialize(mapload)
|
||||
. = ..()
|
||||
icon = 'icons/obj/cryogenics_split.dmi'
|
||||
icon_state = "base"
|
||||
initialize_directions = dir
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/static/list/cutout_types
|
||||
var/static/list/painters = list(/obj/item/reagent_containers/glass/paint, /obj/item/floor_painter)//, /obj/item/closet_painter)
|
||||
|
||||
/obj/structure/barricade/cutout/New()
|
||||
/obj/structure/barricade/cutout/Initialize(mapload)
|
||||
. = ..()
|
||||
color = null
|
||||
if(human_name)
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
icon_state = "doorbell-standby"
|
||||
use_power = USE_POWER_OFF
|
||||
|
||||
/obj/machinery/button/doorbell/New(var/loc, var/dir, var/building = 0)
|
||||
..()
|
||||
/obj/machinery/button/doorbell/Initialize(mapload, var/dir, var/building = FALSE)
|
||||
. = ..()
|
||||
if(building)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
|
||||
|
||||
@@ -1514,9 +1514,7 @@ About the new airlock wires panel:
|
||||
return 0
|
||||
return ..(M)
|
||||
|
||||
/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/Initialize(mapload, var/obj/structure/door_assembly/assembly=null)
|
||||
//if assembly is given, create the new door from the assembly
|
||||
if (assembly && istype(assembly))
|
||||
assembly_type = assembly.type
|
||||
@@ -1543,7 +1541,7 @@ About the new airlock wires panel:
|
||||
set_dir(assembly.dir)
|
||||
|
||||
//wires
|
||||
var/turf/T = get_turf(newloc)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && (T.z in using_map.admin_levels))
|
||||
secured_wires = 1
|
||||
if (secured_wires)
|
||||
@@ -1551,14 +1549,17 @@ About the new airlock wires panel:
|
||||
else
|
||||
wires = new/datum/wires/airlock(src)
|
||||
|
||||
/obj/machinery/door/airlock/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(src.closeOtherId != null)
|
||||
for (var/obj/machinery/door/airlock/A in machines)
|
||||
if(A.closeOtherId == src.closeOtherId && A != src)
|
||||
src.closeOther = A
|
||||
break
|
||||
name = "\improper [name]"
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
qdel(wires)
|
||||
|
||||
@@ -143,14 +143,6 @@
|
||||
if(new_frequency)
|
||||
radio_connection = radio_controller.add_object(src, new_frequency, RADIO_AIRLOCK)
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/Initialize(mapload)
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
if(frequency && radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
for(var/obj/ct as anything in req_components)
|
||||
req_component_names[ct] = initial(ct.name)
|
||||
|
||||
/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
|
||||
/obj/structure/frame/Initialize(mapload, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
|
||||
..()
|
||||
if(building)
|
||||
frame_type = type
|
||||
@@ -278,9 +278,6 @@
|
||||
if(dir)
|
||||
set_dir(dir)
|
||||
|
||||
if(loc)
|
||||
src.loc = loc
|
||||
|
||||
if(frame_type.x_offset)
|
||||
pixel_x = (dir & 3)? 0 : (dir == EAST ? -frame_type.x_offset : frame_type.x_offset)
|
||||
|
||||
|
||||
@@ -121,15 +121,10 @@ Class Procs:
|
||||
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
|
||||
/obj/machinery/New(l, d=0)
|
||||
..()
|
||||
/obj/machinery/Initialize(mapload, d=0)
|
||||
. = ..()
|
||||
if(isnum(d))
|
||||
set_dir(d)
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
|
||||
/obj/machinery/Initialize(mapload)
|
||||
. = ..()
|
||||
SSmachines.all_machines += src
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
|
||||
@@ -27,18 +27,16 @@
|
||||
var/center_y = 0
|
||||
var/max_dist = 20 // absolute value of center_x,y cannot exceed this integer
|
||||
|
||||
/obj/machinery/magnetic_module/New()
|
||||
..()
|
||||
/obj/machinery/magnetic_module/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
hide(!T.is_plating())
|
||||
center = T
|
||||
|
||||
spawn(10) // must wait for map loading to finish
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, freq, RADIO_MAGNETS)
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, freq, RADIO_MAGNETS)
|
||||
|
||||
spawn()
|
||||
magnetic_process()
|
||||
magnetic_process()
|
||||
|
||||
// update the invisibility and icon
|
||||
/obj/machinery/magnetic_module/hide(var/intact)
|
||||
@@ -159,10 +157,14 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
|
||||
if(pulling) return
|
||||
while(on)
|
||||
/obj/machinery/magnetic_module/proc/magnetic_process(var/called_back) // proc that actually does the pulling
|
||||
if(called_back)
|
||||
pulling = 0
|
||||
|
||||
if(pulling)
|
||||
return
|
||||
|
||||
if(on)
|
||||
pulling = 1
|
||||
center = locate(x+center_x, y+center_y, z)
|
||||
if(center)
|
||||
@@ -175,7 +177,7 @@
|
||||
step_towards(S, center)
|
||||
|
||||
use_power(electricity_level * 5)
|
||||
sleep(13 - electricity_level)
|
||||
addtimer(CALLBACK(src, PROC_REF(magnetic_process), TRUE), 13 - electricity_level, TIMER_DELETE_ME)
|
||||
|
||||
pulling = 0
|
||||
|
||||
@@ -209,8 +211,8 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
|
||||
/obj/machinery/magnetic_controller/New()
|
||||
..()
|
||||
/obj/machinery/magnetic_controller/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(autolink)
|
||||
for(var/obj/machinery/magnetic_module/M in machines)
|
||||
@@ -218,9 +220,8 @@
|
||||
magnets.Add(M)
|
||||
|
||||
|
||||
spawn(45) // must wait for map loading to finish
|
||||
if(radio_controller)
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
|
||||
if(radio_controller)
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
|
||||
|
||||
|
||||
if(path) // check for default path
|
||||
|
||||
@@ -26,9 +26,6 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
if(PC != src && PC.id_tag == id_tag)
|
||||
warning("Two [src] with the same id_tag of [id_tag]")
|
||||
id_tag = null
|
||||
// TODO - Remove this bit once machines are converted to Initialize
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/pointdefense_control/get_description_interaction()
|
||||
@@ -139,9 +136,6 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
|
||||
/obj/machinery/power/pointdefense/Initialize(mapload)
|
||||
. = ..()
|
||||
// TODO - Remove this bit once machines are converted to Initialize
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
default_apply_parts()
|
||||
if(anchored)
|
||||
connect_to_network()
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
anchored = TRUE
|
||||
var/lastuser = null
|
||||
|
||||
/obj/machinery/scanner/New()
|
||||
/obj/machinery/scanner/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!outputdir)
|
||||
switch(dir)
|
||||
if(1)
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
var/expended
|
||||
var/drop_type
|
||||
|
||||
/obj/machinery/power/supply_beacon/New()
|
||||
..()
|
||||
/obj/machinery/power/supply_beacon/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!drop_type) drop_type = pick(supply_drop_random_loot_types())
|
||||
|
||||
/obj/machinery/power/supply_beacon/supermatter
|
||||
|
||||
@@ -13,14 +13,11 @@
|
||||
//Setting this to 1 will set locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
|
||||
var/datum/tgui_module/teleport_control/teleport_control
|
||||
|
||||
/obj/machinery/computer/teleporter/New()
|
||||
/obj/machinery/computer/teleporter/Initialize(mapload)
|
||||
id = "[rand(1000, 9999)]"
|
||||
..()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs
|
||||
|
||||
/obj/machinery/computer/teleporter/Initialize(mapload)
|
||||
. = ..()
|
||||
teleport_control = new(src)
|
||||
var/obj/machinery/teleport/station/station = null
|
||||
var/obj/machinery/teleport/hub/hub = null
|
||||
|
||||
@@ -12,14 +12,9 @@
|
||||
opacity = 0
|
||||
var/list/welder_salvage = list(/obj/item/stack/material/plasteel,/obj/item/stack/material/steel,/obj/item/stack/rods)
|
||||
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
|
||||
var/list/crowbar_salvage
|
||||
var/list/crowbar_salvage = list()
|
||||
var/salvage_num = 5
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/New()
|
||||
..()
|
||||
crowbar_salvage = new
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ex_act(severity)
|
||||
if(severity < 2)
|
||||
spawn
|
||||
@@ -80,8 +75,8 @@
|
||||
name = "Gygax wreckage"
|
||||
icon_state = "gygax-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/gygax/New()
|
||||
..()
|
||||
/obj/effect/decal/mecha_wreckage/gygax/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
|
||||
/obj/item/mecha_parts/part/gygax_head,
|
||||
/obj/item/mecha_parts/part/gygax_left_arm,
|
||||
@@ -93,7 +88,6 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/gygax/dark
|
||||
name = "Dark Gygax wreckage"
|
||||
@@ -128,8 +122,8 @@
|
||||
name = "Ripley wreckage"
|
||||
icon_state = "ripley-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/New()
|
||||
..()
|
||||
/obj/effect/decal/mecha_wreckage/ripley/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
@@ -140,14 +134,13 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/firefighter
|
||||
name = "Firefighter wreckage"
|
||||
icon_state = "firefighter-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
|
||||
..()
|
||||
/obj/effect/decal/mecha_wreckage/ripley/firefighter/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
@@ -159,7 +152,6 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/deathripley
|
||||
name = "Death-Ripley wreckage"
|
||||
@@ -169,8 +161,8 @@
|
||||
name = "Durand wreckage"
|
||||
icon_state = "durand-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/durand/New()
|
||||
..()
|
||||
/obj/effect/decal/mecha_wreckage/durand/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/durand_torso,
|
||||
/obj/item/mecha_parts/part/durand_head,
|
||||
@@ -183,7 +175,6 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/phazon
|
||||
name = "Phazon wreckage"
|
||||
@@ -194,8 +185,8 @@
|
||||
name = "Odysseus wreckage"
|
||||
icon_state = "odysseus-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/odysseus/New()
|
||||
..()
|
||||
/obj/effect/decal/mecha_wreckage/odysseus/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/odysseus_torso,
|
||||
/obj/item/mecha_parts/part/odysseus_head,
|
||||
@@ -208,7 +199,6 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/odysseus/murdysseus
|
||||
icon_state = "murdysseus-broken"
|
||||
|
||||
@@ -252,8 +252,8 @@
|
||||
var/ticks = 0
|
||||
var/target_strength = 0
|
||||
|
||||
/obj/effect/alien/acid/New(loc, target)
|
||||
..(loc)
|
||||
/obj/effect/alien/acid/Initialize(mapload, target)
|
||||
. = ..()
|
||||
src.target = target
|
||||
|
||||
if(isturf(target)) // Turf take twice as long to take down.
|
||||
|
||||
@@ -9,7 +9,6 @@ var/global/list/global_used_pois = list()
|
||||
var/poi_type = null
|
||||
var/remove_from_pool = TRUE
|
||||
|
||||
/obj/effect/landmark/poi_loader/New()
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark/poi_loader)
|
||||
|
||||
/obj/effect/landmark/poi_loader/Initialize(mapload)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/sparks
|
||||
var/datum/ghost_query/Q //This is used so we can unregister ourself.
|
||||
|
||||
/obj/item/antag_spawner/New()
|
||||
..()
|
||||
/obj/item/antag_spawner/Initialize(mapload)
|
||||
. = ..()
|
||||
sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(5, 0, src)
|
||||
sparks.attach(loc)
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2, TECH_ILLEGAL = 1)
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/bodysnatcher/New()
|
||||
..()
|
||||
flags |= NOBLUDGEON //So borgs don't spark.
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/bodysnatcher/attack(mob/living/M, mob/living/user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
@@ -349,8 +349,8 @@ var/global/list/obj/item/communicator/all_communicators = list()
|
||||
/obj/machinery/camera/communicator
|
||||
network = list(NETWORK_COMMUNICATORS)
|
||||
|
||||
/obj/machinery/camera/communicator/New()
|
||||
..()
|
||||
/obj/machinery/camera/communicator/Initialize(mapload)
|
||||
. = ..()
|
||||
client_huds |= global_hud.whitense
|
||||
client_huds |= global_hud.darkMask
|
||||
|
||||
|
||||
@@ -31,17 +31,17 @@
|
||||
/obj/item/laser_pointer/purple
|
||||
pointer_icon_state = "purple_laser"
|
||||
|
||||
/obj/item/laser_pointer/New()
|
||||
..()
|
||||
diode = new(src)
|
||||
/obj/item/laser_pointer/Initialize(mapload, var/laser_path)
|
||||
. = ..()
|
||||
if(ispath(laser_path))
|
||||
diode = new laser_path
|
||||
else
|
||||
diode = new(src)
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/stock_parts/micro_laser/ultra
|
||||
|
||||
|
||||
/obj/item/laser_pointer/upgraded/Initialize(mapload)
|
||||
. = ..(mapload, /obj/item/stock_parts/micro_laser/ultra)
|
||||
|
||||
/obj/item/laser_pointer/attack(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/lightreplacer/New()
|
||||
/obj/item/lightreplacer/Initialize(mapload)
|
||||
. = ..()
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/lightreplacer/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -241,10 +241,6 @@
|
||||
|
||||
var/dimming = 0.7 // multiply value to dim lights from setcolor to nightcolor
|
||||
|
||||
|
||||
/obj/item/lightpainter/New()
|
||||
. = ..()
|
||||
|
||||
/obj/item/lightpainter/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/mass_spectrometer/New()
|
||||
..()
|
||||
/obj/item/mass_spectrometer/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/camerabug/New()
|
||||
..()
|
||||
/obj/item/camerabug/Initialize(mapload)
|
||||
. = ..()
|
||||
// radio = new(src)
|
||||
camera = new camtype(src)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/*
|
||||
/obj/item/bug_monitor/New()
|
||||
/obj/item/bug_monitor/Initialize(mapload)
|
||||
radio = new(src)
|
||||
*/
|
||||
/obj/item/bug_monitor/attack_self(mob/user)
|
||||
@@ -252,8 +252,8 @@
|
||||
/obj/machinery/camera/bug
|
||||
network = list(NETWORK_SECURITY)
|
||||
|
||||
/obj/machinery/camera/bug/New()
|
||||
..()
|
||||
/obj/machinery/camera/bug/Initialize(mapload)
|
||||
. = ..()
|
||||
name = "Camera #[rand(1000,9999)]"
|
||||
c_tag = name
|
||||
|
||||
@@ -261,8 +261,8 @@
|
||||
// These cheap toys are accessible from the mercenary camera console as well - only the antag ones though!
|
||||
network = list(NETWORK_MERCENARY)
|
||||
|
||||
/obj/machinery/camera/bug/spy/New()
|
||||
..()
|
||||
/obj/machinery/camera/bug/spy/Initialize(mapload)
|
||||
. = ..()
|
||||
name = "DV-136ZB #[rand(1000,9999)]"
|
||||
c_tag = name
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
var/special_delivery = FALSE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/pizzavoucher/New()
|
||||
..()
|
||||
/obj/item/pizzavoucher/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/descstrings = list("24/7 PIZZA PIE HEAVEN",
|
||||
"WE ALWAYS DELIVER!",
|
||||
"24-HOUR PIZZA PIE POWER!",
|
||||
|
||||
@@ -172,11 +172,11 @@
|
||||
var/closed_state
|
||||
|
||||
/obj/item/storage/box/fancy/chewables/tobacco/nico/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!open_state)
|
||||
open_state = "[initial(icon_state)]0"
|
||||
if(!closed_state)
|
||||
closed_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/box/fancy/chewables/tobacco/nico/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -373,8 +373,8 @@ Can only be loaded while still in its original case.<BR>
|
||||
the implant may become unstable and either pre-maturely inject the subject or simply break."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/chem/New()
|
||||
..()
|
||||
/obj/item/implant/chem/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/injecting = 0
|
||||
|
||||
/obj/machinery/implantchair/New()
|
||||
..()
|
||||
/obj/machinery/implantchair/Initialize(mapload)
|
||||
. = ..()
|
||||
add_implants()
|
||||
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
starts_with = list(/obj/item/reagent_containers/food/snacks/egg = 12)
|
||||
|
||||
/obj/item/storage/fancy/egg_box/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!open_state)
|
||||
open_state = "[initial(icon_state)]0"
|
||||
if(!closed_state)
|
||||
closed_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/fancy/egg_box/update_icon()
|
||||
cut_overlays()
|
||||
@@ -264,11 +264,11 @@
|
||||
C.desc += " This one is \a [brand]."
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!open_state)
|
||||
open_state = "[initial(icon_state)]_open"
|
||||
if(!closed_state)
|
||||
closed_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
cut_overlays()
|
||||
@@ -411,11 +411,11 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/cigar/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!open_state)
|
||||
open_state = "[initial(icon_state)]0"
|
||||
if(!closed_state)
|
||||
closed_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/fancy/cigar/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -813,11 +813,11 @@
|
||||
icon_state = closed_state
|
||||
|
||||
/obj/item/storage/trinketbox/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!open_state)
|
||||
open_state = "[initial(icon_state)]_open"
|
||||
if(!closed_state)
|
||||
closed_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/trinketbox/attack_self()
|
||||
open = !open
|
||||
|
||||
@@ -66,7 +66,8 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation)
|
||||
return
|
||||
icon_state = "offcenter"
|
||||
/* VOREStation Removal - Doesn't do anything
|
||||
/obj/machinery/gateway/centerstation/New()
|
||||
/obj/machinery/gateway/centerstation/Initialize(mapload)
|
||||
. = ..()
|
||||
density = TRUE
|
||||
*/ //VOREStation Removal End
|
||||
|
||||
@@ -249,7 +250,8 @@ GLOBAL_DATUM(gateway_away, /obj/machinery/gateway/centeraway)
|
||||
var/ready = 0
|
||||
var/obj/machinery/gateway/centerstation/stationgate = null
|
||||
|
||||
/obj/machinery/gateway/centeraway/New()
|
||||
/obj/machinery/gateway/centeraway/Initialize(mapload)
|
||||
. = ..()
|
||||
density = TRUE
|
||||
|
||||
/obj/machinery/gateway/centeraway/Initialize(mapload)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
)
|
||||
|
||||
//Forces different sprite sheet on equip
|
||||
/obj/item/clothing/accessory/choker/New()
|
||||
..()
|
||||
/obj/item/clothing/accessory/choker/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_previous_override = icon_override
|
||||
|
||||
/obj/item/clothing/accessory/choker/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
@@ -57,8 +57,8 @@
|
||||
)
|
||||
|
||||
//Forces different sprite sheet on equip
|
||||
/obj/item/clothing/accessory/collar/New()
|
||||
..()
|
||||
/obj/item/clothing/accessory/collar/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_previous_override = icon_override
|
||||
|
||||
/obj/item/clothing/accessory/collar/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
slot_flags = SLOT_TIE
|
||||
var/obj/item/dosimeter_film/current_film = null
|
||||
|
||||
/obj/item/clothing/accessory/dosimeter/New()
|
||||
..()
|
||||
/obj/item/clothing/accessory/dosimeter/Initialize(mapload)
|
||||
. = ..()
|
||||
current_film = new /obj/item/dosimeter_film(src)
|
||||
update_state(current_film.state)
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -119,8 +119,8 @@
|
||||
max_storage_space = (ITEMSIZE_COST_SMALL * 4) + (ITEMSIZE_COST_TINY * 1)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/storage/box/dosimeter/New()
|
||||
..()
|
||||
/obj/item/storage/box/dosimeter/Initialize(mapload)
|
||||
. = ..()
|
||||
new /obj/item/paper/dosimeter_manual(src)
|
||||
new /obj/item/clothing/accessory/dosimeter(src)
|
||||
new /obj/item/dosimeter_film(src)
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
. += span_notice("Pressure: [env.return_pressure()]kPa / Temperature: [env.temperature]K ")
|
||||
|
||||
/obj/item/clothing/accessory/watch/survival/New()
|
||||
/obj/item/clothing/accessory/watch/survival/Initialize(mapload)
|
||||
. = ..()
|
||||
gps = new/obj/item/gps/watch(src)
|
||||
|
||||
/obj/item/gps/watch
|
||||
|
||||
@@ -304,8 +304,8 @@
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/global/clothing_choices
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!clothing_choices)
|
||||
clothing_choices = generate_chameleon_choices(/obj/item/clothing/glasses, list(src.type))
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ BLIND // can't see anything
|
||||
vision_flags = SEE_TURFS
|
||||
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
|
||||
|
||||
/obj/item/clothing/glasses/meson/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/meson/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.meson
|
||||
|
||||
/obj/item/clothing/glasses/meson/prescription
|
||||
@@ -142,8 +142,8 @@ BLIND // can't see anything
|
||||
actions_types = list(/datum/action/item_action/toggle_goggles)
|
||||
item_flags = AIRTIGHT
|
||||
|
||||
/obj/item/clothing/glasses/science/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/science/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.science
|
||||
|
||||
/obj/item/clothing/glasses/goggles
|
||||
@@ -172,8 +172,8 @@ BLIND // can't see anything
|
||||
species_restricted = list("Vox")
|
||||
flags = PHORONGUARD
|
||||
|
||||
/obj/item/clothing/glasses/night/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/night/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.nvg
|
||||
|
||||
/obj/item/clothing/glasses/eyepatch
|
||||
@@ -264,8 +264,8 @@ BLIND // can't see anything
|
||||
flash_protection = FLASH_PROTECTION_REDUCED
|
||||
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
|
||||
|
||||
/obj/item/clothing/glasses/graviton/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/graviton/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.material
|
||||
|
||||
/obj/item/clothing/glasses/regular
|
||||
@@ -551,8 +551,8 @@ BLIND // can't see anything
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/thermal/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/thermal/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = global_hud.thermal
|
||||
|
||||
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
var/ar_toggled = TRUE //Used for toggle_ar_planes() verb
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/New()
|
||||
..()
|
||||
/obj/item/clothing/glasses/omnihud/Initialize(mapload)
|
||||
. = ..()
|
||||
if(tgarscreen_path)
|
||||
tgarscreen = new tgarscreen_path(src)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Our clear gas masks don't hide faces, but changing the var on mask/gas would require un-chaging it on all children. This is nicer.
|
||||
/obj/item/clothing/mask/gas/New()
|
||||
/obj/item/clothing/mask/gas/Initialize(mapload)
|
||||
. = ..()
|
||||
if(type == /obj/item/clothing/mask/gas)
|
||||
flags_inv &= ~HIDEFACE
|
||||
..()
|
||||
|
||||
// Since we changed the gas mask sprite, if we want the old one for some reason use this.
|
||||
/obj/item/clothing/mask/gas/wwii
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
item_state_slots = list(slot_r_hand_str = null, slot_l_hand_str = null)
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/clothing/mask/muzzle/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/muzzle/Initialize(mapload)
|
||||
. = ..()
|
||||
say_messages = list("Mmfph!", "Mmmf mrrfff!", "Mmmf mnnf!")
|
||||
say_verbs = list("mumbles", "says")
|
||||
|
||||
@@ -217,8 +217,8 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
body_parts_covered = HEAD|FACE
|
||||
*/
|
||||
/obj/item/clothing/mask/horsehead/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/horsehead/Initialize(mapload)
|
||||
. = ..()
|
||||
// The horse mask doesn't cause voice changes by default, the wizard spell changes the flag as necessary
|
||||
say_messages = list("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
say_verbs = list("whinnies", "neighs", "says")
|
||||
@@ -232,7 +232,8 @@
|
||||
body_parts_covered = 0
|
||||
var/mob/observer/eye/aiEye/eye
|
||||
|
||||
/obj/item/clothing/mask/ai/New()
|
||||
/obj/item/clothing/mask/ai/Initialize(mapload)
|
||||
. = ..()
|
||||
eye = new(src)
|
||||
|
||||
/obj/item/clothing/mask/ai/equipped(var/mob/user, var/slot)
|
||||
|
||||
@@ -33,6 +33,6 @@
|
||||
changer.voice = null
|
||||
to_chat(usr, span_notice("You have reset your voice changer's mimicry feature."))
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/gas/voice/Initialize(mapload)
|
||||
. = ..()
|
||||
changer = new(src)
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
var/gun_type = /obj/item/gun/energy/lasercannon/mounted
|
||||
var/obj/item/gun/gun
|
||||
|
||||
/obj/item/rig_module/mounted/New()
|
||||
..()
|
||||
/obj/item/rig_module/mounted/Initialize(mapload)
|
||||
. = ..()
|
||||
gun = new gun_type(src)
|
||||
|
||||
/obj/item/rig_module/mounted/engage(atom/target)
|
||||
|
||||
@@ -237,11 +237,7 @@
|
||||
|
||||
interface_name = "contact datajack"
|
||||
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
|
||||
var/list/stored_research
|
||||
|
||||
/obj/item/rig_module/datajack/New()
|
||||
..()
|
||||
stored_research = list()
|
||||
var/list/stored_research = list()
|
||||
|
||||
/obj/item/rig_module/datajack/engage(atom/target)
|
||||
|
||||
|
||||
@@ -182,8 +182,8 @@
|
||||
interface_name = "dead man's switch"
|
||||
interface_desc = "An integrated self-destruct module. When the wearer dies, they vanish in smoke. Do not press this button."
|
||||
|
||||
/obj/item/rig_module/self_destruct/New()
|
||||
..()
|
||||
/obj/item/rig_module/self_destruct/Initialize(mapload)
|
||||
. = ..()
|
||||
src.smoke = new /datum/effect/effect/system/smoke_spread/bad()
|
||||
src.smoke.attach(src)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
drop_sound = 'sound/items/drop/toolbox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/toolbox.ogg'
|
||||
|
||||
/obj/item/storage/briefcase/crimekit/New()
|
||||
..()
|
||||
/obj/item/storage/briefcase/crimekit/Initialize(mapload)
|
||||
. = ..()
|
||||
new /obj/item/storage/box/swabs(src)
|
||||
new /obj/item/storage/box/fingerprints(src)
|
||||
new /obj/item/reagent_containers/spray/luminol(src)
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
var/list/evidence = list()
|
||||
|
||||
/obj/item/sample/New(var/newloc, var/atom/supplied)
|
||||
..(newloc)
|
||||
/obj/item/sample/Initialize(mapload, var/atom/supplied)
|
||||
. = ..()
|
||||
if(supplied)
|
||||
copy_evidence(supplied)
|
||||
name = "[initial(name)] (\the [supplied])"
|
||||
|
||||
/obj/item/sample/print/New(var/newloc, var/atom/supplied)
|
||||
..(newloc, supplied)
|
||||
/obj/item/sample/print/Initialize(mapload, supplied)
|
||||
. = ..()
|
||||
if(evidence && evidence.len)
|
||||
icon_state = "fingerprint1"
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
can_hold = list(/obj/item/forensics/swab)
|
||||
storage_slots = 14
|
||||
|
||||
/obj/item/storage/box/swabs/New()
|
||||
..()
|
||||
/obj/item/storage/box/swabs/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/i = 1 to storage_slots) // Fill 'er up.
|
||||
new /obj/item/forensics/swab(src)
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
storage_slots = 7
|
||||
can_hold = list(/obj/item/evidencebag)
|
||||
|
||||
/obj/item/storage/box/evidence/New()
|
||||
..()
|
||||
/obj/item/storage/box/evidence/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new /obj/item/evidencebag(src)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
can_hold = list(/obj/item/sample/print)
|
||||
storage_slots = 14
|
||||
|
||||
/obj/item/storage/box/fingerprints/New()
|
||||
..()
|
||||
/obj/item/storage/box/fingerprints/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new /obj/item/sample/print(src)
|
||||
|
||||
@@ -35,9 +35,9 @@ log transactions
|
||||
var/view_screen = NO_SCREEN
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
|
||||
/obj/machinery/atm/New()
|
||||
..()
|
||||
/obj/machinery/atm/Initialize(mapload)
|
||||
machine_id = "[station_name()] RT #[num_financial_terminals++]"
|
||||
. = ..()
|
||||
spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
/obj/machinery/account_database/Initialize(mapload)
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/account_database/attackby(obj/O, mob/user)
|
||||
if(!istype(O, /obj/item/card/id))
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
|
||||
|
||||
// Claim machine ID
|
||||
/obj/machinery/cash_register/New()
|
||||
/obj/machinery/cash_register/Initialize(mapload)
|
||||
machine_id = "[station_name()] RETAIL #[num_financial_terminals++]"
|
||||
. = ..()
|
||||
cash_stored = rand(10, 70)*10
|
||||
transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy()
|
||||
|
||||
|
||||
@@ -100,12 +100,12 @@
|
||||
price_tag = null
|
||||
|
||||
// for /obj/machinery/vending/sovietsoda
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/soda/New()
|
||||
..()
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/soda/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(REAGENT_ID_SODAWATER, 50)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/cola/New()
|
||||
..()
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/cola/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(REAGENT_ID_COLA, 50)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
icon_state = "card_pack_cardemon"
|
||||
parentdeck = "cardemon"
|
||||
|
||||
/obj/item/pack/cardemon/New()
|
||||
..()
|
||||
/obj/item/pack/cardemon/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/playingcard/P
|
||||
var/i
|
||||
for(i=0; i<5; i++)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/deck/egy/New()
|
||||
..()
|
||||
/obj/item/deck/egy/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/playingcard/P
|
||||
//Universal cards
|
||||
for(var/i=0; i<=3; i++)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
desc = "An ancient trick-taking card game from a bygone-Earth country. For 2 players!"
|
||||
icon_state = "deck"
|
||||
|
||||
/obj/item/deck/schnapsen/New()
|
||||
..()
|
||||
/obj/item/deck/schnapsen/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/playingcard/P
|
||||
var/colour
|
||||
for(var/suit in list("acorns","leaves","bells","hearts"))
|
||||
|
||||
@@ -187,8 +187,8 @@
|
||||
if (last_to_emag)
|
||||
C.friends = list(last_to_emag)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/New()
|
||||
..()
|
||||
/obj/machinery/computer/HolodeckControl/Initialize(mapload)
|
||||
. = ..()
|
||||
current_program = powerdown_program
|
||||
linkedholodeck = locate(projection_area)
|
||||
if(!linkedholodeck)
|
||||
|
||||
@@ -301,11 +301,11 @@
|
||||
unacidable = TRUE
|
||||
var/active = 0
|
||||
|
||||
/obj/item/holo/esword/green/New()
|
||||
lcolor = "#008000"
|
||||
/obj/item/holo/esword/green
|
||||
lcolor = "#008000"
|
||||
|
||||
/obj/item/holo/esword/red/New()
|
||||
lcolor = "#FF0000"
|
||||
/obj/item/holo/esword/red
|
||||
lcolor = "#FF0000"
|
||||
|
||||
/obj/item/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
|
||||
@@ -431,10 +431,6 @@
|
||||
to_chat(user, "The station AI is not to interact with these devices!")
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/New()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/readybutton/attackby(obj/item/W, mob/user)
|
||||
to_chat(user, "The device is a solid button, there's nothing you can do with it!")
|
||||
|
||||
@@ -501,8 +497,8 @@
|
||||
meat_amount = 0
|
||||
meat_type = null
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/holodeck/New()
|
||||
..()
|
||||
/mob/living/simple_mob/animal/space/carp/holodeck/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(2) //hologram lighting
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/holodeck/proc/set_safety(var/safe)
|
||||
|
||||
@@ -29,10 +29,7 @@
|
||||
var/original_zLevel = 1 // zLevel on which the station map was initialized.
|
||||
var/bogus = TRUE // set to 0 when you initialize the station map on a zLevel that has its own icon formatted for use by station holomaps.
|
||||
var/datum/station_holomap/holomap_datum
|
||||
|
||||
/obj/machinery/station_map/New()
|
||||
..()
|
||||
flags |= ON_BORDER // Why? It doesn't help if its not density
|
||||
flags = ON_BORDER
|
||||
|
||||
/obj/machinery/station_map/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -375,12 +375,11 @@
|
||||
|
||||
var/list/fruit_icon_cache = list()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/fruit_slice/New(var/newloc, var/datum/seed/S)
|
||||
..(newloc)
|
||||
/obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, var/datum/seed/S)
|
||||
. = ..()
|
||||
// Need to go through and make a general image caching controller. Todo.
|
||||
if(!istype(S))
|
||||
qdel(src)
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
name = "[S.seed_name] slice"
|
||||
desc = "A slice of \a [S.seed_name]. Tasty, probably."
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
var/lockdown = 0
|
||||
var/datum/wires/seedstorage/wires = null
|
||||
|
||||
/obj/machinery/seed_storage/New()
|
||||
..()
|
||||
/obj/machinery/seed_storage/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
if(!contraband_seeds.len)
|
||||
contraband_seeds = pick( /// Some form of ambrosia in all lists.
|
||||
@@ -83,7 +83,6 @@
|
||||
/obj/item/seeds/deathberryseed = 1 /// Very ow.
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
/obj/machinery/seed_storage/process()
|
||||
..()
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/New()
|
||||
..()
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/Initialize(mapload)
|
||||
. = ..()
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
|
||||
|
||||
@@ -287,8 +287,8 @@
|
||||
power_draw_idle = 5 // Raises to 80 when on.
|
||||
var/obj/machinery/camera/network/circuits/camera
|
||||
|
||||
/obj/item/integrated_circuit/output/video_camera/New()
|
||||
..()
|
||||
/obj/item/integrated_circuit/output/video_camera/Initialize(mapload)
|
||||
. = ..()
|
||||
extended_desc = list()
|
||||
extended_desc += "Network choices are; "
|
||||
extended_desc += jointext(networks, ", ")
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/mineral/input/New()
|
||||
/obj/machinery/mineral/input/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/machinery/mineral/output
|
||||
@@ -17,5 +18,6 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/mineral/output/New()
|
||||
/obj/machinery/mineral/output/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "blank"
|
||||
|
||||
@@ -10,19 +10,16 @@
|
||||
var/obj/machinery/mineral/stacking_machine/machine = null
|
||||
//var/machinedir = SOUTHEAST //This is really dumb, so lets burn it with fire.
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/New()
|
||||
|
||||
..()
|
||||
|
||||
spawn(7)
|
||||
//src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
//Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
|
||||
to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
|
||||
qdel(src)
|
||||
/obj/machinery/mineral/stacking_unit_console/Initialize(mapload)
|
||||
. = ..()
|
||||
//src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) //No.
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine) in range(5,src)
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
//Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
|
||||
to_world(span_danger("Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!"))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
@@ -84,23 +81,19 @@
|
||||
var/list/stack_paths[0]
|
||||
var/stack_amt = 50; // Amount to stack before releassing
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/item/stack/material/S as anything in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg)))
|
||||
var/s_matname = initial(S.default_type)
|
||||
stack_storage[s_matname] = 0
|
||||
stack_paths[s_matname] = S
|
||||
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
return
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/toggle_speed(var/forced)
|
||||
if(forced)
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
src.set_light(0)
|
||||
cameranet.removeCamera(src)
|
||||
|
||||
/obj/machinery/camera/New()
|
||||
..()
|
||||
/obj/machinery/camera/Initialize(mapload)
|
||||
. = ..()
|
||||
//Camera must be added to global list of all cameras no matter what...
|
||||
if(cameranet.cameras_unsorted || !ticker)
|
||||
cameranet.cameras += src
|
||||
|
||||
@@ -313,15 +313,17 @@ var/list/ai_verbs_default = list(
|
||||
var/mob/living/silicon/ai/powered_ai = null
|
||||
invisibility = 100
|
||||
|
||||
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
|
||||
powered_ai = ai
|
||||
/obj/machinery/ai_powersupply/Initialize(mapload)
|
||||
. = ..()
|
||||
powered_ai = loc
|
||||
if(!istype(powered_ai))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
powered_ai.psupply = src
|
||||
if(istype(powered_ai,/mob/living/silicon/ai/announcer)) //Don't try to get a loc for a nullspace announcer mob, just put it into it
|
||||
forceMove(powered_ai)
|
||||
else
|
||||
forceMove(powered_ai.loc)
|
||||
|
||||
..()
|
||||
use_power(1) // Just incase we need to wake up the power system.
|
||||
|
||||
/obj/machinery/ai_powersupply/Destroy()
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
fabricator_tag = "Upper Level Mining"
|
||||
drone_type = /mob/living/silicon/robot/drone/mining
|
||||
|
||||
/obj/machinery/drone_fabricator/New()
|
||||
..()
|
||||
|
||||
/obj/machinery/drone_fabricator/power_change()
|
||||
..()
|
||||
if (stat & NOPOWER)
|
||||
|
||||
@@ -253,13 +253,13 @@ var/global/list/grub_machine_overlays = list()
|
||||
ignored_targets += A
|
||||
|
||||
|
||||
/obj/machinery/abstract_grub_machine/New()
|
||||
..()
|
||||
/obj/machinery/abstract_grub_machine/Initialize(mapload)
|
||||
. = ..()
|
||||
shuffle_power_usages()
|
||||
grub = loc
|
||||
if(!istype(grub))
|
||||
grub = null
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/abstract_grub_machine/Destroy()
|
||||
grub = null
|
||||
|
||||
@@ -95,8 +95,8 @@
|
||||
ntnet_global.add_log("Manual override: Network blacklist cleared.")
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/ntnet_relay/New()
|
||||
..()
|
||||
/obj/machinery/ntnet_relay/Initialize(mapload)
|
||||
. = ..()
|
||||
assign_uid()
|
||||
default_apply_parts()
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/zpipe/New()
|
||||
..()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/Initialize(mapload)
|
||||
. = ..()
|
||||
init_dir()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/zpipe/init_dir()
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
|
||||
/obj/machinery/disperser/Initialize(mapload)
|
||||
. = ..()
|
||||
// TODO - Remove this bit once machines are converted to Initialize
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/disperser/examine(mob/user)
|
||||
|
||||
@@ -605,8 +605,8 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
name = "deep ocean"
|
||||
alpha = 0
|
||||
|
||||
/obj/machinery/power/smes/buildable/offmap_spawn/empty/New()
|
||||
..(1)
|
||||
/obj/machinery/power/smes/buildable/offmap_spawn/empty/Initialize(mapload)
|
||||
. = ..()
|
||||
charge = 0
|
||||
RCon = TRUE
|
||||
input_level = input_level_max
|
||||
|
||||
@@ -15,16 +15,14 @@
|
||||
var/obj/machinery/power/am_engine/injector/connected_I = null
|
||||
var/state = STATE_DEFAULT
|
||||
|
||||
/obj/machinery/computer/am_engine/New()
|
||||
..()
|
||||
spawn( 24 )
|
||||
for(var/obj/machinery/power/am_engine/engine/E in world)
|
||||
if(E.engine_id == src.engine_id)
|
||||
src.connected_E = E
|
||||
for(var/obj/machinery/power/am_engine/injector/I in world)
|
||||
if(I.engine_id == src.engine_id)
|
||||
src.connected_I = I
|
||||
return
|
||||
/obj/machinery/computer/am_engine/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/machinery/power/am_engine/engine/E in world)
|
||||
if(E.engine_id == src.engine_id)
|
||||
src.connected_E = E
|
||||
for(var/obj/machinery/power/am_engine/injector/I in world)
|
||||
if(I.engine_id == src.engine_id)
|
||||
src.connected_I = I
|
||||
|
||||
/obj/machinery/computer/am_engine/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
var/stored_power = 0//Power to deploy per tick
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/New()
|
||||
..()
|
||||
/obj/machinery/power/am_control_unit/Initialize(mapload)
|
||||
. = ..()
|
||||
linked_shielding = list()
|
||||
linked_cores = list()
|
||||
|
||||
@@ -227,16 +227,13 @@
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
if(AMS.processing) AMS.shutdown_core()
|
||||
AMS.control_unit = null
|
||||
spawn(10)
|
||||
AMS.controllerscan()
|
||||
addtimer(CALLBACK(AMS, TYPE_PROC_REF(/obj/machinery/am_shielding, controllerscan)), 1 SECOND, TIMER_DELETE_ME)
|
||||
linked_shielding = list()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
AMS.update_icon()
|
||||
spawn(20)
|
||||
shield_icon_delay = 0
|
||||
return
|
||||
VARSET_IN(src, shield_icon_delay, 0, 2 SECONDS)
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/check_core_stability()
|
||||
@@ -246,8 +243,7 @@
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_cores)
|
||||
stored_core_stability += AMS.stability
|
||||
stored_core_stability/=linked_cores.len
|
||||
spawn(40)
|
||||
stored_core_stability_delay = 0
|
||||
VARSET_IN(src, stored_core_stability_delay, 0, 4 SECONDS)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -28,14 +28,10 @@
|
||||
|
||||
//injector
|
||||
|
||||
/obj/machinery/power/am_engine/injector/New()
|
||||
..()
|
||||
spawn( 13 )
|
||||
var/loc = get_step(src, NORTH)
|
||||
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(loc, NORTH))
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/power/am_engine/injector/Initialize(mapload)
|
||||
. = ..()
|
||||
var/link_loc = get_step(src, NORTH)
|
||||
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(link_loc, NORTH))
|
||||
|
||||
/obj/machinery/power/am_engine/injector/attackby(obj/item/fuel/F, mob/user)
|
||||
if( (stat & BROKEN) || !connected) return
|
||||
@@ -72,13 +68,10 @@
|
||||
//engine
|
||||
|
||||
|
||||
/obj/machinery/power/am_engine/engine/New()
|
||||
..()
|
||||
spawn( 7 )
|
||||
var/loc = get_step(src, SOUTH)
|
||||
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(loc, SOUTH))
|
||||
return
|
||||
return
|
||||
/obj/machinery/power/am_engine/engine/Initialize(mapload)
|
||||
. = ..()
|
||||
var/link_loc = get_step(src, SOUTH)
|
||||
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(link_loc, SOUTH))
|
||||
|
||||
|
||||
/obj/machinery/power/am_engine/engine/proc/engine_go()
|
||||
|
||||
@@ -26,45 +26,49 @@
|
||||
var/efficiency = 1//How many cores this core counts for when doing power processing, phoron in the air and stability could affect this
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/New(loc)
|
||||
..(loc)
|
||||
spawn(10)
|
||||
controllerscan()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/proc/controllerscan(var/priorscan = 0)
|
||||
/obj/machinery/am_shielding/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!istype(loc, /turf))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
//Make sure we are the only one here
|
||||
if(!istype(src.loc, /turf))
|
||||
for(var/obj/machinery/am_shielding/AMS in loc.contents)
|
||||
if(AMS == src)
|
||||
continue
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
scan_control_shield()
|
||||
|
||||
if(!control_unit) // Failed to link
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/am_shielding/proc/controllerscan()
|
||||
//Make sure we are the only one here
|
||||
if(!istype(loc, /turf))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/am_shielding/AMS in loc.contents)
|
||||
if(AMS == src) continue
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
if(AMS == src)
|
||||
continue
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
scan_control_shield()
|
||||
|
||||
if(!control_unit) // Failed to link
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/am_shielding/proc/scan_control_shield()
|
||||
//Search for shielding first
|
||||
for(var/obj/machinery/am_shielding/AMS in cardinalrange(src))
|
||||
if(AMS && AMS.control_unit && link_control(AMS.control_unit))
|
||||
break
|
||||
|
||||
if(!control_unit)//No other guys nearby look for a control unit
|
||||
for(var/direction in cardinal)
|
||||
for(var/obj/machinery/power/am_control_unit/AMC in cardinalrange(src))
|
||||
if(AMC.add_shielding(src))
|
||||
break
|
||||
|
||||
if(!control_unit)
|
||||
if(!priorscan)
|
||||
spawn(20)
|
||||
controllerscan(1)//Last chance
|
||||
return
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/Destroy()
|
||||
if(control_unit) control_unit.remove_shielding(src)
|
||||
if(processing) shutdown_core()
|
||||
|
||||
@@ -190,8 +190,8 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
|
||||
return drained_energy
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
/obj/machinery/power/apc/Initialize(mapload, ndir, building)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
GLOB.apcs += src
|
||||
|
||||
@@ -211,12 +211,10 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
name = "[area.name] APC"
|
||||
stat |= MAINT
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/power/apc/Initialize(mapload, ndir, building)
|
||||
. = ..()
|
||||
if(!building)
|
||||
init()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
init()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/power/apc/LateInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
should_be_mapped = TRUE
|
||||
|
||||
|
||||
/obj/machinery/power/smes/batteryrack/New()
|
||||
..()
|
||||
/obj/machinery/power/smes/batteryrack/Initialize(mapload)
|
||||
. = ..()
|
||||
add_parts()
|
||||
RefreshParts()
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
var/obj/machinery/power/fusion_core/cur_viewed_device
|
||||
var/datum/tgui_module/rustcore_monitor/monitor
|
||||
|
||||
/obj/machinery/computer/fusion_core_control/New()
|
||||
..()
|
||||
/obj/machinery/computer/fusion_core_control/Initialize(mapload)
|
||||
. = ..()
|
||||
monitor = new(src)
|
||||
monitor.core_tag = id_tag
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
var/scan_range = 25
|
||||
var/datum/tgui_module/rustfuel_control/monitor
|
||||
|
||||
/obj/machinery/computer/fusion_fuel_control/New()
|
||||
..()
|
||||
/obj/machinery/computer/fusion_fuel_control/Initialize(mapload)
|
||||
. = ..()
|
||||
monitor = new(src)
|
||||
monitor.fuel_tag = id_tag
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
var/scan_range = 25
|
||||
var/datum/tgui_module/gyrotron_control/monitor
|
||||
|
||||
/obj/machinery/computer/gyrotron_control/New()
|
||||
..()
|
||||
/obj/machinery/computer/gyrotron_control/Initialize(mapload)
|
||||
. = ..()
|
||||
monitor = new(src)
|
||||
monitor.gyro_tag = id_tag
|
||||
monitor.scan_range = scan_range
|
||||
|
||||
@@ -31,8 +31,8 @@ var/global/list/light_type_cache = list()
|
||||
|
||||
var/cell_connectors = TRUE
|
||||
|
||||
/obj/machinery/light_construct/New(var/atom/newloc, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
|
||||
..(newloc)
|
||||
/obj/machinery/light_construct/Initialize(mapload, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
|
||||
. = ..()
|
||||
if(fixture)
|
||||
fixture_type = fixture.type
|
||||
fixture.transfer_fingerprints_to(src)
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
//Vorestation addition, to override the New() proc further below, since this is a lamp.
|
||||
/obj/machinery/light/flamp/New()
|
||||
..()
|
||||
/obj/machinery/light/flamp/Initialize(mapload, obj/machinery/light_construct/construct)
|
||||
layer = initial(layer)
|
||||
. = ..()
|
||||
|
||||
// create a new lighting fixture
|
||||
/obj/machinery/light/New()
|
||||
..()
|
||||
/obj/machinery/light/Initialize(mapload, obj/machinery/light_construct/construct)
|
||||
. = ..()
|
||||
//Vorestation addition, so large mobs stop looking stupid in front of lights.
|
||||
if (dir == SOUTH) // Lights are backwards, SOUTH lights face north (they are on south wall)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
|
||||
@@ -95,8 +95,6 @@
|
||||
|
||||
/obj/machinery/power/rtg/Initialize(mapload)
|
||||
. = ..()
|
||||
if(ispath(circuit))
|
||||
circuit = new circuit(src)
|
||||
default_apply_parts()
|
||||
connect_to_network()
|
||||
|
||||
|
||||
@@ -25,14 +25,12 @@
|
||||
var/next_record = 0
|
||||
var/is_secret_monitor = FALSE
|
||||
|
||||
// Proc: New()
|
||||
// Proc: Initialize(mapload)
|
||||
// Parameters: None
|
||||
// Description: Automatically assigns name according to ID tag.
|
||||
/obj/machinery/power/sensor/New()
|
||||
..()
|
||||
auto_set_name()
|
||||
/obj/machinery/power/sensor/Initialize(mapload)
|
||||
. = ..()
|
||||
auto_set_name()
|
||||
history["supply"] = list()
|
||||
history["demand"] = list()
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
..()
|
||||
*/
|
||||
// On creation automatically connects to active sensors. This is delayed to ensure sensors already exist.
|
||||
/obj/machinery/computer/power_monitor/New()
|
||||
..()
|
||||
/obj/machinery/computer/power_monitor/Initialize(mapload)
|
||||
. = ..()
|
||||
power_monitor = new(src)
|
||||
|
||||
// On user click opens the UI of this computer.
|
||||
|
||||
@@ -17,8 +17,8 @@ var/global/list/rad_collectors = list()
|
||||
var/locked = 0
|
||||
var/drainratio = 1
|
||||
|
||||
/obj/machinery/power/rad_collector/New()
|
||||
..()
|
||||
/obj/machinery/power/rad_collector/Initialize(mapload)
|
||||
. = ..()
|
||||
rad_collectors += src
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
|
||||
@@ -68,11 +68,10 @@ field_generator power level display
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field_generator/New()
|
||||
..()
|
||||
/obj/machinery/field_generator/Initialize(mapload)
|
||||
. = ..()
|
||||
fields = list()
|
||||
connected_gens = list()
|
||||
return
|
||||
|
||||
/obj/machinery/field_generator/process()
|
||||
if(Varedit_start == 1)
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
var/parts = null
|
||||
var/datum/wires/particle_acc/control_box/wires = null
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/New()
|
||||
/obj/machinery/particle_accelerator/control_box/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
connected_parts = list()
|
||||
update_active_power_usage(initial(active_power_usage) * (strength + 1))
|
||||
..()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/Destroy()
|
||||
if(active)
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
|
||||
var/datum/looping_sound/supermatter/soundloop
|
||||
|
||||
/obj/machinery/power/supermatter/New()
|
||||
..()
|
||||
/obj/machinery/power/supermatter/Initialize(mapload)
|
||||
. = ..()
|
||||
uid = gl_uid++
|
||||
|
||||
/obj/machinery/power/supermatter/Initialize(mapload)
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
layer = WIRES_LAYER+0.01
|
||||
|
||||
|
||||
/obj/machinery/power/terminal/New()
|
||||
..()
|
||||
/obj/machinery/power/terminal/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/T = src.loc
|
||||
if(level==1) hide(!T.is_plating())
|
||||
return
|
||||
|
||||
/obj/machinery/power/terminal/Destroy()
|
||||
if(master)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user