Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TGMC Xenos Rework #1134

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8478174
xeno rework initial commit
Perohai Feb 10, 2025
e802b32
small fix
Perohai Feb 10, 2025
1d627ba
conflict fix
Perohai Feb 12, 2025
003aaf7
Conflict fix
Perohai Feb 12, 2025
e7ac0f8
fix conflict
Perohai Feb 13, 2025
23acd4e
add CM tts
Perohai Feb 13, 2025
33c9c33
try linter fix
Perohai Feb 14, 2025
49fed80
Merge branch 'master' into tgmc-xenoo
Perohai Feb 14, 2025
440f839
fix linter
Perohai Feb 14, 2025
905f1bd
Merge branch 'tgmc-xenoo' of https://github.com/Perohai/Bandastation …
Perohai Feb 14, 2025
49beb84
fix loud sounds
Perohai Feb 14, 2025
f2e4d1d
Merge branch 'master' into tgmc-xenoo
Perohai Feb 15, 2025
a0e8114
Merge branch 'master' into tgmc-xenoo
Perohai Feb 15, 2025
78e09ee
fix one shot ravager
Perohai Feb 17, 2025
d31cbf0
Merge branch 'tgmc-xenoo' of https://github.com/Perohai/Bandastation …
Perohai Feb 17, 2025
8d2b4ff
Merge branch 'master' into tgmc-xenoo
Perohai Feb 17, 2025
379080c
Change larva tts to CM tts
Perohai Feb 22, 2025
607de0f
Merge branch 'master' into tgmc-xenoo
Perohai Feb 22, 2025
0e25dd7
Merge branch 'tgmc-xenoo' of https://github.com/Perohai/Bandastation …
Perohai Feb 22, 2025
185d038
Merge branch 'master' into pr/1134
AyIong Feb 22, 2025
de2dfd5
fix queen sense
Perohai Feb 22, 2025
b42c6a0
Merge branch 'tgmc-xenoo' of https://github.com/Perohai/Bandastation …
Perohai Feb 22, 2025
68ad8f6
Merge branch 'master' into tgmc-xenoo
Perohai Feb 22, 2025
82aedf6
adds fire immune to queen and ravager (lore friendly)
Perohai Feb 23, 2025
3a9ee9b
Merge branch 'master' into tgmc-xenoo
Perohai Feb 23, 2025
0a85014
Merge branch 'master' into tgmc-xenoo
Perohai Feb 24, 2025
fb4287d
Merge branch 'master' into tgmc-xenoo
Perohai Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/alien/larva/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

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
Expand Down Expand Up @@ -101,3 +103,5 @@

larva.alien_evolve(new_xeno)
return TRUE
*/
////BANDASTATION EDIT REMOVAL END
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/screen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/mob/living/carbon/alien/proc/findQueen()
if(hud_used)
hud_used.alien_queen_finder.cut_overlays()
var/mob/queen = get_alien_type(/mob/living/carbon/alien/adult/royal/queen)
var/mob/queen = get_alien_type(/mob/living/carbon/alien/adult/banda/queen) // Bandastation edit. Original: /mob/living/carbon/alien/adult/royal/queen
if(!queen)
return
var/turf/Q = get_turf(queen)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
return TRUE

//BANDASTATION EDIT REMOVAL BEGIN XENO_REWORK - Moved to: modular_bandastation\xeno_rework\code\larva.dm
/*
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/adult/user, list/modifiers)
. = ..()
if(!.)
Expand Down Expand Up @@ -245,6 +247,8 @@
if(!dismembering_strike(user, user.zone_selected)) //Dismemberment successful
return TRUE
apply_damage(damage, BRUTE, affecting, armor_block)
*/
//BANDASTATION EDIT REMOVAL END

/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/worm, list/modifiers)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "turfs/_turfs.dme"
#include "whitelist220/_whitelist220.dme"
#include "world_topics/_world_topics.dme"
#include "xeno_rework/_xeno_rework.dme"
#include "storyteller/_storyteller.dme"
#include "game/_game.dme"
// --- MODULES END --- //
Expand Down
2 changes: 1 addition & 1 deletion modular_bandastation/tts/code/base_seeds/mobs/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
AddComponent(/datum/component/tts_component, /datum/tts_seed/silero/ladyvashj)

/mob/living/carbon/alien/larva/add_tts_component()
AddComponent(/datum/component/tts_component, /datum/tts_seed/silero/templar)
AddComponent(/datum/component/tts_component, /datum/tts_seed/silero/stelina)

