Merge remote-tracking branch 'polaris/master' into PS_PORT_SCHEDULER

This commit is contained in:
kevinz000
2018-12-09 20:34:39 -08:00
234 changed files with 1365 additions and 477 deletions
@@ -109,7 +109,7 @@
pixel_x = -32
pixel_y = 0
/obj/structure/sign/poster/initialize()
/obj/structure/sign/poster/Initialize()
. = ..()
if (poster_type)
var/path = text2path(poster_type)
+88 -9
View File
@@ -103,7 +103,7 @@ steam.start() -- spawns the effect
if (istype(T, /turf))
T.hotspot_expose(1000,100)
/obj/effect/effect/sparks/initialize()
/obj/effect/effect/sparks/Initialize()
. = ..()
QDEL_IN(src, 5 SECONDS)
@@ -225,15 +225,16 @@ steam.start() -- spawns the effect
/obj/effect/effect/smoke/bad/Move()
..()
for(var/mob/living/carbon/M in get_turf(src))
affect(M)
for(var/mob/living/L in get_turf(src))
affect(L)
/obj/effect/effect/smoke/bad/affect(var/mob/living/carbon/M)
/obj/effect/effect/smoke/bad/affect(var/mob/living/L)
if (!..())
return 0
M.adjustOxyLoss(1)
if(prob(25))
M.emote("cough")
if(L.needs_to_breathe())
L.adjustOxyLoss(1)
if(prob(25))
L.emote("cough")
/* Not feasile until a later date
/obj/effect/effect/smoke/bad/Crossed(atom/movable/M as mob|obj)
@@ -251,6 +252,72 @@ steam.start() -- spawns the effect
projectiles -= proj
*/
/////////////////////////////////////////////
// 'Elemental' smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/elemental
name = "cloud"
desc = "A cloud of some kind that seems really generic and boring."
opacity = FALSE
var/strength = 5 // How much damage to do inside each affect()
/obj/effect/effect/smoke/elemental/Initialize()
processing_objects += src
return ..()
/obj/effect/effect/smoke/elemental/Destroy()
processing_objects -= src
return ..()
/obj/effect/effect/smoke/elemental/Move()
..()
for(var/mob/living/L in range(1, src))
affect(L)
/obj/effect/effect/smoke/elemental/process()
for(var/mob/living/L in range(1, src))
affect(L)
/obj/effect/effect/smoke/elemental/fire
name = "burning cloud"
desc = "A cloud of something that is on fire."
color = "#FF9933"
light_color = "#FF0000"
light_range = 2
light_power = 5
/obj/effect/effect/smoke/elemental/fire/affect(mob/living/L)
L.inflict_heat_damage(strength)
L.add_modifier(/datum/modifier/fire, 6 SECONDS) // Around 15 damage per stack.
/obj/effect/effect/smoke/elemental/frost
name = "freezing cloud"
desc = "A cloud filled with brutally cold mist."
color = "#00CCFF"
/obj/effect/effect/smoke/elemental/frost/affect(mob/living/L)
L.inflict_cold_damage(strength)
/obj/effect/effect/smoke/elemental/shock
name = "charged cloud"
desc = "A cloud charged with electricity."
color = "#4D4D4D"
/obj/effect/effect/smoke/elemental/shock/affect(mob/living/L)
L.inflict_shock_damage(strength)
/obj/effect/effect/smoke/elemental/mist
name = "misty cloud"
desc = "A cloud filled with water vapor."
color = "#CCFFFF"
alpha = 128
strength = 1
/obj/effect/effect/smoke/elemental/mist/affect(mob/living/L)
L.water_act(strength)
/////////////////////////////////////////////
// Smoke spread
/////////////////////////////////////////////
@@ -282,7 +349,8 @@ steam.start() -- spawns the effect
src.location = get_turf(holder)
var/obj/effect/effect/smoke/smoke = new smoke_type(src.location)
src.total_smoke++
smoke.color = I
if(I)
smoke.color = I
var/direction = src.direction
if(!direction)
if(src.cardinals)
@@ -296,10 +364,21 @@ steam.start() -- spawns the effect
if (smoke) qdel(smoke)
src.total_smoke--
/datum/effect/effect/system/smoke_spread/bad
smoke_type = /obj/effect/effect/smoke/bad
/datum/effect/effect/system/smoke_spread/fire
smoke_type = /obj/effect/effect/smoke/elemental/fire
/datum/effect/effect/system/smoke_spread/frost
smoke_type = /obj/effect/effect/smoke/elemental/frost
/datum/effect/effect/system/smoke_spread/shock
smoke_type = /obj/effect/effect/smoke/elemental/shock
/datum/effect/effect/system/smoke_spread/mist
smoke_type = /obj/effect/effect/smoke/elemental/mist
/////////////////////////////////////////////
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)
/// just pass in the object to attach it to in set_up
+1 -1
View File
@@ -83,7 +83,7 @@
/obj/effect/landmark/proc/delete()
delete_me = 1
/obj/effect/landmark/initialize()
/obj/effect/landmark/Initialize()
. = ..()
if(delete_me)
return INITIALIZE_HINT_QDEL
@@ -0,0 +1,192 @@
GLOBAL_LIST_EMPTY(all_beam_points)
// Creates and manages a beam attached to itself and another beam_point.
// You can do cool things with these such as moving the beam_point to move the beam, turning them on and off on a timer, triggered by external input, and more.
/obj/effect/map_effect/beam_point
name = "beam point"
icon_state = "beam_point"
// General variables.
var/list/my_beams = list() // Instances of beams. Deleting one will kill the beam.
var/id = "A" // Two beam_points must share the same ID to be connected to each other.
var/max_beams = 10 // How many concurrent beams to seperate beam_points to have at once. Set to zero to only act as targets for other beam_points.
var/seek_range = 7 // How far to look for an end beam_point when not having a beam. Defaults to screen height/width. Make sure this is below beam_max_distance.
// Controls how and when the beam is created.
var/make_beams_on_init = FALSE
var/use_timer = FALSE // Sadly not the /tg/ timers.
var/list/on_duration = list(2 SECONDS, 2 SECONDS, 2 SECONDS) // How long the beam should stay on for, if use_timer is true. Alternates between each duration in the list.
var/list/off_duration = list(3 SECONDS, 0.5 SECOND, 0.5 SECOND) // How long it should stay off for. List length is not needed to be the same as on_duration.
var/timer_on_index = 1 // Index to use for on_duration list.
var/timer_off_index = 1// Ditto, for off_duration list.
var/initial_delay = 0 // How long to wait before first turning on the beam, to sync beam times or create a specific pattern.
var/beam_creation_sound = null // Optional sound played when one or more beams are created.
var/beam_destruction_sound = null // Optional sound played when a beam is destroyed.
// Beam datum arguments.
var/beam_icon = 'icons/effects/beam.dmi' // Icon file to use for beam visuals.
var/beam_icon_state = "b_beam" // Icon state to use for visuals.
var/beam_time = INFINITY // How long the beam lasts. By default it will last forever until destroyed.
var/beam_max_distance = 10 // If the beam is farther than this, it will be destroyed. Make sure it's higher than seek_range.
var/beam_type = /obj/effect/ebeam // The type of beam. Default has no special properties. Some others may do things like hurt things touching it.
var/beam_sleep_time = 3 // How often the beam updates visually. Suggested to leave this alone, 3 is already fast.
/obj/effect/map_effect/beam_point/Initialize()
GLOB.all_beam_points += src
if(make_beams_on_init)
create_beams()
if(use_timer)
spawn(initial_delay)
handle_beam_timer()
return ..()
/obj/effect/map_effect/beam_point/Destroy()
destroy_all_beams()
use_timer = FALSE
GLOB.all_beam_points -= src
return ..()
// This is the top level proc to make the magic happen.
/obj/effect/map_effect/beam_point/proc/create_beams()
if(my_beams.len >= max_beams)
return
var/beams_to_fill = max_beams - my_beams.len
for(var/i = 1 to beams_to_fill)
var/obj/effect/map_effect/beam_point/point = seek_beam_point()
if(!point)
break // No more points could be found, no point checking repeatively.
build_beam(point)
// Finds a suitable beam point.
/obj/effect/map_effect/beam_point/proc/seek_beam_point()
for(var/obj/effect/map_effect/beam_point/point in GLOB.all_beam_points)
if(id != point.id)
continue // Not linked together by ID.
if(has_active_beam(point))
continue // Already got one.
if(point.z != src.z)
continue // Not on same z-level. get_dist() ignores z-levels by design according to docs.
if(get_dist(src, point) > seek_range)
continue // Too far.
return point
// Checks if the two points have an active beam between them.
// Used to make sure two points don't have more than one beam.
/obj/effect/map_effect/beam_point/proc/has_active_beam(var/obj/effect/map_effect/beam_point/them)
// First, check our beams.
for(var/datum/beam/B in my_beams)
if(B.target == them)
return TRUE
if(B.origin == them) // This shouldn't be needed unless the beam gets built backwards but why not.
return TRUE
// Now check theirs, to see if they have a beam on us.
for(var/datum/beam/B in them.my_beams)
if(B.target == src)
return TRUE
if(B.origin == src) // Same story as above.
return TRUE
return FALSE
/obj/effect/map_effect/beam_point/proc/build_beam(var/atom/beam_target)
if(!beam_target)
log_debug("[src] ([src.type] \[[x],[y],[z]\]) failed to build its beam due to not having a target.")
return FALSE
var/datum/beam/new_beam = Beam(beam_target, beam_icon_state, beam_icon, beam_time, beam_max_distance, beam_type, beam_sleep_time)
my_beams += new_beam
if(beam_creation_sound)
playsound(src, beam_creation_sound, 70, 1)
return TRUE
/obj/effect/map_effect/beam_point/proc/destroy_beam(var/datum/beam/B)
if(!B)
log_debug("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam that does not exist.")
return FALSE
if(!(B in my_beams))
log_debug("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam it did not own.")
return FALSE
my_beams -= B
qdel(B)
if(beam_destruction_sound)
playsound(src, beam_destruction_sound, 70, 1)
return TRUE
/obj/effect/map_effect/beam_point/proc/destroy_all_beams()
for(var/datum/beam/B in my_beams)
destroy_beam(B)
return TRUE
// This code makes me sad.
/obj/effect/map_effect/beam_point/proc/handle_beam_timer()
if(!use_timer || QDELETED(src))
return
if(my_beams.len) // Currently on.
destroy_all_beams()
color = "#FF0000"
timer_off_index++
if(timer_off_index > off_duration.len)
timer_off_index = 1
spawn(off_duration[timer_off_index])
.()
else // Currently off.
// If nobody's around, keep the beams off to avoid wasteful beam process(), if they have one.
if(!always_run && !check_for_player_proximity(src, proximity_needed, ignore_ghosts, ignore_afk))
spawn(retry_delay)
.()
return
create_beams()
color = "#00FF00"
timer_on_index++
if(timer_on_index > on_duration.len)
timer_on_index = 1
spawn(on_duration[timer_on_index])
.()
// Subtypes to use in maps and adminbuse.
// Remember, beam_points ONLY connect to other beam_points with the same id variable.
// Creates the beam when instantiated and stays on until told otherwise.
/obj/effect/map_effect/beam_point/instant
make_beams_on_init = TRUE
/obj/effect/map_effect/beam_point/instant/electric
beam_icon_state = "nzcrentrs_power"
beam_type = /obj/effect/ebeam/reactive/electric
beam_creation_sound = 'sound/effects/lightningshock.ogg'
beam_destruction_sound = "sparks"
// Turns on and off on a timer.
/obj/effect/map_effect/beam_point/timer
use_timer = TRUE
// Shocks people who touch the beam while it's on. Flicks on and off on a specific pattern.
/obj/effect/map_effect/beam_point/timer/electric
beam_icon_state = "nzcrentrs_power"
beam_type = /obj/effect/ebeam/reactive/electric
beam_creation_sound = 'sound/effects/lightningshock.ogg'
beam_destruction_sound = "sparks"
seek_range = 3
// Is only a target for other beams to connect to.
/obj/effect/map_effect/beam_point/end
max_beams = 0
// Can only have one beam.
/obj/effect/map_effect/beam_point/mono
make_beams_on_init = TRUE
max_beams = 1
@@ -0,0 +1,78 @@
// Creates effects like smoke clouds every so often.
/obj/effect/map_effect/interval/effect_emitter
var/datum/effect/effect/system/effect_system = null
var/effect_system_type = null // Which effect system to attach.
var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems.
var/effect_cardinals_only = FALSE // If true, effects only move in cardinal directions.
var/effect_forced_dir = null // If set, effects emitted will always move in this direction.
/obj/effect/map_effect/interval/effect_emitter/Initialize()
effect_system = new effect_system_type()
effect_system.attach(src)
configure_effects()
return ..()
/obj/effect/map_effect/interval/effect_emitter/interval/Destroy()
QDEL_NULL(effect_system)
return ..()
/obj/effect/map_effect/interval/effect_emitter/proc/configure_effects()
effect_system.set_up(effect_amount, effect_cardinals_only, usr.loc, effect_forced_dir)
/obj/effect/map_effect/interval/effect_emitter/trigger()
configure_effects() // We do this every interval in case it changes.
effect_system.start()
..()
// Creates smoke clouds every so often.
/obj/effect/map_effect/interval/effect_emitter/smoke
name = "smoke emitter"
icon_state = "smoke_emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread
interval_lower_bound = 1 SECOND
interval_upper_bound = 1 SECOND
effect_amount = 2
/obj/effect/map_effect/interval/effect_emitter/smoke/bad
name = "bad smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/bad
/obj/effect/map_effect/interval/effect_emitter/smoke/fire
name = "fire smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/fire
/obj/effect/map_effect/interval/effect_emitter/smoke/frost
name = "frost smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/frost
/obj/effect/map_effect/interval/effect_emitter/smoke/shock
name = "shock smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/shock
/obj/effect/map_effect/interval/effect_emitter/smoke/mist
name = "mist smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/mist
// Makes sparks.
/obj/effect/map_effect/interval/effect_emitter/sparks
name = "spark emitter"
icon_state = "spark_emitter"
effect_system_type = /datum/effect/effect/system/spark_spread
interval_lower_bound = 3 SECONDS
interval_upper_bound = 7 SECONDS
/obj/effect/map_effect/interval/effect_emitter/sparks/frequent
effect_amount = 4 // Otherwise it caps out fast.
interval_lower_bound = 1
interval_upper_bound = 3 SECONDS
// Makes ""steam"" that looks like fire extinguisher water except it does nothing.
/obj/effect/map_effect/interval/effect_emitter/steam
name = "steam emitter"
icon_state = "smoke_emitter"
effect_system_type = /datum/effect/effect/system/steam_spread
@@ -0,0 +1,71 @@
// These are objects you can use inside special maps (like PoIs), or for adminbuse.
// Players cannot see or interact with these.
/obj/effect/map_effect
anchored = TRUE
invisibility = 99 // So a badmin can go view these by changing their see_invisible.
icon = 'icons/effects/map_effects.dmi'
// Below vars concern check_for_player_proximity() and is used to not waste effort if nobody is around to appreciate the effects.
var/always_run = FALSE // If true, the game will not try to suppress this from firing if nobody is around to see it.
var/proximity_needed = 12 // How many tiles a mob with a client must be for this to run.
var/ignore_ghosts = FALSE // If true, ghosts won't satisfy the above requirement.
var/ignore_afk = TRUE // If true, AFK people (5 minutes) won't satisfy it as well.
var/retry_delay = 3 SECONDS // How long until we check for players again.
/obj/effect/map_effect/ex_act()
return
/obj/effect/map_effect/singularity_pull()
return
/obj/effect/map_effect/singularity_act()
return
// Base type for effects that run on variable intervals.
/obj/effect/map_effect/interval
var/interval_lower_bound = 5 SECONDS // Lower number for how often the map_effect will trigger.
var/interval_upper_bound = 5 SECONDS // Higher number for above.
var/halt = FALSE // Set to true to stop the loop when it reaches the next iteration.
/obj/effect/map_effect/interval/Initialize()
handle_interval_delay()
return ..()
/obj/effect/map_effect/interval/Destroy()
halt = TRUE // Shouldn't need it to GC but just in case.
return ..()
// Override this for the specific thing to do. Be sure to call parent to keep looping.
/obj/effect/map_effect/interval/proc/trigger()
handle_interval_delay()
// Handles the delay and making sure it doesn't run when it would be bad.
/obj/effect/map_effect/interval/proc/handle_interval_delay()
// Check to see if we're useful first.
if(halt)
return // Do not pass .(), do not recursively collect 200 thaler.
if(!always_run && !check_for_player_proximity(src, proximity_needed, ignore_ghosts, ignore_afk))
spawn(retry_delay) // Maybe someday we'll have fancy TG timers/schedulers.
if(!QDELETED(src))
.()
var/next_interval = rand(interval_lower_bound, interval_upper_bound)
spawn(next_interval)
if(!QDELETED(src))
trigger()
// Helper proc to optimize the use of effects by making sure they do not run if nobody is around to perceive it.
/proc/check_for_player_proximity(var/atom/proximity_to, var/radius = 12, var/ignore_ghosts = FALSE, var/ignore_afk = TRUE)
if(!proximity_to)
return FALSE
for(var/thing in player_list)
var/mob/M = thing // Avoiding typechecks for more speed, player_list will only contain mobs anyways.
if(ignore_ghosts && isobserver(M))
continue
if(ignore_afk && M.client && M.client.is_afk(5 MINUTES))
continue
if(M.z == proximity_to.z && get_dist(M, proximity_to) <= radius)
return TRUE
return FALSE
@@ -0,0 +1,9 @@
// Emits light forever with magic. Useful for mood lighting in Points of Interest.
// Be sure to check how it looks ingame, and fiddle with the settings until it looks right.
/obj/effect/map_effect/perma_light
name = "permanent light"
icon_state = "permalight"
light_range = 3
light_power = 1
light_color = "#FFFFFF"
@@ -0,0 +1,19 @@
// Constantly emites radiation from the tile it's placed on.
/obj/effect/map_effect/radiation_emitter
name = "radiation emitter"
icon_state = "radiation_emitter"
var/radiation_power = 30 // Bigger numbers means more radiation.
/obj/effect/map_effect/radiation_emitter/Initialize()
processing_objects += src
return ..()
/obj/effect/map_effect/radiation_emitter/Destroy()
processing_objects -= src
return ..()
/obj/effect/map_effect/radiation_emitter/process()
radiation_repository.radiate(src, radiation_power)
/obj/effect/map_effect/radiation_emitter/strong
radiation_power = 100
@@ -0,0 +1,18 @@
// Makes the screen shake for nearby players every so often.
/obj/effect/map_effect/interval/screen_shaker
name = "screen shaker"
icon_state = "screen_shaker"
interval_lower_bound = 1 SECOND
interval_upper_bound = 2 SECONDS
var/shake_radius = 7 // How far the shaking effect extends to. By default it is one screen length.
var/shake_duration = 2 // How long the shaking lasts.
var/shake_strength = 1 // How much it shakes.
/obj/effect/map_effect/interval/screen_shaker/trigger()
for(var/A in player_list)
var/mob/M = A
if(M.z == src.z && get_dist(src, M) <= shake_radius)
shake_camera(M, shake_duration, shake_strength)
..()
@@ -0,0 +1,117 @@
// Plays a sound at its location every so often.
/obj/effect/map_effect/interval/sound_emitter
name = "sound emitter"
icon_state = "sound_emitter"
var/list/sounds_to_play = list(null) // List containing sound files or strings of sound groups.
// A sound or string is picked randomly each run.
var/sound_volume = 50 // How loud the sound is. 0 is silent, and 100 is loudest. Please be reasonable with the volume.
// Note that things like vacuum may affect the volume heard by other mobs.
var/sound_frequency_variance = TRUE // If the sound will sound somewhat different each time.
// If a specific frequency is desired, sound_frequency must also be set.
var/sound_extra_range = 0 // Set to make sounds heard from farther away than normal.
var/sound_fallout = 0 // Within the 'fallout distance', the sound stays at the same volume, otherwise it attenuates.
// Higher numbers make the sound fade out more slowly with distance.
var/sound_global = FALSE // If true, sounds will not be distorted due to the current area's 'sound environment'.
// It DOES NOT make the sound have a constant volume or z-level wide range, despite the misleading name.
var/sound_frequency = null // Sets a specific custom frequency. sound_frequency_variance must be true as well.
// If sound_frequency is null, but sound_frequency_variance is true, a semi-random frequency will be chosen to the sound each time.
var/sound_channel = 0 // BYOND allows a sound to play in 1 through 1024 sound channels.
// 0 will have BYOND give it the lowest available channel, it is not recommended to change this without a good reason.
var/sound_pressure_affected = TRUE // If false, people in low pressure or vacuum will hear the sound.
var/sound_ignore_walls = TRUE // If false, walls will completely muffle the sound.
var/sound_preference = null // Player preference to check before playing this sound to them, if any.
/obj/effect/map_effect/interval/sound_emitter/trigger()
playsound(
src,
pick(sounds_to_play),
sound_volume,
sound_frequency_variance,
sound_extra_range,
sound_fallout,
sound_global,
sound_frequency,
sound_channel,
sound_pressure_affected,
sound_ignore_walls,
sound_preference
)
..()
/obj/effect/map_effect/interval/sound_emitter/thunder
sounds_to_play = list("thunder")
interval_lower_bound = 10 SECONDS
interval_upper_bound = 15 SECONDS
/obj/effect/map_effect/interval/sound_emitter/geiger
sounds_to_play = list("geiger")
interval_lower_bound = 2 SECONDS
interval_upper_bound = 2 SECONDS
/obj/effect/map_effect/interval/sound_emitter/geiger_weak
sounds_to_play = list("geiger_weak")
interval_lower_bound = 1 SECOND
interval_upper_bound = 1 SECOND
/obj/effect/map_effect/interval/sound_emitter/punching
sounds_to_play = list("punch")
interval_lower_bound = 5
interval_upper_bound = 1 SECOND
/obj/effect/map_effect/interval/sound_emitter/explosions
sounds_to_play = list("explosion")
interval_lower_bound = 5 SECONDS
interval_upper_bound = 10 SECONDS
/obj/effect/map_effect/interval/sound_emitter/distant_explosions
sounds_to_play = list('sound/effects/explosionfar.ogg')
interval_lower_bound = 5 SECONDS
interval_upper_bound = 10 SECONDS
/obj/effect/map_effect/interval/sound_emitter/ballistic_gunfight
sounds_to_play = list(
'sound/weapons/gunshot.ogg',
'sound/weapons/deagle.ogg',
'sound/weapons/rifleshot.ogg',
'sound/weapons/sniper.ogg',
'sound/weapons/shotgun.ogg',
'sound/weapons/gunshot3.ogg',
'sound/weapons/machinegun.ogg'
)
interval_lower_bound = 5
interval_upper_bound = 2 SECONDS
/obj/effect/map_effect/interval/sound_emitter/energy_gunfight
sounds_to_play = list(
'sound/weapons/Taser.ogg',
'sound/weapons/laser.ogg',
'sound/weapons/eLuger.ogg',
'sound/weapons/laser3.ogg',
'sound/weapons/pulse.ogg',
'sound/weapons/gauss_shoot.ogg',
'sound/weapons/emitter.ogg'
)
interval_lower_bound = 5
interval_upper_bound = 2 SECONDS
// I'm not sorry.
/obj/effect/map_effect/interval/sound_emitter/clownsteps
sounds_to_play = list("clownstep")
interval_lower_bound = 5
interval_upper_bound = 1 SECOND
/obj/effect/map_effect/interval/sound_emitter/bikehorns
sounds_to_play = list('sound/items/bikehorn.ogg')
interval_lower_bound = 5
interval_upper_bound = 1 SECOND
+3 -3
View File
@@ -34,7 +34,7 @@
pixel_x = -32
pixel_y = -32
/obj/effect/temporary_effect/cleave_attack/initialize() // Makes the slash fade smoothly. When completely transparent it should qdel itself.
/obj/effect/temporary_effect/cleave_attack/Initialize() // Makes the slash fade smoothly. When completely transparent it should qdel itself.
. = ..()
animate(src, alpha = 0, time = time_to_die - 1)
@@ -44,7 +44,7 @@
icon_state = "shuttle_warning_still"
time_to_die = 4.9 SECONDS
/obj/effect/temporary_effect/shuttle_landing/initialize()
/obj/effect/temporary_effect/shuttle_landing/Initialize()
flick("shuttle_warning", src) // flick() forces the animation to always begin at the start.
. = ..()
@@ -60,7 +60,7 @@
time_to_die = 1 SECOND
pixel_x = -32
/obj/effect/temporary_effect/lightning_strike/initialize()
/obj/effect/temporary_effect/lightning_strike/Initialize()
icon_state += "[rand(1,2)]" // To have two variants of lightning sprites.
animate(src, alpha = 0, time = time_to_die - 1)
. = ..()
+2 -2
View File
@@ -57,7 +57,7 @@
/obj/effect/spider/stickyweb
icon_state = "stickyweb1"
/obj/effect/spider/stickyweb/initialize()
/obj/effect/spider/stickyweb/Initialize()
if(prob(50))
icon_state = "stickyweb2"
return ..()
@@ -83,7 +83,7 @@
var/spiders_max = 24
var/spider_type = /obj/effect/spider/spiderling
/obj/effect/spider/eggcluster/initialize()
/obj/effect/spider/eggcluster/Initialize()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
START_PROCESSING(SSobj, src)
+1 -1
View File
@@ -128,7 +128,7 @@
var/obj/effect/landmark/the_landmark = null
var/landmark_id = null
/obj/effect/step_trigger/teleporter/landmark/initialize()
/obj/effect/step_trigger/teleporter/landmark/Initialize()
. = ..()
for(var/obj/effect/landmark/teleport_mark/mark in tele_landmarks)
if(mark.landmark_id == landmark_id)
@@ -2,7 +2,7 @@
desc = "It's a decoy!"
duration = 15
/obj/effect/temp_visual/decoy/initialize(mapload, atom/mimiced_atom, var/customappearance)
/obj/effect/temp_visual/decoy/Initialize(mapload, atom/mimiced_atom, var/customappearance)
. = ..()
alpha = initial(alpha)
if(mimiced_atom)
@@ -13,7 +13,7 @@
if(customappearance)
appearance = customappearance
/obj/effect/temp_visual/decoy/fading/initialize(mapload, atom/mimiced_atom)
/obj/effect/temp_visual/decoy/fading/Initialize(mapload, atom/mimiced_atom)
. = ..()
animate(src, alpha = 0, time = duration)
@@ -8,7 +8,7 @@
var/duration = 10 //in deciseconds
var/randomdir = TRUE
/obj/effect/temp_visual/initialize()
/obj/effect/temp_visual/Initialize()
. = ..()
if(randomdir)
set_dir(pick(cardinal))
+4 -4
View File
@@ -108,7 +108,7 @@ var/list/civilian_cartridges = list(
icon_state = "cart-s"
access_security = 1
/obj/item/weapon/cartridge/security/initialize()
/obj/item/weapon/cartridge/security/Initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
. = ..()
@@ -164,7 +164,7 @@ var/list/civilian_cartridges = list(
access_reagent_scanner = 1
access_atmos = 1
/obj/item/weapon/cartridge/signal/initialize()
/obj/item/weapon/cartridge/signal/Initialize()
radio = new /obj/item/radio/integrated/signal(src)
. = ..()
@@ -198,7 +198,7 @@ var/list/civilian_cartridges = list(
access_status_display = 1
access_security = 1
/obj/item/weapon/cartridge/hos/initialize()
/obj/item/weapon/cartridge/hos/Initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
. = ..()
@@ -223,7 +223,7 @@ var/list/civilian_cartridges = list(
access_reagent_scanner = 1
access_atmos = 1
/obj/item/weapon/cartridge/rd/initialize()
/obj/item/weapon/cartridge/rd/Initialize()
radio = new /obj/item/radio/integrated/signal(src)
. = ..()
+29 -31
View File
@@ -116,39 +116,37 @@
var/last_transmission
var/datum/radio_frequency/radio_connection
initialize()
if(!radio_controller)
return
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)
proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
proc/send_signal(message="ACTIVATE")
if(last_transmission && world.time < (last_transmission + 5))
return
last_transmission = world.time
var/time = time2text(world.realtime,"hh:mm:ss")
var/turf/T = get_turf(src)
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
var/datum/signal/signal = new
signal.source = src
signal.encryption = code
signal.data["message"] = message
radio_connection.post_signal(src, signal)
/obj/item/radio/integrated/signal/Initialize()
if(!radio_controller)
return
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
if(last_transmission && world.time < (last_transmission + 5))
return
last_transmission = world.time
var/time = time2text(world.realtime,"hh:mm:ss")
var/turf/T = get_turf(src)
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
var/datum/signal/signal = new
signal.source = src
signal.encryption = code
signal.data["message"] = message
radio_connection.post_signal(src, signal)
/obj/item/radio/integrated/signal/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
@@ -379,7 +379,7 @@
..()
internal_devices |= new /obj/item/device/halogen_counter(src)
/obj/item/weapon/commcard/engineering/initialize()
/obj/item/weapon/commcard/engineering/Initialize()
internal_data["grid_sensors"] = find_powernet_sensors()
internal_data["powernet_target"] = ""
@@ -616,7 +616,7 @@
internal_data["stat_display_active2"] = null
internal_data["stat_display_special"] = null
/obj/item/weapon/commcard/head/initialize()
/obj/item/weapon/commcard/head/Initialize()
// Have to register the commcard with the Radio controller to receive updates to the status displays
radio_controller.add_object(src, 1435)
..()
@@ -793,7 +793,7 @@
internal_devices |= new /obj.item/device/analyzer(src)
internal_devices |= new /obj/item/device/halogen_counter(src)
/obj/item/weapon/commcard/head/ce/initialize()
/obj/item/weapon/commcard/head/ce/Initialize()
internal_data["grid_sensors"] = find_powernet_sensors()
internal_data["powernet_target"] = ""
@@ -904,7 +904,7 @@
list("name" = "Shuttle Blast Door Control", "template" = "merc_blast_door_control.tmpl")
)
/obj/item/weapon/commcard/mercenary/initialize()
/obj/item/weapon/commcard/mercenary/Initialize()
internal_data["shuttle_door_code"] = "smindicate" // Copied from PDA code
internal_data["shuttle_doors"] = find_blast_doors()
@@ -19,7 +19,7 @@
var/power_usage
var/power_use = 1
/obj/item/device/flashlight/initialize()
/obj/item/device/flashlight/Initialize()
. = ..()
update_icon()
+1 -1
View File
@@ -17,7 +17,7 @@ var/list/GPS_list = list()
var/hide_signal = FALSE // If true, signal is not visible to other GPS devices.
var/can_hide_signal = FALSE // If it can toggle the above var.
/obj/item/device/gps/initialize()
/obj/item/device/gps/Initialize()
. = ..()
GPS_list += src
name = "global positioning system ([gps_tag])"
@@ -92,7 +92,7 @@
syndie = 1
ks1type = /obj/item/device/encryptionkey/raider
/obj/item/device/radio/headset/raider/initialize()
/obj/item/device/radio/headset/raider/Initialize()
. = ..()
set_frequency(RAID_FREQ)
@@ -53,7 +53,7 @@
/obj/item/device/radio/intercom/omni
name = "global announcer"
/obj/item/device/radio/intercom/omni/initialize()
/obj/item/device/radio/intercom/omni/Initialize()
channels = radiochannels.Copy()
return ..()
@@ -78,7 +78,7 @@ var/global/list/default_medbay_channels = list(
return ..()
/obj/item/device/radio/initialize()
/obj/item/device/radio/Initialize()
. = ..()
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
+1 -1
View File
@@ -26,7 +26,7 @@
to_chat(usr, "Video feed is [camera.status ? "on" : "off"]")
to_chat(usr, "Audio feed is [radio.broadcasting ? "on" : "off"]")
/obj/item/device/tvcamera/initialize()
/obj/item/device/tvcamera/Initialize()
. = ..()
camera = new(src)
camera.c_tag = channel
@@ -37,7 +37,7 @@ var/list/marker_beacon_colors = list(
/obj/item/stack/marker_beacon/hundred
amount = 100
/obj/item/stack/marker_beacon/initialize()
/obj/item/stack/marker_beacon/Initialize()
. = ..()
update_icon()
+5 -5
View File
@@ -28,7 +28,7 @@
var/material_to_use = DEFAULT_WALL_MATERIAL // So badmins can make RCDs that print diamond walls.
var/make_rwalls = FALSE // If true, when building walls, they will be reinforced.
/obj/item/weapon/rcd/initialize()
/obj/item/weapon/rcd/Initialize()
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -137,7 +137,7 @@
// RCD variants.
// This one starts full.
/obj/item/weapon/rcd/loaded/initialize()
/obj/item/weapon/rcd/loaded/Initialize()
stored_matter = max_stored_matter
return ..()
@@ -148,7 +148,7 @@
used in the construction of hulls for starships. Reload with compressed matter cartridges."
material_to_use = MAT_STEELHULL
/obj/item/weapon/rcd/shipwright/loaded/initialize()
/obj/item/weapon/rcd/shipwright/loaded/Initialize()
stored_matter = max_stored_matter
return ..()
@@ -162,7 +162,7 @@
toolspeed = 0.5 // Twice as fast.
max_stored_matter = RCD_MAX_CAPACITY * 3 // Three times capacity.
/obj/item/weapon/rcd/advanced/loaded/initialize()
/obj/item/weapon/rcd/advanced/loaded/Initialize()
stored_matter = max_stored_matter
return ..()
@@ -179,7 +179,7 @@
var/make_cell = TRUE // If false, initialize() won't spawn a cell for this.
var/electric_cost_coefficent = 83.33 // Higher numbers make it less efficent. 86.3... means it should matche the standard RCD capacity on a 10k cell.
/obj/item/weapon/rcd/electric/initialize()
/obj/item/weapon/rcd/electric/Initialize()
if(make_cell)
cell = new /obj/item/weapon/cell/high(src)
return ..()
+2 -2
View File
@@ -85,13 +85,13 @@
/obj/item/weapon/flame/candle/everburn
wax = 99999
/obj/item/weapon/flame/candle/everburn/initialize()
/obj/item/weapon/flame/candle/everburn/Initialize()
. = ..()
light("<span class='notice'>\The [src] mysteriously lights itself!.</span>")
/obj/item/weapon/flame/candle/candelabra/everburn
wax = 99999
/obj/item/weapon/flame/candle/candelabra/everburn/initialize()
/obj/item/weapon/flame/candle/candelabra/everburn/Initialize()
. = ..()
light("<span class='notice'>\The [src] mysteriously lights itself!.</span>")
@@ -121,7 +121,7 @@
return ..()
/obj/item/weapon/card/id/initialize()
/obj/item/weapon/card/id/Initialize()
. = ..()
var/datum/job/J = job_master.GetJob(rank)
if(J)
@@ -168,7 +168,7 @@
item_state = "tdgreen"
assignment = "Synthetic"
/obj/item/weapon/card/id/synthetic/initialize()
/obj/item/weapon/card/id/synthetic/Initialize()
. = ..()
access = get_all_station_access() + access_synth
@@ -179,11 +179,11 @@
registered_name = "Central Command"
assignment = "General"
/obj/item/weapon/card/id/centcom/initialize()
/obj/item/weapon/card/id/centcom/Initialize()
. = ..()
access = get_all_centcom_access()
/obj/item/weapon/card/id/centcom/station/initialize()
/obj/item/weapon/card/id/centcom/station/Initialize()
. = ..()
access |= get_all_station_access()
@@ -192,7 +192,7 @@
assignment = "Emergency Response Team"
icon_state = "centcom"
/obj/item/weapon/card/id/centcom/ERT/initialize()
/obj/item/weapon/card/id/centcom/ERT/Initialize()
. = ..()
access |= get_all_station_access()
@@ -6,11 +6,11 @@
var/electronic_warfare = 1
var/mob/registered_user = null
/obj/item/weapon/card/id/syndicate/initialize()
/obj/item/weapon/card/id/syndicate/Initialize()
. = ..()
access = syndicate_access.Copy()
/obj/item/weapon/card/id/syndicate/station_access/initialize()
/obj/item/weapon/card/id/syndicate/station_access/Initialize()
. = ..() // Same as the normal Syndicate id, only already has all station access
access |= get_all_station_access()
@@ -14,7 +14,7 @@
var/apply_tape = FALSE
/obj/item/taperoll/initialize()
/obj/item/taperoll/Initialize()
. = ..()
if(apply_tape)
var/turf/T = get_turf(src)
@@ -92,7 +92,7 @@
/obj/item/weapon/pen/crayon/purple
)
/obj/item/weapon/storage/fancy/crayons/initialize()
/obj/item/weapon/storage/fancy/crayons/Initialize()
. = ..()
update_icon()
@@ -134,7 +134,7 @@
/obj/item/weapon/pen/crayon/marker/purple
)
/obj/item/weapon/storage/fancy/markers/initialize()
/obj/item/weapon/storage/fancy/markers/Initialize()
. = ..()
update_icon()
@@ -174,7 +174,7 @@
starts_with = list(/obj/item/clothing/mask/smokable/cigarette = 6)
var/brand = "\improper Trans-Stellar Duty-free"
/obj/item/weapon/storage/fancy/cigarettes/initialize()
/obj/item/weapon/storage/fancy/cigarettes/Initialize()
. = ..()
flags |= NOREACT
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
@@ -280,7 +280,7 @@
icon_type = "cigar"
starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar = 7)
/obj/item/weapon/storage/fancy/cigar/initialize()
/obj/item/weapon/storage/fancy/cigar/Initialize()
. = ..()
flags |= NOREACT
create_reagents(15 * storage_slots)
@@ -332,7 +332,7 @@
storage_slots = 6
req_access = list(access_virology)
/obj/item/weapon/storage/lockbox/vials/initialize()
/obj/item/weapon/storage/lockbox/vials/Initialize()
. = ..()
update_icon()
@@ -377,7 +377,7 @@
/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle
)
/obj/item/weapon/storage/fancy/heartbox/initialize()
/obj/item/weapon/storage/fancy/heartbox/Initialize()
. = ..()
update_icon()
@@ -16,7 +16,7 @@
max_storage_space = ITEMSIZE_COST_SMALL * 7 // 14
var/list/icon_variety
/obj/item/weapon/storage/firstaid/initialize()
/obj/item/weapon/storage/firstaid/Initialize()
. = ..()
if(icon_variety)
icon_state = pick(icon_variety)
@@ -11,7 +11,7 @@
foldable = /obj/item/stack/material/cardboard
starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 6)
/obj/item/weapon/storage/box/donut/initialize()
/obj/item/weapon/storage/box/donut/Initialize()
. = ..()
update_icon()
@@ -527,7 +527,7 @@
for(var/obj/item/I in contents)
remove_from_storage(I, T)
/obj/item/weapon/storage/initialize()
/obj/item/weapon/storage/Initialize()
. = ..()
if(allow_quick_empty)
@@ -24,7 +24,7 @@
/obj/item/weapon/extinguisher/mini,
/obj/item/device/radio
)
/obj/item/weapon/storage/toolbox/emergency/initialize()
/obj/item/weapon/storage/toolbox/emergency/Initialize()
if(prob(50))
new /obj/item/device/flashlight(src)
else
@@ -56,7 +56,7 @@
/obj/item/stack/cable_coil/random_belt,
/obj/item/stack/cable_coil/random_belt
)
/obj/item/weapon/storage/toolbox/electrical/initialize()
/obj/item/weapon/storage/toolbox/electrical/Initialize()
. = ..()
if(prob(5))
new /obj/item/clothing/gloves/yellow(src)
@@ -102,7 +102,7 @@
var/filled = FALSE
attack_verb = list("lunched")
/obj/item/weapon/storage/toolbox/lunchbox/initialize()
/obj/item/weapon/storage/toolbox/lunchbox/Initialize()
if(filled)
var/list/lunches = lunchables_lunches()
var/lunch = lunches[pick(lunches)]
@@ -1,4 +1,4 @@
/obj/item/weapon/storage/box/syndicate/initialize()
/obj/item/weapon/storage/box/syndicate/Initialize()
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1, "smoothoperator" = 1)))
if("bloodyspai")
new /obj/item/clothing/under/chameleon(src)
@@ -70,7 +70,7 @@
/obj/item/weapon/storage/box/syndie_kit/imp_freedom
name = "boxed freedom implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_freedom/initialize()
/obj/item/weapon/storage/box/syndie_kit/imp_freedom/Initialize()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/freedom(O)
O.update()
@@ -87,7 +87,7 @@
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
name = "boxed uplink implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_uplink/initialize()
/obj/item/weapon/storage/box/syndie_kit/imp_uplink/Initialize()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/uplink(O)
O.update()
@@ -157,7 +157,7 @@
name = "\improper Tricky smokes"
desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up."
/obj/item/weapon/storage/box/syndie_kit/cigarette/initialize()
/obj/item/weapon/storage/box/syndie_kit/cigarette/Initialize()
. = ..()
var/obj/item/weapon/storage/fancy/cigarettes/pack
+1 -1
View File
@@ -100,7 +100,7 @@ var/list/multi_point_spawns
var/id // Group id
var/weight // Probability weight for this spawn point
/obj/random_multi/initialize()
/obj/random_multi/Initialize()
. = ..()
weight = max(1, round(weight))
+1 -1
View File
@@ -11,7 +11,7 @@
var/maxhealth = 100
anchored = 1.0
/obj/structure/catwalk/initialize()
/obj/structure/catwalk/Initialize()
. = ..()
for(var/obj/structure/catwalk/O in range(1))
O.update_icon()
@@ -32,7 +32,7 @@
var/list/starts_with
/obj/structure/closet/initialize()
/obj/structure/closet/Initialize()
. = ..()
if(starts_with)
create_objects_in_loc(src, starts_with)
@@ -16,7 +16,7 @@
starts_with = list(/obj/item/weapon/material/twohanded/fireaxe)
/obj/structure/closet/fireaxecabinet/initialize()
/obj/structure/closet/fireaxecabinet/Initialize()
..()
fireaxe = locate() in contents
@@ -22,7 +22,7 @@
/obj/item/clothing/gloves/fingerless,
/obj/item/clothing/head/soft)
/obj/structure/closet/secure_closet/cargotech/initialize()
/obj/structure/closet/secure_closet/cargotech/Initialize()
if(prob(75))
starts_with += /obj/item/weapon/storage/backpack
else
@@ -59,7 +59,7 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/cargo,
/obj/item/clothing/shoes/boots/winter/supply)
/obj/structure/closet/secure_closet/quartermaster/initialize()
/obj/structure/closet/secure_closet/quartermaster/Initialize()
if(prob(75))
starts_with += /obj/item/weapon/storage/backpack
else
@@ -93,7 +93,7 @@
/obj/item/clothing/shoes/boots/winter/mining,
/obj/item/stack/marker_beacon/thirty)
/obj/structure/closet/secure_closet/miner/initialize()
/obj/structure/closet/secure_closet/miner/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/industrial
else
@@ -32,7 +32,7 @@
/obj/item/clothing/shoes/boots/winter/engineering,
/obj/item/weapon/tank/emergency/oxygen/engi)
/obj/structure/closet/secure_closet/engineering_chief/initialize()
/obj/structure/closet/secure_closet/engineering_chief/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/industrial
else
@@ -98,7 +98,7 @@
/obj/item/clothing/shoes/boots/winter/engineering,
/obj/item/weapon/tank/emergency/oxygen/engi)
/obj/structure/closet/secure_closet/engineering_personal/initialize()
/obj/structure/closet/secure_closet/engineering_personal/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/industrial
else
@@ -133,7 +133,7 @@
/obj/item/clothing/shoes/boots/winter/atmos,
/obj/item/weapon/tank/emergency/oxygen/engi)
/obj/structure/closet/secure_closet/atmos_personal/initialize()
/obj/structure/closet/secure_closet/atmos_personal/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/industrial
else
@@ -9,7 +9,7 @@
icon_opened = "base"
req_one_access = list(access_armory)
/obj/structure/closet/secure_closet/guncabinet/initialize()
/obj/structure/closet/secure_closet/guncabinet/Initialize()
. = ..()
update_icon()
@@ -21,7 +21,7 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/hydro,
/obj/item/clothing/shoes/boots/winter/hydro)
/obj/structure/closet/secure_closet/hydroponics/initialize()
/obj/structure/closet/secure_closet/hydroponics/Initialize()
if(prob(50))
starts_with += /obj/item/clothing/suit/storage/apron
else
@@ -60,7 +60,7 @@
/obj/item/clothing/head/nursehat,
/obj/item/weapon/storage/box/freezer = 3)
/obj/structure/closet/secure_closet/medical3/initialize()
/obj/structure/closet/secure_closet/medical3/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/medic
else
@@ -169,7 +169,7 @@
/obj/item/clothing/head/bio_hood/cmo,
/obj/item/clothing/shoes/white)
/obj/structure/closet/secure_closet/CMO/initialize()
/obj/structure/closet/secure_closet/CMO/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/medic
else
@@ -7,7 +7,7 @@
starts_with = list(
/obj/item/device/radio/headset)
/obj/structure/closet/secure_closet/personal/initialize()
/obj/structure/closet/secure_closet/personal/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack
else
@@ -18,7 +18,7 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/science,
/obj/item/clothing/shoes/boots/winter/science)
/obj/structure/closet/secure_closet/scientist/initialize()
/obj/structure/closet/secure_closet/scientist/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/dufflebag/sci
else
@@ -119,7 +119,7 @@
/obj/item/device/flashlight/maglight,
/obj/item/clothing/mask/gas/half)
/obj/structure/closet/secure_closet/hos/initialize()
/obj/structure/closet/secure_closet/hos/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/security
else
@@ -168,7 +168,7 @@
/obj/item/device/megaphone,
/obj/item/clothing/mask/gas/half)
/obj/structure/closet/secure_closet/warden/initialize()
/obj/structure/closet/secure_closet/warden/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/security
else
@@ -212,7 +212,7 @@
/obj/item/clothing/shoes/boots/winter/security,
/obj/item/device/flashlight/maglight)
/obj/structure/closet/secure_closet/security/initialize()
/obj/structure/closet/secure_closet/security/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/security
else
@@ -221,22 +221,22 @@
starts_with += /obj/item/weapon/storage/backpack/dufflebag/sec
return ..()
/obj/structure/closet/secure_closet/security/cargo/initialize()
/obj/structure/closet/secure_closet/security/cargo/Initialize()
starts_with += /obj/item/clothing/accessory/armband/cargo
starts_with += /obj/item/device/encryptionkey/headset_cargo
return ..()
/obj/structure/closet/secure_closet/security/engine/initialize()
/obj/structure/closet/secure_closet/security/engine/Initialize()
starts_with += /obj/item/clothing/accessory/armband/engine
starts_with += /obj/item/device/encryptionkey/headset_eng
return ..()
/obj/structure/closet/secure_closet/security/science/initialize()
/obj/structure/closet/secure_closet/security/science/Initialize()
starts_with += /obj/item/clothing/accessory/armband/science
starts_with += /obj/item/device/encryptionkey/headset_sci
return ..()
/obj/structure/closet/secure_closet/security/med/initialize()
/obj/structure/closet/secure_closet/security/med/Initialize()
starts_with += /obj/item/clothing/accessory/armband/medblue
starts_with += /obj/item/device/encryptionkey/headset_med
return ..()
@@ -48,7 +48,7 @@
/obj/structure/closet/syndicate/resources
desc = "An old, dusty locker."
/obj/structure/closet/syndicate/resources/initialize()
/obj/structure/closet/syndicate/resources/Initialize()
. = ..()
if(!contents.len)
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
@@ -103,7 +103,7 @@
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
/obj/structure/closet/syndicate/resources/everything/initialize()
/obj/structure/closet/syndicate/resources/everything/Initialize()
var/list/resources = list(
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
@@ -19,7 +19,7 @@
icon_closed = "emergency"
icon_opened = "emergencyopen"
/obj/structure/closet/emcloset/initialize()
/obj/structure/closet/emcloset/Initialize()
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10)))
if ("small")
starts_with = list(
@@ -106,7 +106,7 @@
icon_closed = "toolcloset"
icon_opened = "toolclosetopen"
/obj/structure/closet/toolcloset/initialize()
/obj/structure/closet/toolcloset/Initialize()
starts_with = list()
if(prob(40))
starts_with += /obj/item/clothing/suit/storage/hazardvest
@@ -22,7 +22,7 @@
/obj/item/clothing/accessory/armband = 3,
/obj/item/clothing/accessory/holster/waist = 3)
/obj/structure/closet/wardrobe/red/initialize()
/obj/structure/closet/wardrobe/red/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/security
else
@@ -223,7 +223,7 @@
/obj/item/weapon/storage/backpack/toxins,
/obj/item/weapon/storage/backpack/satchel/tox)
/obj/structure/closet/wardrobe/science_white/initialize()
/obj/structure/closet/wardrobe/science_white/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/dufflebag/sci
else
@@ -249,7 +249,7 @@
/obj/item/weapon/storage/backpack/toxins,
/obj/item/weapon/storage/backpack/satchel/tox)
/obj/structure/closet/wardrobe/robotics_black/initialize()
/obj/structure/closet/wardrobe/robotics_black/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack/dufflebag/sci
else
@@ -401,7 +401,7 @@
/obj/item/clothing/gloves/black,
/obj/item/clothing/under/pants/camo)
/obj/structure/closet/wardrobe/tactical/initialize()
/obj/structure/closet/wardrobe/tactical/Initialize()
if(prob(25))
starts_with += /obj/item/weapon/storage/belt/security/tactical/bandolier
else
@@ -6,7 +6,7 @@
density = 1
var/list/starts_with
/obj/structure/largecrate/initialize()
/obj/structure/largecrate/Initialize()
. = ..()
if(starts_with)
create_objects_in_loc(src, starts_with)
@@ -63,7 +63,7 @@
desc = "It comes in a box for the consumer's sake. ..How is this lighter?"
icon_state = "vehiclecrate"
/obj/structure/largecrate/vehicle/initialize()
/obj/structure/largecrate/vehicle/Initialize()
..()
spawn(1)
for(var/obj/O in contents)
@@ -13,7 +13,7 @@
if(my_vehicle)
to_chat(user, "<span class='notice'>It seems to contain \the [my_vehicle].</span>")
/obj/structure/vehiclecage/initialize()
/obj/structure/vehiclecage/Initialize()
. = ..()
if(my_vehicle_type)
my_vehicle = new my_vehicle_type(src)
+2 -2
View File
@@ -304,7 +304,7 @@
light_power = 0.6
light_color = "#FF6633"
/obj/structure/flora/sif/subterranean/initialize()
/obj/structure/flora/sif/subterranean/Initialize()
icon_state = "[initial(icon_state)][rand(1,2)]"
. = ..()
@@ -313,6 +313,6 @@
desc = "This is a mysterious looking plant. They kind of look like eyeballs. Creepy."
icon_state = "eyeplant"
/obj/structure/flora/sif/eyes/initialize()
/obj/structure/flora/sif/eyes/Initialize()
icon_state = "[initial(icon_state)][rand(1,3)]"
. = ..()
@@ -59,7 +59,7 @@
var/delay_to_self_open = 10 MINUTES // How long to wait for first attempt. Note that the timer by default starts when the pod is created.
var/delay_to_try_again = 20 MINUTES // How long to wait if first attempt fails. Set to 0 to never try again.
/obj/structure/ghost_pod/automatic/initialize()
/obj/structure/ghost_pod/automatic/Initialize()
. = ..()
spawn(delay_to_self_open)
if(src)
+2 -2
View File
@@ -17,7 +17,7 @@
"plant-13"
)
/obj/machinery/holoplant/initialize()
/obj/machinery/holoplant/Initialize()
. = ..()
activate()
@@ -101,5 +101,5 @@
/obj/machinery/holoplant/shipped
anchored = FALSE
/obj/machinery/holoplant/shipped/initialize()
/obj/machinery/holoplant/shipped/Initialize()
. = ..()
+1 -1
View File
@@ -9,7 +9,7 @@
plane = PLATING_PLANE
// flags = CONDUCT
/obj/structure/lattice/initialize()
/obj/structure/lattice/Initialize()
. = ..()
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/mineral)))
+1 -1
View File
@@ -115,7 +115,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
var/path = pick(rare_loot)
return new path(src)
/obj/structure/loot_pile/initialize()
/obj/structure/loot_pile/Initialize()
if(icon_states_to_use && icon_states_to_use.len)
icon_state = pick(icon_states_to_use)
. = ..()
+1 -1
View File
@@ -19,7 +19,7 @@
update_icon()
return
/obj/structure/noticeboard/initialize()
/obj/structure/noticeboard/Initialize()
for(var/obj/item/I in loc)
if(notices > 4) break
if(istype(I, /obj/item/weapon/paper))
@@ -59,7 +59,7 @@
var/static/list/possible_states = list("health", "spider", "slime", "emp", "species", "egg", "vent", "mindshock", "viral", "gland")
var/static/list/possible_tech = list(TECH_MATERIAL, TECH_ENGINEERING, TECH_PHORON, TECH_POWER, TECH_BIO, TECH_COMBAT, TECH_MAGNET, TECH_DATA)
/obj/item/prop/alien/junk/initialize()
/obj/item/prop/alien/junk/Initialize()
. = ..()
icon_state = pick(possible_states)
var/list/techs = possible_tech.Copy()
@@ -26,7 +26,7 @@
interaction_message = "<span class='notice'>The prismatic turret seems to be able to rotate.</span>"
/obj/structure/prop/prism/initialize()
/obj/structure/prop/prism/Initialize()
if(degrees_from_north)
animate(src, transform = turn(NORTH, degrees_from_north), time = 3)
@@ -196,7 +196,7 @@
for(var/obj/structure/prop/prism/P in my_turrets)
P.rotate_auto(new_bearing)
/obj/structure/prop/prismcontrol/initialize()
/obj/structure/prop/prismcontrol/Initialize()
..()
if(my_turrets.len) //Preset controls.
for(var/obj/structure/prop/prism/P in my_turrets)
+1 -1
View File
@@ -19,7 +19,7 @@
var/tally = 0 //The counter referenced against total_creature_max, or just to see how many mobs it has spawned.
var/total_creature_max //If set, it can spawn this many creatures, total, ever.
/obj/structure/prop/nest/initialize()
/obj/structure/prop/nest/Initialize()
..()
den_mobs = list()
START_PROCESSING(SSobj, src)
@@ -31,7 +31,7 @@
visible_message("<span class='cult'>\The [src] is completely unaffected by the blast.</span>")
return
/obj/machinery/door/blast/puzzle/initialize()
/obj/machinery/door/blast/puzzle/Initialize()
. = ..()
implicit_material = get_material_by_name("dungeonium")
if(locks.len)
+1 -1
View File
@@ -23,7 +23,7 @@
if(climbable)
verbs += /obj/structure/proc/climb_on
/obj/structure/railing/initialize()
/obj/structure/railing/Initialize()
. = ..()
if(src.anchored)
update_icon(0)
+2 -2
View File
@@ -30,7 +30,7 @@ FLOOR SAFES
tumbler_2_open = rand(0, 72)
/obj/structure/safe/initialize()
/obj/structure/safe/Initialize()
. = ..()
for(var/obj/item/I in loc)
if(space >= maxspace)
@@ -175,7 +175,7 @@ obj/structure/safe/ex_act(severity)
plane = TURF_PLANE
layer = ABOVE_UTILITY
/obj/structure/safe/floor/initialize()
/obj/structure/safe/floor/Initialize()
. = ..()
var/turf/T = loc
if(istype(T) && !T.is_plating())
@@ -25,7 +25,7 @@
/obj/effect/wingrille_spawn/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
return FALSE
/obj/effect/wingrille_spawn/initialize()
/obj/effect/wingrille_spawn/Initialize()
. = ..()
if(!win_path)
return