mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 18:51:53 +00:00
73 lines
1.5 KiB
Plaintext
73 lines
1.5 KiB
Plaintext
/proc/parse_zone(zone)
|
|
if(zone == "r_hand") return "right hand"
|
|
else if (zone == "l_hand") return "left hand"
|
|
else if (zone == "l_arm") return "left arm"
|
|
else if (zone == "r_arm") return "right arm"
|
|
else if (zone == "l_leg") return "left leg"
|
|
else if (zone == "r_leg") return "right leg"
|
|
else if (zone == "l_foot") return "left foot"
|
|
else if (zone == "r_foot") return "right foot"
|
|
else return zone
|
|
|
|
/proc/text2dir(direction)
|
|
switch(uppertext(direction))
|
|
if("NORTH")
|
|
return 1
|
|
if("SOUTH")
|
|
return 2
|
|
if("EAST")
|
|
return 4
|
|
if("WEST")
|
|
return 8
|
|
if("NORTHEAST")
|
|
return 5
|
|
if("NORTHWEST")
|
|
return 9
|
|
if("SOUTHEAST")
|
|
return 6
|
|
if("SOUTHWEST")
|
|
return 10
|
|
else
|
|
return
|
|
|
|
/proc/get_turf(turf/location as turf)
|
|
while (location)
|
|
if (istype(location, /turf))
|
|
return location
|
|
|
|
location = location.loc
|
|
return null
|
|
|
|
/proc/get_turf_or_move(turf/location as turf)
|
|
location = get_turf(location)
|
|
return location
|
|
|
|
|
|
|
|
/proc/dir2text(direction)
|
|
switch(direction)
|
|
if(1.0)
|
|
return "north"
|
|
if(2.0)
|
|
return "south"
|
|
if(4.0)
|
|
return "east"
|
|
if(8.0)
|
|
return "west"
|
|
if(5.0)
|
|
return "northeast"
|
|
if(6.0)
|
|
return "southeast"
|
|
if(9.0)
|
|
return "northwest"
|
|
if(10.0)
|
|
return "southwest"
|
|
else
|
|
return
|
|
|
|
/obj/proc/hear_talk(mob/M as mob, text)
|
|
var/mob/mo = locate(/mob) in src
|
|
if(mo)
|
|
var/rendered = "<span class='game say'><span class='name'>[M.name]: </span> <span class='message'>[text]</span></span>"
|
|
mo.show_message(rendered, 2)
|
|
return |