diff --git a/code/datums/components/weed_food.dm b/code/datums/components/weed_food.dm index 296808fe5721..2335a053412f 100644 --- a/code/datums/components/weed_food.dm +++ b/code/datums/components/weed_food.dm @@ -6,15 +6,19 @@ desc = "Weird black weeds in the shape of a body..." gender = PLURAL vis_flags = VIS_INHERIT_DIR|VIS_INHERIT_PLANE|VIS_INHERIT_LAYER + mouse_opacity = MOUSE_OPACITY_TRANSPARENT icon = 'icons/mob/xenos/weeds.dmi' - var/static/list/icon_states = list("human_1","human_2","human_3","human_4","human_5") - var/static/list/icon_states_flipped = list("human_1_f","human_2_f","human_3_f","human_4_f","human_5_f") + var/list/icon_states + var/list/icon_states_flipped var/icon_state_idx = 0 var/timer_id = null var/flipped = FALSE -/atom/movable/vis_obj/weed_food/Initialize(mapload, is_flipped, ...) +/atom/movable/vis_obj/weed_food/Initialize(mapload, is_flipped, weeds_icon, states, states_flipped, ...) flipped = is_flipped + icon = weeds_icon + icon_states = states + icon_states_flipped = states_flipped timer_id = addtimer(CALLBACK(src, PROC_REF(on_animation_timer)), WEED_FOOD_STATE_DELAY, TIMER_STOPPABLE|TIMER_UNIQUE|TIMER_LOOP|TIMER_DELETE_ME) on_animation_timer() return ..() @@ -22,6 +26,7 @@ /// Timer callback for changing the icon_state /atom/movable/vis_obj/weed_food/proc/on_animation_timer() icon_state_idx++ + // Assumption: Length of icon_states is the same as icon_states_flipped if(icon_state_idx > length(icon_states)) deltimer(timer_id) timer_id = null @@ -59,10 +64,9 @@ /datum/component/weed_food/Initialize(...) parent_mob = parent - //if(!istype(parent_mob)) - //return COMPONENT_INCOMPATIBLE - if(!istype(parent_mob, /mob/living/carbon/human)) - return COMPONENT_INCOMPATIBLE // TODO: At the moment we only support humans + // At the moment we only support humans and xenos + if(!istype(parent_mob, /mob/living/carbon/human) && !istype(parent_mob, /mob/living/carbon/xenomorph)) + return COMPONENT_INCOMPATIBLE parent_turf = get_turf(parent_mob) if(parent_turf != parent_mob.loc) @@ -289,9 +293,8 @@ var/is_flipped = parent_mob.transform.b == -1 // Technically we should check if d is 1 too, but corpses can only be rotated 90 or 270 (1/-1 or -1/1) if(parent_mob.dir & WEST) is_flipped = !is_flipped // The direction reversed the effect of the flip! - weed_appearance = new(null, is_flipped) + weed_appearance = new(null, is_flipped, parent_mob.weed_food_icon, parent_mob.weed_food_states, parent_mob.weed_food_states_flipped) weed_appearance.color = absorbing_weeds.color - // TODO: For non-humans change the icon_state or something here parent_mob.vis_contents += weed_appearance return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm index 37dc3048408a..074af92d69fa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm @@ -58,6 +58,10 @@ icon_xeno = 'icons/mob/xenos/boiler.dmi' icon_xenonid = 'icons/mob/xenonids/boiler.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Boiler_1","Boiler_2","Boiler_3") + weed_food_states_flipped = list("Boiler_1","Boiler_2","Boiler_3") + var/datum/effect_system/smoke_spread/xeno_acid/smoke base_actions = list( diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm index ee882bc14fdf..69a498184fa3 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm @@ -80,6 +80,10 @@ icon_xeno = 'icons/mob/xenos/burrower.dmi' icon_xenonid = 'icons/mob/xenonids/burrower.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Burrower_1","Burrower_2","Burrower_3") + weed_food_states_flipped = list("Burrower_1","Burrower_2","Burrower_3") + /mob/living/carbon/xenomorph/burrower/Initialize(mapload, mob/living/carbon/xenomorph/oldxeno, h_number) . = ..() sight |= SEE_TURFS diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm index 6793f29afa0a..cf3acb890e4d 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm @@ -80,6 +80,10 @@ icon_xenonid = 'icons/mob/xenonids/carrier.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Carrier_1","Carrier_2","Carrier_3") + weed_food_states_flipped = list("Carrier_1","Carrier_2","Carrier_3") + var/list/hugger_image_index = list() var/mutable_appearance/hugger_overlays_icon var/mutable_appearance/eggsac_overlays_icon diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index bf1702598250..64dfd021f894 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -69,6 +69,10 @@ icon_xeno = 'icons/mob/xenos/crusher.dmi' icon_xenonid = 'icons/mob/xenonids/crusher.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Crusher_1","Crusher_2","Crusher_3") + weed_food_states_flipped = list("Crusher_1","Crusher_2","Crusher_3") + // Refactored to handle all of crusher's interactions with object during charge. /mob/living/carbon/xenomorph/proc/handle_collision(atom/target) if(!target) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm b/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm index 8c05fa53660e..8ec53d51046e 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm @@ -38,6 +38,7 @@ pixel_x = -16 old_x = -16 tier = 1 + base_actions = list( /datum/action/xeno_action/onclick/xeno_resting, /datum/action/xeno_action/onclick/regurgitate, @@ -49,11 +50,17 @@ /datum/action/xeno_action/activable/fortify, /datum/action/xeno_action/onclick/tacmap, ) + mutation_icon_state = DEFENDER_NORMAL mutation_type = DEFENDER_NORMAL + icon_xeno = 'icons/mob/xenos/defender.dmi' icon_xenonid = 'icons/mob/xenonids/defender.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Defender_1","Defender_2","Defender_3") + weed_food_states_flipped = list("Defender_1","Defender_2","Defender_3") + /mob/living/carbon/xenomorph/defender/handle_special_state() if(fortify) return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm index dbdb03bb94ca..77992b33a52b 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm @@ -74,3 +74,7 @@ icon_xeno = 'icons/mob/xenos/drone.dmi' icon_xenonid = 'icons/mob/xenonids/drone.dmi' + + weed_food_icon = 'icons/mob/xenos/weeds_48x48.dmi' + weed_food_states = list("Drone_1","Drone_2","Drone_3") + weed_food_states_flipped = list("Drone_1","Drone_2","Drone_3") diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index 3e01cc2af139..25212718527b 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -60,6 +60,10 @@ icon_xeno = 'icons/mob/xenos/facehugger.dmi' icon_xenonid = 'icons/mob/xenonids/facehugger.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_48x48.dmi' + weed_food_states = list("Facehugger_1","Facehugger_2","Facehugger_3") + weed_food_states_flipped = list("Facehugger_1","Facehugger_2","Facehugger_3") + /mob/living/carbon/xenomorph/facehugger/initialize_pass_flags(datum/pass_flags_container/PF) ..() if (PF) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm index a44fee5645ac..6868fd5ac589 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm @@ -69,6 +69,10 @@ icon_xeno = 'icons/mob/xenos/hellhound.dmi' icon_xenonid = 'icons/mob/xenos/hellhound.dmi' + weed_food_icon = 'icons/mob/xenos/weeds.dmi' + weed_food_states = list("Hellhound_1","Hellhound_2","Hellhound_3") + weed_food_states_flipped = list("Hellhound_1","Hellhound_2","Hellhound_3") + /mob/living/carbon/xenomorph/hellhound/Initialize(mapload, mob/living/carbon/xenomorph/oldXeno, h_number) . = ..(mapload, oldXeno, h_number || XENO_HIVE_YAUTJA) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm index 23f8ffc8acd6..9c062bf779fd 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm @@ -55,6 +55,7 @@ mob_size = MOB_SIZE_BIG drag_delay = 6 //pulling a big dead xeno is hard tier = 2 + base_actions = list( /datum/action/xeno_action/onclick/xeno_resting, /datum/action/xeno_action/onclick/regurgitate, @@ -75,11 +76,16 @@ /mob/living/carbon/xenomorph/proc/rename_tunnel, /mob/living/carbon/xenomorph/proc/set_hugger_reserve_for_morpher, ) + mutation_type = HIVELORD_NORMAL icon_xeno = 'icons/mob/xenos/hivelord.dmi' icon_xenonid = 'icons/mob/xenonids/hivelord.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Hivelord_1","Hivelord_2","Hivelord_3") + weed_food_states_flipped = list("Hivelord_1","Hivelord_2","Hivelord_3") + /datum/behavior_delegate/hivelord_base name = "Base Hivelord Behavior Delegate" diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm index d893db4e29f8..469b9a78d063 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm @@ -59,6 +59,10 @@ icon_xeno = 'icons/mob/xenos/lurker.dmi' icon_xenonid = 'icons/mob/xenonids/lurker.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_48x48.dmi' + weed_food_states = list("Drone_1","Drone_2","Drone_3") + weed_food_states_flipped = list("Drone_1","Drone_2","Drone_3") + /datum/behavior_delegate/lurker_base name = "Base Lurker Behavior Delegate" diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm b/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm index 344e1e21f302..9536ef1553e9 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm @@ -64,6 +64,10 @@ icon_xeno = 'icons/mob/xenos/praetorian.dmi' icon_xenonid = 'icons/mob/xenonids/praetorian.dmi' + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Praetorian_1","Praetorian_2","Praetorian_3") + weed_food_states_flipped = list("Praetorian_1","Praetorian_2","Praetorian_3") + /datum/behavior_delegate/praetorian_base name = "Base Praetorian Behavior Delegate" ///reward for hitting shots instead of spamming acid ball diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm index 14aa31b1f1e8..bcf47386fefc 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm @@ -62,8 +62,13 @@ /datum/action/xeno_action/activable/devastate, /datum/action/xeno_action/onclick/tacmap, ) + mutation_type = "Normal" + weed_food_icon = 'icons/mob/xenos/weeds_64x64.dmi' + weed_food_states = list("Predalien_1","Predalien_2","Predalien_3") + weed_food_states_flipped = list("Predalien_1","Predalien_2","Predalien_3") + var/butcher_time = 6 SECONDS @@ -147,7 +152,7 @@ Your health meter will not regenerate normally, so kill and die for the hive!