mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
back to other things for the moment
This commit is contained in:
@@ -2,9 +2,17 @@
|
|||||||
var/energy = 100
|
var/energy = 100
|
||||||
var/transformed = FALSE
|
var/transformed = FALSE
|
||||||
var/paused = FALSE
|
var/paused = FALSE
|
||||||
var/cooldown
|
|
||||||
var/paused_loc
|
var/paused_loc
|
||||||
|
var/cooldown
|
||||||
|
|
||||||
var/mob/living/carbon/human/gargoyle //easy reference
|
var/mob/living/carbon/human/gargoyle //easy reference
|
||||||
|
var/obj/structure/gargoyle/statue //another easy ref
|
||||||
|
|
||||||
|
var/fireloss
|
||||||
|
var/bruteloss
|
||||||
|
var/sleeping
|
||||||
|
var/paralysis
|
||||||
|
var/blinded
|
||||||
|
|
||||||
/datum/component/gargoyle/Initialize()
|
/datum/component/gargoyle/Initialize()
|
||||||
if (!ishuman(parent))
|
if (!ishuman(parent))
|
||||||
@@ -18,9 +26,35 @@
|
|||||||
if (paused && gargoyle.loc != paused_loc)
|
if (paused && gargoyle.loc != paused_loc)
|
||||||
paused = FALSE
|
paused = FALSE
|
||||||
energy -= 20
|
energy -= 20
|
||||||
if (!transformed && !paused && energy > 0)
|
if (energy > 0)
|
||||||
|
if (!transformed && !paused)
|
||||||
energy = max(0,energy-0.05)
|
energy = max(0,energy-0.05)
|
||||||
|
else
|
||||||
|
paused = 0
|
||||||
|
|
||||||
if (transformed)
|
if (transformed)
|
||||||
|
if (!statue)
|
||||||
|
transformed = FALSE
|
||||||
|
statue.health = min(gargoyle.max_health + 100, statue.health + 0.5)
|
||||||
energy = min(energy+0.3, 100)
|
energy = min(energy+0.3, 100)
|
||||||
H.adjustBruteLoss(-0.5)
|
fireloss = max(fireloss - 0.5, 0)
|
||||||
H.adjustFireLoss(-0.5)
|
bruteloss = max(bruteloss - 0.5, 0)
|
||||||
|
|
||||||
|
/mob/living/carbon/human/verb/gargoyle_transformation()
|
||||||
|
set name = "Gargoyle Petrification"
|
||||||
|
set category = "Abilities"
|
||||||
|
set desc = "Turn yourself into (or out of) being a gargoyle."
|
||||||
|
|
||||||
|
if (stat == DEAD)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle)
|
||||||
|
if (comp?.cooldown > world.time)
|
||||||
|
var/time_to_wait = (comp.cooldown - world.time) / (1 SECONDS)
|
||||||
|
to_chat(src, "<span class='warning'>You can't activate that ability right now! Wait for another [round(time_to_wait,0.1)] seconds!</span>")
|
||||||
|
|
||||||
|
if (istype(loc, /obj/structure/gargoyle))
|
||||||
|
var/obj/structure/gargoyle/statue = loc
|
||||||
|
statue.unpetrify()
|
||||||
|
else if (isturf(loc))
|
||||||
|
var/obj/structure/gargoyle/statue = new(loc, src)
|
||||||
32
modular_chomp/code/game/objects/structures/gargoyle.dm
Normal file
32
modular_chomp/code/game/objects/structures/gargoyle.dm
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/obj/structure/gargoyle
|
||||||
|
name = "statue"
|
||||||
|
desc = "A very lifelike carving."
|
||||||
|
density = TRUE
|
||||||
|
anchored = TRUE
|
||||||
|
var/mob/living/carbon/human/gargoyle
|
||||||
|
var/initial_sleep
|
||||||
|
var/initial_blind
|
||||||
|
|
||||||
|
/obj/structure/gargoyle/Initialize(var/location, var/mob/living/carbon/human/H)
|
||||||
|
. = ..()
|
||||||
|
if (!location || !istype(H))
|
||||||
|
return
|
||||||
|
gargoyle = H
|
||||||
|
if (H.buckled)
|
||||||
|
H.buckled.unbuckle_mob(H, TRUE)
|
||||||
|
H.click_intercept = src
|
||||||
|
initial_sleep = H.sleeping
|
||||||
|
intial_blind = H.eye_blind
|
||||||
|
transform = H.transform
|
||||||
|
layer = H.layer
|
||||||
|
pixel_x = H.pixel_x
|
||||||
|
pixel_y = H.pixel_y
|
||||||
|
dir = H.dir
|
||||||
|
H.disabilites |= MUTE
|
||||||
|
H.forceMove(src)
|
||||||
|
H.setBlinded(0)
|
||||||
|
H.setSleeping(0)
|
||||||
|
H.status_flags |= GODMODE
|
||||||
|
H.updatehealth()
|
||||||
|
H.canmove = 0
|
||||||
|
|
||||||
@@ -4516,6 +4516,7 @@
|
|||||||
#include "modular_chomp\code\datums\autolathe\arms.dm"
|
#include "modular_chomp\code\datums\autolathe\arms.dm"
|
||||||
#include "modular_chomp\code\datums\autolathe\engineering_ch.dm"
|
#include "modular_chomp\code\datums\autolathe\engineering_ch.dm"
|
||||||
#include "modular_chomp\code\datums\autolathe\general_ch.dm"
|
#include "modular_chomp\code\datums\autolathe\general_ch.dm"
|
||||||
|
#include "modular_chomp\code\datums\components\gargoyle.dm"
|
||||||
#include "modular_chomp\code\datums\outfits\jobs\noncrew.dm"
|
#include "modular_chomp\code\datums\outfits\jobs\noncrew.dm"
|
||||||
#include "modular_chomp\code\datums\supplypacks\medical.dm"
|
#include "modular_chomp\code\datums\supplypacks\medical.dm"
|
||||||
#include "modular_chomp\code\game\dna\dna2.dm"
|
#include "modular_chomp\code\game\dna\dna2.dm"
|
||||||
@@ -4525,6 +4526,7 @@
|
|||||||
#include "modular_chomp\code\game\machinery\airconditioner_ch.dm"
|
#include "modular_chomp\code\game\machinery\airconditioner_ch.dm"
|
||||||
#include "modular_chomp\code\game\machinery\autolathe_armory.dm"
|
#include "modular_chomp\code\game\machinery\autolathe_armory.dm"
|
||||||
#include "modular_chomp\code\game\objects\items\clockwork\ratvarian_spear.dm"
|
#include "modular_chomp\code\game\objects\items\clockwork\ratvarian_spear.dm"
|
||||||
|
#include "modular_chomp\code\game\objects\structures\gargoyle.dm"
|
||||||
#include "modular_chomp\code\game\objects\structures\loot_pile.dm"
|
#include "modular_chomp\code\game\objects\structures\loot_pile.dm"
|
||||||
#include "modular_chomp\code\game\objects\structures\watercloset_ch.dm"
|
#include "modular_chomp\code\game\objects\structures\watercloset_ch.dm"
|
||||||
#include "modular_chomp\code\game\objects\structures\crate_lockers\largecrate.dm"
|
#include "modular_chomp\code\game\objects\structures\crate_lockers\largecrate.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user