/mob/living/carbon/alien/adult/royal/queen/add_tts_component()
AddComponent(/datum/component/tts_component, /datum/tts_seed/silero/queen)
4 changes: 4 additions & 0 deletions modular_bandastation/xeno_rework/_xeno_rework.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/world_topics
name = "Xeno Rework"
desc = "Добавляет новые касты ксеноморфов, перерабоатывает существующие"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desc = "Добавляет новые касты ксеноморфов, перерабоатывает существующие"
desc = "Добавляет новые касты ксеноморфов, перерабатывает существующие."

author = "artfish(modpack), Paxilmaniac(original)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
author = "artfish(modpack), Paxilmaniac(original)"
author = "Artfish, Paxilmaniac"

17 changes: 17 additions & 0 deletions modular_bandastation/xeno_rework/_xeno_rework.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "_xeno_rework.dm"

#include "code/defines/traits.dm"
#include "code/base_xeno.dm"
#include "code/human_defense.dm"
#include "code/larva.dm"

#include "code/xeno_types/defender.dm"
#include "code/xeno_types/drone.dm"
#include "code/xeno_types/praetorian.dm"
#include "code/xeno_types/queen.dm"
#include "code/xeno_types/ravager.dm"
#include "code/xeno_types/rouny.dm"
#include "code/xeno_types/sentinel.dm"
#include "code/xeno_types/spitter.dm"
#include "code/xeno_types/warrior.dm"

216 changes: 216 additions & 0 deletions modular_bandastation/xeno_rework/code/base_xeno.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
/// MODULE _XENO_REDO

/mob/living/carbon/alien/adult/banda
name = "rare bugged alien"
icon = 'modular_bandastation/xeno_rework/icons/big_xenos.dmi'
rotate_on_lying = FALSE
base_pixel_x = -16 //All of the xeno sprites are 64x64, and we want them to be level with the tile they are on, much like oversized quirk users
mob_size = MOB_SIZE_LARGE
layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles
plane = ABOVE_GAME_PLANE
maptext_height = 64
maptext_width = 64
pressure_resistance = 200
/// What icon file update_held_items will look for when making inhands for xenos
var/alt_inhands_file = 'modular_bandastation/xeno_rework/icons/big_xenos.dmi'
/// Setting this will give a xeno generic_evolve set to evolve them into this type
var/next_evolution
/// Keeps track of if a xeno has evolved recently, if so then we prevent them from evolving until that time is up
var/has_evolved_recently = FALSE
/// How long xenos should be unable to evolve after recently evolving
var/evolution_cooldown_time = 90 SECONDS
/// Determines if a xeno is unable to use abilities
var/unable_to_use_abilities = FALSE
/// Pixel X shifting of the on fire overlay
var/on_fire_pixel_x = 16
/// Pixel Y shifting of the on fire overlay
var/on_fire_pixel_y = 16


/mob/living/carbon/alien/adult/banda/Initialize(mapload)
. = ..()
AddComponent(/datum/component/seethrough_mob)

GRANT_ACTION(/datum/action/cooldown/alien/banda/sleepytime)
if(next_evolution)
GRANT_ACTION(/datum/action/cooldown/alien/banda/generic_evolve)

pixel_x = -16

ADD_TRAIT(src, TRAIT_XENO_HEAL_AURA, TRAIT_XENO_INNATE)
real_name = "alien [caste]"

/// Called when a larva or xeno evolves, adds a configurable timer on evolving again to the xeno
/mob/living/carbon/alien/adult/banda/proc/has_just_evolved()
if(has_evolved_recently)
return
has_evolved_recently = TRUE
addtimer(CALLBACK(src, PROC_REF(can_evolve_once_again)), evolution_cooldown_time)

/// Allows xenos to evolve again if they are currently unable to
/mob/living/carbon/alien/adult/banda/proc/can_evolve_once_again()
if(!has_evolved_recently)
return
has_evolved_recently = FALSE

/datum/action/cooldown/alien/banda
button_icon = 'modular_bandastation/xeno_rework/icons/xeno_actions.dmi'
/// Some xeno abilities block other abilities from being used, this allows them to get around that in cases where it is needed
var/can_be_used_always = FALSE

/datum/action/cooldown/alien/banda/IsAvailable(feedback = FALSE)
. = ..()
if(!.)
return FALSE

if(can_be_used_always)
return TRUE

var/mob/living/carbon/alien/adult/banda/owner_alien = owner
if(!istype(owner_alien) || owner_alien.unable_to_use_abilities)
return FALSE

/datum/action/cooldown/alien/banda/sleepytime //I don't think this has a mechanical advantage but they have cool resting sprites so...
name = "Rest"
desc = "Иногда даже кровожадным чужим нужно немного полежать."
button_icon_state = "sleepytime"

