Minor action datum refactor and spellcasting fix.
This commit is contained in:
@@ -21,14 +21,13 @@ Doesn't work on other aliens/AI.*/
|
||||
. = ..()
|
||||
action = new(src)
|
||||
|
||||
/obj/effect/proc_holder/alien/Click()
|
||||
if(!iscarbon(usr))
|
||||
return 1
|
||||
var/mob/living/carbon/user = usr
|
||||
if(cost_check(check_turf,user))
|
||||
/obj/effect/proc_holder/alien/Trigger(mob/living/carbon/user, skip_cost_check)
|
||||
if(!istype(user))
|
||||
return TRUE
|
||||
if(!skip_cost_check || cost_check(check_turf,user))
|
||||
if(fire(user) && user) // Second check to prevent runtimes when evolving
|
||||
user.adjustPlasma(-plasma_cost)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/proc_holder/alien/on_gain(mob/living/carbon/user)
|
||||
return
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
var/cooldown = 150
|
||||
var/last_teleport = 0
|
||||
|
||||
/datum/action/innate/unstable_teleport/IsAvailable()
|
||||
/datum/action/innate/unstable_teleport/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
if(world.time > last_teleport + cooldown)
|
||||
return 1
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
background_icon_state = "bg_alien"
|
||||
required_mobility_flags = NONE
|
||||
|
||||
/datum/action/innate/regenerate_limbs/IsAvailable()
|
||||
/datum/action/innate/regenerate_limbs/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/list/limbs_to_heal = H.get_missing_limbs()
|
||||
@@ -223,7 +223,7 @@
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
|
||||
/datum/action/innate/split_body/IsAvailable()
|
||||
/datum/action/innate/split_body/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
|
||||
@@ -776,7 +776,7 @@
|
||||
..()
|
||||
species = _species
|
||||
|
||||
/datum/action/innate/use_extract/IsAvailable()
|
||||
/datum/action/innate/use_extract/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
if(species && species.current_extract && (world.time > species.extract_cooldown))
|
||||
return TRUE
|
||||
|
||||
@@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
if(cultslurring)
|
||||
message = cultslur(message)
|
||||
|
||||
|
||||
if(clockcultslurring)
|
||||
message = CLOCK_CULT_SLUR(message)
|
||||
|
||||
|
||||
@@ -400,10 +400,9 @@
|
||||
action.button_icon_state = "wrap_[active]"
|
||||
action.UpdateButtonIcon()
|
||||
|
||||
/obj/effect/proc_holder/wrap/Click()
|
||||
if(!istype(usr, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
|
||||
/obj/effect/proc_holder/wrap/Trigger(mob/living/simple_animal/hostile/poison/giant_spider/nurse/user)
|
||||
if(!istype(user))
|
||||
return TRUE
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/user = usr
|
||||
activate(user)
|
||||
return TRUE
|
||||
|
||||
@@ -444,7 +443,7 @@
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "lay_eggs"
|
||||
|
||||
/datum/action/innate/spider/lay_eggs/IsAvailable()
|
||||
/datum/action/innate/spider/lay_eggs/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
|
||||
return 0
|
||||
@@ -508,7 +507,7 @@
|
||||
desc = "Send a command to all living spiders."
|
||||
button_icon_state = "command"
|
||||
|
||||
/datum/action/innate/spider/comm/IsAvailable()
|
||||
/datum/action/innate/spider/comm/IsAvailable(silent = FALSE)
|
||||
if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
background_icon_state = "bg_alien"
|
||||
var/needs_growth = NO_GROWTH_NEEDED
|
||||
|
||||
/datum/action/innate/slime/IsAvailable()
|
||||
/datum/action/innate/slime/IsAvailable(silent = FALSE)
|
||||
if(..())
|
||||
var/mob/living/simple_animal/slime/S = owner
|
||||
if(needs_growth == GROWTH_NEEDED)
|
||||
|
||||
Reference in New Issue
Block a user