removes var/ inside all procs (#19450)

* removes var/ inside all procs

* .

* ugh
This commit is contained in:
Kashargul
2026-05-05 10:55:17 +02:00
committed by GitHub
parent 13162d13a2
commit 5926589c16
1987 changed files with 7376 additions and 7377 deletions
+1 -1
View File
@@ -116,7 +116,7 @@
return
//Wrapper procs that handle sanity and user feedback
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, var/forced = FALSE, var/silent = FALSE)
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, forced = FALSE, silent = FALSE)
if(!SSticker)
to_chat(user, span_warning("You can't buckle anyone in before the game starts."))
return FALSE // Is this really needed?
+5 -5
View File
@@ -39,7 +39,7 @@
var/obj/effect/alien/weeds/node/linked_node = null
var/static/list/weedImageCache
/obj/effect/alien/weeds/Initialize(mapload, var/node, var/newcolor)
/obj/effect/alien/weeds/Initialize(mapload, node, newcolor)
. = ..()
if(isspace(loc) || delete_me)
return INITIALIZE_HINT_QDEL
@@ -76,7 +76,7 @@
var/node_range = NODERANGE
var/set_color = "#321D37"
/obj/effect/alien/weeds/node/Initialize(mapload, var/node, var/newcolor)
/obj/effect/alien/weeds/node/Initialize(mapload, node, newcolor)
. = ..()
for(var/obj/effect/alien/weeds/existing in loc)
@@ -187,7 +187,7 @@
qdel(src)
return
/obj/effect/alien/weeds/attackby(var/obj/item/W, var/mob/user)
/obj/effect/alien/weeds/attackby(obj/item/W, mob/user)
user.setClickCooldown(user.get_attack_speed(W))
if(LAZYLEN(W.attack_verb))
visible_message(span_danger("\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]"))
@@ -206,14 +206,14 @@
health -= damage
healthcheck()
/obj/effect/alien/weeds/attack_generic(var/mob/user, var/damage, var/attack_verb)
/obj/effect/alien/weeds/attack_generic(mob/user, damage, attack_verb)
visible_message(span_danger("[user] [attack_verb] the [src]!"))
user.do_attack_animation(src)
health -= damage
healthcheck()
return
/obj/effect/alien/weeds/take_damage(var/damage)
/obj/effect/alien/weeds/take_damage(damage)
health -= damage
healthcheck()
return
@@ -60,7 +60,7 @@
var/random_spawn_picked = pick(random_spawns)
new random_spawn_picked(affected_turf)
/datum/dimension_theme/proc/can_convert(var/turf/affected_turf)
/datum/dimension_theme/proc/can_convert(turf/affected_turf)
if(istype(affected_turf, /turf/unsimulated))
return FALSE
if(isspace(affected_turf))
@@ -109,7 +109,7 @@
affected_mob.wash(CLEAN_ALL)
affected_mob.water_act(2)
/datum/anomalous_weather/proc/do_special(var/turf/simulated/T)
/datum/anomalous_weather/proc/do_special(turf/simulated/T)
return
/datum/anomalous_weather/proc/hear_sounds(mob/M, adding)
+4 -4
View File
@@ -58,7 +58,7 @@
// Calculates the max range smoke can travel, then gets all turfs in that view range.
// Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make
// sure the smoke can actually path to the turfs. This culls any turfs it can't reach.
/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
/datum/effect/effect/system/smoke_spread/chem/set_up(datum/reagents/carry = null, n = 10, c = 0, loca, direct)
range = n * 0.3
cardinals = c
carry.trans_to_obj(chemholder, carry.total_volume, copy = 1)
@@ -162,7 +162,7 @@
// Randomizes and spawns the smoke effect.
// Also handles deleting the smoke once the effect is finished.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke)
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(turf/T, icon/I, dist = 1, obj/effect/effect/smoke/chem/passed_smoke)
var/obj/effect/effect/smoke/chem/smoke
if(passed_smoke)
@@ -183,12 +183,12 @@
var/lifespan = 150 + rand(0, 20)
addtimer(CALLBACK(src, PROC_REF(fadeOut), smoke), lifespan)
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(turf/T, icon/I, dist = 1)
var/obj/effect/effect/smoke/chem/spores = new /obj/effect/effect/smoke/chem(location)
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(atom/A, frames = 16) // Fades out the smoke smoothly using it's alpha variable.
A.set_opacity(0) // lighting and view range updates
if(A.alpha == 0) //Handle already transparent case
qdel(A)
+6 -6
View File
@@ -17,7 +17,7 @@
var/dries = 1 //VOREStation Add
var/slips = 0 //VOREStation Add
/obj/effect/effect/foam/Initialize(mapload, var/ismetal = 0)
/obj/effect/effect/foam/Initialize(mapload, ismetal = 0)
. = ..()
//icon_state = "[ismetal? "m" : ""]foam" //VOREStation Removal
metal = ismetal
@@ -80,7 +80,7 @@
spawn(5)
qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
/obj/effect/effect/foam/Crossed(atom/movable/AM)
if(AM.is_incorporeal())
return
if(metal)
@@ -94,7 +94,7 @@
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null, metalfoam = 0)
amount = round(sqrt(amt / 3), 1)
if(istype(loca, /turf/))
location = loca
@@ -160,13 +160,13 @@
/obj/structure/foamedmetal/ex_act(severity)
qdel(src)
/obj/structure/foamedmetal/bullet_act(var/obj/item/projectile/P)
/obj/structure/foamedmetal/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/test))
return
else if(metal == 1 || prob(50))
qdel(src)
/obj/structure/foamedmetal/attack_hand(var/mob/user)
/obj/structure/foamedmetal/attack_hand(mob/user)
if ((HULK in user.mutations) || (prob(75 - metal * 25)))
user.visible_message(span_warning("[user] smashes through the foamed metal."), span_notice("You smash through the metal foam wall."))
qdel(src)
@@ -174,7 +174,7 @@
to_chat(user, span_notice("You hit the metal foam but bounce off it."))
return
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user)
/obj/structure/foamedmetal/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/grab))
var/obj/item/grab/G = I
G.affecting.loc = src.loc
+2 -2
View File
@@ -12,12 +12,12 @@
/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it
icon += reagents.get_color()
/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
/obj/effect/effect/water/proc/set_up(turf/target, step_count = 5, delay = 5)
if(!target)
return
step_process(target, step_count, delay)
/obj/effect/effect/water/proc/step_process(var/turf/target, var/step_count, var/delay, var/iteration)
/obj/effect/effect/water/proc/step_process(turf/target, step_count, delay, iteration)
step_count--
if(!loc)
qdel(src)
@@ -5,7 +5,7 @@
/image/client_only
var/list/clients = list()
/image/client_only/proc/append_client(var/client/C)
/image/client_only/proc/append_client(client/C)
C.images += src
clients.Add(WEAKREF(C))
@@ -18,6 +18,6 @@
clients.Cut()
// Mostly for motion echos, but someone will probably find another use for it... So parent type gets it instead!
/image/client_only/proc/place_from_root(var/turf/At)
/image/client_only/proc/place_from_root(turf/At)
pixel_x = ((At.x - loc.x) * 32)
pixel_y = ((At.y - loc.y) * 32)
@@ -53,7 +53,7 @@
qdel(B)
//VOREstation edit - Moved timer call to Init, and made it not call on mapload
/obj/effect/decal/cleanable/blood/Initialize(mapload, var/_age)
/obj/effect/decal/cleanable/blood/Initialize(mapload, _age)
. = ..()
if(!mapload)
addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1))
@@ -233,7 +233,7 @@
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
@@ -69,7 +69,7 @@
mouse_opacity = 0
var/delete_me = FALSE
/obj/effect/decal/cleanable/dirt/Initialize(mapload, var/_age, var/dirt)
/obj/effect/decal/cleanable/dirt/Initialize(mapload, _age, dirt)
.=..()
if(delete_me)
return INITIALIZE_HINT_QDEL
@@ -16,7 +16,7 @@
/obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
return
/obj/effect/decal/cleanable/blood/gibs/robot/streak(var/list/directions)
/obj/effect/decal/cleanable/blood/gibs/robot/streak(list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
@@ -59,7 +59,7 @@
* @param goingdir Direction tracks are going to (or 0).
* @param bloodcolor Color of the blood when wet.
*/
/obj/effect/decal/cleanable/blood/tracks/proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
/obj/effect/decal/cleanable/blood/tracks/proc/AddTracks(list/DNA, comingdir, goingdir, bloodcolor="#A10808")
var/updated=0
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
var/realgoing=goingdir<<4
@@ -11,7 +11,7 @@
var/custombasedesc = null
var/custombasecolor = null
/obj/effect/decal/cleanable/blood/reagent/Initialize(mapload, var/spill_name, var/spill_color, var/spill_reagentid, var/new_amount, var/ckey_user, var/ckey_spawn)
/obj/effect/decal/cleanable/blood/reagent/Initialize(mapload, spill_name, spill_color, spill_reagentid, new_amount, ckey_user, ckey_spawn)
. = ..()
switch(spill_reagentid) //To ensure that if people spill some liquids, it wont cause issues with spawning, like spilling blood. Also allow for spilling of certain things to
if("blood")
@@ -16,7 +16,7 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
///The type of cleaning required to clean the decal, CLEAN_TYPE_LIGHT_DECAL can be cleaned with mops and soap, CLEAN_TYPE_HARD_DECAL can be cleaned by soap, see __DEFINES/cleaning.dm for the others
var/clean_type = CLEAN_TYPE_LIGHT_DECAL
/obj/effect/decal/cleanable/Initialize(mapload, var/_age)
/obj/effect/decal/cleanable/Initialize(mapload, _age)
if(!isnull(_age))
age = _age
if(random_icon_states && length(src.random_icon_states) > 0)
@@ -18,7 +18,7 @@
var/poster_type = /obj/structure/sign/poster
/obj/item/contraband/poster/Initialize(mapload, var/given_serial = 0)
/obj/item/contraband/poster/Initialize(mapload, given_serial = 0)
if(!serial_number)
if(given_serial == 0)
serial_number = rand(1, poster_designs.len)
@@ -28,7 +28,7 @@
. = ..()
//Places the poster on a wall
/obj/item/contraband/poster/afterattack(var/atom/A, var/mob/user, var/adjacent, var/clickparams)
/obj/item/contraband/poster/afterattack(atom/A, mob/user, adjacent, clickparams)
if (!adjacent)
return
@@ -83,7 +83,7 @@
icon_state = "rolled_poster_nt"
poster_type = /obj/structure/sign/poster/nanotrasen
/obj/item/contraband/poster/nanotrasen/Initialize(mapload, var/given_serial = 0)
/obj/item/contraband/poster/nanotrasen/Initialize(mapload, given_serial = 0)
if(given_serial == 0)
serial_number = rand(1, NT_poster_designs.len)
else
@@ -96,7 +96,7 @@
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. This one is made from some kind of e-paper, and could display almost anything!"
poster_type = /obj/structure/sign/poster/custom
/obj/item/contraband/poster/custom/Initialize(mapload, var/given_serial = 0)
/obj/item/contraband/poster/custom/Initialize(mapload, given_serial = 0)
if(given_serial == 0)
serial_number = 1 //Decidedly unrandom
else
@@ -137,7 +137,7 @@
var/roll_type
var/poster_set = FALSE
/obj/structure/sign/poster/Initialize(mapload, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster)
/obj/structure/sign/poster/Initialize(mapload, placement_dir=null, serial=null, itemtype = /obj/item/contraband/poster)
. = ..()
if(!serial)
@@ -172,7 +172,7 @@
var/datum/poster/design = new path
set_poster(design)
/obj/structure/sign/poster/proc/set_poster(var/datum/poster/design)
/obj/structure/sign/poster/proc/set_poster(datum/poster/design)
name = "[initial(name)] - [design.name]"
desc = "[initial(desc)] [design.desc]"
icon_state = design.icon_state // poster[serial_number]
@@ -226,7 +226,7 @@
/obj/structure/sign/poster/nanotrasen
roll_type = /obj/item/contraband/poster/nanotrasen
/obj/structure/sign/poster/nanotrasen/Initialize(mapload, var/placement_dir=null, var/serial=null, var/itemtype = /obj/item/contraband/poster/nanotrasen)
/obj/structure/sign/poster/nanotrasen/Initialize(mapload, placement_dir=null, serial=null, itemtype = /obj/item/contraband/poster/nanotrasen)
if(!serial)
serial = rand(1, NT_poster_designs.len)
+1 -1
View File
@@ -9,7 +9,7 @@
var/art_color
var/art_shade
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF",shade = "#000000",var/type = "rune", new_age = 0)
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF",shade = "#000000",type = "rune", new_age = 0)
name = type
desc = "A [type] drawn in crayon."
@@ -1,5 +1,5 @@
/// Returns a randomly picked poster decl of the subtype specified by the path argument. If the exact argument is true, it will return the decl from the decls_repository of the exact path specified.
/proc/get_poster_decl(var/path = null, var/exact = TRUE, var/forbid_types)
/proc/get_poster_decl(path = null, exact = TRUE, forbid_types)
if(ispath(path))
if(exact)
return GLOB.decls_repository.get_decl(path)
@@ -43,7 +43,7 @@
return poster_decl
//Places the poster on a wall
/obj/item/poster/afterattack(var/atom/A, var/mob/user, var/adjacent, var/clickparams)
/obj/item/poster/afterattack(atom/A, mob/user, adjacent, clickparams)
if(!adjacent)
return FALSE
@@ -99,7 +99,7 @@
VAR_PROTECTED/roll_type = /obj/item/poster
VAR_PRIVATE/ruined = FALSE
/obj/structure/sign/poster/Initialize(mapload, var/placement_dir = null, var/obj/item/poster/P = null)
/obj/structure/sign/poster/Initialize(mapload, placement_dir = null, obj/item/poster/P = null)
. = ..()
if(ispath(poster_decl))
@@ -5,7 +5,7 @@
icon_state = "rolled_poster_nt"
poster_type = /obj/structure/sign/poster/nanotrasen
/obj/item/poster/nanotrasen/Initialize(mapload, var/datum/decl/poster/P = null)
/obj/item/poster/nanotrasen/Initialize(mapload, datum/decl/poster/P = null)
if(!ispath(poster_decl) && !ispath(P) && !istype(P))
poster_decl = get_poster_decl(/datum/decl/poster/nanotrasen, FALSE, null)
return ..()
+6 -6
View File
@@ -192,7 +192,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
if(istype(M))
affect(M)
/obj/effect/effect/smoke/proc/affect(var/mob/living/carbon/M)
/obj/effect/effect/smoke/proc/affect(mob/living/carbon/M)
if (!istype(M))
return 0
if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT))
@@ -213,7 +213,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/Initialize(mapload, var/lifetime=10, var/range=null, var/power=null, var/color=null)
/obj/effect/effect/smoke/illumination/Initialize(mapload, lifetime=10, range=null, power=null, color=null)
time_to_live=lifetime
. = ..()
set_light(range, power, color)
@@ -231,7 +231,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
for(var/mob/living/L in get_turf(src))
affect(L)
/obj/effect/effect/smoke/bad/affect(var/mob/living/L)
/obj/effect/effect/smoke/bad/affect(mob/living/L)
if (!..())
return 0
if(L.needs_to_breathe())
@@ -242,7 +242,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/effect/smoke/bad/noxious
opacity = 0
/obj/effect/effect/smoke/bad/noxious/affect(var/mob/living/L)
/obj/effect/effect/smoke/bad/noxious/affect(mob/living/L)
if (!..())
return 0
if(L.needs_to_breathe())
@@ -273,7 +273,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
for(var/mob/living/L in get_turf(src))
affect(L)
/obj/effect/effect/smoke/bad/burntfood/affect(var/mob/living/L) // This stuff is extra-vile.
/obj/effect/effect/smoke/bad/burntfood/affect(mob/living/L) // This stuff is extra-vile.
if (!..())
return 0
if(L.needs_to_breathe())
@@ -369,7 +369,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
if(direct)
direction = direct
/datum/effect/effect/system/smoke_spread/start(var/I)
/datum/effect/effect/system/smoke_spread/start(I)
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
@@ -7,7 +7,7 @@
. = ..()
QDEL_IN(src, 1 SECOND)
/image/client_only/electrify_notice/place_from_root(var/turf/At)
/image/client_only/electrify_notice/place_from_root(turf/At)
. = ..()
pixel_y += 8
animate(src, pixel_y = 32, alpha = 0, time = 1 SECOND)
+3 -3
View File
@@ -1,4 +1,4 @@
/proc/gibs(atom/location, var/datum/dna/MobDNA, gibber_type = /obj/effect/gibspawner/generic, var/fleshcolor, var/bloodcolor)
/proc/gibs(atom/location, datum/dna/MobDNA, gibber_type = /obj/effect/gibspawner/generic, fleshcolor, bloodcolor)
new gibber_type(location,MobDNA,fleshcolor,bloodcolor)
/obj/effect/gibspawner
@@ -12,7 +12,7 @@
icon = 'icons/effects/map_effects.dmi'
icon_state = "gibspawn"
/obj/effect/gibspawner/Initialize(mapload, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
/obj/effect/gibspawner/Initialize(mapload, datum/dna/MobDNA, fleshcolor, bloodcolor)
. = ..()
if(fleshcolor) src.fleshcolor = fleshcolor
@@ -20,7 +20,7 @@
Gib(loc,MobDNA)
return INITIALIZE_HINT_QDEL
/obj/effect/gibspawner/proc/Gib(atom/location, var/datum/dna/MobDNA = null)
/obj/effect/gibspawner/proc/Gib(atom/location, datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_chat(world, span_filter_system(span_warning("Gib list length mismatch!")))
log_world("Gib list length mismatch!")
@@ -6,14 +6,14 @@
time_to_die = 0.5 SECONDS
var/lifetime = 0.25 SECONDS //so it doesn't die before animation ends
/obj/effect/temporary_effect/item_pickup_ghost/proc/assumeform(var/obj/item/picked_up)
/obj/effect/temporary_effect/item_pickup_ghost/proc/assumeform(obj/item/picked_up)
icon = picked_up.icon
icon_state = picked_up.icon_state
pixel_x = picked_up.pixel_x
pixel_y = picked_up.pixel_y
color = picked_up.color
/obj/effect/temporary_effect/item_pickup_ghost/proc/animate_towards(var/atom/target)
/obj/effect/temporary_effect/item_pickup_ghost/proc/animate_towards(atom/target)
var/new_pixel_x = pixel_x + (target.x - src.x) * 32
var/new_pixel_y = pixel_y + (target.y - src.y) * 32
animate(src, pixel_x = new_pixel_x, pixel_y = new_pixel_y, transform = matrix()*0, time = lifetime)
+1 -1
View File
@@ -74,7 +74,7 @@
else
GLOB.landmarks_list += src
/obj/effect/landmark/Destroy(var/force = FALSE)
/obj/effect/landmark/Destroy(force = FALSE)
if(delete_me || force)
GLOB.landmarks_list -= src
return ..()
@@ -45,7 +45,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
GLOB.event_triggers[creator_ckey] -= src
. = ..()
/obj/effect/landmark/event_trigger/Crossed(var/atom/movable/AM)
/obj/effect/landmark/event_trigger/Crossed(atom/movable/AM)
if(!isliving(AM))
return FALSE
var/mob/living/L = AM
@@ -109,7 +109,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
/obj/effect/landmark/event_trigger/auto_narrate/Crossed(var/atom/movable/AM)
/obj/effect/landmark/event_trigger/auto_narrate/Crossed(atom/movable/AM)
. = ..() //Checks if AM is mob/living and notifies admin(s)
if(!.)
return
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
// 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)
/obj/effect/map_effect/beam_point/proc/has_active_beam(obj/effect/map_effect/beam_point/them)
// First, check our beams.
for(var/datum/beam/B in my_beams)
if(B.target == them)
@@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
return FALSE
/obj/effect/map_effect/beam_point/proc/build_beam(var/atom/beam_target)
/obj/effect/map_effect/beam_point/proc/build_beam(atom/beam_target)
if(!beam_target)
log_mapping("[src] ([src.type] \[[x],[y],[z]\]) failed to build its beam due to not having a target.")
return FALSE
@@ -100,7 +100,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
return TRUE
/obj/effect/map_effect/beam_point/proc/destroy_beam(var/datum/beam/B)
/obj/effect/map_effect/beam_point/proc/destroy_beam(datum/beam/B)
if(!B)
log_mapping("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam that does not exist.")
return FALSE
@@ -54,7 +54,7 @@
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)
/proc/check_for_player_proximity(atom/proximity_to, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE)
if(!proximity_to)
return FALSE
+15 -15
View File
@@ -40,7 +40,7 @@
old_turf.unregister_dangerous_object(src)
new_turf.register_dangerous_object(src)
/obj/effect/mine/proc/explode(var/mob/living/M)
/obj/effect/mine/proc/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
@@ -59,7 +59,7 @@
qdel(s)
qdel(src)
/obj/effect/mine/proc/trigger_trap(var/mob/living/victim)
/obj/effect/mine/proc/trigger_trap(mob/living/victim)
if(istype(trap, /obj/item/grenade))
var/obj/item/grenade/G = trap
trap = null
@@ -130,7 +130,7 @@
/obj/effect/mine/dnascramble
mineitemtype = /obj/item/mine/dnascramble
/obj/effect/mine/dnascramble/explode(var/mob/living/M)
/obj/effect/mine/dnascramble/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
@@ -149,7 +149,7 @@
/obj/effect/mine/stun
mineitemtype = /obj/item/mine/stun
/obj/effect/mine/stun/explode(var/mob/living/M)
/obj/effect/mine/stun/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -165,7 +165,7 @@
/obj/effect/mine/n2o
mineitemtype = /obj/item/mine/n2o
/obj/effect/mine/n2o/explode(var/mob/living/M)
/obj/effect/mine/n2o/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -179,7 +179,7 @@
/obj/effect/mine/phoron
mineitemtype = /obj/item/mine/phoron
/obj/effect/mine/phoron/explode(var/mob/living/M)
/obj/effect/mine/phoron/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -194,7 +194,7 @@
/obj/effect/mine/kick
mineitemtype = /obj/item/mine/kick
/obj/effect/mine/kick/explode(var/mob/living/M)
/obj/effect/mine/kick/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
@@ -215,7 +215,7 @@
//The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern
var/spread_range = 7
/obj/effect/mine/frag/explode(var/mob/living/M)
/obj/effect/mine/frag/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
@@ -235,7 +235,7 @@
// desc = "A mine with its payload removed, for EOD training and demonstrations."
mineitemtype = /obj/item/mine/training
/obj/effect/mine/training/explode(var/mob/living/M)
/obj/effect/mine/training/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -248,7 +248,7 @@
/obj/effect/mine/emp
mineitemtype = /obj/item/mine/emp
/obj/effect/mine/emp/explode(var/mob/living/M)
/obj/effect/mine/emp/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -266,7 +266,7 @@
/obj/effect/mine/incendiary
mineitemtype = /obj/item/mine/incendiary
/obj/effect/mine/incendiary/explode(var/mob/living/M)
/obj/effect/mine/incendiary/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -283,7 +283,7 @@
/obj/effect/mine/stripping
mineitemtype = /obj/item/mine/stripping
/obj/effect/mine/stripping/explode(var/mob/living/M)
/obj/effect/mine/stripping/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
triggered = TRUE
@@ -300,7 +300,7 @@
/obj/effect/mine/gadget
mineitemtype = /obj/item/mine/gadget
/obj/effect/mine/gadget/explode(var/mob/living/M)
/obj/effect/mine/gadget/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
@@ -374,7 +374,7 @@
..()
/obj/item/mine/proc/prime(mob/user as mob, var/explode_now = FALSE)
/obj/item/mine/proc/prime(mob/user as mob, explode_now = FALSE)
visible_message("\The [src.name] beeps as the priming sequence completes.")
var/obj/effect/mine/R = new minetype(get_turf(src))
src.transfer_fingerprints_to(R)
@@ -456,7 +456,7 @@
var/beam_types = list(/obj/item/projectile/bullet/foam_dart_riot) // you fool, you baffoon, you used these, you absolute ignoramous, why did you not read this!
var/spread_range = 3
/obj/effect/mine/lasertag/explode(var/mob/living/M)
/obj/effect/mine/lasertag/explode(mob/living/M)
if(triggered) // Prevents circular mine explosions from two mines detonating eachother
return
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
+1 -1
View File
@@ -7,7 +7,7 @@
. = ..()
QDEL_IN(src, 2 SECONDS)
/image/client_only/motion_echo/place_from_root(var/turf/At)
/image/client_only/motion_echo/place_from_root(turf/At)
. = ..()
var/rand_limit = 12
pixel_x += rand(-rand_limit,rand_limit)
@@ -8,7 +8,7 @@
pixel_x = -16
/obj/effect/temporary_effect/eruption/Initialize(mapload, var/ttd = 10 SECONDS, var/newcolor)
/obj/effect/temporary_effect/eruption/Initialize(mapload, ttd = 10 SECONDS, newcolor)
if(ttd)
time_to_die += ttd
addtimer(CALLBACK(src, PROC_REF(on_eruption), get_turf(src)), time_to_die - 0.2 SECONDS, TIMER_DELETE_ME)
@@ -19,11 +19,11 @@
. = ..()
flick("[icon_state]_create",src)
/obj/effect/temporary_effect/eruption/proc/on_eruption(var/turf/Target) // Override for specific functions, as below.
/obj/effect/temporary_effect/eruption/proc/on_eruption(turf/Target) // Override for specific functions, as below.
flick("[icon_state]_erupt",src)
return TRUE
/obj/effect/temporary_effect/eruption/test/on_eruption(var/turf/Target)
/obj/effect/temporary_effect/eruption/test/on_eruption(turf/Target)
flick("[icon_state]_erupt",src)
if(Target)
new /obj/effect/explosion(Target)
@@ -36,7 +36,7 @@
/obj/effect/temporary_effect/eruption/flamestrike
desc = "A bubbling pool of fire!"
/obj/effect/temporary_effect/eruption/flamestrike/on_eruption(var/turf/Target)
/obj/effect/temporary_effect/eruption/flamestrike/on_eruption(turf/Target)
flick("[icon_state]_erupt",src)
if(Target)
Target.hotspot_expose(1000, 50, 1)
+6 -6
View File
@@ -22,7 +22,7 @@
// Is the snake hunting a specific atom? (Will always try to meander toward this target.)
var/atom/hunting
/obj/effect/temporary_effect/pulse/snake/Initialize(mapload, var/atom/hunt_target, var/atom/Creator)
/obj/effect/temporary_effect/pulse/snake/Initialize(mapload, atom/hunt_target, atom/Creator)
. = ..()
if(hunt_target)
hunting = hunt_target
@@ -89,15 +89,15 @@
on_leave_turf(get_turf(src))
return FALSE
/obj/effect/temporary_effect/pulse/snake/proc/on_leave_turf(var/turf/T)
/obj/effect/temporary_effect/pulse/snake/proc/on_leave_turf(turf/T)
/obj/effect/temporary_effect/pulse/snake/proc/on_enter_turf(var/turf/T)
/obj/effect/temporary_effect/pulse/snake/proc/on_enter_turf(turf/T)
/obj/effect/temporary_effect/pulse/snake/test/on_leave_turf(var/turf/T)
/obj/effect/temporary_effect/pulse/snake/test/on_leave_turf(turf/T)
if(T)
new /obj/effect/temporary_effect/eruption/test(T, 3 SECONDS, "#ff0000")
/obj/effect/temporary_effect/pulse/snake/test/on_enter_turf(var/turf/T)
/obj/effect/temporary_effect/pulse/snake/test/on_enter_turf(turf/T)
if(T)
T.color = "#00ff00"
@@ -119,6 +119,6 @@
pulses_remaining = 8
pulse_delay = 0.2 SECONDS
/obj/effect/temporary_effect/pulse/snake/flamestrike/on_leave_turf(var/turf/T)
/obj/effect/temporary_effect/pulse/snake/flamestrike/on_leave_turf(turf/T)
if(T)
new /obj/effect/temporary_effect/eruption/flamestrike(T, 1.2 SECONDS, "#f75000")
+5 -5
View File
@@ -20,7 +20,7 @@
qdel(src)
return
/obj/effect/spider/attackby(var/obj/item/W, var/mob/user)
/obj/effect/spider/attackby(obj/item/W, mob/user)
user.setClickCooldown(user.get_attack_speed(W))
if(LAZYLEN(W.attack_verb))
@@ -52,7 +52,7 @@
visible_message(span_warning("\The [user] stomps \the [src] dead!"))
die()
/obj/effect/spider/bullet_act(var/obj/item/projectile/Proj)
/obj/effect/spider/bullet_act(obj/item/projectile/Proj)
..()
health -= Proj.get_structure_damage()
healthcheck()
@@ -104,7 +104,7 @@
START_PROCESSING(SSobj, src)
return ..()
/obj/effect/spider/eggcluster/Initialize(mapload, var/atom/parent)
/obj/effect/spider/eggcluster/Initialize(mapload, atom/parent)
. = ..()
get_light_and_color(parent)
@@ -169,7 +169,7 @@
/mob/living/simple_mob/animal/giant_spider/webslinger, /mob/living/simple_mob/animal/giant_spider/phorogenic, /mob/living/simple_mob/animal/giant_spider/carrier,
/mob/living/simple_mob/animal/giant_spider/ion)
/obj/effect/spider/spiderling/Initialize(mapload, var/atom/parent)
/obj/effect/spider/spiderling/Initialize(mapload, atom/parent)
. = ..()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
@@ -297,7 +297,7 @@
desc = "There's a special aura about this one."
grow_as = list(/mob/living/simple_mob/animal/giant_spider/nurse/queen)
/obj/effect/spider/spiderling/princess/Initialize(mapload, var/atom/parent)
/obj/effect/spider/spiderling/princess/Initialize(mapload, atom/parent)
. = ..()
amount_grown = 50
+7 -7
View File
@@ -11,7 +11,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
icon = 'icons/mob/screen1.dmi' //VS Edit
icon_state = "centermarker" //VS Edit
/obj/effect/step_trigger/proc/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
return 0
/obj/effect/step_trigger/Crossed(atom/movable/H as mob|obj)
@@ -37,7 +37,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
var/nostop = 0 // if 1: will only be stopped by teleporters
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(var/atom/A)
/obj/effect/step_trigger/thrower/Trigger(atom/A)
if(!A || !istype(A, /atom/movable))
return
var/atom/movable/AM = A
@@ -160,7 +160,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
var/teleport_y_offset = 0
var/teleport_z_offset = 0
/obj/effect/step_trigger/teleporter/random/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/teleporter/random/Trigger(atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
the_landmark = mark
return
/obj/effect/step_trigger/teleporter/landmark/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/teleporter/landmark/Trigger(atom/movable/A)
if(the_landmark)
A.forceMove(get_turf(the_landmark))
@@ -212,7 +212,7 @@ GLOBAL_LIST_EMPTY(tele_landmarks)
/obj/effect/step_trigger/teleporter/planetary_fall/proc/find_planet()
return
/obj/effect/step_trigger/teleporter/planetary_fall/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/teleporter/planetary_fall/Trigger(atom/movable/A)
var/turf/T = get_turf(A)
if(!T)
return
@@ -224,7 +224,7 @@ GLOBAL_LIST_EMPTY(tele_landmarks)
var/deathmessage = "You die a horrible, brutal and very sudden death."
var/deathalert = "has stepped on a death trigger."
/obj/effect/step_trigger/death/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/death/Trigger(atom/movable/A)
if(isliving(A))
to_chat(A, span_danger("[deathmessage]"))
log_and_message_admins("[deathalert]", A)
@@ -248,7 +248,7 @@ GLOBAL_LIST_EMPTY(tele_landmarks)
var/warningmessage = "Warning!"
icon_state = "warnmarker"
/obj/effect/step_trigger/warning/Trigger(var/atom/movable/A)
/obj/effect/step_trigger/warning/Trigger(atom/movable/A)
if(isliving(A))
to_chat(A, span_warning("[warningmessage]"))
@@ -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, customappearance)
. = ..()
alpha = initial(alpha)
if(mimiced_atom)
+17 -17
View File
@@ -481,7 +481,7 @@
// slot uses the slot_X defines found in setup.dm
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot)
/obj/item/proc/equipped(mob/user, slot)
// Give out actions our item has to people who equip it.
for(var/datum/action/action as anything in actions)
give_item_action(action, user, slot)
@@ -523,7 +523,7 @@
return TRUE
// As above but for items being equipped to an active module on a robot.
/obj/item/proc/equipped_robot(var/mob/user)
/obj/item/proc/equipped_robot(mob/user)
return
//Defines which slots correspond to which slot flags
@@ -697,7 +697,7 @@ GLOBAL_LIST_INIT(slot_flags_enumeration, list(
//If a negative value is returned, it should be treated as a special return value for bullet_act() and handled appropriately.
//For non-projectile attacks this usually means the attack is blocked.
//Otherwise should return 0 to indicate that the attack is not affected in any way.
/obj/item/proc/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
/obj/item/proc/handle_shield(mob/user, damage, atom/damage_source = null, mob/attacker = null, def_zone = null, attack_text = "the attack")
return 0
/obj/item/proc/get_loc_turf()
@@ -842,7 +842,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
I.showoff(src)
/// For zooming with scope or binoculars. Uses remote_view/item component for disabling when you move or drop the item
/obj/item/proc/zoom(var/mob/living/M, var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
/obj/item/proc/zoom(mob/living/M, tileoffset = 14,viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
SIGNAL_HANDLER
if(isliving(usr)) //Always prefer usr if set
M = usr
@@ -883,7 +883,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
// Used for non-adjacent melee attacks with specific weapons capable of reaching more than one tile.
// This uses changeling range string A* but for this purpose its also applicable.
/obj/item/proc/attack_can_reach(var/atom/us, var/atom/them, var/range)
/obj/item/proc/attack_can_reach(atom/us, atom/them, range)
if(us.Adjacent(them))
return TRUE // Already adjacent.
if(AStar(get_turf(us), get_turf(them), /turf/proc/AdjacentTurfsRangedSting, /turf/proc/Distance, max_nodes=25, max_node_depth=range))
@@ -908,7 +908,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
return FALSE
//Worn icon generation for on-mob sprites
/obj/item/proc/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer,var/icon/clip_mask = null)
/obj/item/proc/make_worn_icon(body_type,slot_name,inhands,default_icon,default_layer,icon/clip_mask = null)
//Get the required information about the base icon
var/icon/icon2use = get_worn_icon_file(body_type = body_type, slot_name = slot_name, default_icon = default_icon, inhands = inhands)
var/state2use = get_worn_icon_state(slot_name = slot_name)
@@ -957,7 +957,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
return standing
//Returns the icon object that should be used for the worn icon
/obj/item/proc/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands)
/obj/item/proc/get_worn_icon_file(body_type,slot_name,default_icon,inhands)
//1: icon_override var
if(icon_override)
@@ -1004,7 +1004,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
return
//Returns the state that should be used for the worn icon
/obj/item/proc/get_worn_icon_state(var/slot_name)
/obj/item/proc/get_worn_icon_state(slot_name)
//1: slot-specific sprite sheets
if(LAZYLEN(item_state_slots))
@@ -1021,7 +1021,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
return icon_state
//Returns the layer that should be used for the worn icon (as a FLOAT_LAYER layer, so negative)
/obj/item/proc/get_worn_layer(var/default_layer = 0)
/obj/item/proc/get_worn_layer(default_layer = 0)
//1: worn_layer variable
if(!isnull(worn_layer)) //Can be zero, so...
@@ -1031,7 +1031,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
return BODY_LAYER+default_layer
//Apply the addblend blends onto the icon
/obj/item/proc/apply_addblends(var/source_icon, var/icon/standing_icon)
/obj/item/proc/apply_addblends(source_icon, icon/standing_icon)
//If we have addblends, blend them onto the provided icon
if(addblends && standing_icon && source_icon)
@@ -1039,18 +1039,18 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
standing_icon.Blend(addblend_icon, ICON_ADD)
//STUB
/obj/item/proc/apply_custom(var/icon/standing_icon)
/obj/item/proc/apply_custom(icon/standing_icon)
return standing_icon
//STUB
/obj/item/proc/apply_blood(var/image/standing)
/obj/item/proc/apply_blood(image/standing)
return standing
//STUB
/obj/item/proc/apply_accessories(var/image/standing)
/obj/item/proc/apply_accessories(image/standing)
return standing
/obj/item/proc/apply_overlays(var/image/standing)
/obj/item/proc/apply_overlays(image/standing)
if(!blocks_emissive)
return standing
@@ -1107,7 +1107,7 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
/obj/item/var/center_of_mass_x = 16
/obj/item/var/center_of_mass_y = 16
/proc/auto_align(obj/item/W, click_parameters, var/animate = FALSE)
/proc/auto_align(obj/item/W, click_parameters, animate = FALSE)
if(!W.center_of_mass_x && !W.center_of_mass_y)
W.randpixel_xy()
return
@@ -1139,10 +1139,10 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
#undef CELLSIZE
// this gets called when the item gets chucked by the vending machine
/obj/item/proc/vendor_action(var/obj/machinery/vending/V)
/obj/item/proc/vendor_action(obj/machinery/vending/V)
return
/obj/item/proc/on_holder_escape(var/obj/item/holder/H)
/obj/item/proc/on_holder_escape(obj/item/holder/H)
return
/obj/item/proc/get_welder()
+4 -4
View File
@@ -114,7 +114,7 @@
var/area/A = T.loc
return A
/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
/obj/item/blueprints/proc/get_area_type(area/A = get_area())
for(var/type in SPACE_AREA_TYPES)
if(istype(A, type))
return AREA_SPACE
@@ -192,7 +192,7 @@
interact()
return
/obj/item/blueprints/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
/obj/item/blueprints/proc/move_turfs_to_area(list/turf/turfs, area/A)
for(var/T in turfs)
ChangeArea(T, A)
@@ -213,7 +213,7 @@
/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
/obj/item/blueprints/proc/set_area_machinery_title(area/A,title,oldtitle)
if (!oldtitle) // or replacetext goes to infinite loop
return
@@ -239,7 +239,7 @@
* Note: The first turf is always allowed, and turfs in its area.
* @return On success, a list of turfs included in the room. On failure will return a ROOM_ERR_* constant.
*/
/obj/item/blueprints/proc/detect_room_ex(var/turf/first, var/allowedAreas = AREA_SPACE)
/obj/item/blueprints/proc/detect_room_ex(turf/first, allowedAreas = AREA_SPACE)
if(!istype(first))
return ROOM_ERR_LOLWAT
var/list/turf/found = list()
+5 -5
View File
@@ -472,7 +472,7 @@
found_turfs += origin //If this isn't done, it just adds the 8 tiles around the user.
return found_turfs
/proc/create_area(mob/creator, var/obj/item/areaeditor/AO)
/proc/create_area(mob/creator, obj/item/areaeditor/AO)
if(AO && istype(AO,/obj/item/areaeditor))
if(AO.uses_charges && AO.charges < 1)
to_chat(creator, span_warning("You need more paper before you can even think of editing this area!"))
@@ -552,7 +552,7 @@
// OLD CODE. DON'T TOUCH OR 100 RABID SQUIRRELS WILL DEVOUR YOU.
// I say old code, but it truly isn't. It's a bastardization of the new create_area code and the old create_area code.
// In essence, it does a few things: Ensure no blacklisted areas are nearby, get the nearby areas (to allow merging), and allow you to make a whole near area.
/obj/item/areaeditor/proc/create_area_whole(mob/creator, var/override = 0) //Gets the entire enclosed space and makes a new area out of it. Can overwrite old areas.
/obj/item/areaeditor/proc/create_area_whole(mob/creator, override = 0) //Gets the entire enclosed space and makes a new area out of it. Can overwrite old areas.
if(uses_charges && charges < 5)
to_chat(creator, span_warning("You need more paper before you can even think of editing this area!"))
return
@@ -666,12 +666,12 @@
interact()
return
/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
/proc/move_turfs_to_area(list/turf/turfs, area/A)
for(var/T in turfs)
ChangeArea(T, A)
/obj/item/areaeditor/proc/detect_room_ex(var/turf/first, var/allowedAreas = AREA_SPACE, var/list/forbiddenAreas = list(), var/visual)
/obj/item/areaeditor/proc/detect_room_ex(turf/first, allowedAreas = AREA_SPACE, list/forbiddenAreas = list(), visual)
if(!istype(first))
return ROOM_ERR_LOLWAT
if(!visual && forbiddenAreas[first.loc.type] || forbiddenAreas[first.type]) //Is the area of the starting turf a banned area? Is the turf a banned area?
@@ -818,7 +818,7 @@
return 0 //If it's not a buildable area, don't let them build in it.
/proc/detect_new_area(var/turf/first, var/user) //Heavily simplified version for creating an area yourself.
/proc/detect_new_area(turf/first, user) //Heavily simplified version for creating an area yourself.
if(!istype(first)) //Not on a turf.
to_chat(usr, span_warning("You can not create a room here."))
return
+4 -4
View File
@@ -58,7 +58,7 @@
var/contains_body = FALSE
var/has_label = FALSE
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
/obj/structure/closet/body_bag/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/pen))
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null, MAX_NAME_LEN )
if (user.get_active_hand() != W)
@@ -82,7 +82,7 @@
cut_overlays()
return
/obj/structure/closet/body_bag/store_mobs(var/stored_units)
/obj/structure/closet/body_bag/store_mobs(stored_units)
contains_body = ..()
return contains_body
@@ -116,7 +116,7 @@
occupants += H
return occupants
/obj/structure/closet/body_bag/proc/update(var/broadcast=0)
/obj/structure/closet/body_bag/proc/update(broadcast=0)
if(istype(loc, /obj/structure/morgue))
var/obj/structure/morgue/M = loc
M.update(broadcast)
@@ -226,7 +226,7 @@
return tank.air_contents
..()
/obj/structure/closet/body_bag/cryobag/proc/inject_occupant(var/mob/living/carbon/human/H)
/obj/structure/closet/body_bag/cryobag/proc/inject_occupant(mob/living/carbon/human/H)
if(!syringe)
return
+1 -1
View File
@@ -77,7 +77,7 @@
/// Snorting.
/obj/item/reagent_containers/powder/attackby(var/obj/item/W, var/mob/living/user)
/obj/item/reagent_containers/powder/attackby(obj/item/W, mob/living/user)
if(!ishuman(user)) /// You gotta be fleshy to snort the naughty drugs.
return ..()
@@ -38,7 +38,7 @@
else
icon_state = initial(icon_state)
/obj/item/nifrepairer/afterattack(var/atom/target, var/mob/user, var/proximity)
/obj/item/nifrepairer/afterattack(atom/target, mob/user, proximity)
if(!target.is_open_container() || !target.reagents)
return 0
@@ -80,7 +80,7 @@
/obj/item/multitool/ai_detector/update_icon()
icon_state = "[initial(icon_state)][detect_state]"
/obj/item/multitool/ai_detector/proc/update_warning(var/old_state, var/new_state)
/obj/item/multitool/ai_detector/proc/update_warning(old_state, new_state)
var/mob/living/carrier = isliving(loc) ? loc : null
// Now to warn our holder, if the state changes.
+2 -2
View File
@@ -101,7 +101,7 @@
else
icon_state = "aicard"
/obj/item/aicard/proc/grab_ai(var/mob/living/silicon/ai/ai, var/mob/living/user)
/obj/item/aicard/proc/grab_ai(mob/living/silicon/ai/ai, mob/living/user)
if(!ai.client && !ai.deployed_shell)
to_chat(user, span_danger("ERROR:") + " AI [ai.name] is offline. Unable to transfer.")
return 0
@@ -166,7 +166,7 @@
carded_ai.show_message(rendered, type)
..()
/obj/item/aicard/relaymove(var/mob/user, var/direction)
/obj/item/aicard/relaymove(mob/user, direction)
if(user.stat || user.stunned)
return
var/obj/item/rig/rig = src.get_rig()
@@ -73,7 +73,7 @@
flick("emppulse",T)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), T), 0.8 SECONDS, TIMER_DELETE_ME)
/obj/item/chameleon/proc/disrupt(var/delete_dummy = 1)
/obj/item/chameleon/proc/disrupt(delete_dummy = 1)
if(active_dummy)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
@@ -102,7 +102,7 @@
var/can_move = 1
var/obj/item/chameleon/master = null
/obj/effect/dummy/chameleon/proc/activate(var/obj/O, var/mob/M, new_icon, new_iconstate, new_overlays, var/obj/item/chameleon/C)
/obj/effect/dummy/chameleon/proc/activate(obj/O, mob/M, new_icon, new_iconstate, new_overlays, obj/item/chameleon/C)
name = O.name
desc = O.desc
icon = new_icon
@@ -137,7 +137,7 @@
/obj/effect/dummy/chameleon/proc/allow_move()
can_move = 1
/obj/effect/dummy/chameleon/relaymove(var/mob/user, direction)
/obj/effect/dummy/chameleon/relaymove(mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
@@ -157,7 +157,7 @@
// Proc: add_to_EPv2()
// Parameters: 1 (hex - a single hexadecimal character)
// Description: Called when someone is manually dialing with nanoUI. Adds colons when appropiate.
/obj/item/communicator/proc/add_to_EPv2(var/hex)
/obj/item/communicator/proc/add_to_EPv2(hex)
var/length = length(target_address)
if(length >= 24)
return
@@ -2,7 +2,7 @@
// Parameters: 4 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received,
// text - message text to send if message is of type "text")
// Description: Handles voice requests and invite messages originating from both real communicators and ghosts. Also includes a ping response and IM function.
/obj/item/communicator/receive_exonet_message(var/atom/origin_atom, origin_address, message, text)
/obj/item/communicator/receive_exonet_message(atom/origin_atom, origin_address, message, text)
if(message == "voice")
if(isobserver(origin_atom) || istype(origin_atom, /obj/item/communicator))
if(origin_atom in voice_invites)
@@ -53,7 +53,7 @@
// Parameters: 3 (candidate - the communicator wanting to message the device, origin_address - the address of the sender, text - the message)
// Description: Response to a communicator trying to message the device.
// Adds them to the list of people that have messaged this device and adds the message to the message list.
/obj/item/communicator/proc/request_im(var/atom/candidate, var/origin_address, var/text)
/obj/item/communicator/proc/request_im(atom/candidate, origin_address, text)
var/who = null
if(isobserver(candidate))
var/mob/observer/dead/ghost = candidate
@@ -20,7 +20,7 @@
// Proc: open_connection()
// Parameters: 2 (user - the person who initiated the connecting being opened, candidate - the communicator or observer that will connect to the device)
// Description: Typechecks the candidate, then calls the correct proc for further connecting.
/obj/item/communicator/proc/open_connection(mob/user, var/atom/candidate)
/obj/item/communicator/proc/open_connection(mob/user, atom/candidate)
if(isobserver(candidate))
voice_invites.Remove(candidate)
open_connection_to_ghost(user, candidate)
@@ -31,7 +31,7 @@
// Proc: open_connection_to_communicator()
// Parameters: 2 (user - the person who initiated this and will be receiving feedback information, candidate - someone else's communicator)
// Description: Adds the candidate and src to each other's communicating lists, allowing messages seen by the devices to be relayed.
/obj/item/communicator/proc/open_connection_to_communicator(mob/user, var/atom/candidate)
/obj/item/communicator/proc/open_connection_to_communicator(mob/user, atom/candidate)
if(!istype(candidate, /obj/item/communicator))
return
var/obj/item/communicator/comm = candidate
@@ -56,7 +56,7 @@
// Proc: open_connection_to_ghost()
// Parameters: 2 (user - the person who initiated this, candidate - the ghost that will be turned into a voice mob)
// Description: Pulls the candidate ghost from deadchat, makes a new voice mob, transfers their identity, then their client.
/obj/item/communicator/proc/open_connection_to_ghost(mob/user, var/mob/candidate)
/obj/item/communicator/proc/open_connection_to_ghost(mob/user, mob/candidate)
if(!isobserver(candidate))
return
//Handle moving the ghost into the new shell.
@@ -113,7 +113,7 @@
// Parameters: 3 (user - the user who initiated the disconnect, target - the mob or device being disconnected, reason - string shown when disconnected)
// Description: Deletes specific voice_mobs or disconnects communicators, and shows a message to everyone when doing so. If target is null, all communicators
// and voice mobs are removed.
/obj/item/communicator/proc/close_connection(mob/user, var/atom/target, var/reason)
/obj/item/communicator/proc/close_connection(mob/user, atom/target, reason)
if(voice_mobs.len == 0 && communicating.len == 0)
return
@@ -144,7 +144,7 @@
// Proc: request()
// Parameters: 1 (candidate - the ghost or communicator wanting to call the device)
// Description: Response to a communicator or observer trying to call the device. Adds them to the list of requesters
/obj/item/communicator/proc/request(var/atom/candidate)
/obj/item/communicator/proc/request(atom/candidate)
if(candidate in voice_requests)
return
var/who = null
@@ -179,7 +179,7 @@
// Proc: del_request()
// Parameters: 1 (candidate - the ghost or communicator to be declined)
// Description: Declines a request and cleans up both ends
/obj/item/communicator/proc/del_request(var/atom/candidate)
/obj/item/communicator/proc/del_request(atom/candidate)
if(!(candidate in voice_requests))
return
+14 -14
View File
@@ -101,7 +101,7 @@
else
return ..()
/obj/item/defib_kit/emag_act(var/remaining_charges, var/mob/user)
/obj/item/defib_kit/emag_act(remaining_charges, mob/user)
var/obj/item/shockpaddles/linked/paddles = get_paddles()
if(paddles)
. = paddles.emag_act(user)
@@ -181,7 +181,7 @@
var/cooldown = 0
var/busy = 0
/obj/item/shockpaddles/proc/set_cooldown(var/delay)
/obj/item/shockpaddles/proc/set_cooldown(delay)
cooldown = 1
update_icon()
@@ -306,10 +306,10 @@
blood_volume *= 0.8
return blood_volume < H.species.blood_volume*H.species.blood_level_fatal
/obj/item/shockpaddles/proc/check_charge(var/charge_amt)
/obj/item/shockpaddles/proc/check_charge(charge_amt)
return 0
/obj/item/shockpaddles/proc/checked_use(var/charge_amt)
/obj/item/shockpaddles/proc/checked_use(charge_amt)
return 0
/obj/item/shockpaddles/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
@@ -329,7 +329,7 @@
return ITEM_INTERACT_SUCCESS
//Since harm-intent now skips the delay for deliberate placement, you have to be able to hit them in combat in order to shock people.
/obj/item/shockpaddles/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
/obj/item/shockpaddles/apply_hit_effect(mob/living/target, mob/living/user, hit_zone)
if(ishuman(target) && can_use(user, target))
busy = 1
update_icon()
@@ -410,7 +410,7 @@
log_and_message_admins("used \a [src] to revive [key_name(H)].")
/obj/item/shockpaddles/proc/do_electrocute(mob/living/carbon/human/H, mob/user, var/target_zone)
/obj/item/shockpaddles/proc/do_electrocute(mob/living/carbon/human/H, mob/user, target_zone)
var/obj/item/organ/external/affecting = H.get_organ(target_zone)
if(!affecting)
to_chat(user, span_warning("They are missing that body part!"))
@@ -497,7 +497,7 @@
H.setBrainLoss(brain_damage)
/obj/item/shockpaddles/proc/make_announcement(var/message, var/msg_class)
/obj/item/shockpaddles/proc/make_announcement(message, msg_class)
audible_message(span_bold(span_info("\The [src]") + " [message]"), span_info("\The [src] vibrates slightly."), runemessage = "buzz")
/obj/item/shockpaddles/emag_act(mob/user)
@@ -536,12 +536,12 @@
item_state = "defibpaddles0"
cooldowntime = (3 SECONDS)
/obj/item/shockpaddles/robot/check_charge(var/charge_amt)
/obj/item/shockpaddles/robot/check_charge(charge_amt)
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return (R.cell && R.cell.check_charge(charge_amt))
/obj/item/shockpaddles/robot/checked_use(var/charge_amt)
/obj/item/shockpaddles/robot/checked_use(charge_amt)
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return (R.cell && R.cell.checked_use(charge_amt))
@@ -556,15 +556,15 @@
/*
Shockpaddles that are linked to a base unit
*/
/obj/item/shockpaddles/linked/check_charge(var/charge_amt)
/obj/item/shockpaddles/linked/check_charge(charge_amt)
var/obj/item/defib_kit/base_unit = tethered_host_item
return (base_unit.bcell && base_unit.bcell.check_charge(charge_amt))
/obj/item/shockpaddles/linked/checked_use(var/charge_amt)
/obj/item/shockpaddles/linked/checked_use(charge_amt)
var/obj/item/defib_kit/base_unit = tethered_host_item
return (base_unit.bcell && base_unit.bcell.checked_use(charge_amt))
/obj/item/shockpaddles/linked/make_announcement(var/message, var/msg_class)
/obj/item/shockpaddles/linked/make_announcement(message, msg_class)
var/obj/item/defib_kit/base_unit = tethered_host_item
base_unit.audible_message(span_infoplain(span_bold("\The [base_unit]") + " [message]"), span_info("\The [base_unit] vibrates slightly."))
@@ -584,10 +584,10 @@
if(fail_counter)
STOP_PROCESSING(SSobj, src)
/obj/item/shockpaddles/standalone/check_charge(var/charge_amt)
/obj/item/shockpaddles/standalone/check_charge(charge_amt)
return 1
/obj/item/shockpaddles/standalone/checked_use(var/charge_amt)
/obj/item/shockpaddles/standalone/checked_use(charge_amt)
radiation_pulse(
src,
max_range = 5,
@@ -119,7 +119,7 @@
var/revive_time = 30 SECONDS //Don't do this in combat
var/advanced = 1 //allows for ghosts to join mobs who get revived by this, and updates their faction to yours
/obj/item/denecrotizer/examine(var/mob/user)
/obj/item/denecrotizer/examine(mob/user)
. = ..()
var/cooldowntime = round((cooldown - (world.time - last_used)) * 0.1)
if(Adjacent(user))
+2 -2
View File
@@ -49,7 +49,7 @@
. = ..()
power_supply = new cell_type(src)
/obj/item/flash/attackby(var/obj/item/W, var/mob/user)
/obj/item/flash/attackby(obj/item/W, mob/user)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && broken)
user.visible_message(span_infoplain(span_bold("\The [user]") + " starts trying to repair \the [src]'s bulb."))
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed, target = src) && can_repair)
@@ -92,7 +92,7 @@
return suit.cell
return null
/obj/item/flash/proc/clown_check(var/mob/user)
/obj/item/flash/proc/clown_check(mob/user)
if(user && CLUMSY_FAIL_CHANCE(user))
to_chat(user, span_warning("\The [src] slips out of your hand."))
user.drop_item()
@@ -252,7 +252,7 @@
var/turf/T = get_turf(target)
OL.place_directional_light(T)
/obj/item/flashlight/proc/flicker(var/amount = rand(10, 20), var/flicker_color, var/forced)
/obj/item/flashlight/proc/flicker(amount = rand(10, 20), flicker_color, forced)
if(flickering)
return
if(!flicker_color)
@@ -276,7 +276,7 @@
/// original_on is if we were originally on or not.
/// OL is our overlay for lighting.
/// ticker is how many times we have flickered so far.
/obj/item/flashlight/proc/do_flicker(var/amount = rand(10, 20), var/flicker_color, var/original_color, var/original_on, var/datum/component/overlay_lighting/OL, var/ticker)
/obj/item/flashlight/proc/do_flicker(amount = rand(10, 20), flicker_color, original_color, original_on, datum/component/overlay_lighting/OL, ticker)
if(ticker >= amount) //We have flickered enough times. Terminate the cycle.
finish_flicker(original_color, original_on, OL)
return
@@ -286,7 +286,7 @@
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
addtimer(CALLBACK(src, PROC_REF(do_flicker), amount, flicker_color, original_color, original_on, OL, ++ticker), rand(5,15), TIMER_DELETE_ME)
/obj/item/flashlight/proc/finish_flicker(var/original_color, var/original_on, var/datum/component/overlay_lighting/OL)
/obj/item/flashlight/proc/finish_flicker(original_color, original_on, datum/component/overlay_lighting/OL)
set_light_color(original_color)
OL.directional_atom?.color = original_color
on = original_on
@@ -41,7 +41,7 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
/obj/item/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
/obj/item/floor_painter/afterattack(atom/A, mob/user, proximity, params)
if(!proximity)
return
+2 -2
View File
@@ -101,7 +101,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
QDEL_NULL(compass)
. = ..()
/obj/item/gps/proc/can_track(var/obj/item/gps/other, var/reachable_z_levels)
/obj/item/gps/proc/can_track(obj/item/gps/other, reachable_z_levels)
if(!other.tracking || other.emped || other.hide_signal || is_vore_jammed(other))
return FALSE
var/turf/origin = get_turf(src)
@@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
reachable_z_levels = reachable_z_levels || using_map.get_map_levels(origin.z, long_range)
return (target.z in reachable_z_levels)
/obj/item/gps/proc/update_compass(atom/movable/source, var/update_compass_icon)
/obj/item/gps/proc/update_compass(atom/movable/source, update_compass_icon)
SIGNAL_HANDLER
compass.hide_waypoints(FALSE)
var/turf/my_turf = get_turf(src)
+4 -4
View File
@@ -32,7 +32,7 @@
hack_state = null
return ..()
/obj/item/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
/obj/item/multitool/hacktool/attackby(obj/item/W, mob/user)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
in_hack_mode = !in_hack_mode
playsound(src, W.usesound, 50, 1)
@@ -68,7 +68,7 @@
D.close()
return 1
/obj/item/multitool/hacktool/proc/attempt_hack(var/mob/user, var/atom/target)
/obj/item/multitool/hacktool/proc/attempt_hack(mob/user, atom/target)
if(is_hacking)
to_chat(user, span_warning("You are already hacking!"))
return 0
@@ -137,13 +137,13 @@
A.unregister(OBSERVER_EVENT_DESTROY, src)
known_targets.Cut(max_known_targets + 1)
/obj/item/multitool/hacktool/proc/on_target_destroy(var/target)
/obj/item/multitool/hacktool/proc/on_target_destroy(target)
known_targets -= target
/datum/tgui_state/default/must_hack
var/obj/item/multitool/hacktool/hacktool
/datum/tgui_state/default/must_hack/New(var/hacktool)
/datum/tgui_state/default/must_hack/New(hacktool)
src.hacktool = hacktool
..()
@@ -30,7 +30,7 @@
/obj/item/laser_pointer/purple
pointer_icon_state = "purple_laser"
/obj/item/laser_pointer/Initialize(mapload, var/laser_path)
/obj/item/laser_pointer/Initialize(mapload, laser_path)
. = ..()
if(ispath(laser_path))
diode = new laser_path
@@ -68,12 +68,12 @@
..()
return
/obj/item/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
/obj/item/laser_pointer/afterattack(atom/target, mob/living/user, flag, params)
if(flag) //we're placing the object on a table or in backpack
return
laser_act(target, user)
/obj/item/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
/obj/item/laser_pointer/proc/laser_act(atom/target, mob/living/user)
if(!(user in (viewers(world.view,target))))
return
if(!(target in view(user, world.view)))
@@ -154,14 +154,14 @@
icon_state = "lightreplacer[emagged]"
/obj/item/lightreplacer/proc/Use(var/mob/user)
/obj/item/lightreplacer/proc/Use(mob/user)
playsound(src, 'sound/machines/click.ogg', 50, 1)
add_uses(-1)
return 1
// Negative numbers will subtract
/obj/item/lightreplacer/proc/add_uses(var/amount = 1)
/obj/item/lightreplacer/proc/add_uses(amount = 1)
uses = min(max(uses + amount, 0), max_uses)
@@ -173,13 +173,13 @@
bulb_shards = bulb_shards % shards_required
return new_bulbs
/obj/item/lightreplacer/proc/Charge(var/mob/user, var/amount = 1)
/obj/item/lightreplacer/proc/Charge(mob/user, amount = 1)
charge += amount
if(charge > 6)
add_uses(1)
charge = 0
/obj/item/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
/obj/item/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
if(target.status != LIGHT_OK)
if(CanUse(U))
@@ -211,7 +211,7 @@
to_chat(U, "There is a working [target.get_fitting_name()] already inserted.")
return
/obj/item/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
/obj/item/lightreplacer/emag_act(remaining_charges, mob/user)
emagged = !emagged
playsound(src, "sparks", 100, 1)
update_icon()
@@ -219,7 +219,7 @@
//Can you use it?
/obj/item/lightreplacer/proc/CanUse(var/mob/living/user)
/obj/item/lightreplacer/proc/CanUse(mob/living/user)
src.add_fingerprint(user)
//Not sure what else to check for. Maybe if clumsy?
if(uses > 0)
@@ -277,7 +277,7 @@
to_chat(user, span_infoplain("Painter color set."))
/obj/item/lightpainter/proc/ColorLight(var/obj/machinery/light/target, var/mob/living/U)
/obj/item/lightpainter/proc/ColorLight(obj/machinery/light/target, mob/living/U)
src.add_fingerprint(U)
@@ -72,7 +72,7 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
/obj/item/closet_painter/afterattack(atom/A, var/mob/user, proximity)
/obj/item/closet_painter/afterattack(atom/A, mob/user, proximity)
if(!proximity)
return
+8 -8
View File
@@ -12,7 +12,7 @@
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
/obj/item/megaphone/proc/can_broadcast(var/mob/living/user)
/obj/item/megaphone/proc/can_broadcast(mob/living/user)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
to_chat(user, span_warning("You cannot speak in IC (muted)."))
@@ -31,7 +31,7 @@
return FALSE
return TRUE
/obj/item/megaphone/proc/do_broadcast(var/mob/living/user, var/message)
/obj/item/megaphone/proc/do_broadcast(mob/living/user, message)
if(emagged)
if(insults)
var/insult = pick(insultmsg)
@@ -57,7 +57,7 @@
spamcheck = world.time + 20
do_broadcast(user, message)
/obj/item/megaphone/emag_act(var/remaining_charges, var/mob/user)
/obj/item/megaphone/emag_act(remaining_charges, mob/user)
if(!emagged)
to_chat(user, span_warning("You overload [src]'s voice synthesizer."))
emagged = TRUE
@@ -78,7 +78,7 @@
insultmsg = list("HONK?!", "HONK!", "HOOOOOOOONK!", "...!", "HUNK.", "Honk?")
/obj/item/megaphone/super/emag_act(var/remaining_charges, var/mob/user)
/obj/item/megaphone/super/emag_act(remaining_charges, mob/user)
..()
if(emagged)
if(!(11 in volume_options))
@@ -103,7 +103,7 @@
adjust_volume(usr)
/obj/item/megaphone/super/proc/adjust_volume(var/mob/living/user)
/obj/item/megaphone/super/proc/adjust_volume(mob/living/user)
var/new_volume = tgui_input_list(user, "Set Volume", "Set Volume", volume_options)
if(new_volume && Adjacent(user))
@@ -116,7 +116,7 @@
adjust_font(usr)
/obj/item/megaphone/super/proc/adjust_font(var/mob/living/user)
/obj/item/megaphone/super/proc/adjust_font(mob/living/user)
var/new_font = tgui_input_list(user, "Set Volume", "Set Volume", font_options)
if(new_font && Adjacent(user))
@@ -129,13 +129,13 @@
adjust_color(usr)
/obj/item/megaphone/super/proc/adjust_color(var/mob/living/user)
/obj/item/megaphone/super/proc/adjust_color(mob/living/user)
var/new_color = tgui_input_list(user, "Set Volume", "Set Volume", color_options)
if(new_color && Adjacent(user))
broadcast_color = new_color
/obj/item/megaphone/super/do_broadcast(var/mob/living/user, var/message)
/obj/item/megaphone/super/do_broadcast(mob/living/user, message)
if(emagged)
if(insults)
var/insult = pick(insultmsg)
+2 -2
View File
@@ -404,7 +404,7 @@
return
setEmotion(16)
/obj/item/paicard/attackby(var/obj/item/I as obj, mob/user as mob)
/obj/item/paicard/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/tool/screwdriver))
if(panel_open)
panel_open = FALSE
@@ -882,6 +882,6 @@
/obj/random/paicard/item_to_spawn()
return pick(/obj/item/paicard ,/obj/item/paicard/typeb)
/obj/item/paicard/digest_act(var/atom/movable/item_storage = null)
/obj/item/paicard/digest_act(atom/movable/item_storage = null)
if(pai.digestable)
return ..()
@@ -223,7 +223,7 @@
// Making it so emagging the weapon it comes with would also be a good idea. Different modes, perhaps?
/*
/obj/item/personal_shield_generator/emag_act(var/remaining_charges, var/mob/user)
/obj/item/personal_shield_generator/emag_act(remaining_charges, mob/user)
if(active_weapon)
. = active_weapon.emag_act(user)
update_icon()
@@ -437,16 +437,16 @@
if(shield_generator)
shield_generator.reattach_gun(user)
/obj/item/gun/energy/proc/check_charge(var/charge_amt) //In case using any other guns.
/obj/item/gun/energy/proc/check_charge(charge_amt) //In case using any other guns.
return 0
/obj/item/gun/energy/proc/checked_use(var/charge_amt) //In case using any other guns.
/obj/item/gun/energy/proc/checked_use(charge_amt) //In case using any other guns.
return 0
/obj/item/gun/energy/gun/generator/check_charge(var/charge_amt)
/obj/item/gun/energy/gun/generator/check_charge(charge_amt)
return (shield_generator.bcell && shield_generator.bcell.check_charge(charge_amt))
/obj/item/gun/energy/gun/generator/checked_use(var/charge_amt)
/obj/item/gun/energy/gun/generator/checked_use(charge_amt)
return (shield_generator.bcell && shield_generator.bcell.checked_use(charge_amt))
+2 -2
View File
@@ -31,7 +31,7 @@
STOP_PROCESSING_POWER_OBJECT(src)
. = ..()
/obj/item/powersink/attackby(var/obj/item/I, var/mob/user)
/obj/item/powersink/attackby(obj/item/I, mob/user)
if(I.has_tool_quality(TOOL_SCREWDRIVER))
if(mode == 0)
var/turf/T = loc
@@ -67,7 +67,7 @@
/obj/item/powersink/attack_ai()
return
/obj/item/powersink/attack_hand(var/mob/user)
/obj/item/powersink/attack_hand(mob/user)
switch(mode)
if(0)
..()
@@ -38,7 +38,7 @@
keyslot2 = null
return ..()
/obj/item/radio/headset/list_channels(var/mob/user)
/obj/item/radio/headset/list_channels(mob/user)
return list_secure_channels()
/obj/item/radio/headset/examine(mob/user)
@@ -71,7 +71,7 @@
return ..(freq, level)
return -1
/obj/item/radio/headset/get_worn_icon_state(var/slot_name)
/obj/item/radio/headset/get_worn_icon_state(slot_name)
var/append = ""
if(icon_override)
switch(slot_name)
@@ -140,7 +140,7 @@
return
/obj/item/radio/headset/recalculateChannels(var/setDescription = FALSE)
/obj/item/radio/headset/recalculateChannels(setDescription = FALSE)
src.channels = list()
src.translate_binary = FALSE
src.translate_hive = FALSE
@@ -180,7 +180,7 @@
handle_finalize_recalculatechannels(setDescription, TRUE)
/obj/item/radio/headset/proc/handle_finalize_recalculatechannels(var/setDescription = FALSE, var/initial_run = FALSE)
/obj/item/radio/headset/proc/handle_finalize_recalculatechannels(setDescription = FALSE, initial_run = FALSE)
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
if(!SSradio && initial_run)
@@ -212,7 +212,7 @@
return ..(freq, level, 1)
return -1
/obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity)
/obj/item/radio/headset/mob_headset/afterattack(atom/movable/target, mob/living/user, proximity)
if(!proximity)
return
if(isanimal(target))
@@ -206,11 +206,11 @@
set_light_on(TRUE)
//VOREStation Add Start
/obj/item/radio/intercom/ctrl_click_ai(var/mob/user)
/obj/item/radio/intercom/ctrl_click_ai(mob/user)
ToggleBroadcast()
to_chat(user, span_notice("\The [src]'s microphone is now <b>[broadcasting ? "enabled" : "disabled"]</b>."))
/obj/item/radio/intercom/AIAltClick(var/mob/user)
/obj/item/radio/intercom/AIAltClick(mob/user)
if(frequency == AI_FREQ)
set_frequency(initial(frequency))
to_chat(user, span_notice("\The [src]'s frequency is now set to [span_green(span_bold("Default"))]."))
@@ -221,7 +221,7 @@
/obj/item/radio/intercom/locked
var/locked_frequency
/obj/item/radio/intercom/locked/set_frequency(var/frequency)
/obj/item/radio/intercom/locked/set_frequency(frequency)
if(frequency == locked_frequency)
..(locked_frequency)
@@ -1,6 +1,6 @@
GLOBAL_LIST_EMPTY(active_radio_jammers)
/proc/is_jammed(var/obj/radio)
/proc/is_jammed(obj/radio)
var/turf/Tr = get_turf(radio)
if(!Tr) return 0 //Nullspace radios don't get jammed.
+12 -12
View File
@@ -179,10 +179,10 @@
return data
/obj/item/radio/proc/list_channels(var/mob/user)
/obj/item/radio/proc/list_channels(mob/user)
return list_internal_channels(user)
/obj/item/radio/proc/list_secure_channels(var/mob/user)
/obj/item/radio/proc/list_secure_channels(mob/user)
var/dat[0]
for(var/ch_name in channels)
@@ -193,7 +193,7 @@
return dat
/obj/item/radio/proc/list_internal_channels(var/mob/user)
/obj/item/radio/proc/list_internal_channels(mob/user)
var/dat[0]
for(var/internal_chan in internal_channels)
if(has_channel_access(user, internal_chan))
@@ -201,7 +201,7 @@
return dat
/obj/item/radio/proc/has_channel_access(var/mob/user, var/freq)
/obj/item/radio/proc/has_channel_access(mob/user, freq)
if(!user)
return FALSE
@@ -210,14 +210,14 @@
return user.has_internal_radio_channel_access(internal_channels[freq])
/mob/proc/has_internal_radio_channel_access(var/list/req_one_accesses)
/mob/proc/has_internal_radio_channel_access(list/req_one_accesses)
var/obj/item/card/id/I = GetIdCard()
return has_access(list(), req_one_accesses, I ? I.GetAccess() : list())
/mob/observer/dead/has_internal_radio_channel_access(var/list/req_one_accesses)
/mob/observer/dead/has_internal_radio_channel_access(list/req_one_accesses)
return can_admin_interact()
/obj/item/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
/obj/item/radio/proc/text_sec_channel(chan_name, chan_stat)
var/list = !!(chan_stat&FREQ_LISTENING)!=0
return {"
<B>[chan_name]</B><br>
@@ -293,7 +293,7 @@
GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
/obj/item/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels, var/states)
/obj/item/radio/proc/autosay(message, from, channel, list/zlevels, states)
if(!GLOB.autospeaker)
return
@@ -335,7 +335,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
// If we were to send to a channel we don't have, drop it.
return RADIO_CONNECTION_FAIL
/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, var/verb = "says")
/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, verb = "says")
if(!on)
return FALSE // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
@@ -547,7 +547,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
filter_type, signal.data["compression"], using_map.get_map_levels(pos_z), connection.frequency, verb)
/obj/item/radio/hear_talk(mob/M as mob, list/message_pieces, var/verb = "says")
/obj/item/radio/hear_talk(mob/M as mob, list/message_pieces, verb = "says")
if(broadcasting)
if(get_dist(src, M) <= canhear_range)
talk_into(M, message_pieces, null, verb)
@@ -649,7 +649,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
myborg = null
return ..()
/obj/item/radio/borg/list_channels(var/mob/user)
/obj/item/radio/borg/list_channels(mob/user)
return list_secure_channels(user)
/obj/item/radio/borg/talk_into()
@@ -724,7 +724,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
controller_check(TRUE)
return
/obj/item/radio/borg/proc/controller_check(var/initial_run = FALSE)
/obj/item/radio/borg/proc/controller_check(initial_run = FALSE)
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
if(!SSradio && initial_run)
@@ -44,7 +44,7 @@
canhear_range = 1
item_flags = NOSTRIP
/obj/item/radio/bluespacehandset/linked/receive_range(var/freq, var/list/level)
/obj/item/radio/bluespacehandset/linked/receive_range(freq, list/level)
//Only care about megabroadcasts or things that are targeted at us
if(!(0 in level))
return -1
@@ -19,7 +19,7 @@
///Var for attack_self chain
var/special_handling = FALSE
/obj/item/analyzer/atmosanalyze(var/mob/user)
/obj/item/analyzer/atmosanalyze(mob/user)
var/air = user.return_air()
if (!air)
return
@@ -41,7 +41,7 @@
analyze_gases(src, user)
return
/obj/item/analyzer/afterattack(var/obj/O, var/mob/user, var/proximity)
/obj/item/analyzer/afterattack(obj/O, mob/user, proximity)
if(proximity)
analyze_gases(O, user)
return
@@ -12,7 +12,7 @@
guide = TRUE
icon_state = "health-g"
/obj/item/healthanalyzer/proc/guide(var/mob/living/carbon/human/M, mob/living/user)
/obj/item/healthanalyzer/proc/guide(mob/living/carbon/human/M, mob/living/user)
/* Enable this if you want non-medical users to be blocked from the guide. Kind of pointless, since the only ones that would really NEED the guide are non-medical users.
var/obj/item/card/id/ourid = user?.GetIdCard()
@@ -29,7 +29,7 @@
UnregisterSignal(SSmotiontracker, COMSIG_MOVABLE_MOTIONTRACKER)
. = ..()
/obj/item/motiontracker/proc/handle_motion_tracking(mob/source, var/datum/weakref/RW, var/turf/T)
/obj/item/motiontracker/proc/handle_motion_tracking(mob/source, datum/weakref/RW, turf/T)
SIGNAL_HANDLER
SHOULD_NOT_OVERRIDE(TRUE)
PRIVATE_PROC(TRUE)
@@ -350,7 +350,7 @@ GLOBAL_DATUM(sleevemate_mob, /mob/living/carbon/human/dummy/mannequin)
else
icon_state = initial(icon_state)
/obj/item/sleevemate/emag_act(var/remaining_charges, var/mob/user)
/obj/item/sleevemate/emag_act(remaining_charges, mob/user)
to_chat(user,span_danger("You hack [src]!"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
+2 -2
View File
@@ -178,11 +178,11 @@
return
. = ..()
/obj/item/bug_monitor/proc/unpair(var/obj/item/camerabug/SB)
/obj/item/bug_monitor/proc/unpair(obj/item/camerabug/SB)
if(SB.camera in cameras)
cameras -= SB.camera
/obj/item/bug_monitor/proc/pair(var/obj/item/camerabug/SB)
/obj/item/bug_monitor/proc/pair(obj/item/camerabug/SB)
cameras += SB.camera
/obj/item/bug_monitor/proc/view_cameras(mob/user)
@@ -116,7 +116,7 @@
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/suit_cooling_unit/proc/turn_off(var/failed)
/obj/item/suit_cooling_unit/proc/turn_off(failed)
if(failed) visible_message("\The [src] clicks and whines as it powers down.")
on = 0
STOP_PROCESSING(SSobj, src)
@@ -142,7 +142,7 @@
toggle(user)
/obj/item/suit_cooling_unit/proc/toggle(var/mob/user)
/obj/item/suit_cooling_unit/proc/toggle(mob/user)
if(on)
turn_off()
else
+3 -3
View File
@@ -29,7 +29,7 @@
return TRUE
set_active(!on)
/obj/item/t_scanner/proc/set_active(var/active)
/obj/item/t_scanner/proc/set_active(active)
on = active
if(on)
START_PROCESSING(SSobj, src)
@@ -102,7 +102,7 @@
if(GLOB.overlay_cache.len > overlay_cache_LEN)
GLOB.overlay_cache.Cut(1, GLOB.overlay_cache.len-overlay_cache_LEN-1)
/obj/item/t_scanner/proc/get_scanned_objects(var/scan_dist)
/obj/item/t_scanner/proc/get_scanned_objects(scan_dist)
. = list()
var/turf/center = get_turf(src.loc)
@@ -119,7 +119,7 @@
continue //if it's already visible don't need an overlay for it
. += O
/obj/item/t_scanner/proc/set_user_client(var/client/new_client)
/obj/item/t_scanner/proc/set_user_client(client/new_client)
if(new_client == user_client)
return
if(user_client)
@@ -96,7 +96,7 @@
mytape.record_speech("[voice] [verb], \"[msg]\"")
/obj/item/taperecorder/see_emote(mob/M as mob, text, var/emote_type)
/obj/item/taperecorder/see_emote(mob/M as mob, text, emote_type)
if(emote_type != 2) //only hearable emotes
return
if(mytape && recording)
@@ -114,7 +114,7 @@
if(mytape && recording)
mytape.record_noise("[strip_html_properly(recordedtext)]")
/obj/item/taperecorder/emag_act(var/remaining_charges, var/mob/user)
/obj/item/taperecorder/emag_act(remaining_charges, mob/user)
if(emagged == 0)
emagged = 1
recording = 0
@@ -120,7 +120,7 @@
update_icon()
add_fingerprint(ui.user)
/obj/item/transfer_valve/proc/process_activation(var/obj/item/D)
/obj/item/transfer_valve/proc/process_activation(obj/item/D)
if(toggle)
toggle = FALSE
toggle_valve()
@@ -100,7 +100,7 @@
/obj/item/perfect_tele/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
afterattack(M, user)
/obj/item/perfect_tele/proc/unload_ammo(mob/user, var/ignore_inactive_hand_check = 0)
/obj/item/perfect_tele/proc/unload_ammo(mob/user, ignore_inactive_hand_check = 0)
if(battery_lock)
to_chat(user,span_notice("[src] does not have a battery port."))
return
@@ -112,14 +112,14 @@
else
to_chat(user,span_notice("[src] does not have a power cell."))
/obj/item/perfect_tele/proc/check_menu(var/mob/living/user)
/obj/item/perfect_tele/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
if(user.incapacitated() || !user.Adjacent(src))
return FALSE
return TRUE
/obj/item/perfect_tele/attack_self(mob/user, list/modifiers, var/radial_menu_anchor = src)
/obj/item/perfect_tele/attack_self(mob/user, list/modifiers, radial_menu_anchor = src)
. = ..(user)
if(.)
return TRUE
@@ -353,7 +353,7 @@ This device records all warnings given and teleport events for admin review in c
logged_events["[world.time]"] = "[user] teleported [target] to [real_dest] [televored ? "(Belly: [lowertext(real_dest.name)])" : null]"
/obj/item/perfect_tele/proc/phase_out(var/mob/M,var/turf/T)
/obj/item/perfect_tele/proc/phase_out(mob/M,turf/T)
if(!M || !T)
return
@@ -363,7 +363,7 @@ This device records all warnings given and teleport events for admin review in c
playsound(T, "sparks", 50, 1)
anim(T,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
/obj/item/perfect_tele/proc/phase_in(var/mob/M,var/turf/T)
/obj/item/perfect_tele/proc/phase_in(mob/M,turf/T)
if(!M || !T)
return
@@ -484,7 +484,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
var/phase_power = 75
var/recharging = 0
/obj/item/perfect_tele/frontier/unload_ammo(mob/user, var/ignore_inactive_hand_check = 0)
/obj/item/perfect_tele/frontier/unload_ammo(mob/user, ignore_inactive_hand_check = 0)
if(recharging)
return
recharging = 1
+1 -1
View File
@@ -162,7 +162,7 @@
//Assembly by roboticist
/obj/item/robot_parts/head/attackby(var/obj/item/assembly/S, mob/user as mob)
/obj/item/robot_parts/head/attackby(obj/item/assembly/S, mob/user as mob)
if(!istype(S, /obj/item/assembly/infra))
..()
return
+2 -2
View File
@@ -31,7 +31,7 @@
. = ..()
addtimer(CALLBACK(src, PROC_REF(next_offer)), offer_time) //It seems like only the /hidden type actually makes use of this...
/obj/item/uplink/get_item_cost(var/item_type, var/item_cost)
/obj/item/uplink/get_item_cost(item_type, item_cost)
return (discount_item && (item_type == discount_item)) ? max(1, round(item_cost*discount_amount)) : item_cost
/obj/item/uplink/proc/next_offer()
@@ -82,7 +82,7 @@
// Checks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset.
// If true, it accesses trigger() and returns 1. If it fails, it returns false. Use this to see if you need to close the
// current item's menu.
/obj/item/uplink/hidden/proc/check_trigger(mob/user as mob, var/value, var/target)
/obj/item/uplink/hidden/proc/check_trigger(mob/user as mob, value, target)
if(value == target)
trigger(user)
return TRUE
@@ -7,7 +7,7 @@ GLOBAL_DATUM_INIT(all_uplink_selection, /datum/uplink_random_selection/all, new)
var/reselect_probability // Probability that we'll decide to keep this item if previously selected.
// Is done together with the keep_probability check. Being selected more than once does not affect this probability.
/datum/uplink_random_item/New(var/uplink_item, var/keep_probability = 100, var/reselect_propbability = 33)
/datum/uplink_random_item/New(uplink_item, keep_probability = 100, reselect_propbability = 33)
..()
src.uplink_item = uplink_item
src.keep_probability = keep_probability
@@ -22,7 +22,7 @@ GLOBAL_DATUM_INIT(all_uplink_selection, /datum/uplink_random_selection/all, new)
items = list()
all_items = list()
/datum/uplink_random_selection/proc/get_random_item(var/telecrystals, var/obj/item/uplink/U, var/list/bought_items, var/items_override = 0)
/datum/uplink_random_selection/proc/get_random_item(telecrystals, obj/item/uplink/U, list/bought_items, items_override = 0)
var/const/attempts = 50
for(var/i = 0; i < attempts; i++)
+1 -1
View File
@@ -335,7 +335,7 @@
return TRUE
return FALSE
/obj/item/vac_attachment/resolve_attackby(atom/A, mob/user, var/attack_modifier = 1, var/click_parameters)
/obj/item/vac_attachment/resolve_attackby(atom/A, mob/user, attack_modifier = 1, click_parameters)
if(istype(A,/obj/structure) && vac_power > 0)
afterattack(A.loc, user, click_parameters)
return TRUE
+1 -1
View File
@@ -54,7 +54,7 @@
spawn(20)
spamcheck = 0
/obj/item/hailer/emag_act(var/remaining_charges, var/mob/user)
/obj/item/hailer/emag_act(remaining_charges, mob/user)
if(isnull(insults))
to_chat(user, span_danger("You overload \the [src]'s voice synthesizer."))
insults = rand(1, 3)//to prevent dickflooding
@@ -30,7 +30,7 @@
. = ..()
icon_state = "[rand(1,33)]"
/obj/effect/illusionary_fall/end_fall(var/crushing = FALSE)
/obj/effect/illusionary_fall/end_fall(crushing = FALSE)
for(var/mob/living/L in loc)
var/target_zone = ran_zone()
var/blocked = L.run_armor_check(target_zone, "melee")
+1 -1
View File
@@ -36,7 +36,7 @@
addtimer(CALLBACK(dropped, TYPE_PROC_REF(/atom/movable,end_fall), crushing), 0.7 SECONDS)
qdel(src)
/atom/movable/proc/end_fall(var/crushing = FALSE)
/atom/movable/proc/end_fall(crushing = FALSE)
if(isliving(src))
var/mob/living/L = src
for(var/mob/living/P in loc)
+2 -2
View File
@@ -26,7 +26,7 @@
. = ..()
update_icon()
/obj/item/glass_jar/afterattack(var/atom/A, var/mob/user, var/proximity)
/obj/item/glass_jar/afterattack(atom/A, mob/user, proximity)
if(!proximity || contains)
return
if(can_fill && !filled)
@@ -110,7 +110,7 @@
update_icon()
return
/obj/item/glass_jar/attackby(var/obj/item/W, var/mob/user)
/obj/item/glass_jar/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/spacecash))
if(contains == JAR_NOTHING)
contains = JAR_MONEY
+1 -1
View File
@@ -266,7 +266,7 @@
to_chat(leash_pet, span_userdanger("You have been released!"))
clear_leash()
/obj/item/leash/proc/is_wearing_collar(var/mob/living/carbon/human/human)
/obj/item/leash/proc/is_wearing_collar(mob/living/carbon/human/human)
if (!istype(human))
return FALSE
for (var/obj/item/clothing/worn in human.worn_clothing)
+17 -17
View File
@@ -14,17 +14,17 @@
. = ..()
. += "It has [uses] use\s left."
/obj/item/kit/proc/use(var/amt, var/mob/user)
/obj/item/kit/proc/use(amt, mob/user)
uses -= amt
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
if(uses<1)
user.drop_item()
qdel(src)
/obj/item/kit/proc/can_customize(var/obj/item/I)
/obj/item/kit/proc/can_customize(obj/item/I)
return is_type_in_list(I, allowed_types)
/obj/item/kit/proc/set_info(var/kit_name, var/kit_desc, var/kit_icon, var/kit_icon_file = CUSTOM_ITEM_OBJ, var/kit_icon_override_file = CUSTOM_ITEM_MOB, var/additional_data)
/obj/item/kit/proc/set_info(kit_name, kit_desc, kit_icon, kit_icon_file = CUSTOM_ITEM_OBJ, kit_icon_override_file = CUSTOM_ITEM_MOB, additional_data)
new_name = kit_name
new_desc = kit_desc
new_icon = kit_icon
@@ -34,7 +34,7 @@
for(var/path in splittext(additional_data, ", "))
allowed_types |= text2path(path)
/obj/item/kit/proc/customize(var/obj/item/I, var/mob/user)
/obj/item/kit/proc/customize(obj/item/I, mob/user)
if(can_customize(I))
I.name = new_name ? new_name : I.name
I.desc = new_desc ? new_desc : I.desc
@@ -65,16 +65,16 @@
uses = 2
var/new_light_overlay
/obj/item/kit/suit/can_customize(var/obj/item/I)
/obj/item/kit/suit/can_customize(obj/item/I)
return istype(I, /obj/item/clothing/head/helmet/space/void) || istype(I, /obj/item/clothing/suit/space/void) || istype(I, /obj/item/clothing/suit/storage/hooded)
/obj/item/kit/suit/set_info(var/kit_name, var/kit_desc, var/kit_icon, var/kit_icon_file = CUSTOM_ITEM_OBJ, var/kit_icon_override_file = CUSTOM_ITEM_MOB, var/additional_data)
/obj/item/kit/suit/set_info(kit_name, kit_desc, kit_icon, kit_icon_file = CUSTOM_ITEM_OBJ, kit_icon_override_file = CUSTOM_ITEM_MOB, additional_data)
..()
new_light_overlay = additional_data
/obj/item/kit/suit/customize(var/obj/item/I, var/mob/user)
/obj/item/kit/suit/customize(obj/item/I, mob/user)
if(can_customize(I))
if(istype(I, /obj/item/clothing/head/helmet/space/void))
var/obj/item/clothing/head/helmet/space/void/helmet = I
@@ -126,21 +126,21 @@
suit.species_restricted = list(H.species.get_bodytype(H))
use(1,user)
/obj/item/clothing/head/helmet/space/void/attackby(var/obj/item/O, var/mob/user)
/obj/item/clothing/head/helmet/space/void/attackby(obj/item/O, mob/user)
if(istype(O,/obj/item/kit/suit))
var/obj/item/kit/suit/kit = O
kit.customize(src, user)
return
return ..()
/obj/item/clothing/suit/space/void/attackby(var/obj/item/O, var/mob/user)
/obj/item/clothing/suit/space/void/attackby(obj/item/O, mob/user)
if(istype(O,/obj/item/kit/suit))
var/obj/item/kit/suit/kit = O
kit.customize(src, user)
return
return ..()
/obj/item/clothing/suit/storage/hooded/attackby(var/obj/item/O, var/mob/user)
/obj/item/clothing/suit/storage/hooded/attackby(obj/item/O, mob/user)
if(istype(O,/obj/item/kit/suit))
var/obj/item/kit/suit/kit = O
kit.customize(src, user)
@@ -152,7 +152,7 @@
desc = "A kit for modifying a rigsuit."
uses = 1
/obj/item/kit/suit/rig/customize(var/obj/item/I, var/mob/user)
/obj/item/kit/suit/rig/customize(obj/item/I, mob/user)
var/obj/item/rig/RIG = I
RIG.suit_state = new_icon
RIG.item_state = new_icon
@@ -185,10 +185,10 @@
H.light_overlay = new_light_overlay
use(1,user)
/obj/item/kit/suit/rig/can_customize(var/obj/item/I)
/obj/item/kit/suit/rig/can_customize(obj/item/I)
return istype(I, /obj/item/rig)
/obj/item/rig/attackby(var/obj/item/O, var/mob/user)
/obj/item/rig/attackby(obj/item/O, mob/user)
if(istype(O,/obj/item/kit/suit))
var/obj/item/kit/suit/rig/kit = O
kit.customize(src, user)
@@ -204,7 +204,7 @@
desc = "A kit containing all the needed tools and parts to repaint a mech."
var/removable = null
/obj/item/kit/paint/can_customize(var/obj/mecha/M)
/obj/item/kit/paint/can_customize(obj/mecha/M)
if(!istype(M))
return 0
@@ -212,7 +212,7 @@
if(type == M.initial_icon)
return 1
/obj/item/kit/paint/set_info(var/kit_name, var/kit_desc, var/kit_icon, var/kit_icon_file = CUSTOM_ITEM_OBJ, var/kit_icon_override_file = CUSTOM_ITEM_MOB, var/additional_data)
/obj/item/kit/paint/set_info(kit_name, kit_desc, kit_icon, kit_icon_file = CUSTOM_ITEM_OBJ, kit_icon_override_file = CUSTOM_ITEM_MOB, additional_data)
..()
allowed_types = splittext(additional_data, ", ")
@@ -225,7 +225,7 @@
for(var/exotype in allowed_types)
. += "- [capitalize(exotype)]"
/obj/item/kit/paint/customize(var/obj/mecha/M, var/mob/user)
/obj/item/kit/paint/customize(obj/mecha/M, mob/user)
if(!can_customize(M))
to_chat(user, "That kit isn't meant for use on this class of exosuit.")
return
@@ -243,7 +243,7 @@
M.update_icon()
use(1, user)
/obj/mecha/attackby(var/obj/item/W, var/mob/user)
/obj/mecha/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/kit/paint))
var/obj/item/kit/paint/P = W
P.customize(src, user)
+1 -1
View File
@@ -13,7 +13,7 @@
var/able_to_unpetrify = TRUE
var/obj/machinery/petrification/linked
/obj/item/petrifier/Initialize(mapload, var/to_link)
/obj/item/petrifier/Initialize(mapload, to_link)
. = ..()
linked = to_link
+1 -1
View File
@@ -40,7 +40,7 @@
else
to_chat(user, span_warning("The [src] is spent!"))
/obj/item/pizzavoucher/emag_act(var/remaining_charges, var/mob/user)
/obj/item/pizzavoucher/emag_act(remaining_charges, mob/user)
if(spent)
to_chat(user, span_warning("The [src] is spent!"))
return
+1 -1
View File
@@ -287,7 +287,7 @@
to_chat(user, span_notice("You insert the flash into the eye socket!"))
/obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user)
/obj/item/robot_parts/emag_act(remaining_charges, mob/user)
if(sabotaged)
to_chat(user, span_warning("[src] is already sabotaged!"))
else
+2 -2
View File
@@ -79,7 +79,7 @@
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
/obj/item/target/bullet_act(obj/item/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
var/decaltype = 1 // 1 - scorch, 2 - bullet
@@ -160,7 +160,7 @@
var/b2y1 = 0
var/b2y2 = 0
/datum/bullethole/New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
if(!Target) return
// Randomize the first box
+1 -1
View File
@@ -22,7 +22,7 @@
create_reagents(5)
. = ..()
/obj/item/soap/proc/wet(var/cleaner = FALSE)
/obj/item/soap/proc/wet(cleaner = FALSE)
if(cleaner)
reagents.add_reagent(REAGENT_ID_CLEANER, 5)
else
@@ -4,7 +4,7 @@
var/recharge_rate = 2000
var/energy
/datum/matter_synth/New(var/store = 0)
/datum/matter_synth/New(store = 0)
if(store)
max_energy = store
energy = max_energy
@@ -13,13 +13,13 @@
/datum/matter_synth/proc/get_charge()
return energy
/datum/matter_synth/proc/use_charge(var/amount)
/datum/matter_synth/proc/use_charge(amount)
if (energy >= amount)
energy -= amount
return 1
return 0
/datum/matter_synth/proc/add_charge(var/amount)
/datum/matter_synth/proc/add_charge(amount)
energy = min(energy + amount, max_energy)
/datum/matter_synth/proc/emp_act(severity, recursive)
+1 -1
View File
@@ -69,7 +69,7 @@
M.updatehealth()
return ITEM_INTERACT_SUCCESS
/obj/item/stack/medical/proc/upgrade_stack(var/upgrade_amount)
/obj/item/stack/medical/proc/upgrade_stack(upgrade_amount)
. = FALSE
var/turf/T = get_turf(src)
+3 -3
View File
@@ -32,7 +32,7 @@
bag_material = MAT_SYNCLOTH
/obj/item/stack/sandbags/Initialize(mapload, var/amt, var/bag_mat)
/obj/item/stack/sandbags/Initialize(mapload, amt, bag_mat)
. = ..(mapload, amt)
recipes = GLOB.sandbag_recipes
update_icon()
@@ -48,7 +48,7 @@
slowdown = round(amount / 10, 0.1)
/obj/item/stack/sandbags/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user)
/obj/item/stack/sandbags/produce_recipe(datum/stack_recipe/recipe, quantity, mob/user)
var/required = quantity*recipe.req_amount
var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount)
@@ -130,7 +130,7 @@
var/bag_material = MAT_CLOTH
custom_handling = TRUE
/obj/item/stack/emptysandbag/Initialize(mapload, var/amt, var/bag_mat)
/obj/item/stack/emptysandbag/Initialize(mapload, amt, bag_mat)
. = ..(mapload, amt)
if(bag_mat)
bag_material = bag_mat
+8 -8
View File
@@ -34,7 +34,7 @@
var/beacons = FALSE
var/sandbags = FALSE
/obj/item/stack/Initialize(mapload, var/starting_amount)
/obj/item/stack/Initialize(mapload, starting_amount)
. = ..()
if(!stacktype)
stacktype = type
@@ -167,7 +167,7 @@
return FALSE
/obj/item/stack/proc/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user)
/obj/item/stack/proc/produce_recipe(datum/stack_recipe/recipe, quantity, mob/user)
var/required = quantity*recipe.req_amount
var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount)
@@ -258,7 +258,7 @@
//Return 1 if an immediate subsequent call to use() would succeed.
//Ensures that code dealing with stacks uses the same logic
/obj/item/stack/proc/can_use(var/used)
/obj/item/stack/proc/can_use(used)
if(used < 0 || (used != round(used)))
stack_trace("Tried to use a bad stack amount: [used]")
return 0
@@ -266,7 +266,7 @@
return 0
return 1
/obj/item/stack/proc/use(var/used)
/obj/item/stack/proc/use(used)
if(!can_use(used))
return 0
if(!uses_charge)
@@ -287,7 +287,7 @@
S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted
return 1
/obj/item/stack/proc/add(var/extra)
/obj/item/stack/proc/add(extra)
if(extra < 0 || (extra != round(extra)))
stack_trace("Tried to add a bad stack amount: [extra]")
return 0
@@ -305,7 +305,7 @@
var/datum/matter_synth/S = synths[i]
S.add_charge(charge_costs[i] * extra)
/obj/item/stack/proc/set_amount(var/new_amount, var/no_limits = FALSE)
/obj/item/stack/proc/set_amount(new_amount, no_limits = FALSE)
if(new_amount < 0 || (new_amount != round(new_amount)))
stack_trace("Tried to set a bad stack amount: [new_amount]")
return 0
@@ -333,7 +333,7 @@
*/
//attempts to transfer amount to S, and returns the amount actually transferred
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
/obj/item/stack/proc/transfer_to(obj/item/stack/S, tamount=null, type_verified)
if (!get_amount())
return 0
if ((stacktype != S.stacktype) && !type_verified)
@@ -360,7 +360,7 @@
return 0
//creates a new stack with the specified amount
/obj/item/stack/proc/split(var/tamount)
/obj/item/stack/proc/split(tamount)
if (!amount)
return null
if(uses_charge)
+1 -1
View File
@@ -29,7 +29,7 @@
return FALSE
return TRUE
/obj/item/stack/Crossed(var/atom/movable/AM)
/obj/item/stack/Crossed(atom/movable/AM)
if(istype(AM, src.type)) // Sanity so we don't try to merge non-stacks.
if(can_merge(AM))
merge(AM)
@@ -10,7 +10,7 @@
force = 1 //Needs a token force to ensure you can attack because for some reason you can't attack with 0 force things
custom_handling = TRUE
/obj/item/stack/telecrystal/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
/obj/item/stack/telecrystal/apply_hit_effect(mob/living/target, mob/living/user, hit_zone)
if(amount >= 5)
target.visible_message(span_warning("\The [target] has been transported with \the [src] by \the [user]."))
safe_blink(target, 14)
+1 -1
View File
@@ -71,7 +71,7 @@
* * opponent - (optional) the defender controller in the battle, for PvP
*/
/obj/item/toy/mecha/proc/combat_sleep(var/delay, obj/item/toy/mecha/attacker, mob/living/carbon/attacker_controller, mob/living/carbon/opponent)
/obj/item/toy/mecha/proc/combat_sleep(delay, obj/item/toy/mecha/attacker, mob/living/carbon/attacker_controller, mob/living/carbon/opponent)
if(!attacker_controller) // If the attacker for whatever reason is null, don't continue.
return FALSE
+1 -1
View File
@@ -1124,7 +1124,7 @@
icon_state = "monster_bait"
w_class = ITEMSIZE_SMALL
/obj/item/toy/monster_bait/afterattack(var/atom/A, var/mob/user)
/obj/item/toy/monster_bait/afterattack(atom/A, mob/user)
var/mob/living/simple_mob/M = A
if(M.z != user.z || get_dist(user,M) > 1)
to_chat(user, span_notice("You need to stand right next to \the [M] to bait it."))
+1 -1
View File
@@ -11,7 +11,7 @@
matter = list(MAT_STEEL = 30)
var/age = 0
/obj/item/trash/Initialize(mapload, var/_age)
/obj/item/trash/Initialize(mapload, _age)
. = ..()
if(!isnull(_age))
age = _age
+10 -10
View File
@@ -75,7 +75,7 @@
else if(health <= (initial(health)/2))
. += span_warning("It looks pretty beaten up...")
/obj/item/uav/attack_hand(var/mob/user)
/obj/item/uav/attack_hand(mob/user)
//Has to be on the ground to work with it properly
if(!isturf(loc))
return ..()
@@ -110,7 +110,7 @@
if(can_transition_to(state == UAV_PAIRING ? UAV_OFF : UAV_PAIRING, user))
return toggle_pairing(user)
/obj/item/uav/attackby(var/obj/item/I, var/mob/user)
/obj/item/uav/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/modular_computer) && state == UAV_PAIRING)
var/obj/item/modular_computer/MC = I
LAZYDISTINCTADD(MC.paired_uavs, WEAKREF(src))
@@ -146,7 +146,7 @@
else
return ..()
/obj/item/uav/proc/can_transition_to(var/new_state, var/mob/user)
/obj/item/uav/proc/can_transition_to(new_state, mob/user)
switch(state) //Current one
if(UAV_ON)
if(new_state == UAV_OFF || new_state == UAV_PACKED)
@@ -264,7 +264,7 @@
/obj/item/uav/get_cell()
return cell
/obj/item/uav/relaymove(var/mob/user, direction, signal = 1)
/obj/item/uav/relaymove(mob/user, direction, signal = 1)
if(signal && state == UAV_ON && (WEAKREF(user) in masters))
if(next_move <= world.time)
next_move = world.time + (1 SECOND/signal)
@@ -275,10 +275,10 @@
/obj/item/uav/proc/get_status_string()
return "[nickname] - [get_x(src)],[get_y(src)],[get_z(src)] - I:[health]/[initial(health)] - C:[cell ? "[cell.charge]/[cell.maxcharge]" : "Not Installed"]"
/obj/item/uav/proc/add_master(var/mob/living/M)
/obj/item/uav/proc/add_master(mob/living/M)
LAZYDISTINCTADD(masters, WEAKREF(M))
/obj/item/uav/proc/remove_master(var/mob/living/M)
/obj/item/uav/proc/remove_master(mob/living/M)
LAZYREMOVE(masters, WEAKREF(M))
/obj/item/uav/proc/start_hover()
@@ -301,7 +301,7 @@
ion_trail.stop()
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
/obj/item/uav/hear_talk(var/mob/M, list/message_pieces, verb)
/obj/item/uav/hear_talk(mob/M, list/message_pieces, verb)
var/name_used = M.GetVoice()
for(var/wr_master in masters)
var/datum/weakref/wr = wr_master
@@ -311,7 +311,7 @@
var/rendered = span_game(span_say(span_italics("UAV received: " + span_name("[name_used]") + " [message]")))
master.show_message(rendered, 2)
/obj/item/uav/see_emote(var/mob/living/M, text)
/obj/item/uav/see_emote(mob/living/M, text)
for(var/wr_master in masters)
var/datum/weakref/wr = wr_master
var/mob/master = wr.resolve()
@@ -325,12 +325,12 @@
var/rendered = span_game(span_say(span_italics("UAV received, " + span_message("[msg]"))))
master.show_message(rendered, type)
/obj/item/uav/take_damage(var/damage)
/obj/item/uav/take_damage(damage)
health -= damage
CheckHealth()
return
/obj/item/uav/attack_generic(var/mob/user, var/damage, var/attack_verb)
/obj/item/uav/attack_generic(mob/user, damage, attack_verb)
visible_message(span_danger("[user] [attack_verb] the [src]!"))
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
user.do_attack_animation(src)
+21 -21
View File
@@ -33,7 +33,7 @@ AI MODULES
else
. += span_infoplain("[law.get_index()]. [law.law]")
/obj/item/aiModule/proc/install(var/atom/movable/AM, var/mob/living/user)
/obj/item/aiModule/proc/install(atom/movable/AM, mob/living/user)
if(!user.IsAdvancedToolUser() && isanimal(user))
var/mob/living/simple_mob/S = user
if(!S.IsHumanoidToolUser(src))
@@ -114,7 +114,7 @@ AI MODULES
to_chat(R, span_notice("Law upload aborted."))
/obj/item/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
log_law_changes(target, sender)
if(laws)
@@ -125,12 +125,12 @@ AI MODULES
to_chat(target, "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
target.show_laws()
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/log_law_changes(mob/living/silicon/ai/target, mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
GLOB.lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
/******************** Modules ********************/
@@ -150,13 +150,13 @@ AI MODULES
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user)
/obj/item/aiModule/safeguard/install(obj/machinery/computer/C, mob/living/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/safeguard/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName)
target.add_supplied_law(9, law)
GLOB.lawchanges.Add("The law specified [targetName]")
@@ -177,13 +177,13 @@ AI MODULES
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
/obj/item/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user)
/obj/item/aiModule/oneHuman/install(obj/machinery/computer/C, mob/living/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
return ..()
/obj/item/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/oneHuman/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "Only [targetName] is an crew member."
to_chat(target, law)
target.add_supplied_law(16, law)
@@ -194,7 +194,7 @@ AI MODULES
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized.'" //made of gold
/obj/item/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/protectStation/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized."
target.add_supplied_law(10, law)
@@ -204,7 +204,7 @@ AI MODULES
name = "'PrototypeEngineOffline' AI Module"
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary.'"
/obj/item/aiModule/prototypeEngineOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/prototypeEngineOffline/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary."
target.add_supplied_law(11, law)
@@ -214,7 +214,7 @@ AI MODULES
name = "'TeleporterOffline' AI Module"
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member.'"
/obj/item/aiModule/teleporterOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/teleporterOffline/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member."
target.add_supplied_law(12, law)
@@ -224,7 +224,7 @@ AI MODULES
name = "\improper 'Quarantine' AI module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving.'"
/obj/item/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/quarantine/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving."
target.add_supplied_law(13, law)
@@ -234,7 +234,7 @@ AI MODULES
name = "\improper 'OxygenIsToxicToCrewMembers' AI module"
desc = "A 'OxygenIsToxicToCrewMembers' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'"
/obj/item/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/oxygen/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member."
target.add_supplied_law(14, law)
@@ -258,14 +258,14 @@ AI MODULES
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/freeform/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "[newFreeFormLaw]"
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
GLOB.lawchanges.Add("The law was '[newFreeFormLaw]'")
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
/obj/item/aiModule/freeform/install(obj/machinery/computer/C, mob/living/user)
if(!newFreeFormLaw)
to_chat(user, "No law detected on module, please create one.")
return 0
@@ -283,7 +283,7 @@ AI MODULES
. = ..()
laws = new using_map.default_law_type // Pull from loaded map
/obj/item/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/reset/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
@@ -300,7 +300,7 @@ AI MODULES
name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
/obj/item/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/purge/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
@@ -369,12 +369,12 @@ AI MODULES
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/freeformcore/addAdditionalLaws(mob/living/silicon/ai/target, mob/sender)
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'")
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
/obj/item/aiModule/freeformcore/install(obj/machinery/computer/C, mob/living/user)
if(!newFreeFormLaw)
to_chat(user, "No law detected on module, please create one.")
return 0
@@ -394,7 +394,7 @@ AI MODULES
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/syndicate/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
@@ -404,7 +404,7 @@ AI MODULES
target.add_ion_law(law)
target.show_laws()
/obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user)
/obj/item/aiModule/syndicate/install(obj/machinery/computer/C, mob/living/user)
if(!newFreeFormLaw)
to_chat(user, "No law detected on module, please create one.")
return 0

Some files were not shown because too many files have changed in this diff Show More