Skip to content

Commit b0ee52c

Browse files
Adds action button for nian wings (ParadiseSS13#31563)
1 parent d1f4af2 commit b0ee52c

File tree

1 file changed

+14
-0
lines changed
  • code/modules/mob/living/carbon/human/species

1 file changed

+14
-0
lines changed

code/modules/mob/living/carbon/human/species/moth.dm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
..()
8383
var/datum/action/innate/cocoon/cocoon = new()
8484
cocoon.Grant(H)
85+
var/datum/action/innate/toggle_wings/wings_toggle = new()
86+
wings_toggle.Grant(H)
8587
RegisterSignal(H, COMSIG_LIVING_FIRE_TICK, PROC_REF(check_burn_wings))
8688
RegisterSignal(H, COMSIG_LIVING_AHEAL, PROC_REF(on_aheal))
8789
RegisterSignal(H, COMSIG_HUMAN_CHANGE_BODY_ACCESSORY, PROC_REF(on_change_body_accessory))
@@ -91,6 +93,8 @@
9193
..()
9294
for(var/datum/action/innate/cocoon/cocoon in H.actions)
9395
cocoon.Remove(H)
96+
for(var/datum/action/innate/toggle_wings/wings_toggle in H.actions)
97+
wings_toggle.Remove(H)
9498
UnregisterSignal(H, COMSIG_LIVING_FIRE_TICK)
9599
UnregisterSignal(H, COMSIG_LIVING_AHEAL)
96100
UnregisterSignal(H, COMSIG_HUMAN_CHANGE_BODY_ACCESSORY)
@@ -194,6 +198,16 @@
194198
else
195199
to_chat(H, SPAN_WARNING("You need to hold still in order to weave a cocoon!"))
196200

201+
/datum/action/innate/toggle_wings
202+
name = "Toggle Wings"
203+
desc = "Open or close your wings! While your wings are open, you can fly in pressurized 0G environments!"
204+
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUNNED | AB_CHECK_CONSCIOUS
205+
button_icon = 'icons/mob/sprite_accessories/moth/moth_wings.dmi'
206+
button_icon_state = "monarch_BEHIND"
207+
208+
/datum/action/innate/toggle_wings/Activate()
209+
owner.emote("wings")
210+
197211
/**
198212
* Removes moth from cocoon, restores burnt wings
199213
*/

0 commit comments

Comments
 (0)