/datum/action/cooldown/alien/banda/sleepytime/Activate()
var/mob/living/carbon/sleepytime_mob = owner
if(!isalien(owner))
return FALSE
if(!sleepytime_mob.resting)
sleepytime_mob.set_resting(new_resting = TRUE, silent = FALSE, instant = TRUE)
return TRUE
sleepytime_mob.set_resting(new_resting = FALSE, silent = FALSE, instant = FALSE)
return TRUE

/datum/action/cooldown/alien/banda/generic_evolve
name = "Evolve"
desc = "Позволяет нам эволюционировать в высшую касту нашего типа, если такая ещё не существует."
button_icon_state = "evolution"
/// What type this ability will turn the owner into upon completion
var/type_to_evolve_into

/datum/action/cooldown/alien/banda/generic_evolve/Grant(mob/grant_to)
. = ..()
if(!isalien(owner))
return
var/mob/living/carbon/alien/target_alien = owner
plasma_cost = target_alien.get_max_plasma() //This ability should always require that a xeno be at their max plasma capacity to use

/datum/action/cooldown/alien/banda/generic_evolve/Activate()
var/mob/living/carbon/alien/adult/banda/evolver = owner

if(!istype(evolver))
to_chat(owner, span_warning("You aren't an alien, you can't evolve!"))
return FALSE

type_to_evolve_into = evolver.next_evolution
if(!type_to_evolve_into)
to_chat(evolver, span_bolddanger("Something is wrong... We can't evolve into anything? (This is broken report it on GitHub)"))
CRASH("Couldn't find an evolution for [owner] ([owner.type]).")

if(!isturf(evolver.loc))
return FALSE

if(get_alien_type(type_to_evolve_into))
evolver.balloon_alert(evolver, "Слишком много наших эволюционировавших форм уже существует.")
return FALSE

var/obj/item/organ/alien/hivenode/node = evolver.get_organ_by_type(/obj/item/organ/alien/hivenode)
if(!node)
to_chat(evolver, span_bolddanger("Мы не ощущаем связь нашего узла с ульем... Мы не можем эволюционировать!"))
return FALSE

if(node.recent_queen_death)
to_chat(evolver, span_bolddanger("Смерть нашей королевы... Мы не можем собрать достаточно ментальной энергии, чтобы эволюционировать..."))
return FALSE

if(evolver.has_evolved_recently)
evolver.balloon_alert(evolver, "сможет эволюционировать через 1.5 минуты") //Make that 1.5 variable later, but it keeps fucking up for me :(
return FALSE

var/new_beno = new type_to_evolve_into(evolver.loc)
evolver.alien_evolve(new_beno)
return TRUE

/datum/movespeed_modifier/alien_quick
multiplicative_slowdown = -0.5

/datum/movespeed_modifier/alien_slow
multiplicative_slowdown = 0.5

/datum/movespeed_modifier/alien_heavy
multiplicative_slowdown = 1

/datum/movespeed_modifier/alien_big
multiplicative_slowdown = 2

/mob/living/carbon/alien/adult/banda/update_held_items()
..()
remove_overlay(HANDS_LAYER)
var/list/hands = list()

var/obj/item/l_hand = get_item_for_held_index(1)
if(l_hand)
var/itm_state = l_hand.inhand_icon_state
if(!itm_state)
itm_state = l_hand.icon_state
var/mutable_appearance/l_hand_item = mutable_appearance(alt_inhands_file, "[itm_state][caste]_l", -HANDS_LAYER)
if(l_hand.blocks_emissive)
l_hand_item.overlays += emissive_blocker(l_hand_item.icon, l_hand_item.icon_state, alpha = l_hand_item.alpha)
hands += l_hand_item

var/obj/item/r_hand = get_item_for_held_index(2)
if(r_hand)
var/itm_state = r_hand.inhand_icon_state
if(!itm_state)
itm_state = r_hand.icon_state
var/mutable_appearance/r_hand_item = mutable_appearance(alt_inhands_file, "[itm_state][caste]_r", -HANDS_LAYER)
if(r_hand.blocks_emissive)
r_hand_item.overlays += emissive_blocker(r_hand_item.icon, r_hand_item.icon_state, alpha = r_hand_item.alpha)
hands += r_hand_item

overlays_standing[HANDS_LAYER] = hands
apply_overlay(HANDS_LAYER)

/mob/living/carbon/proc/get_max_plasma()
var/obj/item/organ/alien/plasmavessel/vessel = get_organ_by_type(/obj/item/organ/alien/plasmavessel)
if(!vessel)
return -1
return vessel.max_plasma

/mob/living/carbon/alien/adult/banda/alien_evolve(mob/living/carbon/alien/new_xeno, is_it_a_larva)
var/mob/living/carbon/alien/adult/banda/xeno_to_transfer_to = new_xeno

