Files
VOREStation/code/game/objects/items/helper_procs.dm
n3ophyt3@gmail.com c48804b204 Made a change to the cloner, since I was getting reports of people abusing quirks in the damage system to pop clones out way early without having to muck about with things like cryo.
Mobs now have a "cloneloss" var, used to represent the fact that they aren't done being cloned. There are exactly 2 ways to heal cloneloss outside of badminnery.
1) Don't get popped out of the tube early.
2) Load a cryo tube with Clonexadone (mix Cyroxadone, Plasma, and Sodium to make) and hop in.

Clonexadone also happens to heal regular damages twice as fast as cryoxadone, so it has more use than just fixing quickclones.

PDA medscanners aren't sophisticated enough to detect cloning imperfections, but the ones found in medkits are.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1178 316c924e-a436-60f5-8080-3fe189b3f50e
2011-03-12 00:35:03 +00:00

133 lines
2.7 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
/proc/is_type_in_list(var/atom/A, var/list/L)
for(var/type in L)
if(isnull(type))
continue
if(istype(A, type))
return 1
return 0
//Quick type checks for some tools
var/global/list/common_tools = list(
/obj/item/weapon/cable_coil,
/obj/item/weapon/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/device/multitool,
/obj/item/weapon/crowbar)
/proc/istool(O)
if(O && is_type_in_list(O, common_tools))
return 1
return 0
/proc/iswrench(O)
if(O && istype(O, /obj/item/weapon/wrench))
return 1
return 0
/proc/iswelder(O)
if(O && istype(O, /obj/item/weapon/weldingtool))
return 1
return 0
/proc/iscoil(O)
if(O && istype(O, /obj/item/weapon/cable_coil))
return 1
return 0
/proc/iswirecutter(O)
if(O && istype(O, /obj/item/weapon/wirecutters))
return 1
return 0
/proc/isscrewdriver(O)
if(O && istype(O, /obj/item/weapon/screwdriver))
return 1
return 0
/proc/ismultitool(O)
if(O && istype(O, /obj/item/device/multitool))
return 1
return 0
/proc/iscrowbar(O)
if(O && istype(O, /obj/item/weapon/crowbar))
return 1
return 0