mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user