mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 14:51:27 +00:00
* Add blob burst status effect to mouse and human * Mouse cleanup * Blob code refactors * Change description * Undo testing changes * fix final stage * Better map text. Thanks to Vi3trice * Update code/datums/status_effects/blob_burst.dm Co-authored-by: Vi3trice <80771500+Vi3trice@users.noreply.github.com> * Update code/game/gamemodes/blob/blob.dm * Duration fix + potential GC fix * Update code/game/gamemodes/blob/blob.dm Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: Vi3trice <80771500+Vi3trice@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
28 lines
861 B
Plaintext
28 lines
861 B
Plaintext
/datum/status_effect/blob_burst
|
|
alert_type = /obj/screen/alert/status_effect/blob_burst
|
|
var/datum/callback/blob_burst_callback
|
|
|
|
/datum/status_effect/blob_burst/on_creation(mob/living/new_owner, duration = 120 SECONDS, datum/callback/burst_callback)
|
|
src.duration = duration
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
blob_burst_callback = burst_callback
|
|
|
|
/datum/status_effect/blob_burst/Destroy()
|
|
blob_burst_callback = null
|
|
return ..()
|
|
|
|
/datum/status_effect/blob_burst/tick()
|
|
var/time_left = (duration - world.time) / 10
|
|
linked_alert.maptext = MAPTEXT_CENTER(round(time_left))
|
|
|
|
/datum/status_effect/blob_burst/on_timeout()
|
|
blob_burst_callback.Invoke()
|
|
|
|
/obj/screen/alert/status_effect/blob_burst
|
|
name = "Blob burst"
|
|
desc = "You're about to burst into a blob, be sure to find a safe place before that you burst!"
|
|
icon = 'icons/mob/blob.dmi'
|
|
icon_state = "ui_tocore"
|