mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
converts the hide verb to an action button (#20459)
* converts the hide verb to an action button * Update code/modules/mob/living/carbon/alien/larva/larva.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/mob/living/silicon/robot/drone/drone_abilities.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/mob/living/silicon/robot/drone/drone_abilities.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/hide_action.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * tweak * what a thrill * bam * what a krill --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,14 @@
|
||||
add_language("Xenomorph")
|
||||
add_language("Hivemind")
|
||||
AddSpell(new /obj/effect/proc_holder/spell/alien_spell/evolve_larva)
|
||||
var/datum/action/innate/hide/alien_larva_hide/hide = new()
|
||||
hide.Grant(src)
|
||||
|
||||
/mob/living/carbon/alien/larva/Destroy()
|
||||
for(var/datum/action/innate/hide/alien_larva_hide/hide in actions)
|
||||
hide.Remove(src)
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/get_caste_organs()
|
||||
. = ..()
|
||||
@@ -81,4 +89,3 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/mob/living/carbon/alien/larva/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Alien"
|
||||
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if(layer != ABOVE_NORMAL_TURF_LAYER)
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
visible_message("<B>[src] scurries to the ground!</B>", "<span class='noticealien'>You are now hiding.</span>")
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
visible_message("[src] slowly peeks up from the ground...", "<span class=notice'>You have stopped hiding.</span>")
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
// DRONE ABILITIES
|
||||
/mob/living/silicon/robot/drone/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows you to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Robot Commands"
|
||||
|
||||
if(layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
to_chat(src, text("<span class='notice'>You are now hiding.</span>"))
|
||||
pass_flags |= PASSDOOR
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
to_chat(src, text("<span class='notice'>You have stopped hiding.</span>"))
|
||||
pass_flags &= ~PASSDOOR
|
||||
|
||||
//Actual picking-up event.
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M)
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
|
||||
verbs -= /mob/living/silicon/robot/verb/Namepick
|
||||
module = new /obj/item/robot_module/drone(src)
|
||||
// Give us our action button
|
||||
var/datum/action/innate/hide/drone_hide/hide = new()
|
||||
hide.Grant(src)
|
||||
|
||||
//Allows Drones to hear the Engineering channel.
|
||||
module.channels = list("Engineering" = 1)
|
||||
@@ -191,6 +194,8 @@
|
||||
QDEL_NULL(stack_wood)
|
||||
QDEL_NULL(stack_plastic)
|
||||
QDEL_NULL(decompiler)
|
||||
for(var/datum/action/innate/hide/drone_hide/hide in actions)
|
||||
hide.Remove(src)
|
||||
|
||||
/mob/living/silicon/robot/drone/emag_act(mob/user)
|
||||
if(!client || stat == DEAD)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/datum/action/innate/hide
|
||||
name = "Hide"
|
||||
desc = "Allows to hide beneath tables or certain items. Toggled on or off. While hiding you can fit under unbolted airlocks."
|
||||
var/layer_to_change_from = MOB_LAYER
|
||||
var/layer_to_change_to = TURF_LAYER + 0.2
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "mouse_gray_sleep"
|
||||
|
||||
/datum/action/innate/hide/Activate()
|
||||
var/mob/living/simple_animal/simplemob = owner
|
||||
|
||||
if(owner.layer != layer_to_change_to)
|
||||
owner.layer = layer_to_change_to
|
||||
owner.visible_message("<span class=notice'><b>[owner] scurries to the ground!</b></span>", "<span class=notice'>You are now hiding.</span>")
|
||||
if(istype(simplemob) && simplemob.pass_door_while_hidden || isdrone(simplemob))
|
||||
simplemob.pass_flags |= PASSDOOR
|
||||
return
|
||||
|
||||
simplemob.layer = layer_to_change_from
|
||||
owner.visible_message("<span class=notice'>[owner] slowly peeks up from the ground...</span>", "<span class=notice'>You have stopped hiding.</span>")
|
||||
if(istype(simplemob) && simplemob.pass_door_while_hidden || isdrone(simplemob))
|
||||
simplemob.pass_flags &= ~PASSDOOR
|
||||
|
||||
/datum/action/innate/hide/alien_larva_hide
|
||||
desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
background_icon_state = "bg_alien"
|
||||
button_icon_state = "alien_hide"
|
||||
layer_to_change_to = ABOVE_NORMAL_TURF_LAYER
|
||||
layer_to_change_from = MOB_LAYER
|
||||
|
||||
/datum/action/innate/hide/drone_hide
|
||||
button_icon_state = "repairbot"
|
||||
@@ -1,18 +0,0 @@
|
||||
/mob/living/simple_animal/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Animal"
|
||||
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if(layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
visible_message("<B>[src] scurries to the ground!</B>", "<span class=notice'>You are now hiding.</span>")
|
||||
if(pass_door_while_hidden)
|
||||
pass_flags |= PASSDOOR
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
visible_message("[src] slowly peeks up from the ground...", "<span class=notice'>You have stopped hiding.</span>")
|
||||
if(pass_door_while_hidden)
|
||||
pass_flags &= ~PASSDOOR
|
||||
@@ -149,8 +149,9 @@
|
||||
if(!loc)
|
||||
stack_trace("Simple animal being instantiated in nullspace")
|
||||
verbs -= /mob/verb/observe
|
||||
if(!can_hide)
|
||||
verbs -= /mob/living/simple_animal/verb/hide
|
||||
if(can_hide)
|
||||
var/datum/action/innate/hide/hide = new()
|
||||
hide.Grant(src)
|
||||
if(pcollar)
|
||||
pcollar = new(src)
|
||||
regenerate_icons()
|
||||
@@ -161,6 +162,8 @@
|
||||
/// We need to clear the reference to where we're walking to properly GC
|
||||
walk_to(src, 0)
|
||||
QDEL_NULL(pcollar)
|
||||
for(var/datum/action/innate/hide/hide in actions)
|
||||
hide.Remove(src)
|
||||
master_commander = null
|
||||
GLOB.simple_animals[AIStatus] -= src
|
||||
if(SSnpcpool.state == SS_PAUSED && LAZYLEN(SSnpcpool.currentrun))
|
||||
|
||||
Reference in New Issue
Block a user