mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Gets rid of hasvar usage and moves up some vars (#11484)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f3954fdbeb
commit
938e760841
@@ -124,8 +124,8 @@
|
||||
/obj/machinery/camera/hitby(AM as mob|obj)
|
||||
..()
|
||||
if (istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
if (O.throwforce >= src.toughness)
|
||||
var/obj/item/O = AM
|
||||
if(O.throwforce >= src.toughness)
|
||||
visible_message(span_boldwarning("[src] was hit by [O]."))
|
||||
take_damage(O.throwforce)
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ Deployable items
|
||||
return
|
||||
else
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
if(BURN)
|
||||
health -= W.force * 0.75
|
||||
if("brute")
|
||||
if(BRUTE)
|
||||
health -= W.force * 0.5
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
CheckHealth()
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
var/list/floor_light_cache = list()
|
||||
|
||||
/obj/item/floor_light
|
||||
name = "floor light kit"
|
||||
desc = "A backlit floor panel, ready for installation!"
|
||||
icon = 'icons/obj/machines/floor_light.dmi'
|
||||
icon_state = "item"
|
||||
matter = list(MAT_STEEL = 2500, MAT_GLASS = 2750)
|
||||
|
||||
/obj/item/floor_light/attack_self(mob/user)
|
||||
var/turf/T = get_turf(user)
|
||||
if(!T)
|
||||
to_chat(user, span_warning("You need to be on a floor to install this."))
|
||||
return
|
||||
new /obj/machinery/floor_light(T)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/floor_light
|
||||
name = "floor light"
|
||||
icon = 'icons/obj/machines/floor_light.dmi'
|
||||
@@ -11,7 +26,6 @@ var/list/floor_light_cache = list()
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 20
|
||||
power_channel = LIGHT
|
||||
matter = list(MAT_STEEL = 2500, MAT_GLASS = 2750)
|
||||
|
||||
var/on
|
||||
var/damaged
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
/obj/machinery/partslathe/proc/build(var/datum/category_item/partslathe/D)
|
||||
for(var/M in D.resources)
|
||||
materials[M] = max(0, materials[M] - CEILING((D.resources[M] * mat_efficiency), 1))
|
||||
var/obj/new_item = D.build(loc);
|
||||
var/obj/item/new_item = D.build(loc);
|
||||
if(new_item)
|
||||
new_item.loc = loc
|
||||
if(mat_efficiency < 1) // No matter out of nowhere
|
||||
|
||||
Reference in New Issue
Block a user