mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-17 04:27:39 +00:00
## About The Pull Request
Using these search regexes:
Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`
Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`
Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`
## Why It's Good For The Game
Code readability
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
/obj/structure/hivebot_beacon
|
|
name = "beacon"
|
|
desc = "Some odd beacon thing."
|
|
icon = 'icons/mob/simple/hivebot.dmi'
|
|
icon_state = "def_radar-off"
|
|
anchored = TRUE
|
|
density = TRUE
|
|
var/bot_type = "norm"
|
|
var/bot_amt = 10
|
|
|
|
/obj/structure/hivebot_beacon/Initialize(mapload)
|
|
. = ..()
|
|
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
|
smoke.set_up(2, holder = src, location = loc)
|
|
smoke.start()
|
|
visible_message(span_boldannounce("[src] warps in!"))
|
|
playsound(src.loc, 'sound/effects/empulse.ogg', 25, TRUE)
|
|
addtimer(CALLBACK(src, PROC_REF(warpbots)), rand(1 SECONDS, 1 MINUTES))
|
|
|
|
/obj/structure/hivebot_beacon/proc/warpbots()
|
|
icon_state = "def_radar"
|
|
visible_message(span_danger("[src] turns on!"))
|
|
while(bot_amt > 0)
|
|
bot_amt--
|
|
switch(bot_type)
|
|
if("norm")
|
|
new /mob/living/basic/hivebot(get_turf(src))
|
|
if("range")
|
|
new /mob/living/basic/hivebot/range(get_turf(src))
|
|
if("rapid")
|
|
new /mob/living/basic/hivebot/rapid(get_turf(src))
|
|
sleep(10 SECONDS)
|
|
visible_message(span_boldannounce("[src] warps out!"))
|
|
playsound(src.loc, 'sound/effects/empulse.ogg', 25, TRUE)
|
|
qdel(src)
|
|
return
|