mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-11 08:16:17 +01:00
Merge pull request #1210 from cadyn/eventstuffuwu
Adding telecrystal stuff for event
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/obj/effect/bspawner
|
||||
anchored = 1
|
||||
icon = 'icons/obj/stationobjs_vr.dmi'
|
||||
icon_state = "portalgateway"
|
||||
var/obj/item_to_spawn = /obj/item/stack/telecrystal
|
||||
var/item_arg = 8
|
||||
var/time_between_spawn = 1 MINUTE
|
||||
var/time_to_end = 45 MINUTES
|
||||
var/spawned_num = 0
|
||||
var/init_time
|
||||
|
||||
/obj/effect/bspawner/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj,src)
|
||||
init_time = world.time
|
||||
|
||||
/obj/effect/bspawner/proc/spawn_item()
|
||||
if(!isnull(item_arg))
|
||||
new item_to_spawn(loc,item_arg)
|
||||
else
|
||||
new item_to_spawn(loc)
|
||||
|
||||
/obj/effect/bspawner/process()
|
||||
if(world.time > init_time + time_between_spawn * (spawned_num + 1))
|
||||
spawn_item()
|
||||
spawned_num++
|
||||
if(world.time > init_time + time_to_end)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/bspawner/Destroy()
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/bspawner/min30
|
||||
time_to_end = 30 MINUTES
|
||||
Reference in New Issue
Block a user