Skip to content

Commit

Permalink
no tileswap while rooted, makes digging a function
Browse files Browse the repository at this point in the history
  • Loading branch information
Gristlebee committed May 3, 2024
1 parent a80fbf7 commit 3f3d88b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions code/modules/mob/living/carbon/human/species_types/ethereal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
to_chat(H, "<span class='warning'>You were interupted!</span>")
return
ADD_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
ADD_TRAIT(H,TRAIT_PUSHIMMUNE,SPECIES_TRAIT)
to_chat(H, "<span class='notice'>You root into the ground and begin to feed.</span>")

while(do_after(H, E.root_time, target = H))
Expand All @@ -132,10 +133,7 @@
if(stomach.crystal_charge > charge_limit)
stomach.crystal_charge = ELZUOSE_CHARGE_FULL
H.visible_message("<span_class='notice'>[H] is digging out of the ground.</span>","<span class='notice'>You finish rooting and begin digging yourself out.</span>","<span_class='notice'>You hear digging.</span>")
if(do_after(H, E.dig_time,target = H))
to_chat(H, "<span class='notice'>You finish digging yourself out.</span>")
REMOVE_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
return
E.digout(H, E)
else
to_chat(H, "<span class='warning'>You can't recieve charge from rooting!</span>")
break
Expand All @@ -151,16 +149,22 @@
H.apply_damage(8,BRUTE,BODY_ZONE_R_LEG)
H.say("*scream")
REMOVE_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
REMOVE_TRAIT(H,TRAIT_PUSHIMMUNE,SPECIES_TRAIT)
return
to_chat(H, "<span class='notice'>Your rooting was interupted and you begin digging yourself out.</span>")
if(do_after(H, E.dig_time,target = H))
H.visible_message("<span_class='notice'>[H] is digging out of the ground.</span>","<span class='notice'>You finish rooting and begin digging yourself out.</span>","<span_class='notice'>You hear digging.</span>")
REMOVE_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
return
H.visible_message("<span_class='notice'>[H] is digging out of the ground.</span>","<span class='notice'>Your rooting was interupted and you begin digging yourself out.</span>","<span_class='notice'>You hear digging.</span>")
E.digout(H, E)

REMOVE_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
REMOVE_TRAIT(H,TRAIT_PUSHIMMUNE,SPECIES_TRAIT)
return

/datum/species/elzuose/proc/digout(mob/living/carbon/human/H, datum/species/elzuose/E)
if(do_after(H, E.dig_time,target = H))
to_chat(H, "<span class='notice'>You finish digging yourself out.</span>")
REMOVE_TRAIT(H,TRAIT_IMMOBILIZED,SPECIES_TRAIT)
REMOVE_TRAIT(H,TRAIT_PUSHIMMUNE,SPECIES_TRAIT)
return

/datum/action/innate/root/IsAvailable()
if(..())
var/mob/living/carbon/human/H = owner
Expand Down

0 comments on commit 3f3d88b

Please sign in to comment.