Files
GS13NG/code/datums/status_effects/gas.dm
kevinz000 0e3193e929 relatively small 71 file 700 lines changed refactor/rework to combat mode/sprint and some miscellaneous things that totally aren't important (#11376)
* combat refactoring

* i hate this

* mobility flags part 2 time xd

* whew

* stuff

* a

* ok

* changes

* Wew

* k

* add flags

* FUCKYOUVORE

* fixes

* typo

* no using this in hard stamcrit

* update icon

* woopsy

* . = ..()

* sigh

* Update living_combat.dm

* wew

* wups

* fix

* i hate you

* wrong button

* k

* ok

* bet

* k

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* early returns

* skreee

* agony

* k

* k

* k

* k

* wack

* compile

* wack

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-03-21 16:04:26 +01:00

48 lines
1.4 KiB
Plaintext

/datum/status_effect/freon
id = "frozen"
duration = 100
status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/freon
var/icon/cube
var/can_melt = TRUE
/obj/screen/alert/status_effect/freon
name = "Frozen Solid"
desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!"
icon_state = "frozen"
/datum/status_effect/freon/on_apply()
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist)
if(!owner.stat)
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
cube = icon('icons/effects/freeze.dmi', "ice_cube")
owner.add_overlay(cube)
owner.update_mobility()
return ..()
/datum/status_effect/freon/tick()
owner.update_mobility()
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
qdel(src)
/datum/status_effect/freon/proc/owner_resist()
to_chat(owner, "You start breaking out of the ice cube!")
if(do_mob(owner, owner, 40))
if(!QDELETED(src))
to_chat(owner, "You break out of the ice cube!")
owner.remove_status_effect(/datum/status_effect/freon)
owner.update_mobility()
/datum/status_effect/freon/on_remove()
if(!owner.stat)
to_chat(owner, "The cube melts!")
owner.cut_overlay(cube)
owner.adjust_bodytemperature(100)
owner.update_mobility()
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
return ..()
/datum/status_effect/freon/watcher
duration = 8
can_melt = FALSE