mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
Fixes proc arguments
This commit is contained in:
@@ -61,7 +61,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/proc/SetInitDirections()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/proc/safe_input(var/title, var/text, var/default_set)
|
||||
/obj/machinery/atmospherics/proc/safe_input(title, text, default_set)
|
||||
var/new_value = input(usr,text,title,default_set) as num
|
||||
if(usr.canUseTopic(src))
|
||||
return new_value
|
||||
@@ -86,13 +86,13 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/proc/icon_addintact(var/obj/machinery/atmospherics/node, var/connected)
|
||||
/obj/machinery/atmospherics/proc/icon_addintact(obj/machinery/atmospherics/node, connected)
|
||||
var/image/img = getpipeimage('icons/obj/atmospherics/binary_devices.dmi', "pipe_intact", get_dir(src,node), node.pipe_color)
|
||||
underlays += img
|
||||
|
||||
return connected | img.dir
|
||||
|
||||
/obj/machinery/atmospherics/proc/icon_addbroken(var/connected)
|
||||
/obj/machinery/atmospherics/proc/icon_addbroken(connected)
|
||||
var/unconnected = (~connected) & initialize_directions
|
||||
for(var/direction in cardinal)
|
||||
if(unconnected & direction)
|
||||
@@ -101,7 +101,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/update_icon()
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
|
||||
var/turf/T = get_turf(src)
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
@@ -138,7 +138,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
//Called when an atmospherics object is unwrenched while having a large pressure difference
|
||||
//with it's locs air contents.
|
||||
/obj/machinery/atmospherics/proc/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
/obj/machinery/atmospherics/proc/unsafe_pressure_release(mob/user,pressures)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
@@ -165,7 +165,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/proc/nullifyPipenet(datum/pipeline/P)
|
||||
P.other_atmosmch -= src
|
||||
|
||||
/obj/machinery/atmospherics/proc/getpipeimage(var/iconset, var/iconstate, var/direction, var/col=rgb(255,255,255))
|
||||
/obj/machinery/atmospherics/proc/getpipeimage(iconset, iconstate, direction, col=rgb(255,255,255))
|
||||
|
||||
//Add identifiers for the iconset
|
||||
if(iconsetids[iconset] == null)
|
||||
@@ -186,7 +186,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
return img
|
||||
|
||||
/obj/machinery/atmospherics/construction(D, P, var/pipe_type, var/obj_color)
|
||||
/obj/machinery/atmospherics/construction(D, P, pipe_type, obj_color)
|
||||
dir = D
|
||||
initialize_directions = P
|
||||
if(can_unwrench)
|
||||
@@ -212,7 +212,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
|
||||
//Find a connecting /obj/machinery/atmospherics in specified direction
|
||||
/obj/machinery/atmospherics/proc/findConnecting(var/direction)
|
||||
/obj/machinery/atmospherics/proc/findConnecting(direction)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
return target
|
||||
@@ -220,7 +220,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
#define VENT_SOUND_DELAY 30
|
||||
|
||||
/obj/machinery/atmospherics/relaymove(var/mob/living/user, var/direction)
|
||||
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
|
||||
if(!(direction & initialize_directions)) //cant go this way.
|
||||
return
|
||||
|
||||
@@ -248,7 +248,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
user.canmove = 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/AltClick(var/mob/living/L)
|
||||
/obj/machinery/atmospherics/AltClick(mob/living/L)
|
||||
if(is_type_in_list(src, ventcrawl_machinery))
|
||||
L.handle_ventcrawl(src)
|
||||
return
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
parent2 = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
/obj/machinery/atmospherics/binary/unsafe_pressure_release(mob/user,pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -144,7 +144,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -178,7 +178,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (on)
|
||||
|
||||
@@ -97,7 +97,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
@@ -148,7 +148,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -180,7 +180,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
|
||||
@@ -93,7 +93,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
@@ -143,7 +143,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -177,7 +177,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
|
||||
@@ -142,7 +142,7 @@ Filter types:
|
||||
set_frequency(frequency)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/trinary/filter/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -152,7 +152,7 @@ Filter types:
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/trinary/mixer/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
|
||||
@@ -45,13 +45,13 @@ Iconnery
|
||||
/obj/machinery/atmospherics/trinary/proc/update_icon_nopipes()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/trinary/icon_addintact(var/obj/machinery/atmospherics/node, var/connected)
|
||||
/obj/machinery/atmospherics/trinary/icon_addintact(obj/machinery/atmospherics/node, connected)
|
||||
var/image/img = getpipeimage('icons/obj/atmospherics/trinary_devices.dmi', "intact", get_dir(src,node), node.pipe_color)
|
||||
overlays += img
|
||||
|
||||
return connected | img.dir
|
||||
|
||||
/obj/machinery/atmospherics/trinary/icon_addbroken(var/connected)
|
||||
/obj/machinery/atmospherics/trinary/icon_addbroken(connected)
|
||||
var/unconnected = (~connected) & initialize_directions
|
||||
for(var/direction in cardinal)
|
||||
if(unconnected & direction)
|
||||
@@ -222,7 +222,7 @@ Housekeeping and pipe network stuff below
|
||||
parent3 = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
/obj/machinery/atmospherics/trinary/unsafe_pressure_release(mob/user,pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -120,7 +120,7 @@ Housekeeping and pipe network stuff below
|
||||
parent = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
/obj/machinery/atmospherics/unary/unsafe_pressure_release(mob/user,pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
stat |= NOPOWER
|
||||
update_icon_nopipes()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
if(node3)
|
||||
overlays += getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src,node3))
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hide(var/i)
|
||||
/obj/machinery/atmospherics/pipe/manifold/hide(i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hide(var/i)
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hide(i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
@@ -104,7 +104,7 @@ The regular pipe you see everywhere, including bent ones.
|
||||
var/have_node2 = node2?1:0
|
||||
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hide(var/i)
|
||||
/obj/machinery/atmospherics/pipe/simple/hide(i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/turf/proc/CanAtmosPass(var/turf/T)
|
||||
/turf/proc/CanAtmosPass(turf/T)
|
||||
if(!istype(T)) return 0
|
||||
var/R
|
||||
if(blocks_air || T.blocks_air)
|
||||
@@ -79,23 +79,23 @@
|
||||
T.atmos_adjacent_turfs_amount -= 1
|
||||
T.atmos_adjacent_turfs &= ~counterdir
|
||||
|
||||
/atom/movable/proc/air_update_turf(var/command = 0)
|
||||
/atom/movable/proc/air_update_turf(command = 0)
|
||||
if(!istype(loc,/turf) && command)
|
||||
return
|
||||
var/turf/T = get_turf(loc)
|
||||
T.air_update_turf(command)
|
||||
|
||||
/turf/proc/air_update_turf(var/command = 0)
|
||||
/turf/proc/air_update_turf(command = 0)
|
||||
if(command)
|
||||
CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(src,command)
|
||||
|
||||
/atom/movable/proc/move_update_air(var/turf/T)
|
||||
/atom/movable/proc/move_update_air(turf/T)
|
||||
if(istype(T,/turf))
|
||||
T.air_update_turf(1)
|
||||
air_update_turf(1)
|
||||
|
||||
/atom/movable/proc/atmos_spawn_air(var/text, var/amount) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires
|
||||
/atom/movable/proc/atmos_spawn_air(text, amount) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
@@ -112,7 +112,7 @@ var/const/SPAWN_N2O = 64
|
||||
|
||||
var/const/SPAWN_AIR = 256
|
||||
|
||||
/turf/simulated/proc/atmos_spawn_air(var/flag, var/amount)
|
||||
/turf/simulated/proc/atmos_spawn_air(flag, amount)
|
||||
if(!text || !amount || !air)
|
||||
return
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
if("sleeping_agent")
|
||||
overlays += SSair.sleeptoxin_overlay
|
||||
|
||||
/turf/simulated/proc/share_air(var/turf/simulated/T)
|
||||
/turf/simulated/proc/share_air(turf/simulated/T)
|
||||
if(T.current_cycle < current_cycle)
|
||||
var/difference
|
||||
difference = air.share(T.air, atmos_adjacent_turfs_amount)
|
||||
@@ -251,7 +251,7 @@
|
||||
T.consider_pressure_difference(src, difference)
|
||||
last_share_check()
|
||||
|
||||
/turf/proc/consider_pressure_difference(var/turf/simulated/T, var/difference)
|
||||
/turf/proc/consider_pressure_difference(turf/simulated/T, difference)
|
||||
SSair.high_pressure_delta |= src
|
||||
if(difference > pressure_difference)
|
||||
pressure_direction = get_dir(src, T)
|
||||
@@ -284,13 +284,13 @@
|
||||
/datum/excited_group/New()
|
||||
SSair.excited_groups += src
|
||||
|
||||
/datum/excited_group/proc/add_turf(var/turf/simulated/T)
|
||||
/datum/excited_group/proc/add_turf(turf/simulated/T)
|
||||
turf_list += T
|
||||
T.excited_group = src
|
||||
T.recently_active = 1
|
||||
reset_cooldowns()
|
||||
|
||||
/datum/excited_group/proc/merge_groups(var/datum/excited_group/E)
|
||||
/datum/excited_group/proc/merge_groups(datum/excited_group/E)
|
||||
if(turf_list.len > E.turf_list.len)
|
||||
SSair.excited_groups -= E
|
||||
for(var/turf/simulated/T in E.turf_list)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// Like view but bypasses luminosity check
|
||||
|
||||
/proc/get_hear(var/range, var/atom/source)
|
||||
/proc/get_hear(range, atom/source)
|
||||
|
||||
var/lum = source.luminosity
|
||||
source.luminosity = 6
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
return heard
|
||||
|
||||
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
|
||||
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
|
||||
var/area/our_area = get_area_master(the_area)
|
||||
for(var/C in living_mob_list)
|
||||
if(!istype(C, check_type))
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
//This is the new version of recursive_mob_check, used for say().
|
||||
//The other proc was left intact because morgue trays use it.
|
||||
/proc/recursive_hear_check(var/atom/O)
|
||||
/proc/recursive_hear_check(atom/O)
|
||||
var/list/processing_list = list(O)
|
||||
var/list/processed_list = list()
|
||||
var/list/found_atoms = list()
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
// Better recursive loop, technically sort of not actually recursive cause that shit is retarded, enjoy.
|
||||
//No need for a recursive limit either
|
||||
/proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/include_radio=1)
|
||||
/proc/recursive_mob_check(atom/O,client_check=1,sight_check=1,include_radio=1)
|
||||
|
||||
var/list/processing_list = list(O)
|
||||
var/list/processed_list = list()
|
||||
@@ -187,7 +187,7 @@
|
||||
return found_mobs
|
||||
|
||||
|
||||
/proc/get_hearers_in_view(var/R, var/atom/source)
|
||||
/proc/get_hearers_in_view(R, atom/source)
|
||||
// Returns a list of hearers in view(R) from source (ignoring luminosity). Used in saycode.
|
||||
var/turf/T = get_turf(source)
|
||||
var/list/hear = list()
|
||||
@@ -202,7 +202,7 @@
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
|
||||
/proc/get_mobs_in_radio_ranges(list/obj/item/device/radio/radios)
|
||||
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
#undef SIGN
|
||||
|
||||
|
||||
/proc/isInSight(var/atom/A, var/atom/B)
|
||||
/proc/isInSight(atom/A, atom/B)
|
||||
var/turf/Aturf = get_turf(A)
|
||||
var/turf/Bturf = get_turf(B)
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
if(AM.Move(get_step(T, direction)))
|
||||
break
|
||||
|
||||
/proc/get_mob_by_key(var/key)
|
||||
/proc/get_mob_by_key(key)
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.ckey == lowertext(key))
|
||||
return M
|
||||
@@ -363,7 +363,7 @@
|
||||
src.dest_x = dest_x
|
||||
src.dest_y = dest_y
|
||||
|
||||
/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power)
|
||||
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
|
||||
|
||||
// returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle],
|
||||
// rotated at [rotation] and with the power of [power]
|
||||
|
||||
@@ -870,7 +870,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
//Find's the average colour of the icon
|
||||
//By vg's ComicIronic
|
||||
/proc/AverageColour(var/icon/I)
|
||||
/proc/AverageColour(icon/I)
|
||||
var/list/colours = list()
|
||||
for(var/x_pixel = 1 to I.Width())
|
||||
for(var/y_pixel = 1 to I.Height())
|
||||
@@ -889,7 +889,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
//Interface for using DrawBox() to draw 1 pixel on a coordinate.
|
||||
//Returns the same icon specifed in the argument, but with the pixel drawn
|
||||
/proc/DrawPixel(var/icon/I,var/colour,var/drawX,var/drawY)
|
||||
/proc/DrawPixel(icon/I,colour,drawX,drawY)
|
||||
if(!I)
|
||||
return 0
|
||||
|
||||
@@ -906,7 +906,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
|
||||
//Interface for easy drawing of one pixel on an atom.
|
||||
/atom/proc/DrawPixelOn(var/colour, var/drawX, var/drawY)
|
||||
/atom/proc/DrawPixelOn(colour, drawX, drawY)
|
||||
var/icon/I = new(icon)
|
||||
var/icon/J = DrawPixel(I, colour, drawX, drawY)
|
||||
if(J) //Only set the icon if it succeeded, the icon without the pixel is 1000x better than a black square.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return "[nothing_text]"
|
||||
@@ -57,7 +57,7 @@
|
||||
return 0
|
||||
|
||||
//Checks for specific types in a list
|
||||
/proc/is_type_in_list(var/atom/A, var/list/L)
|
||||
/proc/is_type_in_list(atom/A, list/L)
|
||||
for(var/type in L)
|
||||
if(istype(A, type))
|
||||
return 1
|
||||
@@ -84,7 +84,7 @@
|
||||
* If skiprep = 1, repeated elements are treated as one.
|
||||
* If either of arguments is not a list, returns null
|
||||
*/
|
||||
/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
|
||||
/proc/difflist(list/first, list/second, skiprep=0)
|
||||
if(!islist(first) || !islist(second))
|
||||
return
|
||||
var/list/result = new
|
||||
@@ -101,7 +101,7 @@
|
||||
* If skipref = 1, repeated elements are treated as one.
|
||||
* If either of arguments is not a list, returns null
|
||||
*/
|
||||
/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
|
||||
/proc/uniquemergelist(list/first, list/second, skiprep=0)
|
||||
if(!islist(first) || !islist(second))
|
||||
return
|
||||
var/list/result = new
|
||||
@@ -148,7 +148,7 @@
|
||||
L.Insert(pos+1, thing)
|
||||
|
||||
// Returns the next item in a list
|
||||
/proc/next_list_item(var/item, var/list/L)
|
||||
/proc/next_list_item(item, list/L)
|
||||
var/i
|
||||
i = L.Find(item)
|
||||
if(i == L.len)
|
||||
@@ -158,7 +158,7 @@
|
||||
return L[i]
|
||||
|
||||
// Returns the previous item in a list
|
||||
/proc/previous_list_item(var/item, var/list/L)
|
||||
/proc/previous_list_item(item, list/L)
|
||||
var/i
|
||||
i = L.Find(item)
|
||||
if(i == 1)
|
||||
@@ -172,7 +172,7 @@
|
||||
*/
|
||||
/*
|
||||
//Reverses the order of items in the list
|
||||
/proc/reverselist(var/list/input)
|
||||
/proc/reverselist(list/input)
|
||||
var/list/output = list()
|
||||
for(var/i = input.len; i >= 1; i--)
|
||||
output += input[i]
|
||||
@@ -180,7 +180,7 @@
|
||||
*/
|
||||
|
||||
//Randomize: Return the list in a random order
|
||||
/proc/shuffle(var/list/L)
|
||||
/proc/shuffle(list/L)
|
||||
if(!L)
|
||||
return
|
||||
L = L.Copy()
|
||||
@@ -191,7 +191,7 @@
|
||||
return L
|
||||
|
||||
//Return a list with no duplicate entries
|
||||
/proc/uniqueList(var/list/L)
|
||||
/proc/uniqueList(list/L)
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
. |= i
|
||||
@@ -206,11 +206,11 @@
|
||||
return sortTim(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)
|
||||
|
||||
//any value in a list
|
||||
/proc/sortList(var/list/L, cmp=/proc/cmp_text_asc)
|
||||
/proc/sortList(list/L, cmp=/proc/cmp_text_asc)
|
||||
return sortTim(L.Copy(), cmp)
|
||||
|
||||
//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
|
||||
/proc/sortNames(var/list/L, order=1)
|
||||
/proc/sortNames(list/L, order=1)
|
||||
return sortTim(L, order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
return r
|
||||
|
||||
// Returns the key based on the index
|
||||
/proc/get_key_by_index(var/list/L, var/index)
|
||||
/proc/get_key_by_index(list/L, index)
|
||||
var/i = 1
|
||||
for(var/key in L)
|
||||
if(index == i)
|
||||
@@ -240,7 +240,7 @@
|
||||
i++
|
||||
return null
|
||||
|
||||
/proc/count_by_type(var/list/L, type)
|
||||
/proc/count_by_type(list/L, type)
|
||||
var/i = 0
|
||||
for(var/T in L)
|
||||
if(istype(T, type))
|
||||
|
||||
@@ -129,7 +129,7 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
|
||||
|
||||
//A logarithm that converts an integer to a number scaled between 0 and 1 (can be tweaked to be higher).
|
||||
//Currently, this is used for hydroponics-produce sprite transforming, but could be useful for other transform functions.
|
||||
/proc/TransformUsingVariable(var/input, var/inputmaximum, var/scaling_modifier = 0)
|
||||
/proc/TransformUsingVariable(input, inputmaximum, scaling_modifier = 0)
|
||||
|
||||
var/inputToDegrees = (input/inputmaximum)*180 //Converting from a 0 -> 100 scale to a 0 -> 180 scale. The 0 -> 180 scale corresponds to degrees
|
||||
var/size_factor = ((-cos(inputToDegrees) +1) /2) //returns a value from 0 to 1
|
||||
|
||||
@@ -128,7 +128,7 @@ Proc for attack log creation, because really why not
|
||||
6 is additional information, anything that needs to be added
|
||||
*/
|
||||
|
||||
/proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=null)
|
||||
/proc/add_logs(mob/user, mob/target, what_done, object=null, addition=null)
|
||||
var/newhealthtxt = ""
|
||||
if (target && isliving(target))
|
||||
var/mob/living/L = target
|
||||
|
||||
@@ -32,7 +32,7 @@ var/command_name = null
|
||||
command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(var/name)
|
||||
/proc/change_command_name(name)
|
||||
|
||||
command_name = name
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
*/
|
||||
|
||||
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
|
||||
/proc/sanitizeSQL(var/t as text)
|
||||
/proc/sanitizeSQL(t as text)
|
||||
var/sqltext = dbcon.Quote(t);
|
||||
return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that
|
||||
|
||||
/proc/format_table_name(var/table as text)
|
||||
/proc/format_table_name(table as text)
|
||||
return sqlfdbktableprefix + table
|
||||
|
||||
/*
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/strip_html_simple(t,limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
t = copytext(t,1,limit)
|
||||
for(var/char in strip_chars)
|
||||
@@ -37,7 +37,7 @@
|
||||
return t
|
||||
|
||||
//Removes a few problematic characters
|
||||
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
/proc/sanitize_simple(t,list/repl_chars = list("\n"="#","\t"="#"))
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
@@ -46,22 +46,22 @@
|
||||
return t
|
||||
|
||||
//Runs byond's sanitization proc along-side sanitize_simple
|
||||
/proc/sanitize(var/t,var/list/repl_chars = null)
|
||||
/proc/sanitize(t,list/repl_chars = null)
|
||||
return html_encode(sanitize_simple(t,repl_chars))
|
||||
|
||||
//Runs sanitize and strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode()
|
||||
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/strip_html(t,limit=MAX_MESSAGE_LEN)
|
||||
return copytext((sanitize(strip_html_simple(t))),1,limit)
|
||||
|
||||
//Runs byond's sanitization proc along-side strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause
|
||||
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/adminscrub(t,limit=MAX_MESSAGE_LEN)
|
||||
return copytext((html_encode(strip_html_simple(t))),1,limit)
|
||||
|
||||
|
||||
//Returns null if there is any bad text in the string
|
||||
/proc/reject_bad_text(var/text, var/max_length=512)
|
||||
/proc/reject_bad_text(text, max_length=512)
|
||||
if(length(text) > max_length) return //message too long
|
||||
var/non_whitespace = 0
|
||||
for(var/i=1, i<=length(text), i++)
|
||||
@@ -74,17 +74,17 @@
|
||||
if(non_whitespace) return text //only accepts the text if it has some non-spaces
|
||||
|
||||
// Used to get a properly sanitized input, of max_length
|
||||
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default) as text|null
|
||||
return html_encode(trim(name, max_length)) //trim is "inside" because html_encode can expand single symbols into multiple symbols (such as turning < into <)
|
||||
|
||||
// Used to get a properly sanitized multiline input, of max_length
|
||||
/proc/stripped_multiline_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
return html_encode(trim(name, max_length))
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN)
|
||||
if(!t_in || length(t_in) > max_length)
|
||||
return //Rejects the input if it is null or if it is longer then the max length allowed
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
//html_encode helper proc that returns the smallest non null of two numbers
|
||||
//or 0 if they're both null (needed because of findtext returning 0 when a value is not present)
|
||||
/proc/non_zero_min(var/a, var/b)
|
||||
/proc/non_zero_min(a, b)
|
||||
if(!a)
|
||||
return b
|
||||
if(!b)
|
||||
@@ -239,7 +239,7 @@
|
||||
return trim_left(trim_right(text))
|
||||
|
||||
//Returns a string with the first element of the string capitalized.
|
||||
/proc/capitalize(var/t as text)
|
||||
/proc/capitalize(t as text)
|
||||
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
||||
|
||||
//Centers text by adding spaces to either side of the string.
|
||||
@@ -267,7 +267,7 @@
|
||||
return copytext(message, 1, length + 1)
|
||||
|
||||
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
/proc/stringmerge(text,compare,replace = "*")
|
||||
//This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
@@ -288,7 +288,7 @@
|
||||
return 0
|
||||
return newtext
|
||||
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
/proc/stringpercent(text,character = "*")
|
||||
//This proc returns the number of chars of the string that is the character
|
||||
//This is used for detective work to determine fingerprint completion.
|
||||
if(!text || !character)
|
||||
@@ -300,7 +300,7 @@
|
||||
count++
|
||||
return count
|
||||
|
||||
/proc/reverse_text(var/text = "")
|
||||
/proc/reverse_text(text = "")
|
||||
var/new_text = ""
|
||||
for(var/i = length(text); i > 0; i--)
|
||||
new_text += copytext(text, i, i+1)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
/proc/worldtime2text()
|
||||
return gameTimestamp("hh:mm")
|
||||
|
||||
/proc/time_stamp(var/format = "hh:mm:ss")
|
||||
/proc/time_stamp(format = "hh:mm:ss")
|
||||
return time2text(world.timeofday, format)
|
||||
|
||||
/proc/gameTimestamp(var/format = "hh:mm:ss") // Get the game time in text
|
||||
/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text
|
||||
return time2text(world.time - timezoneOffset + 432000, format)
|
||||
|
||||
/* Preserving this so future generations can see how fucking retarded some people are
|
||||
@@ -23,7 +23,7 @@ proc/time_stamp()
|
||||
*/
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
/proc/isDay(var/month, var/day)
|
||||
/proc/isDay(month, day)
|
||||
if(isnum(month) && isnum(day))
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
return
|
||||
|
||||
//Converts an angle (degrees) into an ss13 direction
|
||||
/proc/angle2dir(var/degree)
|
||||
/proc/angle2dir(degree)
|
||||
|
||||
degree = SimplifyDegrees(degree)
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
/proc/dir2angle(D)
|
||||
switch(D)
|
||||
if(NORTH) return 0
|
||||
if(SOUTH) return 180
|
||||
@@ -263,7 +263,7 @@
|
||||
else return null
|
||||
|
||||
//Returns the angle in english
|
||||
/proc/angle2text(var/degree)
|
||||
/proc/angle2text(degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
//Converts a blend_mode constant to one acceptable to icon.Blend()
|
||||
@@ -460,7 +460,7 @@ for(var/t in test_times)
|
||||
|
||||
//Turns a Body_parts_covered bitfield into a list of organ/limb names.
|
||||
//(I challenge you to find a use for this)
|
||||
/proc/body_parts_covered2organ_names(var/bpc)
|
||||
/proc/body_parts_covered2organ_names(bpc)
|
||||
var/list/covered_parts = list()
|
||||
|
||||
if(!bpc)
|
||||
@@ -544,7 +544,7 @@ for(var/t in test_times)
|
||||
else
|
||||
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
|
||||
|
||||
/proc/color2hex(var/color) //web colors
|
||||
/proc/color2hex(color) //web colors
|
||||
if(!color)
|
||||
return "#000000"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return
|
||||
|
||||
//Returns the middle-most value
|
||||
/proc/dd_range(var/low, var/high, var/num)
|
||||
/proc/dd_range(low, high, num)
|
||||
return max(low,min(high,num))
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return 1
|
||||
|
||||
//Ensure the frequency is within bounds of what it should be sending/recieving at
|
||||
/proc/sanitize_frequency(var/f)
|
||||
/proc/sanitize_frequency(f)
|
||||
f = round(f)
|
||||
f = max(1441, f) // 144.1
|
||||
f = min(1489, f) // 148.9
|
||||
@@ -192,7 +192,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return f
|
||||
|
||||
//Turns 1479 into 147.9
|
||||
/proc/format_frequency(var/f)
|
||||
/proc/format_frequency(f)
|
||||
f = text2num(f)
|
||||
return "[round(f / 10)].[f % 10]"
|
||||
|
||||
@@ -200,7 +200,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//This will update a mob's name, real_name, mind.name, data_core records, pda, id and traitor text
|
||||
//Calling this proc without an oldname will only update the mob and skip updating the pda, id and records ~Carn
|
||||
/mob/proc/fully_replace_character_name(var/oldname,var/newname)
|
||||
/mob/proc/fully_replace_character_name(oldname,newname)
|
||||
if(!newname) return 0
|
||||
real_name = newname
|
||||
name = newname
|
||||
@@ -273,7 +273,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
|
||||
|
||||
/mob/proc/rename_self(var/role, var/allow_numbers=0)
|
||||
/mob/proc/rename_self(role, allow_numbers=0)
|
||||
var/oldname = real_name
|
||||
var/newname
|
||||
var/loop = 1
|
||||
@@ -329,7 +329,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
. += R
|
||||
|
||||
//Returns a list of AI's
|
||||
/proc/active_ais(var/check_mind=0)
|
||||
/proc/active_ais(check_mind=0)
|
||||
. = list()
|
||||
for(var/mob/living/silicon/ai/A in living_mob_list)
|
||||
if(A.stat == DEAD)
|
||||
@@ -352,14 +352,14 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return selected
|
||||
|
||||
/proc/select_active_free_borg(var/mob/user)
|
||||
/proc/select_active_free_borg(mob/user)
|
||||
var/list/borgs = active_free_borgs()
|
||||
if(borgs.len)
|
||||
if(user) . = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs
|
||||
else . = pick(borgs)
|
||||
return .
|
||||
|
||||
/proc/select_active_ai(var/mob/user)
|
||||
/proc/select_active_ai(mob/user)
|
||||
var/list/ais = active_ais()
|
||||
if(ais.len)
|
||||
if(user) . = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais
|
||||
@@ -427,16 +427,16 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return moblist
|
||||
|
||||
//E = MC^2
|
||||
/proc/convert2energy(var/M)
|
||||
/proc/convert2energy(M)
|
||||
var/E = M*(SPEED_OF_LIGHT_SQ)
|
||||
return E
|
||||
|
||||
//M = E/C^2
|
||||
/proc/convert2mass(var/E)
|
||||
/proc/convert2mass(E)
|
||||
var/M = E/(SPEED_OF_LIGHT_SQ)
|
||||
return M
|
||||
|
||||
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
|
||||
/proc/key_name(whom, include_link = null, include_name = 1)
|
||||
var/mob/M
|
||||
var/client/C
|
||||
var/key
|
||||
@@ -492,10 +492,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return .
|
||||
|
||||
/proc/key_name_admin(var/whom, var/include_name = 1)
|
||||
/proc/key_name_admin(whom, include_name = 1)
|
||||
return key_name(whom, 1, include_name)
|
||||
|
||||
/proc/get_mob_by_ckey(var/key)
|
||||
/proc/get_mob_by_ckey(key)
|
||||
if(!key)
|
||||
return
|
||||
var/list/mobs = sortmobs()
|
||||
@@ -505,7 +505,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
// Returns the atom sitting on the turf.
|
||||
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
|
||||
/proc/get_atom_on_turf(var/atom/movable/M)
|
||||
/proc/get_atom_on_turf(atom/movable/M)
|
||||
var/atom/loc = M
|
||||
while(loc && loc.loc && !istype(loc.loc, /turf/))
|
||||
loc = loc.loc
|
||||
@@ -513,7 +513,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
// returns the turf located at the map edge in the specified direction relative to A
|
||||
// used for mass driver
|
||||
/proc/get_edge_target_turf(var/atom/A, var/direction)
|
||||
/proc/get_edge_target_turf(atom/A, direction)
|
||||
|
||||
var/turf/target = locate(A.x, A.y, A.z)
|
||||
if(!A || !target)
|
||||
@@ -537,7 +537,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
// result is bounded to map size
|
||||
// note range is non-pythagorean
|
||||
// used for disposal system
|
||||
/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range)
|
||||
/proc/get_ranged_target_turf(atom/A, direction, range)
|
||||
|
||||
var/x = A.x
|
||||
var/y = A.y
|
||||
@@ -555,7 +555,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
// returns turf relative to A offset in dx and dy tiles
|
||||
// bound to map limits
|
||||
/proc/get_offset_target_turf(var/atom/A, var/dx, var/dy)
|
||||
/proc/get_offset_target_turf(atom/A, dx, dy)
|
||||
var/x = min(world.maxx, max(1, A.x + dx))
|
||||
var/y = min(world.maxy, max(1, A.y + dy))
|
||||
return locate(x,y,A.z)
|
||||
@@ -565,7 +565,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return y
|
||||
|
||||
|
||||
/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
/proc/anim(turf/location,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
//The variables should be apparent enough.
|
||||
var/atom/movable/overlay/animation = new(location)
|
||||
@@ -623,7 +623,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
|
||||
//Step-towards method of determining whether one atom can see another. Similar to viewers()
|
||||
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
|
||||
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
|
||||
var/turf/current = get_turf(source)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
var/steps = 0
|
||||
@@ -638,7 +638,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return 1
|
||||
|
||||
/proc/is_blocked_turf(var/turf/T)
|
||||
/proc/is_blocked_turf(turf/T)
|
||||
var/cant_pass = 0
|
||||
if(T.density) cant_pass = 1
|
||||
for(var/atom/A in T)
|
||||
@@ -646,7 +646,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
cant_pass = 1
|
||||
return cant_pass
|
||||
|
||||
/proc/get_step_towards2(var/atom/ref , var/atom/trg)
|
||||
/proc/get_step_towards2(atom/ref , atom/trg)
|
||||
var/base_dir = get_dir(ref, get_step_towards(ref,trg))
|
||||
var/turf/temp = get_step_towards(ref,trg)
|
||||
|
||||
@@ -674,7 +674,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
else return get_step(ref, base_dir)
|
||||
|
||||
/proc/do_mob(var/mob/user , var/mob/target, var/time = 30, numticks = 5, var/stealth = 0) //This is quite an ugly solution but i refuse to use the old request system.
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, numticks = 5, stealth = 0) //This is quite an ugly solution but i refuse to use the old request system.
|
||||
if(!user || !target)
|
||||
return 0
|
||||
if(numticks == 0)
|
||||
@@ -703,7 +703,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
user.client.images -= progbar
|
||||
return 1
|
||||
|
||||
/proc/make_progress_bar(var/current_number, var/goal_number, var/atom/target)
|
||||
/proc/make_progress_bar(current_number, goal_number, atom/target)
|
||||
if(current_number && goal_number && target)
|
||||
var/image/progbar
|
||||
progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = target, "icon_state" = "prog_bar_0")
|
||||
@@ -767,7 +767,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Takes: Anything that could possibly have variables and a varname to check.
|
||||
//Returns: 1 if found, 0 if not.
|
||||
/proc/hasvar(var/datum/A, var/varname)
|
||||
/proc/hasvar(datum/A, varname)
|
||||
if(A.vars.Find(lowertext(varname))) return 1
|
||||
else return 0
|
||||
|
||||
@@ -785,7 +785,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all areas of that type in the world.
|
||||
/proc/get_areas(var/areatype)
|
||||
/proc/get_areas(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -799,7 +799,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all turfs in areas of that type of that type in the world.
|
||||
/proc/get_area_turfs(var/areatype)
|
||||
/proc/get_area_turfs(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -814,7 +814,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world.
|
||||
/proc/get_area_all_atoms(var/areatype)
|
||||
/proc/get_area_all_atoms(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -833,7 +833,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/y_pos = null
|
||||
var/z_pos = null
|
||||
|
||||
/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
/proc/DuplicateObject(obj/original, perfectcopy = 0 , sameloc = 0)
|
||||
if(!original)
|
||||
return null
|
||||
|
||||
@@ -852,7 +852,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return O
|
||||
|
||||
|
||||
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
|
||||
/area/proc/copy_contents_to(area/A , platingRequired = 0 )
|
||||
//Takes: Area. Optional: If it should copy to areas that don't have plating
|
||||
//Returns: Nothing.
|
||||
//Notes: Attempts to move the contents of one area to another area.
|
||||
@@ -1081,7 +1081,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
//centered = 0 counts from turf edge to edge
|
||||
//centered = 1 counts from turf center to turf center
|
||||
//of course mathematically this is just adding world.icon_size on again
|
||||
/proc/getPixelDistance(var/atom/A, var/atom/B, var/centered = 1)
|
||||
/proc/getPixelDistance(atom/A, atom/B, centered = 1)
|
||||
if(!istype(A)||!istype(B))
|
||||
return 0
|
||||
. = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2)))
|
||||
@@ -1110,7 +1110,7 @@ var/global/list/common_tools = list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/is_hot(obj/item/W as obj)
|
||||
/proc/is_hot(obj/item/W)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/O = W
|
||||
if(O.isOn())
|
||||
@@ -1161,7 +1161,7 @@ var/global/list/common_tools = list(
|
||||
return 0
|
||||
|
||||
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
|
||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
/proc/is_sharp(obj/item/W) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
var/list/sharp_things_1 = list(\
|
||||
/obj/item/weapon/circular_saw,\
|
||||
/obj/item/weapon/shovel,\
|
||||
@@ -1194,7 +1194,7 @@ var/global/list/common_tools = list(
|
||||
else
|
||||
return 0
|
||||
|
||||
/proc/is_pointed(obj/item/W as obj)
|
||||
/proc/is_pointed(obj/item/W)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
@@ -1257,7 +1257,7 @@ var/list/WALLITEMS = list(
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
|
||||
/obj/proc/atmosanalyzer_scan(var/datum/gas_mixture/air_contents, mob/user, var/obj/target = src)
|
||||
/obj/proc/atmosanalyzer_scan(datum/gas_mixture/air_contents, mob/user, obj/target = src)
|
||||
var/obj/icon = target
|
||||
user.visible_message("[user] has used the analyzer on \icon[icon] [target].", "<span class='notice'>You use the analyzer on \icon[icon] [target].</span>")
|
||||
var/pressure = air_contents.return_pressure()
|
||||
@@ -1313,7 +1313,7 @@ var/list/WALLITEMS = list(
|
||||
living_player_count += 1
|
||||
return living_player_count
|
||||
|
||||
/proc/randomColor(var/mode = 0) //if 1 it doesn't pick white, black or gray
|
||||
/proc/randomColor(mode = 0) //if 1 it doesn't pick white, black or gray
|
||||
switch(mode)
|
||||
if(0)
|
||||
return pick("white","black","gray","red","green","blue","brown","yellow","orange","darkred",
|
||||
@@ -1336,7 +1336,7 @@ var/list/WALLITEMS = list(
|
||||
tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1))))
|
||||
return locate(tX, tY, tZ)
|
||||
|
||||
/proc/IsValidSrc(var/A)
|
||||
/proc/IsValidSrc(A)
|
||||
if(istype(A, /datum))
|
||||
var/datum/B = A
|
||||
return !B.gc_destroyed
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you
|
||||
to check that the mob is not inside of something
|
||||
*/
|
||||
/atom/proc/Adjacent(var/atom/neighbor) // basic inheritance, unused
|
||||
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
|
||||
return 0
|
||||
|
||||
// Not a sane use of the function and (for now) indicative of an error elsewhere
|
||||
@@ -83,7 +83,7 @@
|
||||
This is defined as any dense ON_BORDER object, or any dense object without throwpass.
|
||||
The border_only flag allows you to not objects (for source and destination squares)
|
||||
*/
|
||||
/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null)
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null)
|
||||
for(var/obj/O in src)
|
||||
if( !O.density || O == target_atom || O.throwpass) //check if there's a dense object present on the turf
|
||||
continue // throwpass is used for anything you can click through (or the firedoor special case, see above)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/mob/living/silicon/ai/RangedAttack(atom/A)
|
||||
A.attack_ai(src)
|
||||
|
||||
/atom/proc/attack_ai(mob/user as mob)
|
||||
/atom/proc/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -112,7 +112,7 @@
|
||||
/* Atom Procs */
|
||||
/atom/proc/AICtrlClick()
|
||||
return
|
||||
/atom/proc/AIAltClick(var/mob/living/silicon/ai/user)
|
||||
/atom/proc/AIAltClick(mob/living/silicon/ai/user)
|
||||
AltClick(user)
|
||||
return
|
||||
/atom/proc/AIShiftClick()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
* item/afterattack(atom,user,adjacent,params) - used both ranged and adjacent
|
||||
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
|
||||
*/
|
||||
/mob/proc/ClickOn( var/atom/A, var/params )
|
||||
/mob/proc/ClickOn( atom/A, params )
|
||||
if(world.time <= next_click)
|
||||
return
|
||||
next_click = world.time + 1
|
||||
@@ -131,7 +131,7 @@
|
||||
next_move = world.time + num
|
||||
|
||||
// Default behavior: ignore double clicks (the second click that makes the doubleclick call already calls for a normal click)
|
||||
/mob/proc/DblClickOn(var/atom/A, var/params)
|
||||
/mob/proc/DblClickOn(atom/A, params)
|
||||
return
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
proximity_flag is not currently passed to attack_hand, and is instead used
|
||||
in human click code to allow glove touches only at melee range.
|
||||
*/
|
||||
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
|
||||
/mob/proc/UnarmedAttack(atom/A, proximity_flag)
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return
|
||||
@@ -158,36 +158,36 @@
|
||||
for things like ranged glove touches, spitting alien acid/neurotoxin,
|
||||
animals lunging, etc.
|
||||
*/
|
||||
/mob/proc/RangedAttack(var/atom/A, var/params)
|
||||
/mob/proc/RangedAttack(atom/A, params)
|
||||
/*
|
||||
Restrained ClickOn
|
||||
|
||||
Used when you are handcuffed and click things.
|
||||
Not currently used by anything but could easily be.
|
||||
*/
|
||||
/mob/proc/RestrainedClickOn(var/atom/A)
|
||||
/mob/proc/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Middle click
|
||||
Only used for swapping hands
|
||||
*/
|
||||
/mob/proc/MiddleClickOn(var/atom/A)
|
||||
/mob/proc/MiddleClickOn(atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/MiddleClickOn(var/atom/A)
|
||||
/mob/living/carbon/MiddleClickOn(atom/A)
|
||||
if(!src.stat && src.mind && src.mind.changeling && src.mind.changeling.chosen_sting && (istype(A, /mob/living/carbon)) && (A != src))
|
||||
next_click = world.time + 5
|
||||
mind.changeling.chosen_sting.try_to_sting(src, A)
|
||||
else
|
||||
swap_hand()
|
||||
|
||||
/mob/living/simple_animal/drone/MiddleClickOn(var/atom/A)
|
||||
/mob/living/simple_animal/drone/MiddleClickOn(atom/A)
|
||||
swap_hand()
|
||||
|
||||
// In case of use break glass
|
||||
/*
|
||||
/atom/proc/MiddleClick(var/mob/M as mob)
|
||||
/atom/proc/MiddleClick(mob/M as mob)
|
||||
return
|
||||
*/
|
||||
|
||||
@@ -196,10 +196,10 @@
|
||||
For most mobs, examine.
|
||||
This is overridden in ai.dm
|
||||
*/
|
||||
/mob/proc/ShiftClickOn(var/atom/A)
|
||||
/mob/proc/ShiftClickOn(atom/A)
|
||||
A.ShiftClick(src)
|
||||
return
|
||||
/atom/proc/ShiftClick(var/mob/user)
|
||||
/atom/proc/ShiftClick(mob/user)
|
||||
if(user.client && user.client.eye == user || user.client.eye == user.loc)
|
||||
user.examinate(src)
|
||||
return
|
||||
@@ -208,13 +208,13 @@
|
||||
Ctrl click
|
||||
For most objects, pull
|
||||
*/
|
||||
/mob/proc/CtrlClickOn(var/atom/A)
|
||||
/mob/proc/CtrlClickOn(atom/A)
|
||||
A.CtrlClick(src)
|
||||
return
|
||||
/atom/proc/CtrlClick(var/mob/user)
|
||||
/atom/proc/CtrlClick(mob/user)
|
||||
return
|
||||
|
||||
/atom/movable/CtrlClick(var/mob/user)
|
||||
/atom/movable/CtrlClick(mob/user)
|
||||
if(Adjacent(user))
|
||||
user.start_pulling(src)
|
||||
|
||||
@@ -222,18 +222,18 @@
|
||||
Alt click
|
||||
Unused except for AI
|
||||
*/
|
||||
/mob/proc/AltClickOn(var/atom/A)
|
||||
/mob/proc/AltClickOn(atom/A)
|
||||
A.AltClick(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/AltClickOn(var/atom/A)
|
||||
/mob/living/carbon/AltClickOn(atom/A)
|
||||
if(!src.stat && src.mind && src.mind.changeling && src.mind.changeling.chosen_sting && (istype(A, /mob/living/carbon)) && (A != src))
|
||||
next_click = world.time + 5
|
||||
mind.changeling.chosen_sting.try_to_sting(src, A)
|
||||
else
|
||||
..()
|
||||
|
||||
/atom/proc/AltClick(var/mob/user)
|
||||
/atom/proc/AltClick(mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && user.TurfAdjacent(T))
|
||||
if(user.listed_turf == T)
|
||||
@@ -243,18 +243,18 @@
|
||||
user.client.statpanel = T.name
|
||||
return
|
||||
|
||||
/mob/proc/TurfAdjacent(var/turf/T)
|
||||
/mob/proc/TurfAdjacent(turf/T)
|
||||
return T.Adjacent(src)
|
||||
|
||||
/*
|
||||
Control+Shift click
|
||||
Unused except for AI
|
||||
*/
|
||||
/mob/proc/CtrlShiftClickOn(var/atom/A)
|
||||
/mob/proc/CtrlShiftClickOn(atom/A)
|
||||
A.CtrlShiftClick(src)
|
||||
return
|
||||
|
||||
/atom/proc/CtrlShiftClick(var/mob/user)
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -292,7 +292,7 @@
|
||||
src << "<span class='danger'>You're out of energy! You need food!</span>"
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/mob/proc/face_atom(var/atom/A)
|
||||
/mob/proc/face_atom(atom/A)
|
||||
if( buckled || stat != CONSCIOUS || !A || !x || !y || !A.x || !A.y ) return
|
||||
var/dx = A.x - x
|
||||
var/dy = A.y - y
|
||||
|
||||
@@ -90,36 +90,36 @@
|
||||
return
|
||||
|
||||
//Middle click cycles through selected modules.
|
||||
/mob/living/silicon/robot/MiddleClickOn(var/atom/A)
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
cycle_modules()
|
||||
return
|
||||
|
||||
//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks
|
||||
// for non-doors/apcs
|
||||
/mob/living/silicon/robot/CtrlShiftClickOn(var/atom/A)
|
||||
/mob/living/silicon/robot/CtrlShiftClickOn(atom/A)
|
||||
A.BorgCtrlShiftClick(src)
|
||||
/mob/living/silicon/robot/ShiftClickOn(var/atom/A)
|
||||
/mob/living/silicon/robot/ShiftClickOn(atom/A)
|
||||
A.BorgShiftClick(src)
|
||||
/mob/living/silicon/robot/CtrlClickOn(var/atom/A)
|
||||
/mob/living/silicon/robot/CtrlClickOn(atom/A)
|
||||
A.BorgCtrlClick(src)
|
||||
/mob/living/silicon/robot/AltClickOn(var/atom/A)
|
||||
/mob/living/silicon/robot/AltClickOn(atom/A)
|
||||
A.BorgAltClick(src)
|
||||
|
||||
/atom/proc/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
CtrlShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlShiftClick() // Sets/Unsets Emergency Access Override Forwards to AI code.
|
||||
AICtrlShiftClick()
|
||||
|
||||
|
||||
/atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
ShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code.
|
||||
AIShiftClick()
|
||||
|
||||
|
||||
/atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick() // Bolts doors. Forwards to AI code.
|
||||
@@ -131,7 +131,7 @@
|
||||
/obj/machinery/turretid/BorgCtrlClick() //turret control on/off. Forwards to AI code.
|
||||
AICtrlClick()
|
||||
|
||||
/atom/proc/BorgAltClick(var/mob/living/silicon/robot/user)
|
||||
/atom/proc/BorgAltClick(mob/living/silicon/robot/user)
|
||||
AltClick(user)
|
||||
return
|
||||
|
||||
@@ -154,6 +154,6 @@
|
||||
/mob/living/silicon/robot/RangedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
|
||||
/atom/proc/attack_robot(mob/user as mob)
|
||||
/atom/proc/attack_robot(mob/user)
|
||||
attack_ai(user)
|
||||
return
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
usr.update_action_buttons()
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user)
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
|
||||
if(isalien(user))
|
||||
icon_state = "bg_alien"
|
||||
else
|
||||
@@ -188,7 +188,7 @@
|
||||
#define AB_NORTH_OFFSET 26
|
||||
#define AB_MAX_COLUMNS 10
|
||||
|
||||
/datum/hud/proc/ButtonNumberToScreenCoords(var/number) // TODO : Make this zero-indexed for readabilty
|
||||
/datum/hud/proc/ButtonNumberToScreenCoords(number) // TODO : Make this zero-indexed for readabilty
|
||||
var/row = round((number-1)/AB_MAX_COLUMNS)
|
||||
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
|
||||
var/coord_col = "+[col-1]"
|
||||
@@ -197,7 +197,7 @@
|
||||
var/coord_row_offset = 26
|
||||
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]"
|
||||
|
||||
/datum/hud/proc/SetButtonCoords(var/obj/screen/button,var/number)
|
||||
/datum/hud/proc/SetButtonCoords(obj/screen/button,number)
|
||||
var/row = round((number-1)/AB_MAX_COLUMNS)
|
||||
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
|
||||
var/x_offset = 32*(col-1) + 4 + 2*col
|
||||
|
||||
@@ -202,7 +202,7 @@ var/datum/global_hud/global_hud = new()
|
||||
show_hud(HUD_STYLE_REDUCED)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(var/version = 0)
|
||||
/datum/hud/proc/show_hud(version = 0)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
I.attack(src, user)
|
||||
|
||||
/mob/living/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
/mob/living/proc/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
apply_damage(I.force, I.damtype, def_zone)
|
||||
if(I.damtype == "brute")
|
||||
if(prob(33) && I.force)
|
||||
@@ -63,7 +63,7 @@
|
||||
else if(!src.force && src.w_class)
|
||||
return Clamp(src.w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
/obj/item/proc/attack(mob/living/M, mob/living/user, def_zone)
|
||||
|
||||
if (!istype(M)) // not sure if this is the right thing...
|
||||
return
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
A.attack_ghost(src)
|
||||
|
||||
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user as mob)
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user)
|
||||
if(user.client && user.client.inquisitive_ghost)
|
||||
user.examinate(src)
|
||||
return
|
||||
@@ -62,29 +62,29 @@
|
||||
// And here are some good things for free:
|
||||
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
|
||||
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user as mob)
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user)
|
||||
var/atom/l = loc
|
||||
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
|
||||
if(com && com.locked)
|
||||
user.loc = get_turf(com.locked)
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/user as mob)
|
||||
/obj/effect/portal/attack_ghost(mob/user)
|
||||
if(target)
|
||||
user.loc = get_turf(target)
|
||||
|
||||
/obj/machinery/gateway/centerstation/attack_ghost(mob/user as mob)
|
||||
/obj/machinery/gateway/centerstation/attack_ghost(mob/user)
|
||||
if(awaygate)
|
||||
user.loc = awaygate.loc
|
||||
else
|
||||
user << "[src] has no destination."
|
||||
|
||||
/obj/machinery/gateway/centeraway/attack_ghost(mob/user as mob)
|
||||
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
|
||||
if(stationgate)
|
||||
user.loc = stationgate.loc
|
||||
else
|
||||
user << "[src] has no destination."
|
||||
|
||||
/obj/item/weapon/storage/attack_ghost(mob/user as mob)
|
||||
/obj/item/weapon/storage/attack_ghost(mob/user)
|
||||
orient2hud(user)
|
||||
show_to(user)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Otherwise pretty standard.
|
||||
*/
|
||||
/mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity)
|
||||
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
|
||||
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
||||
|
||||
// Special glove functions:
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
A.attack_hand(src)
|
||||
|
||||
/atom/proc/attack_hand(mob/user as mob)
|
||||
/atom/proc/attack_hand(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -30,10 +30,10 @@
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/living/carbon/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(var/atom/A)
|
||||
/mob/living/carbon/human/RangedAttack(atom/A)
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if(istype(G) && G.Touch(A,0)) // for magic gloves
|
||||
@@ -49,24 +49,24 @@
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(var/atom/A)
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(var/atom/A)
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
AttackingTarget()
|
||||
|
||||
/atom/proc/attack_animal(mob/user as mob)
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
/mob/living/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Monkeys
|
||||
*/
|
||||
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A)
|
||||
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
|
||||
A.attack_paw(src)
|
||||
/atom/proc/attack_paw(mob/user as mob)
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -76,7 +76,7 @@
|
||||
moving it here instead of various hand_p's has simplified
|
||||
things considerably
|
||||
*/
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
||||
if(..())
|
||||
return
|
||||
if(a_intent != "harm" || !ismob(A)) return
|
||||
@@ -102,18 +102,18 @@
|
||||
Aliens
|
||||
Defaults to same as monkey in most places
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(var/atom/A)
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
/atom/proc/attack_alien(mob/user as mob)
|
||||
/atom/proc/attack_alien(mob/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
// Babby aliens
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(var/atom/A)
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
||||
A.attack_larva(src)
|
||||
/atom/proc/attack_larva(mob/user as mob)
|
||||
/atom/proc/attack_larva(mob/user)
|
||||
return
|
||||
|
||||
|
||||
@@ -121,11 +121,11 @@
|
||||
Slimes
|
||||
Nothing happening here
|
||||
*/
|
||||
/mob/living/simple_animal/slime/UnarmedAttack(var/atom/A)
|
||||
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
||||
A.attack_slime(src)
|
||||
/atom/proc/attack_slime(mob/user as mob)
|
||||
/atom/proc/attack_slime(mob/user)
|
||||
return
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// Blob Overmind Controls
|
||||
|
||||
|
||||
/mob/camera/blob/CtrlClickOn(var/atom/A) // Expand blob
|
||||
/mob/camera/blob/CtrlClickOn(atom/A) // Expand blob
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
expand_blob(T)
|
||||
|
||||
/mob/camera/blob/MiddleClickOn(var/atom/A) // Rally spores
|
||||
/mob/camera/blob/MiddleClickOn(atom/A) // Rally spores
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
rally_spores(T)
|
||||
|
||||
/mob/camera/blob/AltClickOn(var/atom/A) // Create a shield
|
||||
/mob/camera/blob/AltClickOn(atom/A) // Create a shield
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
create_shield(T)
|
||||
@@ -75,7 +75,7 @@ var/const/tk_maxrange = 15
|
||||
var/mob/living/host = null
|
||||
|
||||
|
||||
/obj/item/tk_grab/dropped(mob/user as mob)
|
||||
/obj/item/tk_grab/dropped(mob/user)
|
||||
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
|
||||
if(focus.Adjacent(loc))
|
||||
focus.loc = loc
|
||||
@@ -85,13 +85,13 @@ var/const/tk_maxrange = 15
|
||||
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(var/mob/user, var/slot)
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tk_grab/attack_self(mob/user as mob)
|
||||
/obj/item/tk_grab/attack_self(mob/user)
|
||||
if(focus)
|
||||
focus.attack_self_tk(user)
|
||||
|
||||
@@ -141,11 +141,11 @@ var/const/tk_maxrange = 15
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
/obj/item/tk_grab/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/living/user)
|
||||
/obj/item/tk_grab/proc/focus_object(obj/target, mob/living/user)
|
||||
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
qdel(src)
|
||||
|
||||
@@ -135,7 +135,7 @@ var/datum/subsystem/air/SSair
|
||||
T.process_cell()
|
||||
|
||||
|
||||
/datum/subsystem/air/proc/remove_from_active(var/turf/simulated/T)
|
||||
/datum/subsystem/air/proc/remove_from_active(turf/simulated/T)
|
||||
if(istype(T))
|
||||
T.excited = 0
|
||||
active_turfs -= T
|
||||
@@ -143,7 +143,7 @@ var/datum/subsystem/air/SSair
|
||||
T.excited_group.garbage_collect()
|
||||
|
||||
|
||||
/datum/subsystem/air/proc/add_to_active(var/turf/simulated/T, var/blockchanges = 1)
|
||||
/datum/subsystem/air/proc/add_to_active(turf/simulated/T, blockchanges = 1)
|
||||
if(istype(T) && T.air)
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
|
||||
@@ -462,7 +462,7 @@ var/datum/subsystem/job/SSjob
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/subsystem/job/proc/RejectPlayer(var/mob/new_player/player)
|
||||
/datum/subsystem/job/proc/RejectPlayer(mob/new_player/player)
|
||||
if(player.mind && player.mind.special_role)
|
||||
return
|
||||
Debug("Popcap overflow Check observer located, Player: [player]")
|
||||
|
||||
@@ -12,7 +12,7 @@ var/datum/subsystem/npcpool/SSbp
|
||||
var/list/botPool_l = list() //list of all npcs using the pool
|
||||
var/list/botPool_l_non = list() //list of all non SNPC mobs using the pool
|
||||
|
||||
/datum/subsystem/npcpool/proc/insertBot(var/toInsert)
|
||||
/datum/subsystem/npcpool/proc/insertBot(toInsert)
|
||||
if(istype(toInsert,/mob/living/carbon/human/interactive))
|
||||
botPool_l |= toInsert
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ var/datum/subsystem/pai/SSpai
|
||||
return
|
||||
recruitWindow(usr)
|
||||
|
||||
/datum/subsystem/pai/proc/recruitWindow(var/mob/M as mob)
|
||||
/datum/subsystem/pai/proc/recruitWindow(mob/M)
|
||||
var/datum/paiCandidate/candidate
|
||||
for(var/datum/paiCandidate/c in candidates)
|
||||
if(c.key == M.key)
|
||||
@@ -133,7 +133,7 @@ var/datum/subsystem/pai/SSpai
|
||||
|
||||
M << browse(dat, "window=paiRecruit")
|
||||
|
||||
/datum/subsystem/pai/proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
|
||||
/datum/subsystem/pai/proc/findPAI(obj/item/device/paicard/p, mob/user)
|
||||
requestRecruits()
|
||||
var/list/available = list()
|
||||
for(var/datum/paiCandidate/c in SSpai.candidates)
|
||||
@@ -196,7 +196,7 @@ var/datum/subsystem/pai/SSpai
|
||||
if(!hasSubmitted && (O.client.prefs.be_special & BE_PAI))
|
||||
question(O.client)
|
||||
|
||||
/datum/subsystem/pai/proc/question(var/client/C)
|
||||
/datum/subsystem/pai/proc/question(client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
asked.Add(C.key)
|
||||
|
||||
@@ -9,7 +9,7 @@ var/datum/subsystem/radio/radio_controller
|
||||
/datum/subsystem/radio/New()
|
||||
NEW_SS_GLOBAL(radio_controller)
|
||||
|
||||
/datum/subsystem/radio/proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
|
||||
/datum/subsystem/radio/proc/add_object(obj/device, new_frequency as num, filter = null as text|null)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
@@ -34,7 +34,7 @@ var/datum/subsystem/radio/radio_controller
|
||||
|
||||
return 1
|
||||
|
||||
/datum/subsystem/radio/proc/return_frequency(var/new_frequency as num)
|
||||
/datum/subsystem/radio/proc/return_frequency(new_frequency as num)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob)
|
||||
/obj/machinery/computer/ordercomp/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
@@ -303,7 +303,7 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob)
|
||||
/obj/machinery/computer/supplycomp/attack_hand(mob/user)
|
||||
if(!allowed(user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
return
|
||||
@@ -514,7 +514,7 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/post_signal(var/command)
|
||||
/obj/machinery/computer/supplycomp/proc/post_signal(command)
|
||||
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ var/datum/subsystem/ticker/ticker
|
||||
|
||||
|
||||
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
|
||||
/datum/subsystem/ticker/proc/station_explosion_cinematic(var/station_missed=0, var/override = null)
|
||||
/datum/subsystem/ticker/proc/station_explosion_cinematic(station_missed=0, override = null)
|
||||
if( cinematic ) return //already a cinematic in progress!
|
||||
|
||||
for (var/datum/html_interface/hi in html_interfaces)
|
||||
|
||||
@@ -44,7 +44,7 @@ var/datum/subsystem/timer/SStimer
|
||||
/datum/timedevent/Destroy()
|
||||
SStimer.processing -= src
|
||||
|
||||
/proc/addtimer(var/thingToCall, var/procToCall, var/wait, var/argList = list())
|
||||
/proc/addtimer(thingToCall, procToCall, wait, argList = list())
|
||||
if (!SStimer) //can't run timers before the mc has been created
|
||||
return
|
||||
if (!thingToCall || !procToCall || wait <= 0)
|
||||
@@ -63,7 +63,7 @@ var/datum/subsystem/timer/SStimer
|
||||
|
||||
return event.id
|
||||
|
||||
/proc/deltimer(var/id)
|
||||
/proc/deltimer(id)
|
||||
for (var/datum/timedevent/event in SStimer.processing)
|
||||
if (event.id == id)
|
||||
qdel(event)
|
||||
|
||||
@@ -120,7 +120,7 @@ var/datum/subsystem/vote/SSvote
|
||||
|
||||
return .
|
||||
|
||||
/datum/subsystem/vote/proc/submit_vote(var/vote)
|
||||
/datum/subsystem/vote/proc/submit_vote(vote)
|
||||
if(mode)
|
||||
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
|
||||
return 0
|
||||
@@ -131,7 +131,7 @@ var/datum/subsystem/vote/SSvote
|
||||
return vote
|
||||
return 0
|
||||
|
||||
/datum/subsystem/vote/proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
/datum/subsystem/vote/proc/initiate_vote(vote_type, initiator_key)
|
||||
if(!mode)
|
||||
if(started_time != null)
|
||||
var/next_allowed_time = (started_time + config.vote_delay)
|
||||
@@ -162,7 +162,7 @@ var/datum/subsystem/vote/SSvote
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/subsystem/vote/proc/interface(var/client/C)
|
||||
/datum/subsystem/vote/proc/interface(client/C)
|
||||
if(!C) return
|
||||
var/admin = 0
|
||||
var/trialmin = 0
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
//could be used to postpone a costly subsystem for (default one) var/cycles, cycles
|
||||
//for instance, during cpu intensive operations like explosions
|
||||
/datum/subsystem/proc/postpone(var/cycles = 1)
|
||||
/datum/subsystem/proc/postpone(cycles = 1)
|
||||
if(next_fire - world.time < wait)
|
||||
next_fire += (wait*cycles)
|
||||
|
||||
|
||||
@@ -119,23 +119,23 @@
|
||||
|
||||
/* General ai_law functions */
|
||||
|
||||
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
|
||||
/datum/ai_laws/proc/set_zeroth_law(law, law_borg = null)
|
||||
src.zeroth = law
|
||||
if(law_borg) //Making it possible for slaved borgs to see a different law 0 than their AI. --NEO
|
||||
src.zeroth_borg = law_borg
|
||||
|
||||
/datum/ai_laws/proc/add_inherent_law(var/law)
|
||||
/datum/ai_laws/proc/add_inherent_law(law)
|
||||
if (!(law in src.inherent))
|
||||
src.inherent += law
|
||||
|
||||
/datum/ai_laws/proc/add_ion_law(var/law)
|
||||
/datum/ai_laws/proc/add_ion_law(law)
|
||||
src.ion += law
|
||||
|
||||
/datum/ai_laws/proc/clear_inherent_laws()
|
||||
del(src.inherent)
|
||||
src.inherent = list()
|
||||
|
||||
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
|
||||
/datum/ai_laws/proc/add_supplied_law(number, law)
|
||||
while (src.supplied.len < number + 1)
|
||||
src.supplied += ""
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/datum/ai_laws/proc/clear_ion_laws()
|
||||
src.ion = list()
|
||||
|
||||
/datum/ai_laws/proc/show_laws(var/who)
|
||||
/datum/ai_laws/proc/show_laws(who)
|
||||
|
||||
if (src.zeroth)
|
||||
who << "0. [src.zeroth]"
|
||||
@@ -171,7 +171,7 @@
|
||||
who << "[number]. [law]"
|
||||
number++
|
||||
|
||||
/datum/ai_laws/proc/clear_zeroth_law(var/force) //only removes zeroth from antag ai if force is 1
|
||||
/datum/ai_laws/proc/clear_zeroth_law(force) //only removes zeroth from antag ai if force is 1
|
||||
if(force)
|
||||
src.zeroth = null
|
||||
src.zeroth_borg = null
|
||||
@@ -184,6 +184,6 @@
|
||||
src.zeroth_borg = null
|
||||
return
|
||||
|
||||
/datum/ai_laws/proc/associate(var/mob/living/silicon/M)
|
||||
/datum/ai_laws/proc/associate(mob/living/silicon/M)
|
||||
if(!owner)
|
||||
owner = M
|
||||
@@ -94,7 +94,7 @@
|
||||
[get_footer()]
|
||||
"}
|
||||
|
||||
/datum/browser/proc/open(var/use_onclose = 1)
|
||||
/datum/browser/proc/open(use_onclose = 1)
|
||||
var/window_size = ""
|
||||
if (width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
@@ -137,7 +137,7 @@
|
||||
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
/proc/onclose(mob/user, windowid, atom/ref=null)
|
||||
if(!user.client) return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
@@ -153,7 +153,7 @@
|
||||
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
|
||||
// otherwise, just reset the client mob's machine var.
|
||||
//
|
||||
/client/verb/windowclose(var/atomref as text)
|
||||
/client/verb/windowclose(atomref as text)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
c.dataId = ++securityCrimeCounter
|
||||
return c
|
||||
|
||||
/datum/datacore/proc/addMinorCrime(id = "", var/datum/data/crime/crime)
|
||||
/datum/datacore/proc/addMinorCrime(id = "", datum/data/crime/crime)
|
||||
for(var/datum/data/record/R in security)
|
||||
if(R.fields["id"] == id)
|
||||
var/list/crimes = R.fields["mi_crim"]
|
||||
@@ -58,14 +58,14 @@
|
||||
crimes -= crime
|
||||
return
|
||||
|
||||
/datum/datacore/proc/addMajorCrime(id = "", var/datum/data/crime/crime)
|
||||
/datum/datacore/proc/addMajorCrime(id = "", datum/data/crime/crime)
|
||||
for(var/datum/data/record/R in security)
|
||||
if(R.fields["id"] == id)
|
||||
var/list/crimes = R.fields["ma_crim"]
|
||||
crimes |= crime
|
||||
return
|
||||
|
||||
/datum/datacore/proc/manifest(var/nosleep = 0)
|
||||
/datum/datacore/proc/manifest(nosleep = 0)
|
||||
spawn()
|
||||
if(!nosleep)
|
||||
sleep(40)
|
||||
@@ -73,7 +73,7 @@
|
||||
manifest_inject(H)
|
||||
return
|
||||
|
||||
/datum/datacore/proc/manifest_modify(var/name, var/assignment)
|
||||
/datum/datacore/proc/manifest_modify(name, assignment)
|
||||
var/datum/data/record/foundrecord = find_record("name", name, data_core.general)
|
||||
if(foundrecord)
|
||||
foundrecord.fields["rank"] = assignment
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
|
||||
var/record_id_num = 1001
|
||||
/datum/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
|
||||
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H)
|
||||
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
|
||||
var/assignment
|
||||
if(H.mind.assigned_role)
|
||||
@@ -265,7 +265,7 @@ var/record_id_num = 1001
|
||||
locked += L
|
||||
return
|
||||
|
||||
/datum/datacore/proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
/datum/datacore/proc/get_id_photo(mob/living/carbon/human/H)
|
||||
var/icon/photo = null
|
||||
var/g = (H.gender == FEMALE) ? "f" : "m"
|
||||
if(!config.mutant_races || H.dna.species.use_skintones)
|
||||
|
||||
@@ -324,7 +324,7 @@ body
|
||||
|
||||
return
|
||||
|
||||
/client/proc/debug_variable(name, value, level, var/datum/DA = null)
|
||||
/client/proc/debug_variable(name, value, level, datum/DA = null)
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
/mob/proc/HasDisease(var/datum/disease/D)
|
||||
/mob/proc/HasDisease(datum/disease/D)
|
||||
for(var/datum/disease/DD in viruses)
|
||||
if(D.IsSame(DD))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/CanContractDisease(var/datum/disease/D)
|
||||
/mob/proc/CanContractDisease(datum/disease/D)
|
||||
if(stat == DEAD)
|
||||
return 0
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
return 1
|
||||
|
||||
|
||||
/mob/proc/ContractDisease(var/datum/disease/D)
|
||||
/mob/proc/ContractDisease(datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
AddDisease(D)
|
||||
|
||||
|
||||
/mob/proc/AddDisease(var/datum/disease/D)
|
||||
/mob/proc/AddDisease(datum/disease/D)
|
||||
var/datum/disease/DD = new D.type(1, D, 0)
|
||||
viruses += DD
|
||||
DD.affected_mob = src
|
||||
@@ -53,7 +53,7 @@
|
||||
DD.affected_mob.med_hud_set_status()
|
||||
|
||||
|
||||
/mob/living/carbon/ContractDisease(var/datum/disease/D)
|
||||
/mob/living/carbon/ContractDisease(datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
|
||||
@@ -135,13 +135,13 @@
|
||||
|
||||
|
||||
//Same as ContractDisease, except never overidden clothes checks
|
||||
/mob/proc/ForceContractDisease(var/datum/disease/D)
|
||||
/mob/proc/ForceContractDisease(datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
AddDisease(D)
|
||||
|
||||
|
||||
/mob/living/carbon/human/CanContractDisease(var/datum/disease/D)
|
||||
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
|
||||
if(dna && VIRUSIMMUNE in dna.species.specflags)
|
||||
return 0
|
||||
return ..()
|
||||
@@ -97,7 +97,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
break //One missing cure is enough to fail
|
||||
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source, var/force_spread = 0)
|
||||
/datum/disease/proc/spread(atom/source, force_spread = 0)
|
||||
if((spread_flags & SPECIAL || spread_flags & NON_CONTAGIOUS || spread_flags & BLOOD) && !force_spread)
|
||||
return
|
||||
|
||||
@@ -172,7 +172,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
SSdisease.processing += src
|
||||
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
/datum/disease/proc/IsSame(datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -91,7 +91,7 @@ var/list/advance_cures = list(
|
||||
CRASH("We do not have any symptoms during stage_act()!")
|
||||
|
||||
// Compares type then ID.
|
||||
/datum/disease/advance/IsSame(var/datum/disease/advance/D)
|
||||
/datum/disease/advance/IsSame(datum/disease/advance/D)
|
||||
|
||||
if(!(istype(D, /datum/disease/advance)))
|
||||
return 0
|
||||
@@ -101,7 +101,7 @@ var/list/advance_cures = list(
|
||||
return 1
|
||||
|
||||
// To add special resistances.
|
||||
/datum/disease/advance/cure(var/resistance=1)
|
||||
/datum/disease/advance/cure(resistance=1)
|
||||
if(affected_mob)
|
||||
var/id = "[GetDiseaseID()]"
|
||||
if(resistance && !(id in affected_mob.resistances))
|
||||
@@ -110,7 +110,7 @@ var/list/advance_cures = list(
|
||||
del(src) //delete the datum to stop it processing
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
/datum/disease/advance/Copy(var/process = 0)
|
||||
/datum/disease/advance/Copy(process = 0)
|
||||
return new /datum/disease/advance(process, src, 1)
|
||||
|
||||
/*
|
||||
@@ -120,20 +120,20 @@ var/list/advance_cures = list(
|
||||
*/
|
||||
|
||||
// Mix the symptoms of two diseases (the src and the argument)
|
||||
/datum/disease/advance/proc/Mix(var/datum/disease/advance/D)
|
||||
/datum/disease/advance/proc/Mix(datum/disease/advance/D)
|
||||
if(!(src.IsSame(D)))
|
||||
var/list/possible_symptoms = shuffle(D.symptoms)
|
||||
for(var/datum/symptom/S in possible_symptoms)
|
||||
AddSymptom(new S.type)
|
||||
|
||||
/datum/disease/advance/proc/HasSymptom(var/datum/symptom/S)
|
||||
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
|
||||
for(var/datum/symptom/symp in symptoms)
|
||||
if(symp.id == S.id)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
|
||||
/datum/disease/advance/proc/GenerateSymptoms(var/level_min, var/level_max, var/amount_get = 0)
|
||||
/datum/disease/advance/proc/GenerateSymptoms(level_min, level_max, amount_get = 0)
|
||||
|
||||
var/list/generated = list() // Symptoms we generated.
|
||||
|
||||
@@ -160,7 +160,7 @@ var/list/advance_cures = list(
|
||||
|
||||
return generated
|
||||
|
||||
/datum/disease/advance/proc/Refresh(var/new_name = 0)
|
||||
/datum/disease/advance/proc/Refresh(new_name = 0)
|
||||
//world << "[src.name] \ref[src] - REFRESH!"
|
||||
var/list/properties = GenerateProperties()
|
||||
AssignProperties(properties)
|
||||
@@ -195,7 +195,7 @@ var/list/advance_cures = list(
|
||||
return properties
|
||||
|
||||
// Assign the properties that are in the list.
|
||||
/datum/disease/advance/proc/AssignProperties(var/list/properties = list())
|
||||
/datum/disease/advance/proc/AssignProperties(list/properties = list())
|
||||
|
||||
if(properties && properties.len)
|
||||
switch(properties["stealth"])
|
||||
@@ -216,7 +216,7 @@ var/list/advance_cures = list(
|
||||
|
||||
|
||||
// Assign the spread type and give it the correct description.
|
||||
/datum/disease/advance/proc/SetSpread(var/spread_id)
|
||||
/datum/disease/advance/proc/SetSpread(spread_id)
|
||||
switch(spread_id)
|
||||
if(NON_CONTAGIOUS)
|
||||
spread_text = "None"
|
||||
@@ -231,7 +231,7 @@ var/list/advance_cures = list(
|
||||
|
||||
spread_flags = spread_id
|
||||
|
||||
/datum/disease/advance/proc/SetSeverity(var/level_sev)
|
||||
/datum/disease/advance/proc/SetSeverity(level_sev)
|
||||
|
||||
switch(level_sev)
|
||||
|
||||
@@ -252,7 +252,7 @@ var/list/advance_cures = list(
|
||||
|
||||
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
|
||||
/datum/disease/advance/proc/GenerateCure(list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
//world << "Res = [res]"
|
||||
@@ -266,7 +266,7 @@ var/list/advance_cures = list(
|
||||
return
|
||||
|
||||
// Randomly generate a symptom, has a chance to lose or gain a symptom.
|
||||
/datum/disease/advance/proc/Evolve(var/min_level, var/max_level)
|
||||
/datum/disease/advance/proc/Evolve(min_level, max_level)
|
||||
var/s = safepick(GenerateSymptoms(min_level, max_level, 1))
|
||||
if(s)
|
||||
AddSymptom(s)
|
||||
@@ -283,7 +283,7 @@ var/list/advance_cures = list(
|
||||
return
|
||||
|
||||
// Name the disease.
|
||||
/datum/disease/advance/proc/AssignName(var/name = "Unknown")
|
||||
/datum/disease/advance/proc/AssignName(name = "Unknown")
|
||||
src.name = name
|
||||
return
|
||||
|
||||
@@ -301,7 +301,7 @@ var/list/advance_cures = list(
|
||||
|
||||
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
|
||||
// we take a random symptom away and add the new one.
|
||||
/datum/disease/advance/proc/AddSymptom(var/datum/symptom/S)
|
||||
/datum/disease/advance/proc/AddSymptom(datum/symptom/S)
|
||||
|
||||
if(HasSymptom(S))
|
||||
return
|
||||
@@ -314,7 +314,7 @@ var/list/advance_cures = list(
|
||||
return
|
||||
|
||||
// Simply removes the symptom.
|
||||
/datum/disease/advance/proc/RemoveSymptom(var/datum/symptom/S)
|
||||
/datum/disease/advance/proc/RemoveSymptom(datum/symptom/S)
|
||||
symptoms -= S
|
||||
return
|
||||
|
||||
@@ -357,7 +357,7 @@ var/list/advance_cures = list(
|
||||
to_return.Refresh(1)
|
||||
return to_return
|
||||
|
||||
/proc/SetViruses(var/datum/reagent/R, var/list/data)
|
||||
/proc/SetViruses(datum/reagent/R, list/data)
|
||||
if(data)
|
||||
var/list/preserve = list()
|
||||
if(istype(data) && data["viruses"])
|
||||
@@ -367,7 +367,7 @@ var/list/advance_cures = list(
|
||||
if(preserve.len)
|
||||
R.data["viruses"] = preserve
|
||||
|
||||
/proc/AdminCreateVirus(var/client/user)
|
||||
/proc/AdminCreateVirus(client/user)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
@@ -24,7 +24,7 @@ BONUS
|
||||
level = 4
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/beard/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/beard/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 3
|
||||
severity = 3
|
||||
|
||||
/datum/symptom/choking/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/choking/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -26,7 +26,7 @@ Bonus
|
||||
severity = 2
|
||||
|
||||
|
||||
/datum/symptom/confusion/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/confusion/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ BONUS
|
||||
level = 1
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/cough/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/cough/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ Bonus
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/damage_converter/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/damage_converter/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -33,7 +33,7 @@ Bonus
|
||||
Convert(M)
|
||||
return
|
||||
|
||||
/datum/symptom/damage_converter/proc/Convert(var/mob/living/M)
|
||||
/datum/symptom/damage_converter/proc/Convert(mob/living/M)
|
||||
|
||||
var/get_damage = rand(1, 2)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 4
|
||||
severity = 3
|
||||
|
||||
/datum/symptom/deafness/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/deafness/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 4
|
||||
severity = 2
|
||||
|
||||
/datum/symptom/dizzy/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/dizzy/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 2
|
||||
severity = 2
|
||||
|
||||
/datum/symptom/fever/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/fever/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 6
|
||||
severity = 5
|
||||
|
||||
/datum/symptom/fire/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/fire/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 6
|
||||
severity = 5
|
||||
|
||||
/datum/symptom/flesh_eating/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/flesh_eating/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -27,7 +27,7 @@ Bonus
|
||||
var/list/possible_mutations
|
||||
var/archived_dna = null
|
||||
|
||||
/datum/symptom/genetic_mutation/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/genetic_mutation/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5)) // 15% chance
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
@@ -40,7 +40,7 @@ Bonus
|
||||
return
|
||||
|
||||
// Archive their DNA before they were infected.
|
||||
/datum/symptom/genetic_mutation/Start(var/datum/disease/advance/A)
|
||||
/datum/symptom/genetic_mutation/Start(datum/disease/advance/A)
|
||||
possible_mutations = (bad_mutations | not_good_mutations) - mutations_list[RACEMUT]
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
if(M)
|
||||
@@ -49,7 +49,7 @@ Bonus
|
||||
archived_dna = M.dna.struc_enzymes
|
||||
|
||||
// Give them back their old DNA when cured.
|
||||
/datum/symptom/genetic_mutation/End(var/datum/disease/advance/A)
|
||||
/datum/symptom/genetic_mutation/End(datum/disease/advance/A)
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
if(M && archived_dna)
|
||||
if(!check_dna_integrity(M))
|
||||
@@ -83,6 +83,6 @@ Bonus
|
||||
level = 6
|
||||
severity = 0
|
||||
|
||||
/datum/symptom/genetic_mutation/powers/Start(var/datum/disease/advance/A)
|
||||
/datum/symptom/genetic_mutation/powers/Start(datum/disease/advance/A)
|
||||
..()
|
||||
possible_mutations = good_mutations
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 5
|
||||
severity = 3
|
||||
|
||||
/datum/symptom/hallucigen/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/hallucigen/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
|
||||
@@ -26,7 +26,7 @@ BONUS
|
||||
level = 1
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/headache/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/headache/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ Bonus
|
||||
transmittable = -4
|
||||
level = 6
|
||||
|
||||
/datum/symptom/heal/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -33,7 +33,7 @@ Bonus
|
||||
Heal(M, A)
|
||||
return
|
||||
|
||||
/datum/symptom/heal/proc/Heal(var/mob/living/M, var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/proc/Heal(mob/living/M, datum/disease/advance/A)
|
||||
|
||||
var/get_damage = rand(8, 14)
|
||||
M.adjustToxLoss(-get_damage)
|
||||
@@ -66,7 +66,7 @@ Bonus
|
||||
level = 3
|
||||
var/list/cured_diseases = list()
|
||||
|
||||
/datum/symptom/heal/metabolism/Heal(var/mob/living/M, var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/metabolism/Heal(mob/living/M, datum/disease/advance/A)
|
||||
var/cured = 0
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(D != A)
|
||||
@@ -76,7 +76,7 @@ Bonus
|
||||
if(cured)
|
||||
M << "<span class='notice'>You feel much better.</span>"
|
||||
|
||||
/datum/symptom/heal/metabolism/End(var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/metabolism/End(datum/disease/advance/A)
|
||||
// Remove all the diseases we cured.
|
||||
var/mob/living/M = A.affected_mob
|
||||
if(istype(M))
|
||||
@@ -113,10 +113,10 @@ Bonus
|
||||
level = 3
|
||||
var/longevity = 30
|
||||
|
||||
/datum/symptom/heal/longevity/Heal(var/mob/living/M, var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/longevity/Heal(mob/living/M, datum/disease/advance/A)
|
||||
longevity -= 1
|
||||
if(!longevity)
|
||||
A.cure()
|
||||
|
||||
/datum/symptom/heal/longevity/Start(var/datum/disease/advance/A)
|
||||
/datum/symptom/heal/longevity/Start(datum/disease/advance/A)
|
||||
longevity = rand(initial(longevity) - 5, initial(longevity) + 5)
|
||||
|
||||
@@ -26,7 +26,7 @@ BONUS
|
||||
level = 1
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/itching/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/itching/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ Bonus
|
||||
transmittable = -4
|
||||
level = 6
|
||||
|
||||
/datum/symptom/oxygen/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/oxygen/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ BONUS
|
||||
level = 4
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/shedding/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/shedding/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 2
|
||||
severity = 2
|
||||
|
||||
/datum/symptom/shivering/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/shivering/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ BONUS
|
||||
level = 4
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/vitiligo/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/vitiligo/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -68,7 +68,7 @@ BONUS
|
||||
level = 4
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/revitiligo/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/revitiligo/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -26,7 +26,7 @@ Bonus
|
||||
level = 1
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/sneeze/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/sneeze/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ Bonus
|
||||
transmittable = -4
|
||||
level = 3
|
||||
|
||||
/datum/symptom/stimulant/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/stimulant/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -28,13 +28,13 @@ var/global/const/SYMPTOM_ACTIVATION_PROB = 3
|
||||
CRASH("We couldn't assign an ID!")
|
||||
|
||||
// Called when processing of the advance disease, which holds this symptom, starts.
|
||||
/datum/symptom/proc/Start(var/datum/disease/advance/A)
|
||||
/datum/symptom/proc/Start(datum/disease/advance/A)
|
||||
return
|
||||
|
||||
// Called when the advance disease is going to be deleted or when the advance disease stops processing.
|
||||
/datum/symptom/proc/End(var/datum/disease/advance/A)
|
||||
/datum/symptom/proc/End(datum/disease/advance/A)
|
||||
return
|
||||
|
||||
/datum/symptom/proc/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/proc/Activate(datum/disease/advance/A)
|
||||
return
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 5
|
||||
severity = 4
|
||||
|
||||
/datum/symptom/visionloss/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/visionloss/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -75,7 +75,7 @@ Bonus
|
||||
transmittable = -4
|
||||
level = 4
|
||||
|
||||
/datum/symptom/visionaid/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/visionaid/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 6
|
||||
severity = 2
|
||||
|
||||
/datum/symptom/voice_change/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/voice_change/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
|
||||
@@ -40,7 +40,7 @@ Bonus
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/voice_change/End(var/datum/disease/advance/A)
|
||||
/datum/symptom/voice_change/End(datum/disease/advance/A)
|
||||
..()
|
||||
if(ishuman(A.affected_mob))
|
||||
var/mob/living/carbon/human/H = A.affected_mob
|
||||
|
||||
@@ -29,7 +29,7 @@ Bonus
|
||||
level = 3
|
||||
severity = 4
|
||||
|
||||
/datum/symptom/vomit/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/vomit/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB / 2))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -41,7 +41,7 @@ Bonus
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/vomit/proc/Vomit(var/mob/living/M)
|
||||
/datum/symptom/vomit/proc/Vomit(mob/living/M)
|
||||
|
||||
M.visible_message("<span class='danger'>[M] vomits on the floor!</span>", \
|
||||
"<span class='userdanger'>You throw up on the floor!</span>")
|
||||
@@ -82,7 +82,7 @@ Bonus
|
||||
level = 4
|
||||
severity = 5
|
||||
|
||||
/datum/symptom/vomit/blood/Vomit(var/mob/living/M)
|
||||
/datum/symptom/vomit/blood/Vomit(mob/living/M)
|
||||
|
||||
M.Stun(1)
|
||||
M.visible_message("<span class='danger'>[M] vomits on the floor!</span>", \
|
||||
|
||||
@@ -25,7 +25,7 @@ Bonus
|
||||
level = 4
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/weight_gain/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/weight_gain/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -67,7 +67,7 @@ Bonus
|
||||
level = 3
|
||||
severity = 1
|
||||
|
||||
/datum/symptom/weight_loss/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/weight_loss/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
@@ -109,7 +109,7 @@ Bonus
|
||||
transmittable = -2
|
||||
level = 4
|
||||
|
||||
/datum/symptom/weight_even/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/weight_even/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -24,7 +24,7 @@ BONUS
|
||||
transmittable = -4
|
||||
level = 5
|
||||
|
||||
/datum/symptom/youth/Activate(var/datum/disease/advance/A)
|
||||
/datum/symptom/youth/Activate(datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 2))
|
||||
var/mob/living/M = A.affected_mob
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(5)
|
||||
do_disease_transformation(affected_mob)
|
||||
|
||||
/datum/disease/transformation/proc/do_disease_transformation(var/mob/living/affected_mob)
|
||||
/datum/disease/transformation/proc/do_disease_transformation(mob/living/affected_mob)
|
||||
if(istype(affected_mob, /mob/living/carbon) && affected_mob.stat != DEAD)
|
||||
if(stage5)
|
||||
affected_mob << pick(stage5)
|
||||
@@ -91,7 +91,7 @@
|
||||
"<span class='warning'>You have a craving for bananas.</span>", "<span class='warning'>Your mind feels clouded.</span>")
|
||||
stage5 = list("<span class='warning'>You feel like monkeying around.</span>")
|
||||
|
||||
/datum/disease/transformation/jungle_fever/do_disease_transformation(var/mob/living/carbon/affected_mob)
|
||||
/datum/disease/transformation/jungle_fever/do_disease_transformation(mob/living/carbon/affected_mob)
|
||||
if(!ismonkey(affected_mob))
|
||||
ticker.mode.add_monkey(affected_mob.mind)
|
||||
affected_mob.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
|
||||
|
||||
@@ -54,7 +54,7 @@ STI KALY - blind
|
||||
|
||||
|
||||
|
||||
/datum/disease/wizarditis/proc/spawn_wizard_clothes(var/chance = 0)
|
||||
/datum/disease/wizarditis/proc/spawn_wizard_clothes(chance = 0)
|
||||
if(istype(affected_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
if(prob(chance))
|
||||
|
||||
@@ -548,7 +548,7 @@ What are the archived variables for?
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/share(datum/gas_mixture/sharer, var/atmos_adjacent_turfs = 4)
|
||||
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
if(!sharer) return 0
|
||||
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/(atmos_adjacent_turfs+1)
|
||||
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/(atmos_adjacent_turfs+1)
|
||||
@@ -677,7 +677,7 @@ What are the archived variables for?
|
||||
var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - sharer.temperature_archived*(sharer.total_moles() - moved_moles)
|
||||
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
|
||||
|
||||
/datum/gas_mixture/mimic(turf/model, border_multiplier, var/atmos_adjacent_turfs = 4)
|
||||
/datum/gas_mixture/mimic(turf/model, border_multiplier, atmos_adjacent_turfs = 4)
|
||||
var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
|
||||
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)
|
||||
var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen)/(atmos_adjacent_turfs+1)
|
||||
@@ -961,13 +961,13 @@ What are the archived variables for?
|
||||
|
||||
//Does handle trace gases!
|
||||
|
||||
/datum/gas_mixture/proc/get_breath_partial_pressure(var/gas_pressure)
|
||||
/datum/gas_mixture/proc/get_breath_partial_pressure(gas_pressure)
|
||||
var/breath_pressure = (total_moles()*R_IDEAL_GAS_EQUATION*temperature)/BREATH_VOLUME
|
||||
return (gas_pressure/total_moles())*breath_pressure
|
||||
|
||||
|
||||
//Reverse of the above
|
||||
/datum/gas_mixture/proc/get_true_breath_pressure(var/breath_pp)
|
||||
/datum/gas_mixture/proc/get_true_breath_pressure(breath_pp)
|
||||
var/breath_pressure = (total_moles()/R_IDEAL_GAS_EQUATION/temperature)*BREATH_VOLUME
|
||||
return (breath_pp/breath_pressure*total_moles())
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
set_desc(steps.len)
|
||||
return
|
||||
|
||||
/datum/construction/proc/action(atom/used_atom,mob/user as mob)
|
||||
/datum/construction/proc/action(atom/used_atom,mob/user)
|
||||
return
|
||||
|
||||
/datum/construction/proc/check_step(atom/used_atom,mob/user as mob) //check last step only
|
||||
/datum/construction/proc/check_step(atom/used_atom,mob/user) //check last step only
|
||||
var/valid_step = is_right_key(used_atom)
|
||||
if(valid_step)
|
||||
if(custom_action(valid_step, used_atom, user))
|
||||
@@ -43,7 +43,7 @@
|
||||
/datum/construction/proc/custom_action(step, used_atom, user)
|
||||
return 1
|
||||
|
||||
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
|
||||
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user) //check all steps, remove matching one.
|
||||
for(var/i=1;i<=steps.len;i++)
|
||||
var/list/L = steps[i];
|
||||
if(istype(used_atom, L["key"]))
|
||||
@@ -91,7 +91,7 @@
|
||||
return BACKWARD //to the last step -> backwards
|
||||
return 0
|
||||
|
||||
/datum/construction/reversible/check_step(atom/used_atom,mob/user as mob)
|
||||
/datum/construction/reversible/check_step(atom/used_atom,mob/user)
|
||||
var/diff = is_right_key(used_atom)
|
||||
if(diff)
|
||||
if(custom_action(index, diff, used_atom, user))
|
||||
|
||||
@@ -18,35 +18,35 @@ var/datum/atom_hud/huds = list( \
|
||||
var/list/mob/hudusers = list() //list with all mobs who can see the hud
|
||||
var/list/hud_icons = list() //these will be the indexes for the atom's hud_list
|
||||
|
||||
/datum/atom_hud/proc/remove_hud_from(var/mob/M)
|
||||
/datum/atom_hud/proc/remove_hud_from(mob/M)
|
||||
if(src in M.permanent_huds)
|
||||
return
|
||||
for(var/atom/A in hudatoms)
|
||||
remove_from_single_hud(M, A)
|
||||
hudusers -= M
|
||||
|
||||
/datum/atom_hud/proc/remove_from_hud(var/atom/A)
|
||||
/datum/atom_hud/proc/remove_from_hud(atom/A)
|
||||
for(var/mob/M in hudusers)
|
||||
remove_from_single_hud(M, A)
|
||||
hudatoms -= A
|
||||
|
||||
/datum/atom_hud/proc/remove_from_single_hud(var/mob/M, var/atom/A) //unsafe, no sanity apart from client
|
||||
/datum/atom_hud/proc/remove_from_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client
|
||||
if(!M.client)
|
||||
return
|
||||
for(var/i in hud_icons)
|
||||
M.client.images -= A.hud_list[i]
|
||||
|
||||
/datum/atom_hud/proc/add_hud_to(var/mob/M)
|
||||
/datum/atom_hud/proc/add_hud_to(mob/M)
|
||||
hudusers |= M
|
||||
for(var/atom/A in hudatoms)
|
||||
add_to_single_hud(M, A)
|
||||
|
||||
/datum/atom_hud/proc/add_to_hud(var/atom/A)
|
||||
/datum/atom_hud/proc/add_to_hud(atom/A)
|
||||
hudatoms |= A
|
||||
for(var/mob/M in hudusers)
|
||||
add_to_single_hud(M, A)
|
||||
|
||||
/datum/atom_hud/proc/add_to_single_hud(var/mob/M, var/atom/A) //unsafe, no sanity apart from client
|
||||
/datum/atom_hud/proc/add_to_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client
|
||||
if(!M.client)
|
||||
return
|
||||
for(var/i in hud_icons)
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
var/temporary = 0
|
||||
var/datum/martial_art/base = null // The permanent style
|
||||
|
||||
/datum/martial_art/proc/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/proc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
|
||||
/datum/martial_art/proc/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/proc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
|
||||
/datum/martial_art/proc/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/proc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
|
||||
/datum/martial_art/proc/add_to_streak(var/element,var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/proc/add_to_streak(element,mob/living/carbon/human/D)
|
||||
if(D != current_target)
|
||||
current_target = D
|
||||
streak = ""
|
||||
@@ -24,7 +24,7 @@
|
||||
streak = copytext(streak,2)
|
||||
return
|
||||
|
||||
/datum/martial_art/proc/basic_hit(var/mob/living/carbon/human/A,var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/proc/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D)
|
||||
|
||||
A.do_attack_animation(D)
|
||||
var/damage = rand(0,9)
|
||||
@@ -71,7 +71,7 @@
|
||||
D.forcesay(hit_appends)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/proc/teach(var/mob/living/carbon/human/H,var/make_temporary=0)
|
||||
/datum/martial_art/proc/teach(mob/living/carbon/human/H,make_temporary=0)
|
||||
if(make_temporary)
|
||||
temporary = 1
|
||||
if(H.martial_art && H.martial_art.temporary)
|
||||
@@ -82,7 +82,7 @@
|
||||
return
|
||||
H.martial_art = src
|
||||
|
||||
/datum/martial_art/proc/remove(var/mob/living/carbon/human/H)
|
||||
/datum/martial_art/proc/remove(mob/living/carbon/human/H)
|
||||
if(H.martial_art != src)
|
||||
return
|
||||
H.martial_art = base
|
||||
@@ -90,15 +90,15 @@
|
||||
/datum/martial_art/boxing
|
||||
name = "Boxing"
|
||||
|
||||
/datum/martial_art/boxing/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/boxing/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
A << "<span class='warning'>Can't disarm while boxing!</span>"
|
||||
return 1
|
||||
|
||||
/datum/martial_art/boxing/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/boxing/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
A << "<span class='warning'>Can't grab while boxing!</span>"
|
||||
return 1
|
||||
|
||||
/datum/martial_art/boxing/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/boxing/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
|
||||
A.do_attack_animation(D)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
/datum/martial_art/wrestling
|
||||
name = "Wrestling"
|
||||
|
||||
/datum/martial_art/wrestling/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/wrestling/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
D.grabbedby(A,1)
|
||||
var/obj/item/weapon/grab/G = A.get_active_hand()
|
||||
if(G && prob(50))
|
||||
@@ -156,7 +156,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/datum/martial_art/wrestling/proc/Suplex(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/wrestling/proc/Suplex(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
|
||||
D.visible_message("<span class='danger'>[A] suplexes [D]!</span>", \
|
||||
"<span class='userdanger'>[A] suplexes [D]!</span>")
|
||||
@@ -174,7 +174,7 @@
|
||||
A.apply_effect(4, WEAKEN, armor_block)
|
||||
return
|
||||
|
||||
/datum/martial_art/wrestling/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/wrestling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(istype(A.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = A.get_inactive_hand()
|
||||
if(G.affecting == D)
|
||||
@@ -183,7 +183,7 @@
|
||||
harm_act(A,D)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/wrestling/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/wrestling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
D.grabbedby(A,1)
|
||||
D.visible_message("<span class='danger'>[A] holds [D] down!</span>", \
|
||||
"<span class='userdanger'>[A] holds [D] down!</span>")
|
||||
@@ -199,7 +199,7 @@
|
||||
/datum/martial_art/plasma_fist
|
||||
name = "Plasma Fist"
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(findtext(streak,TORNADO_COMBO))
|
||||
streak = ""
|
||||
Tornado(A,D)
|
||||
@@ -214,7 +214,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Tornado(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/proc/Tornado(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
A.say("TORNADO SWEEP!")
|
||||
spawn(0)
|
||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||
@@ -228,7 +228,7 @@
|
||||
R.cast(turfs)
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Throwback(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/proc/Throwback(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
D.visible_message("<span class='danger'>[A] has hit [D] with Plasma Punch!</span>", \
|
||||
"<span class='userdanger'>[A] has hit [D] with Plasma Punch!</span>")
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
@@ -237,7 +237,7 @@
|
||||
A.say("HYAH!")
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Plasma(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/proc/Plasma(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
A.do_attack_animation(D)
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
A.say("PLASMA FIST!")
|
||||
@@ -251,21 +251,21 @@
|
||||
D.gib()
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/plasma_fist/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("D")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/plasma_fist/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/plasma_fist/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("G")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
@@ -282,7 +282,7 @@
|
||||
/datum/martial_art/the_sleeping_carp
|
||||
name = "The Sleeping Carp"
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(findtext(streak,WRIST_WRENCH_COMBO))
|
||||
streak = ""
|
||||
wristWrench(A,D)
|
||||
@@ -305,7 +305,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.stunned && !D.weakened)
|
||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
||||
"<span class='userdanger'>[A] grabs your wrist and violently wrenches it to the side!</span>")
|
||||
@@ -317,7 +317,7 @@
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(A.dir == D.dir && !D.stat && !D.weakened)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
||||
@@ -327,7 +327,7 @@
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.weakened)
|
||||
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
||||
"<span class'userdanger'>[A] winds you with a knee in the stomach!</span>")
|
||||
@@ -338,7 +338,7 @@
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.weakened)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
|
||||
@@ -348,7 +348,7 @@
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(D.weakened || D.resting || D.stat)
|
||||
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
||||
"<span class='userdanger'>[A] piledrives you with their elbow!</span>")
|
||||
@@ -359,7 +359,7 @@
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("G")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
@@ -368,7 +368,7 @@
|
||||
if(G)
|
||||
G.state = GRAB_AGGRESSIVE //Instant aggressive grab
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
@@ -379,7 +379,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/the_sleeping_carp/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("D")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
@@ -445,7 +445,7 @@
|
||||
icon_state ="scroll2"
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/plasma_fist_scroll/attack_self(mob/user as mob)
|
||||
/obj/item/weapon/plasma_fist_scroll/attack_self(mob/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(!used)
|
||||
@@ -464,7 +464,7 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
|
||||
/obj/item/weapon/sleeping_carp_scroll/attack_self(mob/living/carbon/human/user as mob)
|
||||
/obj/item/weapon/sleeping_carp_scroll/attack_self(mob/living/carbon/human/user)
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
user << "<span class='notice'>You begin to read the scroll...</span>"
|
||||
|
||||
@@ -1261,7 +1261,7 @@
|
||||
ticker.mode.finalize_traitor(src)
|
||||
ticker.mode.greet_traitor(src)
|
||||
|
||||
/datum/mind/proc/make_Nuke(var/turf/spawnloc,var/nuke_code,var/leader=0)
|
||||
/datum/mind/proc/make_Nuke(turf/spawnloc,nuke_code,leader=0)
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
ticker.mode.update_synd_icons_added(src)
|
||||
@@ -1385,7 +1385,7 @@
|
||||
fail |= !ticker.mode.equip_revolutionary(current)
|
||||
|
||||
|
||||
/datum/mind/proc/make_Gang(var/datum/gang/G)
|
||||
/datum/mind/proc/make_Gang(datum/gang/G)
|
||||
special_role = "[G.name] Gang Boss"
|
||||
G.bosses += src
|
||||
gang_datum = G
|
||||
@@ -1447,7 +1447,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/mind/proc/AddSpell(var/obj/effect/proc_holder/spell/spell)
|
||||
/datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/spell)
|
||||
spell_list += spell
|
||||
if(!spell.action)
|
||||
spell.action = new/datum/action/spell_action
|
||||
@@ -1458,7 +1458,7 @@
|
||||
spell.action.background_icon_state = spell.action_background_icon_state
|
||||
spell.action.Grant(current)
|
||||
return
|
||||
/datum/mind/proc/transfer_actions(var/mob/living/new_character)
|
||||
/datum/mind/proc/transfer_actions(mob/living/new_character)
|
||||
if(current && current.actions)
|
||||
for(var/datum/action/A in current.actions)
|
||||
A.Grant(new_character)
|
||||
|
||||
@@ -30,14 +30,14 @@ var/list/modules = list( // global associative list
|
||||
status = needed
|
||||
installed = needed
|
||||
|
||||
/datum/moduletypes/proc/addmod(var/type, var/modtextlist)
|
||||
/datum/moduletypes/proc/addmod(type, modtextlist)
|
||||
modules += type // index by type text
|
||||
modules[type] = modtextlist
|
||||
|
||||
/datum/moduletypes/proc/inmodlist(var/type)
|
||||
/datum/moduletypes/proc/inmodlist(type)
|
||||
return ("[type]" in modules)
|
||||
|
||||
/datum/moduletypes/proc/getbitmask(var/type)
|
||||
/datum/moduletypes/proc/getbitmask(type)
|
||||
var/count = modcount["[type]"]
|
||||
if(count)
|
||||
return 2**count-1
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/mutation/human/proc/say_mod(var/message)
|
||||
/datum/mutation/human/proc/say_mod(message)
|
||||
if(message)
|
||||
return message
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
return
|
||||
owner.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
|
||||
|
||||
/datum/mutation/human/hulk/say_mod(var/message)
|
||||
/datum/mutation/human/hulk/say_mod(message)
|
||||
if(message)
|
||||
message = "[uppertext(replacetext(message, ".", "!"))]!!"
|
||||
return message
|
||||
@@ -225,7 +225,7 @@
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel strange.</span>"
|
||||
|
||||
/datum/mutation/human/bad_dna/on_acquiring(var/mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/bad_dna/on_acquiring(mob/living/carbon/human/owner)
|
||||
owner << text_gain_indication
|
||||
var/mob/new_mob
|
||||
if(prob(95))
|
||||
@@ -426,7 +426,7 @@
|
||||
text_gain_indication = "<span class='notice'>You feel so happy. Nothing can be wrong with anything. :)</span>"
|
||||
text_lose_indication = "<span class='notice'>Everything is terrible again. :(</span>"
|
||||
|
||||
/datum/mutation/human/smile/say_mod(var/message)
|
||||
/datum/mutation/human/smile/say_mod(message)
|
||||
if(message)
|
||||
message = " [message] "
|
||||
//Time for a friendly game of SS13
|
||||
@@ -481,7 +481,7 @@
|
||||
text_gain_indication = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
|
||||
text_lose_indication = "<span class='danger'>Your mind feels more clear.</span>"
|
||||
|
||||
/datum/mutation/human/unintelligable/say_mod(var/message)
|
||||
/datum/mutation/human/unintelligable/say_mod(message)
|
||||
if(message)
|
||||
var/prefix=copytext(message,1,2)
|
||||
if(prefix == ";")
|
||||
@@ -512,7 +512,7 @@
|
||||
text_gain_indication = "<span class='notice'>You feel Swedish, however that works.</span>"
|
||||
text_lose_indication = "<span class='notice'>The feeling of Swedishness passes.</span>"
|
||||
|
||||
/datum/mutation/human/swedish/say_mod(var/message)
|
||||
/datum/mutation/human/swedish/say_mod(message)
|
||||
if(message)
|
||||
message = replacetext(message,"w","v")
|
||||
if(prob(30))
|
||||
@@ -525,7 +525,7 @@
|
||||
text_gain_indication = "<span class='notice'>Ye feel like a reet prat like, innit?</span>"
|
||||
text_lose_indication = "<span class='notice'>You no longer feel like being rude and sassy.</span>"
|
||||
|
||||
/datum/mutation/human/chav/say_mod(var/message)
|
||||
/datum/mutation/human/chav/say_mod(message)
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," looking at "," gawpin' at ")
|
||||
@@ -568,7 +568,7 @@
|
||||
if(prob(15))
|
||||
owner.visible_message("<b>[owner]</b> [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!")
|
||||
|
||||
/datum/mutation/human/elvis/say_mod(var/message)
|
||||
/datum/mutation/human/elvis/say_mod(message)
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," i'm not "," I aint ")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
var/time = 100 // 1/10 part of second
|
||||
|
||||
|
||||
/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous
|
||||
/datum/recipe/proc/check_reagents(datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous
|
||||
. = 1
|
||||
for (var/r_r in reagents)
|
||||
var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r)
|
||||
@@ -53,7 +53,7 @@
|
||||
return -1
|
||||
return .
|
||||
|
||||
/datum/recipe/proc/check_items(var/obj/container as obj) //1=precisely, 0=insufficiently, -1=superfluous
|
||||
/datum/recipe/proc/check_items(obj/container) //1=precisely, 0=insufficiently, -1=superfluous
|
||||
if (!items)
|
||||
if (locate(/obj/) in container)
|
||||
return -1
|
||||
@@ -75,7 +75,7 @@
|
||||
return .
|
||||
|
||||
//general version
|
||||
/datum/recipe/proc/make(var/obj/container as obj)
|
||||
/datum/recipe/proc/make(obj/container)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to(result_obj, O.reagents.total_volume)
|
||||
@@ -84,7 +84,7 @@
|
||||
return result_obj
|
||||
|
||||
// food-related
|
||||
/datum/recipe/proc/make_food(var/obj/container as obj)
|
||||
/datum/recipe/proc/make_food(obj/container)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
if (O.reagents)
|
||||
@@ -95,7 +95,7 @@
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num)
|
||||
/proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj, exact = 1 as num)
|
||||
if (!exact)
|
||||
exact = -1
|
||||
var/list/datum/recipe/possible_recipes = new
|
||||
|
||||
@@ -94,17 +94,17 @@
|
||||
jaunt_duration = 50 //in deciseconds
|
||||
centcom_cancast = 0 //Stop people from getting to centcom
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(atom/movable/overlay/animation, mob/living/target)
|
||||
animation.icon_state = "phase_shift"
|
||||
animation.dir = target.dir
|
||||
flick("phase_shift",animation)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_reappear(var/atom/movable/overlay/animation, var/mob/living/target)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_reappear(atom/movable/overlay/animation, mob/living/target)
|
||||
animation.icon_state = "phase_shift2"
|
||||
animation.dir = target.dir
|
||||
flick("phase_shift2",animation)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_steam(var/mobloc)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_steam(mobloc)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser
|
||||
|
||||
@@ -60,16 +60,16 @@
|
||||
qdel(animation)
|
||||
qdel(holder)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_disappear(atom/movable/overlay/animation, mob/living/target)
|
||||
animation.icon_state = "liquify"
|
||||
flick("liquify",animation)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_reappear(var/atom/movable/overlay/animation, var/mob/living/target)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_reappear(atom/movable/overlay/animation, mob/living/target)
|
||||
flick("reappear",animation)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(var/mobloc)
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, mobloc)
|
||||
steam.start()
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
action_icon_state = "fireball"
|
||||
sound = "sound/magic/Fireball.ogg"
|
||||
|
||||
/obj/effect/proc_holder/spell/turf/fireball/cast(var/turf/T)
|
||||
/obj/effect/proc_holder/spell/turf/fireball/cast(turf/T)
|
||||
explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ var/const/supply_misc = 8
|
||||
|
||||
var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engineer,supply_medical,supply_science,supply_organic,supply_materials,supply_misc)
|
||||
|
||||
/proc/get_supply_group_name(var/cat)
|
||||
/proc/get_supply_group_name(cat)
|
||||
switch(cat)
|
||||
if(1)
|
||||
return "Emergency"
|
||||
|
||||
@@ -49,14 +49,14 @@ var/list/uplink_items = list()
|
||||
var/list/excludefrom = list() //Empty list does nothing. Place the name of gamemode you don't want this item to be available in here. This is so you dont have to list EVERY mode to exclude something.
|
||||
var/surplus = 100 //Chance of being included in the surplus crate (when pick() selects it)
|
||||
|
||||
/datum/uplink_item/proc/spawn_item(var/turf/loc, var/obj/item/device/uplink/U)
|
||||
/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
if(item)
|
||||
U.uses -= max(cost, 0)
|
||||
U.used_TC += cost
|
||||
feedback_add_details("traitor_uplink_items_bought", "[item]")
|
||||
return new item(loc)
|
||||
|
||||
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
/datum/uplink_item/proc/buy(obj/item/device/uplink/U, mob/user)
|
||||
|
||||
..()
|
||||
if(!istype(U))
|
||||
@@ -775,7 +775,7 @@ var/list/uplink_items = list()
|
||||
item = /obj/item/weapon/storage/box/syndicate
|
||||
cost = 0
|
||||
|
||||
/datum/uplink_item/badass/random/spawn_item(var/turf/loc, var/obj/item/device/uplink/U)
|
||||
/datum/uplink_item/badass/random/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
|
||||
var/list/buyable_items = get_uplink_items()
|
||||
var/list/possible_items = list()
|
||||
|
||||
@@ -118,7 +118,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
A.update_icon()
|
||||
|
||||
|
||||
/datum/wires/airlock/UpdatePulsed(var/index)
|
||||
/datum/wires/airlock/UpdatePulsed(index)
|
||||
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(index)
|
||||
|
||||
@@ -9,7 +9,7 @@ var/const/AALARM_WIRE_AI_CONTROL = 8
|
||||
var/const/AALARM_WIRE_AALARM = 16
|
||||
|
||||
|
||||
/datum/wires/alarm/CanUse(var/mob/living/L)
|
||||
/datum/wires/alarm/CanUse(mob/living/L)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
if(A.panel_open && A.buildstage == 2)
|
||||
return 1
|
||||
@@ -20,7 +20,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
. += ..()
|
||||
. += text("<br>\n[(A.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
||||
|
||||
/datum/wires/alarm/UpdateCut(var/index, var/mended)
|
||||
/datum/wires/alarm/UpdateCut(index, mended)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
switch(index)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
@@ -50,7 +50,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
A.post_alert(2)
|
||||
A.update_icon()
|
||||
|
||||
/datum/wires/alarm/UpdatePulsed(var/index)
|
||||
/datum/wires/alarm/UpdatePulsed(index)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
switch(index)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
|
||||
@@ -13,13 +13,13 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
. += text("<br>\n[(A.locked ? "The APC is locked." : "The APC is unlocked.")]<br>\n[(A.shorted ? "The APCs power has been shorted." : "The APC is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
||||
|
||||
|
||||
/datum/wires/apc/CanUse(var/mob/living/L)
|
||||
/datum/wires/apc/CanUse(mob/living/L)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
if(A.wiresexposed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/apc/UpdatePulsed(var/index)
|
||||
/datum/wires/apc/UpdatePulsed(index)
|
||||
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
|
||||
@@ -53,7 +53,7 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
|
||||
A.updateDialog()
|
||||
|
||||
/datum/wires/apc/UpdateCut(var/index, var/mended)
|
||||
/datum/wires/apc/UpdateCut(index, mended)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
|
||||
switch(index)
|
||||
|
||||
@@ -18,7 +18,7 @@ var/const/AUTOLATHE_DISABLE_WIRE = 4
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/autolathe/Interact(var/mob/living/user)
|
||||
/datum/wires/autolathe/Interact(mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/autolathe/V = holder
|
||||
V.attack_hand(user)
|
||||
|
||||
@@ -6,12 +6,12 @@ var/const/WIRE_EXPLODE = 1
|
||||
/datum/wires/explosive/proc/explode()
|
||||
return
|
||||
|
||||
/datum/wires/explosive/UpdatePulsed(var/index)
|
||||
/datum/wires/explosive/UpdatePulsed(index)
|
||||
switch(index)
|
||||
if(WIRE_EXPLODE)
|
||||
explode()
|
||||
|
||||
/datum/wires/explosive/UpdateCut(var/index, var/mended)
|
||||
/datum/wires/explosive/UpdateCut(index, mended)
|
||||
switch(index)
|
||||
if(WIRE_EXPLODE)
|
||||
if(!mended)
|
||||
@@ -20,7 +20,7 @@ var/const/WIRE_EXPLODE = 1
|
||||
/datum/wires/explosive/c4
|
||||
holder_type = /obj/item/weapon/c4
|
||||
|
||||
/datum/wires/explosive/c4/CanUse(var/mob/living/L)
|
||||
/datum/wires/explosive/c4/CanUse(mob/living/L)
|
||||
var/obj/item/weapon/c4/P = holder
|
||||
if(P.open_panel)
|
||||
return 1
|
||||
@@ -35,10 +35,10 @@ var/const/WIRE_EXPLODE = 1
|
||||
/datum/wires/explosive/gibtonite
|
||||
holder_type = /obj/item/weapon/twohanded/required/gibtonite
|
||||
|
||||
/datum/wires/explosive/gibtonite/CanUse(var/mob/living/L)
|
||||
/datum/wires/explosive/gibtonite/CanUse(mob/living/L)
|
||||
return 1
|
||||
|
||||
/datum/wires/explosive/gibtonite/UpdateCut(var/index, var/mended)
|
||||
/datum/wires/explosive/gibtonite/UpdateCut(index, mended)
|
||||
return
|
||||
|
||||
/datum/wires/explosive/gibtonite/explode()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user