mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Get Turf Optimizations
This commit is contained in:
@@ -461,7 +461,7 @@
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?src=\ref[src];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='?src=\ref[usr];priv_msg=\ref[M]'>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>"
|
||||
@@ -471,7 +471,7 @@
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?src=\ref[src];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='?src=\ref[usr];priv_msg=\ref[M]'>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>"
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
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!
|
||||
|
||||
/client/proc/play_server_sound()
|
||||
|
||||
@@ -469,7 +469,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
|
||||
|
||||
@@ -200,7 +200,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/mineral/plastic
|
||||
M.amount = 10
|
||||
M.loc = get_turf_loc(holder.my_atom)
|
||||
M.loc = get_turf(holder.my_atom)
|
||||
return
|
||||
|
||||
virus_food
|
||||
@@ -390,10 +390,10 @@ datum
|
||||
if(!H) //H is not null.
|
||||
return
|
||||
if(H.mind && H.mind.changeling) //Checks if H, the blood donor is a ling.
|
||||
for(var/mob/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/M in viewers(get_turf(holder.my_atom), null))
|
||||
M.show_message( "<span class='danger'>The blood writhes and wriggles and sizzles away from the container!</span>", 1, "<span class='warning'>You hear bubbling and sizzling.</span>", 2)
|
||||
else
|
||||
for(var/mob/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
for(var/mob/M in viewers(get_turf(holder.my_atom), null))
|
||||
M.show_message( "<span class ='notice'>The blood seems to break apart in the fuel.</span>", 1)
|
||||
holder.del_reagent("blood")
|
||||
return
|
||||
@@ -411,10 +411,10 @@ datum
|
||||
required_container = /obj/item/slime_extract/grey
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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)
|
||||
|
||||
|
||||
slimeinaprov
|
||||
@@ -440,7 +440,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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
|
||||
@@ -464,10 +464,10 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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
|
||||
@@ -484,9 +484,9 @@ datum
|
||||
|
||||
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)
|
||||
|
||||
@@ -494,11 +494,11 @@ 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))
|
||||
// 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 core fizzles disappointingly,"), 1)
|
||||
|
||||
|
||||
@@ -547,9 +547,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)
|
||||
|
||||
@@ -557,7 +557,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))
|
||||
@@ -574,9 +574,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)
|
||||
|
||||
@@ -584,7 +584,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))
|
||||
@@ -609,11 +609,11 @@ datum
|
||||
required_container = /obj/item/slime_extract/darkblue
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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 -= 140
|
||||
M << "\blue You feel a chill!"
|
||||
|
||||
@@ -654,7 +654,7 @@ datum
|
||||
required_container = /obj/item/slime_extract/yellow
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
empulse(get_turf_loc(holder.my_atom), 3, 7)
|
||||
empulse(get_turf(holder.my_atom), 3, 7)
|
||||
|
||||
|
||||
slimecell
|
||||
@@ -667,7 +667,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/obj/item/weapon/stock_parts/cell/slime/P = new /obj/item/weapon/stock_parts/cell/slime
|
||||
P.loc = get_turf_loc(holder.my_atom)
|
||||
P.loc = get_turf(holder.my_atom)
|
||||
|
||||
slimeglow
|
||||
name = "Slime Glow"
|
||||
@@ -695,7 +695,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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)
|
||||
|
||||
|
||||
|
||||
@@ -721,7 +721,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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
|
||||
@@ -745,7 +745,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
|
||||
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
|
||||
@@ -759,7 +759,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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
|
||||
@@ -782,10 +782,10 @@ datum
|
||||
required_container = /obj/item/slime_extract/oil
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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"
|
||||
@@ -797,7 +797,7 @@ datum
|
||||
required_other = 1
|
||||
on_reaction(var/datum/reagents/holder)
|
||||
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"
|
||||
@@ -1095,7 +1095,7 @@ datum
|
||||
required_reagents = list("coffee" = 5, "sugar" = 5, "rum" = 5)
|
||||
required_catalysts = list("enzyme" = 5)
|
||||
result_amount = 5
|
||||
|
||||
|
||||
kahluaVodka
|
||||
name = "KahluaVodka"
|
||||
id = "kahlauVodka"
|
||||
|
||||
Reference in New Issue
Block a user