mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
*Small tidy-up of various helper procs*
-Turns out there was already a Gaussian PRNG proc already, used by mechs and turrets. I've replaced it with my one as mine has almost half the cost. (currently broken! still waiting for fixes to be pulled!) -replaced between(min, val, max) with Clamp(val, min, max) -get_turf(thing) now uses var/list/locs to locate its turf, rather than iterating up through loc of its loc of its loc...etc -sign(num) moved to maths.dm -InRange(val, min, max) replaced with IsInRange(val, min, max) (they were identical) -Removed ismultitool() iswrench() iscoil() iswire() iswelder() iscrowbar() etc -removed modulus(num) as abs() performs the same task! *roll-eyes* -removed get_mob_with_client_list() as it is no longer needed (we have var/list/player_list now) -removed get_turf_or_move() as it simply called get_turf -removed get_turf_loc() as it was identical to get_turf() *Additions:* -The "Declare Ready" link in the lobby will automatically become "Join Game" if the round starts before you declare ready, so you don't have to click it twice
This commit is contained in:
@@ -169,23 +169,23 @@
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = between(
|
||||
0,
|
||||
input_pressure_min = Clamp(
|
||||
text2num(signal.data["set_input_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = between(
|
||||
0,
|
||||
output_pressure_max = Clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = between(
|
||||
0,
|
||||
external_pressure_bound = Clamp(
|
||||
text2num(signal.data["set_external_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
@@ -113,9 +113,9 @@ obj/machinery/atmospherics/binary/passive_gate
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = between(
|
||||
0,
|
||||
target_pressure = Clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@ obj/machinery/atmospherics/binary/pump
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = between(
|
||||
0,
|
||||
target_pressure = Clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
on = !on
|
||||
|
||||
if("set_transfer_rate" in signal.data)
|
||||
transfer_rate = between(
|
||||
0,
|
||||
transfer_rate = Clamp(
|
||||
text2num(signal.data["set_transfer_rate"]),
|
||||
0,
|
||||
air1.volume
|
||||
)
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
if("set_volume_rate" in signal.data)
|
||||
var/number = text2num(signal.data["set_volume_rate"])
|
||||
volume_rate = between(0, number, air_contents.volume)
|
||||
volume_rate = Clamp(number, 0, air_contents.volume)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
|
||||
@@ -214,30 +214,30 @@
|
||||
pump_direction = text2num(signal.data["direction"])
|
||||
|
||||
if("set_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = between(
|
||||
0,
|
||||
internal_pressure_bound = Clamp(
|
||||
text2num(signal.data["set_internal_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = between(
|
||||
0,
|
||||
external_pressure_bound = Clamp(
|
||||
text2num(signal.data["set_external_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("adjust_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = between(
|
||||
0,
|
||||
internal_pressure_bound = Clamp(
|
||||
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("adjust_external_pressure" in signal.data)
|
||||
external_pressure_bound = between(
|
||||
0,
|
||||
external_pressure_bound = Clamp(
|
||||
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
+13
-14
@@ -31,29 +31,28 @@
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
proc/listgetindex(var/list/list,index)
|
||||
if(istype(list) && list.len)
|
||||
proc/listgetindex(list/L, index)
|
||||
if(istype(L))
|
||||
if(isnum(index))
|
||||
if(InRange(index,1,list.len))
|
||||
return list[index]
|
||||
else if(index in list)
|
||||
return list[index]
|
||||
if(IsInRange(index,1,L.len))
|
||||
return L[index]
|
||||
else if(index in L)
|
||||
return L[index]
|
||||
return
|
||||
|
||||
proc/islist(list/list)
|
||||
if(istype(list))
|
||||
proc/islist(list/L)
|
||||
if(istype(L))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Return either pick(list) or null if list is not of type /list or is empty
|
||||
proc/safepick(list/list)
|
||||
if(!islist(list) || !list.len)
|
||||
return
|
||||
return pick(list)
|
||||
proc/safepick(list/L)
|
||||
if(istype(L) && L.len)
|
||||
return pick(L)
|
||||
|
||||
//Checks if the list is empty
|
||||
proc/isemptylist(list/list)
|
||||
if(!list.len)
|
||||
proc/isemptylist(list/L)
|
||||
if(!L.len)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
var/const/E = 2.71828183
|
||||
var/const/Sqrt2 = 1.41421356
|
||||
|
||||
/proc/sign(x)
|
||||
return x!=0?x/abs(x):0
|
||||
|
||||
/proc/Atan2(x, y)
|
||||
if(!x && !y) return 0
|
||||
@@ -110,7 +112,7 @@ var/const/Sqrt2 = 1.41421356
|
||||
var/t = round((val - min) / d)
|
||||
return val - (t * d)
|
||||
|
||||
//polar variant of a gaussian distributed PRNG
|
||||
//converts a uniform distributed random number into a normal distributed one
|
||||
//since this method produces two random numbers, one is saved for subsequent calls
|
||||
//(making the cost negligble for every second call)
|
||||
//This will return +/- decimals, situated about mean with standard deviation stddev
|
||||
|
||||
+7
-104
@@ -36,12 +36,6 @@
|
||||
/proc/dd_range(var/low, var/high, var/num)
|
||||
return max(low,min(high,num))
|
||||
|
||||
//Returns whether or not A is the middle most value
|
||||
/proc/InRange(var/A, var/lower, var/upper)
|
||||
if(A < lower) return 0
|
||||
if(A > upper) return 0
|
||||
return 1
|
||||
|
||||
|
||||
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
|
||||
if(!start || !end) return 0
|
||||
@@ -189,9 +183,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/sign(x)
|
||||
return x!=0?x/abs(x):0
|
||||
|
||||
/proc/getline(atom/M,atom/N)//Ultra-Fast Bresenham Line-Drawing Algorithm
|
||||
var/px=M.x //starting x
|
||||
var/py=M.y
|
||||
@@ -468,14 +459,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/M = E/(SPEED_OF_LIGHT_SQ)
|
||||
return M
|
||||
|
||||
//Forces a variable to be posative
|
||||
/proc/modulus(var/M)
|
||||
if(M >= 0)
|
||||
return M
|
||||
if(M < 0)
|
||||
return -M
|
||||
|
||||
|
||||
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
|
||||
var/mob/M
|
||||
var/client/C
|
||||
@@ -534,15 +517,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
/proc/key_name_admin(var/whom, var/include_name = 1)
|
||||
return key_name(whom, 1, include_name)
|
||||
|
||||
|
||||
//Will return the location of the turf an atom is ultimatly sitting on
|
||||
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
|
||||
//in case they're in a closet or sleeper or something
|
||||
var/atom/loc = M.loc
|
||||
while(loc && !istype(loc, /turf/))
|
||||
loc = loc.loc
|
||||
return loc
|
||||
|
||||
// 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)
|
||||
@@ -600,27 +574,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/y = min(world.maxy, max(1, A.y + dy))
|
||||
return locate(x,y,A.z)
|
||||
|
||||
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
|
||||
/proc/between(var/low, var/middle, var/high)
|
||||
return max(min(middle, high), low)
|
||||
|
||||
proc/arctan(x)
|
||||
var/y=arcsin(x/sqrt(1+x*x))
|
||||
return y
|
||||
|
||||
//returns random gauss number
|
||||
proc/GaussRand(var/sigma)
|
||||
var/x,y,rsq
|
||||
do
|
||||
x=2*rand()-1
|
||||
y=2*rand()-1
|
||||
rsq=x*x+y*y
|
||||
while(rsq>1 || !rsq)
|
||||
return sigma*y*sqrt(-2*log(rsq)/rsq)
|
||||
|
||||
//returns random gauss number, rounded to 'roundto'
|
||||
proc/GaussRandRound(var/sigma,var/roundto)
|
||||
return round(GaussRand(sigma),roundto)
|
||||
|
||||
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)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
@@ -755,10 +712,9 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
|
||||
//Returns: all the areas in the world
|
||||
/proc/return_areas()
|
||||
var/list/area/areas = list()
|
||||
. = list()
|
||||
for(var/area/A in world)
|
||||
areas += A
|
||||
return areas
|
||||
. += A
|
||||
|
||||
//Returns: all the areas in the world, sorted.
|
||||
/proc/return_sorted_areas()
|
||||
@@ -1155,14 +1111,6 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
. = orange(distance,center)
|
||||
return
|
||||
|
||||
proc/get_mob_with_client_list()
|
||||
var/list/mobs = list()
|
||||
for(var/mob/M in world)
|
||||
if (M.client)
|
||||
mobs += M
|
||||
return mobs
|
||||
|
||||
|
||||
/proc/parse_zone(zone)
|
||||
if(zone == "r_hand") return "right hand"
|
||||
else if (zone == "l_hand") return "left hand"
|
||||
@@ -1175,12 +1123,11 @@ proc/get_mob_with_client_list()
|
||||
else return zone
|
||||
|
||||
|
||||
/proc/get_turf(turf/location)
|
||||
while(location)
|
||||
if(isturf(location))
|
||||
return location
|
||||
location = location.loc
|
||||
return null
|
||||
/proc/get_turf(atom/movable/AM)
|
||||
if(istype(AM))
|
||||
return locate(/turf) in AM.locs
|
||||
else if(isturf(AM))
|
||||
return AM
|
||||
|
||||
/proc/get(atom/loc, type)
|
||||
while(loc)
|
||||
@@ -1189,10 +1136,6 @@ proc/get_mob_with_client_list()
|
||||
loc = loc.loc
|
||||
return null
|
||||
|
||||
/proc/get_turf_or_move(turf/location)
|
||||
return get_turf(location)
|
||||
|
||||
|
||||
//Quick type checks for some tools
|
||||
var/global/list/common_tools = list(
|
||||
/obj/item/weapon/cable_coil,
|
||||
@@ -1208,46 +1151,6 @@ var/global/list/common_tools = list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswrench(O)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswelder(O)
|
||||
if(istype(O, /obj/item/weapon/weldingtool))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iscoil(O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswirecutter(O)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isscrewdriver(O)
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/ismultitool(O)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iscrowbar(O)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswire(O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/is_hot(obj/item/W as obj)
|
||||
switch(W.type)
|
||||
if(/obj/item/weapon/weldingtool)
|
||||
|
||||
@@ -105,14 +105,14 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
var/obj/item/I = L.get_active_hand()
|
||||
holder.add_hiddenprint(L)
|
||||
if(href_list["cut"]) // Toggles the cut/mend status
|
||||
if(iswirecutter(I))
|
||||
if(istype(I, /obj/item/weapon/wirecutters))
|
||||
var/colour = href_list["cut"]
|
||||
CutWireColour(colour)
|
||||
else
|
||||
L << "<span class='error'>You need wirecutters!</span>"
|
||||
|
||||
else if(href_list["pulse"])
|
||||
if(ismultitool(I))
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/colour = href_list["pulse"]
|
||||
PulseColour(colour)
|
||||
else
|
||||
|
||||
@@ -242,6 +242,8 @@ var/global/datum/controller/gameticker/ticker
|
||||
else
|
||||
player.create_character()
|
||||
del(player)
|
||||
else
|
||||
player.new_player_panel()
|
||||
|
||||
|
||||
proc/collect_minds()
|
||||
|
||||
@@ -1090,7 +1090,7 @@ Code shamelessly copied from apc_frame
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
|
||||
var/turf/loc = get_turf_loc(usr)
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Air Alarm cannot be placed on this spot."
|
||||
@@ -1452,7 +1452,7 @@ Code shamelessly copied from apc_frame
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
|
||||
var/turf/loc = get_turf_loc(usr)
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Fire Alarm cannot be placed on this spot."
|
||||
|
||||
@@ -255,7 +255,7 @@ Rate: [volume_rate] L/sec<BR>"}
|
||||
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
pressure_setting = between(0, pressure_setting + change, 50*ONE_ATMOSPHERE)
|
||||
pressure_setting = Clamp(pressure_setting + change, 0, 50*ONE_ATMOSPHERE)
|
||||
spawn(1)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
|
||||
|
||||
// DECONSTRUCTION
|
||||
if(isscrewdriver(W))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
//user << "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>"
|
||||
//if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown
|
||||
panel_open = !panel_open
|
||||
@@ -111,10 +111,10 @@
|
||||
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
else if((iswirecutter(W) || ismultitool(W)) && panel_open)
|
||||
else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
wires.Interact(user)
|
||||
|
||||
else if(iswelder(W) && wires.CanDeconstruct())
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && wires.CanDeconstruct())
|
||||
if(weld(W, user))
|
||||
if(assembly)
|
||||
assembly.loc = src.loc
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
if(0)
|
||||
// State 0
|
||||
if(iswrench(W) && isturf(src.loc))
|
||||
if(istype(W, /obj/item/weapon/wrench) && isturf(src.loc))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "You wrench the assembly into place."
|
||||
anchored = 1
|
||||
@@ -39,14 +39,14 @@
|
||||
|
||||
if(1)
|
||||
// State 1
|
||||
if(iswelder(W))
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(weld(W, user))
|
||||
user << "You weld the assembly securely into place."
|
||||
anchored = 1
|
||||
state = 2
|
||||
return
|
||||
|
||||
else if(iswrench(W))
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "You unattach the assembly from it's place."
|
||||
anchored = 0
|
||||
@@ -56,14 +56,14 @@
|
||||
|
||||
if(2)
|
||||
// State 2
|
||||
if(iscoil(W))
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.use(2))
|
||||
user << "You add wires to the assembly."
|
||||
state = 3
|
||||
return
|
||||
|
||||
else if(iswelder(W))
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
if(weld(W, user))
|
||||
user << "You unweld the assembly from it's place."
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
if(3)
|
||||
// State 3
|
||||
if(isscrewdriver(W))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
@@ -108,7 +108,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
else if(iswirecutter(W))
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
|
||||
new/obj/item/weapon/cable_coil(get_turf(src), 2)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
|
||||
// Taking out upgrades
|
||||
else if(iscrowbar(W) && upgrades.len)
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && upgrades.len)
|
||||
var/obj/U = locate(/obj) in upgrades
|
||||
if(U)
|
||||
user << "You unattach an upgrade from the assembly."
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
message = rebootmsg
|
||||
else
|
||||
user << "<span class='notice'>A no server error appears on the screen.</span>"
|
||||
if(isscrewdriver(O) && emag)
|
||||
if(istype(O, /obj/item/weapon/screwdriver) && emag)
|
||||
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
|
||||
user << "<span class='warning'>It is too hot to mess with!</span>"
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/carbon/M = T.imp_in
|
||||
if(M.z == 1 && !istype(M.loc, /turf/space))
|
||||
var/turf/mob_loc = get_turf_loc(M)
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
dat += "ID: [T.id] | Location: [loc_display]<BR>"
|
||||
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font class='bad'><i>Message Holder</i></font>)</A> |<BR>"
|
||||
|
||||
@@ -215,7 +215,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
switch(environment.temperature)
|
||||
if(T0C to (T20C + 20))
|
||||
integrity = between(0, integrity, 100)
|
||||
integrity = Clamp(integrity, 0, 100)
|
||||
if((T20C + 20) to (T0C + 70))
|
||||
integrity = max(0, integrity - 1)
|
||||
if(delay)
|
||||
|
||||
@@ -555,7 +555,7 @@
|
||||
if(src)
|
||||
src.process()
|
||||
if(href_list["scan_range"])
|
||||
src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
|
||||
src.scan_range = Clamp(src.scan_range+text2num(href_list["scan_range"]), 1, 8)
|
||||
if(href_list["scan_for"])
|
||||
if(href_list["scan_for"] in scan_for)
|
||||
scan_for[href_list["scan_for"]] = !scan_for[href_list["scan_for"]]
|
||||
@@ -626,20 +626,23 @@
|
||||
var/target_y = targloc.y
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!src) break
|
||||
var/turf/curloc = get_turf(src)
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if (!targloc || !curloc)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
continue
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
|
||||
src.projectiles--
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
spawn(-1)
|
||||
for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!src) break
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/dx = round(gaussian(0,deviation),1)
|
||||
var/dy = round(gaussian(0,deviation),1)
|
||||
targloc = locate(target_x+dx, target_y+dy, target_z)
|
||||
if (!targloc || !curloc)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
continue
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
|
||||
src.projectiles--
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
return
|
||||
|
||||
@@ -203,7 +203,9 @@
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
var/dx = round(gaussian(0,deviation),1)
|
||||
var/dy = round(gaussian(0,deviation),1)
|
||||
targloc = locate(target_x+dx, target_y+dy, target_z)
|
||||
if(!targloc || targloc == curloc)
|
||||
break
|
||||
playsound(chassis, fire_sound, 80, 1)
|
||||
@@ -242,7 +244,9 @@
|
||||
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!chassis) break
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
var/dx = round(gaussian(0,deviation),1)
|
||||
var/dy = round(gaussian(0,deviation),1)
|
||||
targloc = locate(target_x+dx, target_y+dy, target_z)
|
||||
if (!targloc || !curloc)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
var/index = filter.getNum("index")
|
||||
var/new_index = index + filter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index))
|
||||
if(InRange(new_index,1,queue.len))
|
||||
if(IsInRange(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf_loc(usr)
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red APC cannot be placed on this spot."
|
||||
|
||||
@@ -74,7 +74,7 @@ move an amendment</a> to the drawing.</p>
|
||||
|
||||
|
||||
/obj/item/blueprints/proc/get_area()
|
||||
var/turf/T = get_turf_loc(usr)
|
||||
var/turf/T = get_turf(usr)
|
||||
var/area/A = T.loc
|
||||
A = A.master
|
||||
return A
|
||||
@@ -101,7 +101,7 @@ move an amendment</a> to the drawing.</p>
|
||||
|
||||
/obj/item/blueprints/proc/create_area()
|
||||
//world << "DEBUG: create_area"
|
||||
var/res = detect_room(get_turf_loc(usr))
|
||||
var/res = detect_room(get_turf(usr))
|
||||
if(!istype(res,/list))
|
||||
switch(res)
|
||||
if(ROOM_ERR_SPACE)
|
||||
|
||||
@@ -392,7 +392,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (3)
|
||||
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
||||
|
||||
var/turf/T = get_turf_or_move(user.loc)
|
||||
var/turf/T = get_turf(user.loc)
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
@@ -655,7 +655,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("1") // Configure pAI device
|
||||
pai.attack_self(U)
|
||||
if("2") // Eject pAI device
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
pai.loc = T
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
if(9) src.overlays += "pai-what"
|
||||
|
||||
/obj/item/device/paicard/proc/alertUpdate()
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
user.put_in_hands(src)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
src.loc = get_turf_loc(user)
|
||||
src.loc = get_turf(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
stake.pinned_target = null
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
return .
|
||||
|
||||
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
|
||||
if(isscrewdriver(I))
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
open_panel = !open_panel
|
||||
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
|
||||
else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
wires.Interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
if(iswrench(W) && !status)//Taking this apart
|
||||
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.loc = T
|
||||
@@ -85,7 +85,7 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(isscrewdriver(W) && igniter && !lit)
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && igniter && !lit)
|
||||
status = !status
|
||||
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
|
||||
update_icon()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
O.loc = T
|
||||
T.update_icon()
|
||||
animate()
|
||||
else if(iswrench(W))
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
|
||||
@@ -99,12 +99,12 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
anchored = !anchored
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
pinned_target.loc = get_turf(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
pinned_target = null
|
||||
@@ -425,7 +425,7 @@
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
|
||||
var/turf/mob_loc = get_turf_loc(M)
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
dat += "<td>[mob_loc.loc]</td></tr>"
|
||||
else
|
||||
dat += "<tr><td><i>Head not found!</i></td></tr>"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
|
||||
playsound(get_turf(src.mob), S, 50, 0, 0)
|
||||
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
return
|
||||
|
||||
if(!M)
|
||||
M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
|
||||
M = input("Direct narrate to who?", "Active Players") as null|anything in player_list
|
||||
|
||||
if(!M)
|
||||
return
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if((!A.secured) && (!secured))
|
||||
attach_assembly(A,user)
|
||||
return
|
||||
if(isscrewdriver(W))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(toggle_secure())
|
||||
user << "\blue \The [src] is ready!"
|
||||
else
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!a_left || !a_right)
|
||||
user << "\red BUG:Assembly part missing, please report this!"
|
||||
return
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
// Calculate previous position for transition
|
||||
|
||||
var/turf/FROM = T // the turf of origin we're travelling FROM
|
||||
var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO
|
||||
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
|
||||
|
||||
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
|
||||
@@ -1640,7 +1640,7 @@ ________________________________________________________________________________
|
||||
dat += "</ul>"
|
||||
if(1)
|
||||
dat += "<h4><img src=sos_5.png> Atmospheric Scan:</h4>"//Headers don't need breaks. They are automatically placed.
|
||||
var/turf/T = get_turf_or_move(U.loc)
|
||||
var/turf/T = get_turf(U.loc)
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading."
|
||||
else
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
if(href_list["choose"])
|
||||
chosen = href_list["choose"]
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = between(0, coinsToProduce + text2num(href_list["chooseAmt"]), 1000)
|
||||
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
if (src.output)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/mob/living/silicon/pai/proc/securityHUD()
|
||||
if(client)
|
||||
var/image/holder
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for(var/mob/living/carbon/human/perp in view(T))
|
||||
var/perpname = "wot"
|
||||
holder = perp.hud_list[ID_HUD]
|
||||
@@ -49,7 +49,7 @@
|
||||
/mob/living/silicon/pai/proc/medicalHUD()
|
||||
if(client)
|
||||
var/image/holder
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for(var/mob/living/carbon/human/patient in view(T))
|
||||
|
||||
var/foundVirus = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
return
|
||||
if(src.cable)
|
||||
if(get_dist(src, src.cable) > 1)
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\red [src.cable] rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2)
|
||||
del(src.cable)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
src.silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes
|
||||
src << "<font color=green><b>Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.</b></font>"
|
||||
if(prob(20))
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2)
|
||||
return src.death(0)
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
if(href_list["cancel"])
|
||||
src.hackdoor = null
|
||||
if(href_list["cable"])
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
src.cable = new /obj/item/weapon/pai_cable(T)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\red A port on [src] opens to reveal [src.cable], which promptly falls to the floor.", 3, "\red You hear the soft click of something light and hard falling to the ground.", 2)
|
||||
@@ -370,7 +370,7 @@
|
||||
/mob/living/silicon/pai/proc/CheckDNA(mob/living/carbon/M, mob/living/silicon/pai/P)
|
||||
var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
|
||||
if(answer == "Yes")
|
||||
var/turf/T = get_turf_or_move(P.loc)
|
||||
var/turf/T = get_turf(P.loc)
|
||||
for (var/mob/v in viewers(T))
|
||||
v.show_message("\blue [M] presses \his thumb against [P].", 3, "\blue [P] makes a sharp clicking sound as it extracts DNA material from [M].", 2)
|
||||
if(!check_dna_integrity(M))
|
||||
@@ -531,7 +531,7 @@
|
||||
/mob/living/silicon/pai/proc/softwareAtmo()
|
||||
var/dat = "<h3>Atmospheric Sensor</h4>"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
@@ -608,7 +608,7 @@
|
||||
|
||||
// Door Jack - supporting proc
|
||||
/mob/living/silicon/pai/proc/hackloop()
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
for(var/mob/living/silicon/ai/AI in player_list)
|
||||
if(T.loc)
|
||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
|
||||
|
||||
@@ -18,12 +18,7 @@
|
||||
tag = "mob_[next_mob_id++]"
|
||||
mob_list += src
|
||||
|
||||
verb/new_player_panel()
|
||||
set src = usr
|
||||
new_player_panel_proc()
|
||||
|
||||
|
||||
proc/new_player_panel_proc()
|
||||
proc/new_player_panel()
|
||||
|
||||
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
|
||||
|
||||
@@ -100,7 +95,7 @@
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
new_player_panel_proc()
|
||||
new_player_panel()
|
||||
|
||||
if(href_list["observe"])
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
user << "You start adding cables to the APC frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
var/turf/T = get_turf_loc(src)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/N = T.get_cable_node()
|
||||
if (prob(50) && electrocute_mob(usr, N, N))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf_loc(usr)
|
||||
var/turf/loc = get_turf(usr)
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red [src.name] cannot be placed on this spot."
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@ field_generator power level display
|
||||
// Scale % power to % num_power_levels and truncate value
|
||||
var/level = round(num_power_levels * power / field_generator_max_power)
|
||||
// Clamp between 0 and num_power_levels for out of range power values
|
||||
level = between(0, level, num_power_levels)
|
||||
level = Clamp(level, 0, num_power_levels)
|
||||
if(level)
|
||||
overlays += "+p[level]"
|
||||
|
||||
|
||||
@@ -211,35 +211,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
|
||||
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
|
||||
if(0)
|
||||
if(iswrench(O))
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
src.anchored = 1
|
||||
user.visible_message("[user.name] secures the [src.name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
temp_state++
|
||||
if(1)
|
||||
if(iswrench(O))
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
src.anchored = 0
|
||||
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
temp_state--
|
||||
else if(iscoil(O))
|
||||
else if(istype(O, /obj/item/weapon/cable_coil))
|
||||
if(O:use(1,user))
|
||||
user.visible_message("[user.name] adds wires to the [src.name].", \
|
||||
"You add some wires.")
|
||||
temp_state++
|
||||
if(2)
|
||||
if(iswirecutter(O))//TODO:Shock user if its on?
|
||||
if(istype(O, /obj/item/weapon/wirecutters))//TODO:Shock user if its on?
|
||||
user.visible_message("[user.name] removes some wires from the [src.name].", \
|
||||
"You remove some wires.")
|
||||
temp_state--
|
||||
else if(isscrewdriver(O))
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
|
||||
"You close the access panel.")
|
||||
temp_state++
|
||||
if(3)
|
||||
if(isscrewdriver(O))
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
@@ -362,35 +362,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
var/temp_state = src.construction_state
|
||||
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
|
||||
if(0)
|
||||
if(iswrench(O))
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
src.anchored = 1
|
||||
user.visible_message("[user.name] secures the [src.name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
temp_state++
|
||||
if(1)
|
||||
if(iswrench(O))
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
src.anchored = 0
|
||||
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
temp_state--
|
||||
else if(iscoil(O))
|
||||
else if(istype(O, /obj/item/weapon/cable_coil))
|
||||
if(O:use(1))
|
||||
user.visible_message("[user.name] adds wires to the [src.name].", \
|
||||
"You add some wires.")
|
||||
temp_state++
|
||||
if(2)
|
||||
if(iswirecutter(O))//TODO:Shock user if its on?
|
||||
if(istype(O, /obj/item/weapon/wirecutters))//TODO:Shock user if its on?
|
||||
user.visible_message("[user.name] removes some wires from the [src.name].", \
|
||||
"You remove some wires.")
|
||||
temp_state--
|
||||
else if(isscrewdriver(O))
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
|
||||
"You close the access panel.")
|
||||
temp_state++
|
||||
if(3)
|
||||
if(isscrewdriver(O))
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
|
||||
@@ -63,7 +63,7 @@ var/list/solars_list = list()
|
||||
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(iscrowbar(W))
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
var/obj/item/solar_assembly/S = locate() in src
|
||||
@@ -218,13 +218,13 @@ var/list/solars_list = list()
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
if(!anchored && isturf(loc))
|
||||
if(iswrench(W))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = 1
|
||||
user.visible_message("<span class='notice'>[user] wrenches the solar assembly into place.</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
return 1
|
||||
else
|
||||
if(iswrench(W))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = 0
|
||||
user.visible_message("<span class='notice'>[user] unwrenches the solar assembly from it's place.</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
@@ -251,7 +251,7 @@ var/list/solars_list = list()
|
||||
user.visible_message("<span class='notice'>[user] inserts the electronics into the solar assembly.</span>")
|
||||
return 1
|
||||
else
|
||||
if(iscrowbar(W))
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/weapon/tracker_electronics(src.loc)
|
||||
tracker = 0
|
||||
user.visible_message("<span class='notice'>[user] takes out the electronics from the solar assembly.</span>")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
if(iscrowbar(W))
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
var/obj/item/solar_assembly/S = locate() in src
|
||||
|
||||
@@ -757,8 +757,8 @@ datum
|
||||
if(chosen)
|
||||
// Calculate previous position for transition
|
||||
|
||||
var/turf/FROM = get_turf_loc(holder.my_atom) // the turf of origin we're travelling FROM
|
||||
var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO
|
||||
var/turf/FROM = get_turf(holder.my_atom) // the turf of origin we're travelling FROM
|
||||
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
|
||||
|
||||
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
@@ -819,16 +819,16 @@ datum
|
||||
)//exclusion list for things you don't want the reaction to create.
|
||||
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
var/chosen = pick(critters)
|
||||
var/mob/living/simple_animal/hostile/C = new chosen
|
||||
C.loc = get_turf_loc(holder.my_atom)
|
||||
C.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(C, pick(NORTH,SOUTH,EAST,WEST))
|
||||
@@ -845,9 +845,9 @@ datum
|
||||
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
|
||||
// BORK BORK BORK
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
@@ -855,7 +855,7 @@ datum
|
||||
var/chosen = pick(borks)
|
||||
var/obj/B = new chosen
|
||||
if(B)
|
||||
B.loc = get_turf_loc(holder.my_atom)
|
||||
B.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(B, pick(NORTH,SOUTH,EAST,WEST))
|
||||
@@ -926,10 +926,10 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!"), 1)
|
||||
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
|
||||
S.loc = get_turf_loc(holder.my_atom)
|
||||
S.loc = get_turf(holder.my_atom)
|
||||
|
||||
|
||||
slimemonkey
|
||||
@@ -944,7 +944,7 @@ datum
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/i = 1, i <= 3, i++)
|
||||
var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube
|
||||
M.loc = get_turf_loc(holder.my_atom)
|
||||
M.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Green
|
||||
slimemutate
|
||||
@@ -971,10 +971,10 @@ datum
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal
|
||||
M.amount = 15
|
||||
M.loc = get_turf_loc(holder.my_atom)
|
||||
M.loc = get_turf(holder.my_atom)
|
||||
var/obj/item/stack/sheet/plasteel/P = new /obj/item/stack/sheet/plasteel
|
||||
P.amount = 5
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Gold
|
||||
slimecrit
|
||||
@@ -987,7 +987,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
|
||||
@@ -1026,9 +1026,9 @@ datum
|
||||
|
||||
message_admins(message, 0, 1)
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
@@ -1036,7 +1036,7 @@ datum
|
||||
var/chosen = pick(critters)
|
||||
var/mob/living/simple_animal/hostile/C = new chosen
|
||||
C.faction = "slimesummon"
|
||||
C.loc = get_turf_loc(holder.my_atom)
|
||||
C.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(C, pick(NORTH,SOUTH,EAST,WEST))
|
||||
@@ -1051,7 +1051,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
|
||||
@@ -1090,16 +1090,16 @@ datum
|
||||
|
||||
message_admins(message, 0, 1)
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
var/chosen = pick(critters)
|
||||
var/mob/living/simple_animal/hostile/C = new chosen
|
||||
C.faction = "neutral"
|
||||
C.loc = get_turf_loc(holder.my_atom)
|
||||
C.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Silver
|
||||
slimebork
|
||||
@@ -1117,9 +1117,9 @@ datum
|
||||
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
|
||||
// BORK BORK BORK
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
@@ -1127,7 +1127,7 @@ datum
|
||||
var/chosen = pick(borks)
|
||||
var/obj/B = new chosen
|
||||
if(B)
|
||||
B.loc = get_turf_loc(holder.my_atom)
|
||||
B.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(B, pick(NORTH,SOUTH,EAST,WEST))
|
||||
@@ -1148,9 +1148,9 @@ datum
|
||||
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/drinks) - /obj/item/weapon/reagent_containers/food/drinks
|
||||
// BORK BORK BORK
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
@@ -1158,7 +1158,7 @@ datum
|
||||
var/chosen = pick(borks)
|
||||
var/obj/B = new chosen
|
||||
if(B)
|
||||
B.loc = get_turf_loc(holder.my_atom)
|
||||
B.loc = get_turf(holder.my_atom)
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(B, pick(NORTH,SOUTH,EAST,WEST))
|
||||
@@ -1187,11 +1187,11 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/M in range (get_turf_loc(holder.my_atom), 7))
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
|
||||
M.bodytemperature -= 240
|
||||
M << "\blue You feel a chill!"
|
||||
|
||||
@@ -1217,7 +1217,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
@@ -1244,7 +1244,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
empulse(get_turf_loc(holder.my_atom), 3, 7)
|
||||
empulse(get_turf(holder.my_atom), 3, 7)
|
||||
|
||||
|
||||
slimecell
|
||||
@@ -1258,7 +1258,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
slimeglow
|
||||
name = "Slime Glow"
|
||||
@@ -1270,10 +1270,10 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime begins to emit a soft light. Squeezing it will cause it to grow brightly."), 1)
|
||||
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
|
||||
F.loc = get_turf_loc(holder.my_atom)
|
||||
F.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Purple
|
||||
|
||||
@@ -1288,7 +1288,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
slimejam
|
||||
name = "Slime Jam"
|
||||
@@ -1315,7 +1315,7 @@ datum
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/stack/sheet/mineral/plasma/P = new /obj/item/stack/sheet/mineral/plasma
|
||||
P.amount = 10
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Red
|
||||
slimeglycerol
|
||||
@@ -1340,10 +1340,10 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/living/carbon/slime/slime in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
|
||||
slime.tame = 0
|
||||
slime.rabid = 1
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The [slime] is driven into a frenzy!."), 1)
|
||||
|
||||
//Pink
|
||||
@@ -1358,7 +1358,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
|
||||
//Black
|
||||
@@ -1384,10 +1384,10 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
|
||||
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
|
||||
sleep(50)
|
||||
explosion(get_turf_loc(holder.my_atom), 1 ,3, 6)
|
||||
explosion(get_turf(holder.my_atom), 1 ,3, 6)
|
||||
//Light Pink
|
||||
slimepotion2
|
||||
name = "Slime Potion 2"
|
||||
@@ -1400,7 +1400,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
//Adamantine
|
||||
slimegolem
|
||||
name = "Slime Golem"
|
||||
@@ -1413,7 +1413,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
|
||||
Z.loc = get_turf_loc(holder.my_atom)
|
||||
Z.loc = get_turf(holder.my_atom)
|
||||
Z.announce_to_ghosts()
|
||||
|
||||
|
||||
@@ -1441,8 +1441,8 @@ datum
|
||||
if(chosen)
|
||||
// Calculate previous position for transition
|
||||
|
||||
var/turf/FROM = get_turf_loc(holder.my_atom) // the turf of origin we're travelling FROM
|
||||
var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO
|
||||
var/turf/FROM = get_turf(holder.my_atom) // the turf of origin we're travelling FROM
|
||||
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
|
||||
|
||||
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
@@ -1491,7 +1491,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/weapon/slimesteroid2/P = new /obj/item/weapon/slimesteroid2
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
//Sepia
|
||||
slimecamera
|
||||
@@ -1505,7 +1505,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/device/camera/P = new /obj/item/device/camera
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
slimefilm
|
||||
name = "Slime Film"
|
||||
@@ -1518,7 +1518,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
var/obj/item/device/camera_film/P = new /obj/item/device/camera_film
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
|
||||
//Pyrite
|
||||
@@ -1537,7 +1537,7 @@ datum
|
||||
var/chosen = pick(paints)
|
||||
var/obj/P = new chosen
|
||||
if(P)
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
|
||||
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(wrapped)
|
||||
else
|
||||
wrapped.loc = get_turf_loc(src)
|
||||
wrapped.loc = get_turf(src)
|
||||
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ datum/design/proc/CalcReliability(var/list/temp_techs)
|
||||
for(var/datum/tech/T in temp_techs)
|
||||
if(T.id in req_tech)
|
||||
new_reliability += T.level
|
||||
new_reliability = between(reliability_base, new_reliability, 100)
|
||||
new_reliability = Clamp(new_reliability, reliability_base, 100)
|
||||
reliability = new_reliability
|
||||
return
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/stock_parts/S in src)
|
||||
T += S.rating * 0.1
|
||||
T = between (0, T, 1)
|
||||
T = Clamp(T, 0, 1)
|
||||
decon_mod = T
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
|
||||
|
||||
@@ -637,7 +637,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=1.5'>Load Design to Disk</A> || "
|
||||
else
|
||||
dat += "Name: [d_disk.blueprint.name]<BR>"
|
||||
dat += "Level: [between(0, (d_disk.blueprint.reliability + rand(-15,15)), 100)]<BR>"
|
||||
dat += "Level: [Clamp((d_disk.blueprint.reliability + rand(-15,15)), 0, 100)]<BR>"
|
||||
switch(d_disk.blueprint.build_type)
|
||||
if(IMPRINTER) dat += "Lathe Type: Circuit Imprinter<BR>"
|
||||
if(PROTOLATHE) dat += "Lathe Type: Proto-lathe<BR>"
|
||||
|
||||
@@ -134,7 +134,7 @@ research holder datum.
|
||||
if(DesignHasReqs(PD))
|
||||
AddDesign2Known(PD)
|
||||
for(var/datum/tech/T in known_tech)
|
||||
T = between(1,T.level,20)
|
||||
T = Clamp(T.level, 1, 20)
|
||||
for(var/datum/design/D in known_designs)
|
||||
D.CalcReliability(known_tech)
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(0 to T0C)
|
||||
health = min(100, health + 1)
|
||||
if(T0C to (T20C + 20))
|
||||
health = between(0, health, 100)
|
||||
health = Clamp(health, 0, 100)
|
||||
if((T20C + 20) to (T0C + 70))
|
||||
health = max(0, health - 1)
|
||||
if(health <= 0)
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
//Atmos Scanner
|
||||
dat += "<h4>Atmospheric Readings</h4>"
|
||||
|
||||
var/turf/T = get_turf_or_move(get_turf(src.master))
|
||||
var/turf/T = get_turf(get_turf(src.master))
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
|
||||
@@ -260,10 +260,10 @@
|
||||
last_relay = world.time
|
||||
var/speed_change = 0
|
||||
if(direction & NORTH)
|
||||
pr_inertial_movement.desired_delay = between(pr_inertial_movement.min_delay, pr_inertial_movement.desired_delay-1, pr_inertial_movement.max_delay)
|
||||
pr_inertial_movement.desired_delay = Clamp(pr_inertial_movement.desired_delay-1, pr_inertial_movement.min_delay, pr_inertial_movement.max_delay)
|
||||
speed_change = 1
|
||||
else if (direction & SOUTH)
|
||||
pr_inertial_movement.desired_delay = between(pr_inertial_movement.min_delay, pr_inertial_movement.desired_delay+1, pr_inertial_movement.max_delay)
|
||||
pr_inertial_movement.desired_delay = Clamp(pr_inertial_movement.desired_delay+1, pr_inertial_movement.min_delay, pr_inertial_movement.max_delay)
|
||||
speed_change = 1
|
||||
else if (src.can_rotate && direction & 4)
|
||||
src.dir = turn(src.dir, -90.0)
|
||||
|
||||
Reference in New Issue
Block a user