mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 08:27:24 +01:00
Update adipoelectric_generator.dm
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
var/emp_timer = 0
|
||||
var/active = FALSE
|
||||
var/datum/looping_sound/generator/soundloop
|
||||
var/iamcheckingtoseeifthelinesnumberchange = 0
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/Initialize()
|
||||
. = ..()
|
||||
@@ -24,7 +23,6 @@
|
||||
if(anchored)
|
||||
connect_to_network()
|
||||
update_icon()
|
||||
occupant = null
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/RefreshParts()
|
||||
laser_modifier = 0
|
||||
@@ -35,15 +33,13 @@
|
||||
max_fat += C.rating * 2
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/process()
|
||||
if(!is_operational())
|
||||
return
|
||||
var/mob/living/carbon/user = occupant
|
||||
if(!user || !attached)
|
||||
if(!occupant)
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
return PROCESS_KILL
|
||||
if(user.fatness_real > 0 && powernet && anchored && (emp_timer < world.time))
|
||||
if(occupant:fatness_real > 0 && powernet && anchored && (emp_timer < world.time))
|
||||
active = TRUE
|
||||
add_avail(conversion_rate * laser_modifier * max_fat)
|
||||
user.adjust_fatness(-max_fat, FATTENING_TYPE_ITEM)
|
||||
occupant:adjust_fatness(-max_fat, FATTENING_TYPE_ITEM)
|
||||
soundloop.start()
|
||||
else
|
||||
active = FALSE
|
||||
|
||||
Reference in New Issue
Block a user