mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-26 05:26:24 +01:00
Fixes.
Made glowshrooms and intercoms not use a ridiculous internal loop, and fixed a pickup luminosity bug with glowshrooms. fixes #3708 Fixes #3718 Fixes #3702 Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -5,13 +5,18 @@
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
canhear_range = 2
|
||||
flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
var/last_tick //used to delay the powercheck
|
||||
|
||||
/obj/item/device/radio/intercom/New()
|
||||
spawn(5)
|
||||
checkpower()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/item/device/radio/intercom/Del()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
@@ -51,10 +56,9 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/proc/checkpower()
|
||||
|
||||
// Simple loop, checks for power. Strictly for intercoms
|
||||
while(src)
|
||||
/obj/item/device/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
@@ -69,5 +73,3 @@
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
sleep(30)
|
||||
Reference in New Issue
Block a user