mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-23 13:57:03 +01:00
d5931c5ffe
https://www.youtube.com/watch?v=ZpUYjpKg9KY As per title. The goal is to add health to most objects in the game and thus allow them to be dynamically destructible, while also avoiding shitcode like each structure having its own snowflake health update proc. --------- Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
/obj/structure/hivebot_head
|
|
name = "\improper Secondary Transmitter Drone core"
|
|
desc = "The central core of the Hivebot Secondary Transmitter Drone - all that remains after the machine's destruction. Perhaps some data as to the threat can be gleaned from this?"
|
|
icon = 'icons/obj/structure/hivebot_head.dmi'
|
|
icon_state = "hivebot_head"
|
|
maxhealth = null
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
climbable = FALSE
|
|
density = FALSE
|
|
|
|
/obj/structure/hivebot_head/ex_act(severity) //dont want it getting blown up
|
|
return
|
|
|
|
/obj/structure/hivebot_head/attack_hand(mob/user)
|
|
. = ..()
|
|
user.visible_message(SPAN_NOTICE("\The [user] touches \the [src]."), SPAN_NOTICE("You touch \the [src]."))
|
|
if(prob(10))
|
|
var/T = get_turf(src)
|
|
icon_state = "hivebot_head_active"
|
|
playsound(src.loc, 'sound/effects/creatures/hivebot/hivebot-bark-005.ogg', 60)
|
|
to_chat(user, SPAN_WARNING("\The [src] suddenly sparks and lights up, emitting some unintelligible noise!"))
|
|
spark(T, 3, GLOB.alldirs)
|
|
addtimer(CALLBACK(src, PROC_REF(deactivate)), 3 SECONDS)
|
|
|
|
/obj/structure/hivebot_head/proc/deactivate()
|
|
icon_state = "hivebot_head"
|
|
visible_message(SPAN_WARNING("\The [src] shudders and goes silent..."))
|