forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,288 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/modpack/world_topics | ||
name = "Xeno Rework" | ||
desc = "Добавляет новые касты ксеноморфов, перерабоатывает существующие" | ||
author = "artfish(modpack), Paxilmaniac(original)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "_xeno_rework.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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.