mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Engineering got a new machine that spawns/feeds the singularity.
Redid the power use code, should be working better now. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@999 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -72,10 +72,60 @@
|
||||
mo.show_message(rendered, 2)
|
||||
return
|
||||
|
||||
/proc/is_type_in_list(var/list/L, var/atom/A)
|
||||
/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
|
||||
Reference in New Issue
Block a user