xeno_to_transfer_to.setDir(dir)
if(!islarva(xeno_to_transfer_to))
xeno_to_transfer_to.has_just_evolved()
if(mind)
mind.name = xeno_to_transfer_to.real_name
mind.transfer_to(xeno_to_transfer_to)
qdel(src)

/mob/living/carbon/alien/adult/banda/findQueen() //Yes we really do need to do this whole thing to let the queen finder work
if(hud_used)
hud_used.alien_queen_finder.cut_overlays()
var/mob/queen = get_alien_type(/mob/living/carbon/alien/adult/banda/queen)
if(!queen)
return
var/turf/Q = get_turf(queen)
var/turf/A = get_turf(src)
if(Q.z != A.z) //The queen is on a different Z level, we cannot sense that far.
return
var/Qdir = get_dir(src, Q)
var/Qdist = get_dist(src, Q)
var/finder_icon = "finder_center" //Overlay showed when adjacent to or on top of the queen!
switch(Qdist)
if(2 to 7)
finder_icon = "finder_near"
if(8 to 20)
finder_icon = "finder_med"
if(21 to INFINITY)
finder_icon = "finder_far"
var/image/finder_eye = image('icons/hud/screen_alien.dmi', finder_icon, dir = Qdir)
hud_used.alien_queen_finder.add_overlay(finder_eye)
6 changes: 6 additions & 0 deletions modular_bandastation/xeno_rework/code/defines/traits.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// Trait source for xeno innate abilities
#define TRAIT_XENO_INNATE "xeno_innate"
/// Trait source for something added BY a xeno ability
#define TRAIT_XENO_ABILITY_GIVEN "xeno_ability_given"
/// Determines if something can receive healing from a xeno
#define TRAIT_XENO_HEAL_AURA "trait_xeno_heal_aura"
61 changes: 61 additions & 0 deletions modular_bandastation/xeno_rework/code/human_defense.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/// banda MODULE banda_XENO_REDO

/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/adult/user, list/modifiers)
. = ..()
if(!.)
return

if(LAZYACCESS(modifiers, RIGHT_CLICK)) //Always drop item in hand, if no item, get stun instead.
var/obj/item/mob_held_item = get_active_held_item()
var/disarm_damage = rand(user.melee_damage_lower * 1.5, user.melee_damage_upper * 1.5)

if(mob_held_item)

if(check_block(user, damage = 0, attack_text = "[user.name]"))
playsound(loc, 'sound/items/weapons/parry.ogg', 25, TRUE, -1) //Audio feedback to the fact you just got blocked
apply_damage(disarm_damage / 2, STAMINA)
visible_message(span_danger("[user] пытается дотронуться до [src]!"), \
span_danger("[user] пытается дотронуться до вас!"), span_hear("Вы слышите свистящий звук!"), null, user)
to_chat(user, span_warning("Вы пытаетесь дотронуться до [src]!"))
return FALSE

playsound(loc, 'sound/items/weapons/thudswoosh.ogg', 25, TRUE, -1) //The sounds of these are changed so the xenos can actually hear they are being non-lethal
Knockdown(3 SECONDS)
apply_damage(disarm_damage, STAMINA)
visible_message(span_danger("[user] валит [src] на землю!"), \
span_userdanger("[user] валит вас на землю!"), span_hear("Вы слышите яростное шарканье, за которым следует громкий глухой удар!"), null, user)
to_chat(user, span_danger("Вы опрокидываете [src] на землю!"))
return TRUE

else
playsound(loc, 'sound/effects/hit_kick.ogg', 25, TRUE, -1)
apply_damage(disarm_damage, STAMINA)
log_combat(user, src, "tackled")
visible_message(span_danger("[user] сбивает [src] с ног!"), \
span_userdanger("[user] сбивает вас с ног!"), span_hear("Вы слышите яростное шарканье!"), null, user)
to_chat(user, span_danger("Вы валите [src] на землю!"))

return TRUE

if(user.combat_mode)
if(w_uniform)
w_uniform.add_fingerprint(user)

var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))

if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)

var/armor_block = run_armor_check(affecting, MELEE,"","",10)

playsound(loc, 'sound/items/weapons/slice.ogg', 25, TRUE, -1)
visible_message(span_danger("[user] наносит когтями удар по [src]!"), \
span_userdanger("[user] наносит вам удар когтями!"), span_hear("Вы слышите мерзкий звук разрезаемой плоти!"), null, user)
to_chat(user, span_danger("Вы наносите удар когтями по [src]!"))
log_combat(user, src, "attacked")

if(!dismembering_strike(user, user.zone_selected)) //Dismemberment successful
return TRUE

apply_damage(damage, BRUTE, affecting, armor_block)
Loading
Loading