Update hard override file and downports Vorestation changes of kin

This updates our override file to no longer override the functions that are now just default handling
This commit is contained in:
Sharkmare
2021-03-09 22:55:53 +01:00
parent 4dafc3196e
commit 234bfbb791
7 changed files with 25 additions and 143 deletions
@@ -349,11 +349,9 @@
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
//CHOMPADDITION START Adding whitelist for traits
if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
//CHOMPADDITION END
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
conflict = instance.name
@@ -5,11 +5,10 @@
#define AB_PHASE_SHIFTED 0x1
#define AB_SHADE_REGEN 0x2
//CHOMPADDITION: KIN TYPES
//Porting over the type system of the mobs
#define BLUE_EYES 1
#define RED_EYES 2
#define PURPLE_EYES 3
#define YELLOW_EYES 4
#define GREEN_EYES 5
#define ORANGE_EYES 6
//CHOMPADDITION END
@@ -25,7 +25,7 @@
male_scream_sound = null //CHOMPedit
female_scream_sound = null //CHOMPedit
siemens_coefficient = 0
siemens_coefficient = 1
darksight = 10
slowdown = -0.5
@@ -33,7 +33,6 @@
var/ability_cost = 100
//CHOMPADDITION Conditional shifting ased on observers and darkness
var/darkness = 1
var/turf/T = get_turf(src)
if(!T)
@@ -43,16 +42,18 @@
var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
darkness = 1-brightness //Invert
var/watcher =-1
for(var/mob/living/carbon/human/watchers in view_or_range(7,get_turf(src),"range" ))
watcher++
var/watcher = 0
for(var/mob/living/carbon/human/watchers in oview(7,src )) // If we can see them...
if(watchers in oviewers(7,src)) // And they can see us...
if(!(watchers.stat) && !isbelly(watchers.loc) && !istype(watchers.loc, /obj/item/weapon/holder)) // And they are alive and not being held by someone...
watcher++ // They are watching us!
ability_cost = CLAMP(ability_cost/(0.01+darkness*2),50, 80)//This allows for 1 watcher in full light
if(watcher>0)
ability_cost = ability_cost + ( 15 * watcher )
if(!(ability_flags & AB_PHASE_SHIFTED))
log_debug("[src] attempted to shift with [watcher] visible Carbons and it cost [ability_cost] in a darkness level of [darkness]")
//CHOMPADDITION END
log_debug("[src] attempted to shift with [watcher] visible Carbons with a cost of [ability_cost] in a darkness level of [darkness]")
var/datum/species/shadekin/SK = species
if(!istype(SK))
@@ -70,7 +71,6 @@
shadekin_adjust_energy(-ability_cost)
playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
//var/turf/T = get_turf(src) //CHOMPREMOVAL: This is done earlier since we need it to get lighting
if(!T.CanPass(src,T) || loc != T)
to_chat(src,"<span class='warning'>You can't use that here!</span>")
return FALSE
@@ -1,134 +1,19 @@
/datum/species/shadekin
siemens_coefficient = 1
//SHADEKIN-UNIQUE STUFF GOES HERE
shadekin_abilities = list(/datum/power/shadekin/phase_shift,
/datum/power/shadekin/regenerate_other,
/datum/power/shadekin/create_shade)
shadekin_ability_datums = list()
var/kin_type
var/energy_light = 0.25
var/energy_dark = 0.75
//This file is so i can make upates to shadekin and easily push to vorestation, just a main override file
/datum/species/shadekin/handle_shade(var/mob/living/carbon/human/H)
//Shifted kin don't gain/lose energy (and save time if we're at the cap)
var/darkness = 1
var/dark_gains = 0
var/turf/T = get_turf(H)
if(!T)
dark_gains = 0
return
var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
darkness = 1-brightness //Invert
var/is_dark = (darkness >= 0.5)
/datum/species/shadekin/handle_environment_special(var/mob/living/carbon/human/H)
handle_shade(H)
handle_phased(H)
//Slippery fingers, if we ever make some update that makes all held items non useable for kins we can remove this.
/datum/species/shadekin/proc/handle_phased(var/mob/living/carbon/human/shadekin/H)
if(H.ability_flags & AB_PHASE_SHIFTED)
dark_gains = 0
if(H.l_hand)
H.drop_l_hand()
if(H.r_hand)
H.drop_r_hand()
return 1 //we are phased and applied all handling
else
//Heal (very) slowly in good darkness
if(is_dark)
H.adjustFireLoss((-0.10)*darkness)
H.adjustBruteLoss((-0.10)*darkness)
H.adjustToxLoss((-0.10)*darkness)
//energy_dark and energy_light are set by the shadekin eye traits.
//These are balanced around their playstyles and 2 planned new aggressive abilities
dark_gains = energy_dark
else
dark_gains = energy_light
set_energy(H, get_energy(H) + dark_gains)
//Update huds
update_shadekin_hud(H)
/datum/trait/kintype
allowed_species = list(SPECIES_SHADEKIN)
var/color = BLUE_EYES
name = "Shadekin Blue Adaptation"
desc = "Makes your shadekin adapted as a Blue eyed kin! This gives you decreased energy regeneration in darkness, decreased regeneration in the light amd unchanged health!"
cost = 0
var_changes = list( "total_health" = 100,
"energy_light" = 0.5,
"energy_dark" = 0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
custom_only = FALSE
/datum/trait/kintype/red
name = "Shadekin Red Adaptation"
color = RED_EYES
desc = "Makes your shadekin adapted as a Red eyed kin! This gives you minimal energy regeneration in darkness, moderate regeneration in the light amd increased health!"
var_changes = list( "total_health" = 200,
"energy_light" = -1,
"energy_dark" = 0.1,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/purple
name = "Shadekin Purple Adaptation"
color = PURPLE_EYES
desc = "Makes your shadekin adapted as a Purple eyed kin! This gives you moderate energy regeneration in darkness, minor degeneration in the light amd increased health!"
var_changes = list( "total_health" = 150,
"energy_light" = 1,
"energy_dark" = -0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/yellow
name = "Shadekin Yellow Adaptation"
color = YELLOW_EYES
desc = "Makes your shadekin adapted as a Yellow eyed kin! This gives you the highest energy regeneration in darkness, high degeneration in the light amd unchanged health!"
var_changes = list( "total_health" = 100,
"energy_light" = 3,
"energy_dark" = -2,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/green
name = "Shadekin Green Adaptation"
color = GREEN_EYES
desc = "Makes your shadekin adapted as a Green eyed kin! This gives you high energy regeneration in darkness, minor regeneration in the light amd unchanged health!"
var_changes = list( "total_health" = 100,
"energy_light" = 2,
"energy_dark" = 0.125,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/orange
name = "Shadekin Orange Adaptation"
color = ORANGE_EYES
desc = "Makes your shadekin adapted as a Orange eyed kin! This gives you minor energy regeneration in darkness, modeate degeneration in the light amd increased health!"
var_changes = list( "total_health" = 175,
"energy_light" = 0.25,
"energy_dark" = -0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/apply(var/datum/species/shadekin/S,var/mob/living/carbon/human/H)
if(color && istype(S)) //Sanity check to see if they're actually a shadekin, otherwise just don't do anything. They shouldn't be able to spawn with the trait.
S.kin_type = color
..(S,H)
switch(color)
if(BLUE_EYES)
H.shapeshifter_set_eye_color("0000FF")
if(RED_EYES)
H.shapeshifter_set_eye_color("FF0000")
if(GREEN_EYES)
H.shapeshifter_set_eye_color("00FF00")
if(PURPLE_EYES)
H.shapeshifter_set_eye_color("FF00FF")
if(YELLOW_EYES)
H.shapeshifter_set_eye_color("FFFF00")
if(ORANGE_EYES)
H.shapeshifter_set_eye_color("FFA500")
/datum/unarmed_attack/shadekinharmbap
attack_name = "syphon strike"
attack_verb = list("hit", "clawed", "slashed", "scratched")
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
shredding = 0
/datum/unarmed_attack/shadekinharmbap/apply_effects(var/mob/living/carbon/human/shadekin/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
..()
if(user == target) //Prevent self attack to gain energy
return
var/obj/item/organ/internal/brain/shadekin/shade_organ = user.internal_organs_by_name[O_BRAIN]
if(!istype(shade_organ))
return
shade_organ.dark_energy = CLAMP(shade_organ.dark_energy + attack_damage,0,shade_organ.max_dark_energy) //Convert Damage done to Energy Gained
return 0 //we aren't phased ignore all
@@ -1,6 +1,5 @@
/datum/trait
var/special_env = FALSE
var/list/allowed_species // A list of species that CAN take this trait, use this if only 1 species can use it. -shark
/datum/trait/proc/handle_environment_special(var/mob/living/carbon/human/H)
return
+1
View File
@@ -2794,6 +2794,7 @@
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_abilities.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_hud.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_trait.dm"
#include "code\modules\mob\living\carbon\human\species\shadekin\shadekin_zz_ch.dm"
#include "code\modules\mob\living\carbon\human\species\station\alraune.dm"
#include "code\modules\mob\living\carbon\human\species\station\blank_vr.dm"