forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathpowers.dm
107 lines (90 loc) · 3.78 KB
/
powers.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/datum/action/cooldown/alien/hide
name = "Hide"
desc = "Allows you to hide beneath tables and certain objects."
button_icon_state = "alien_hide"
plasma_cost = 0
/// The layer we are on while hiding
var/hide_layer = ABOVE_NORMAL_TURF_LAYER
/datum/action/cooldown/alien/hide/Activate(atom/target)
if(owner.layer == hide_layer)
owner.layer = initial(owner.layer)
owner.visible_message(
span_notice("[owner] slowly peeks up from the ground..."),
span_noticealien("You stop hiding."),
)
ADD_TRAIT(owner, TRAIT_IGNORE_ELEVATION, ACTION_TRAIT)
else
owner.layer = hide_layer
owner.visible_message(
span_name("[owner] scurries to the ground!"),
span_noticealien("You are now hiding."),
)
REMOVE_TRAIT(owner, TRAIT_IGNORE_ELEVATION, ACTION_TRAIT)
return TRUE
/datum/action/cooldown/alien/larva_evolve
name = "Evolve"
desc = "Evolve into a higher alien caste."
button_icon_state = "alien_evolve_larva"
plasma_cost = 0
/datum/action/cooldown/alien/larva_evolve/IsAvailable(feedback = FALSE)
. = ..()
if(!.)
return FALSE
if(!islarva(owner))
return FALSE
var/mob/living/carbon/alien/larva/larva = owner
if(larva.handcuffed || larva.legcuffed) // Cuffing larvas ? Eh ?
return FALSE
if(larva.amount_grown < larva.max_grown)
return FALSE
if(larva.movement_type & VENTCRAWLING)
return FALSE
return TRUE
//BANDASTATION EDIT REMOVAL BEGIN XENO_REWORK - Moved to: modular_bandastation\xeno_rework\code\larva.dm
/*
/datum/action/cooldown/alien/larva_evolve/Activate(atom/target)
var/mob/living/carbon/alien/larva/larva = owner
var/static/list/caste_options
if(!caste_options)
caste_options = list()
// This can probably be genericized in the future.
var/mob/hunter_path = /mob/living/carbon/alien/adult/hunter
var/datum/radial_menu_choice/hunter = new()
hunter.name = "Hunter"
hunter.image = image(icon = initial(hunter_path.icon), icon_state = initial(hunter_path.icon_state))
hunter.info = span_info("Hunters are the most agile caste, tasked with hunting for hosts. \
They are faster than a human and can even pounce, but are not much tougher than a drone.")
caste_options["Hunter"] = hunter
var/mob/sentinel_path = /mob/living/carbon/alien/adult/sentinel
var/datum/radial_menu_choice/sentinel = new()
sentinel.name = "Sentinel"
sentinel.image = image(icon = initial(sentinel_path.icon), icon_state = initial(sentinel_path.icon_state))
sentinel.info = span_info("Sentinels are tasked with protecting the hive. \
With their ranged spit, invisibility, and high health, they make formidable guardians \
and acceptable secondhand hunters.")
caste_options["Sentinel"] = sentinel
var/mob/drone_path = /mob/living/carbon/alien/adult/drone
var/datum/radial_menu_choice/drone = new()
drone.name = "Drone"
drone.image = image(icon = initial(drone_path.icon), icon_state = initial(drone_path.icon_state))
drone.info = span_info("Drones are the weakest and slowest of the castes, \
but can grow into a praetorian and then queen if no queen exists, \
and are vital to maintaining a hive with their resin secretion abilities.")
caste_options["Drone"] = drone
var/alien_caste = show_radial_menu(owner, owner, caste_options, radius = 38, require_near = TRUE, tooltips = TRUE)
if(QDELETED(src) || QDELETED(owner) || !IsAvailable(feedback = TRUE) || isnull(alien_caste))
return
var/mob/living/carbon/alien/adult/new_xeno
switch(alien_caste)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/adult/hunter(larva.loc)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/adult/sentinel(larva.loc)
if("Drone")
new_xeno = new /mob/living/carbon/alien/adult/drone(larva.loc)
else
CRASH("Alien evolve was given an invalid / incorrect alien cast type. Got: [alien_caste]")
larva.alien_evolve(new_xeno)
return TRUE
*/
////BANDASTATION EDIT REMOVAL END