mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Ling Fixes + Various other fixes
This commit is contained in:
@@ -24,6 +24,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
|||||||
var/list/purchased_powers_history = list() //Used for round-end report, includes respec uses too.
|
var/list/purchased_powers_history = list() //Used for round-end report, includes respec uses too.
|
||||||
var/last_shriek = null // world.time when the ling last used a shriek.
|
var/last_shriek = null // world.time when the ling last used a shriek.
|
||||||
var/next_escape = 0 // world.time when the ling can next use Escape Restraints
|
var/next_escape = 0 // world.time when the ling can next use Escape Restraints
|
||||||
|
var/thermal_sight = FALSE // Is our Vision Augmented? With thermals?
|
||||||
|
|
||||||
/datum/changeling/New(var/gender=FEMALE)
|
/datum/changeling/New(var/gender=FEMALE)
|
||||||
..()
|
..()
|
||||||
@@ -64,8 +65,8 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
|||||||
if(!mind) return
|
if(!mind) return
|
||||||
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
||||||
|
|
||||||
verbs += /datum/changeling/proc/EvolutionMenu
|
verbs.Add(/datum/changeling/proc/EvolutionMenu)
|
||||||
verbs += /mob/proc/changeling_respec
|
verbs.Add(/mob/proc/changeling_respec)
|
||||||
add_language("Changeling")
|
add_language("Changeling")
|
||||||
|
|
||||||
var/lesser_form = !ishuman(src)
|
var/lesser_form = !ishuman(src)
|
||||||
@@ -84,7 +85,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
|||||||
if(P.isVerb)
|
if(P.isVerb)
|
||||||
if(lesser_form && !P.allowduringlesserform) continue
|
if(lesser_form && !P.allowduringlesserform) continue
|
||||||
if(!(P in src.verbs))
|
if(!(P in src.verbs))
|
||||||
src.verbs += P.verbpath
|
verbs.Add(P.verbpath)
|
||||||
if(P.make_hud_button)
|
if(P.make_hud_button)
|
||||||
if(!src.ability_master)
|
if(!src.ability_master)
|
||||||
src.ability_master = new /obj/screen/movable/ability_master(src)
|
src.ability_master = new /obj/screen/movable/ability_master(src)
|
||||||
@@ -111,7 +112,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
|||||||
if(!mind || !mind.changeling) return
|
if(!mind || !mind.changeling) return
|
||||||
for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
|
for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
|
||||||
if(P.isVerb)
|
if(P.isVerb)
|
||||||
verbs -= P.verbpath
|
verbs.Remove(P.verbpath)
|
||||||
var/obj/screen/ability/verb_based/changeling/C = ability_master.get_ability_by_proc_ref(P.verbpath)
|
var/obj/screen/ability/verb_based/changeling/C = ability_master.get_ability_by_proc_ref(P.verbpath)
|
||||||
if(C)
|
if(C)
|
||||||
ability_master.remove_ability(C)
|
ability_master.remove_ability(C)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
//Augmented Eyesight: Gives you thermal and night vision - bye bye, flashlights. Also, high DNA cost because of how powerful it is.
|
//Augmented Eyesight: Gives you thermal vision. Also, higher DNA cost because of how powerful it is.
|
||||||
|
|
||||||
/datum/power/changeling/augmented_eyesight
|
/datum/power/changeling/augmented_eyesight
|
||||||
name = "Augmented Eyesight"
|
name = "Augmented Eyesight"
|
||||||
desc = "Creates heat receptors in our eyes and dramatically increases light sensing ability."
|
desc = "Creates heat receptors in our eyes and dramatically increases light sensing ability."
|
||||||
helptext = "Grants us night vision and thermal vision. It may be toggled on or off. We will become more vulnerable to flash-based devices while active."
|
helptext = "Grants us thermal vision. It may be toggled on or off. We will become more vulnerable to flash-based devices while active."
|
||||||
ability_icon_state = "ling_augmented_eyesight"
|
ability_icon_state = "ling_augmented_eyesight"
|
||||||
genomecost = 2
|
genomecost = 2
|
||||||
var/active = 0 //Whether or not vision is enhanced
|
|
||||||
verbpath = /mob/proc/changeling_augmented_eyesight
|
verbpath = /mob/proc/changeling_augmented_eyesight
|
||||||
|
|
||||||
/mob/proc/changeling_augmented_eyesight()
|
/mob/proc/changeling_augmented_eyesight()
|
||||||
@@ -17,23 +16,22 @@
|
|||||||
var/datum/changeling/changeling = changeling_power(5,0,100,CONSCIOUS)
|
var/datum/changeling/changeling = changeling_power(5,0,100,CONSCIOUS)
|
||||||
if(!changeling)
|
if(!changeling)
|
||||||
return 0
|
return 0
|
||||||
src.mind.changeling.chem_charges -= 5
|
|
||||||
src.sight |= SEE_MOBS
|
|
||||||
/*
|
|
||||||
var/mob/living/carbon/human/C = src
|
var/mob/living/carbon/human/C = src
|
||||||
|
|
||||||
active = !active
|
changeling.thermal_sight = !changeling.thermal_sight
|
||||||
|
|
||||||
|
var/active = changeling.thermal_sight
|
||||||
|
|
||||||
if(active)
|
if(active)
|
||||||
to_chat(C, "<span class='notice'>We feel a minute twitch in our eyes, and darkness creeps away.</span>")
|
src.mind.changeling.chem_charges -= 5
|
||||||
C.sight |= SEE_MOBS
|
to_chat(C, "<span class='notice'>We feel a minute twitch in our eyes, and a hidden layer to the world is revealed.</span>")
|
||||||
C.permanent_sight_flags |= SEE_MOBS
|
C.add_modifier(/datum/modifier/changeling/thermal_sight, 0, src)
|
||||||
C.see_in_dark = 8
|
// C.permanent_sight_flags |= SEE_MOBS
|
||||||
C.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
|
// C.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
|
||||||
else
|
else
|
||||||
to_chat(C, "<span class='notice'>Our vision dulls. Shadows gather.</span>")
|
to_chat(C, "<span class='notice'>Our vision dulls.</span>")
|
||||||
C.sight &= ~SEE_MOBS
|
C.remove_modifiers_of_type(/datum/modifier/changeling/thermal_sight)
|
||||||
C.permanent_sight_flags &= ~SEE_MOBS
|
// C.permanent_sight_flags &= ~SEE_MOBS
|
||||||
C.see_in_dark = 0
|
// C.dna.species.invis_sight = initial(user.dna.species.invis_sight)
|
||||||
C.dna.species.invis_sight = initial(user.dna.species.invis_sight)
|
|
||||||
return 1
|
return 1
|
||||||
*/
|
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
on_expired_text = "<span class='notice'>Our protective armor underneath our skin fades as we absorb it.</span>"
|
on_expired_text = "<span class='notice'>Our protective armor underneath our skin fades as we absorb it.</span>"
|
||||||
max_health_flat = 50
|
max_health_flat = 50
|
||||||
|
|
||||||
//Increases macimum chemical storage
|
|
||||||
/mob/proc/changeling_endoarmor()
|
/mob/proc/changeling_endoarmor()
|
||||||
if(ishuman(src))
|
if(ishuman(src))
|
||||||
var/mob/living/carbon/human/H = src
|
var/mob/living/carbon/human/H = src
|
||||||
|
|||||||
@@ -43,7 +43,10 @@
|
|||||||
|
|
||||||
spawn(rand(2 MINUTES, 4 MINUTES))
|
spawn(rand(2 MINUTES, 4 MINUTES))
|
||||||
//The ling will now be able to choose when to revive
|
//The ling will now be able to choose when to revive
|
||||||
src.verbs += /mob/proc/changeling_revive
|
verbs.Add(/mob/proc/changeling_revive)
|
||||||
|
|
||||||
|
new /obj/changeling_revive_holder(src)
|
||||||
|
|
||||||
to_chat(src, "<span class='notice'><font size='5'>We are ready to rise. Use the <b>Revive</b> verb when you are ready.</font></span>")
|
to_chat(src, "<span class='notice'><font size='5'>We are ready to rise. Use the <b>Revive</b> verb when you are ready.</font></span>")
|
||||||
|
|
||||||
feedback_add_details("changeling_powers","FD")
|
feedback_add_details("changeling_powers","FD")
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
ling_datum.purchased_powers = list() //Then wipe all the powers we bought.
|
ling_datum.purchased_powers = list() //Then wipe all the powers we bought.
|
||||||
ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum.
|
ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum.
|
||||||
ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
|
ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
|
||||||
|
ling_datum.thermal_sight = FALSE
|
||||||
src.mind.changeling.recursive_enhancement = 0 //Ensures this is cleared
|
src.mind.changeling.recursive_enhancement = 0 //Ensures this is cleared
|
||||||
|
|
||||||
ling_datum.chem_storage = 50
|
ling_datum.chem_storage = 50
|
||||||
|
|||||||
@@ -82,10 +82,28 @@
|
|||||||
C.set_stat(CONSCIOUS)
|
C.set_stat(CONSCIOUS)
|
||||||
C.forbid_seeing_deadchat = FALSE
|
C.forbid_seeing_deadchat = FALSE
|
||||||
C.timeofdeath = null
|
C.timeofdeath = null
|
||||||
src.verbs -= /mob/proc/changeling_revive
|
verbs.Remove(/mob/proc/changeling_revive)
|
||||||
// re-add our changeling powers
|
// re-add our changeling powers
|
||||||
C.make_changeling()
|
C.make_changeling()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
//Revive from revival stasis, but one level removed, as the tab refuses to update. Placed in its own tab to avoid hyper-exploding the original tab through the same name being used.
|
||||||
|
|
||||||
|
/obj/changeling_revive_holder
|
||||||
|
name = "strange object"
|
||||||
|
desc = "Please report this object's existence to the dev team! You shouldn't see it."
|
||||||
|
mouse_opacity = FALSE
|
||||||
|
alpha = 1
|
||||||
|
|
||||||
|
/obj/changeling_revive_holder/verb/ling_revive()
|
||||||
|
set src = usr.contents
|
||||||
|
set category = "Regenerate"
|
||||||
|
set name = "Revive"
|
||||||
|
set desc = "We are ready to revive ourselves on command."
|
||||||
|
|
||||||
|
if(iscarbon(usr))
|
||||||
|
var/mob/living/carbon/C = usr
|
||||||
|
C.changeling_revive()
|
||||||
|
|
||||||
|
qdel(src)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
desc = "Murder device."
|
desc = "Murder device."
|
||||||
icon = 'icons/obj/weapons.dmi'
|
icon = 'icons/obj/weapons.dmi'
|
||||||
icon_state = "baton"
|
icon_state = "baton"
|
||||||
item_state = "classic_baton"
|
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
force = 10
|
force = 10
|
||||||
drop_sound = 'sound/items/drop/metalweapon.ogg'
|
drop_sound = 'sound/items/drop/metalweapon.ogg'
|
||||||
|
|||||||
93
code/modules/mob/_modifiers/changeling.dm
Normal file
93
code/modules/mob/_modifiers/changeling.dm
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/datum/modifier/changeling
|
||||||
|
name = "changeling"
|
||||||
|
desc = "Changeling modifier."
|
||||||
|
|
||||||
|
var/required_chems = 1 // Default is to require at least 1 chem unit. This does not consume it.
|
||||||
|
|
||||||
|
var/chem_maintenance = 1 // How many chems are expended per cycle, if we are consuming chems.
|
||||||
|
|
||||||
|
var/max_genetic_damage = 100
|
||||||
|
|
||||||
|
var/max_stat = 0
|
||||||
|
|
||||||
|
var/use_chems = FALSE // Do we have an upkeep cost on chems?
|
||||||
|
|
||||||
|
var/exterior_modifier = FALSE // Should we be checking the origin mob for chems?
|
||||||
|
|
||||||
|
/datum/modifier/changeling/check_if_valid()
|
||||||
|
var/mob/living/L = null
|
||||||
|
if(exterior_modifier)
|
||||||
|
if(origin)
|
||||||
|
L = origin.resolve()
|
||||||
|
else
|
||||||
|
expire()
|
||||||
|
return
|
||||||
|
|
||||||
|
if((!exterior_modifier && !holder.changeling_power(required_chems, 0, max_genetic_damage, max_stat)) || (exterior_modifier && L && !L.changeling_power(required_chems, 0, max_genetic_damage, max_stat)))
|
||||||
|
expire()
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/datum/modifier/changeling/tick()
|
||||||
|
..()
|
||||||
|
|
||||||
|
if(use_chems)
|
||||||
|
var/mob/living/L = null
|
||||||
|
|
||||||
|
if(exterior_modifier)
|
||||||
|
L = origin.resolve()
|
||||||
|
|
||||||
|
else
|
||||||
|
L = holder
|
||||||
|
|
||||||
|
L.mind.changeling.chem_charges = between(0, L.mind.changeling.chem_charges - chem_maintenance, L.mind.changeling.chem_storage)
|
||||||
|
|
||||||
|
/datum/modifier/changeling/thermal_sight
|
||||||
|
name = "Thermal Adaptation"
|
||||||
|
desc = "Our eyes are capable of seeing into the infrared spectrum to accurately identify prey through walls."
|
||||||
|
vision_flags = SEE_MOBS
|
||||||
|
|
||||||
|
on_expired_text = "<span class='alien'>Your sight returns to what it once was.</span>"
|
||||||
|
stacks = MODIFIER_STACK_EXTEND
|
||||||
|
|
||||||
|
/datum/modifier/changeling/thermal_sight/check_if_valid()
|
||||||
|
var/mob/living/L = null
|
||||||
|
|
||||||
|
if(exterior_modifier)
|
||||||
|
L = origin.resolve()
|
||||||
|
|
||||||
|
else
|
||||||
|
L = holder
|
||||||
|
|
||||||
|
if(!L)
|
||||||
|
expire()
|
||||||
|
return
|
||||||
|
|
||||||
|
var/datum/changeling/changeling = L.changeling_power(0,0,100,CONSCIOUS)
|
||||||
|
|
||||||
|
if(!changeling)
|
||||||
|
expire()
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!changeling.thermal_sight)
|
||||||
|
expire()
|
||||||
|
return
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
/datum/modifier/changeling/thermal_sight/expire()
|
||||||
|
var/mob/living/L = null
|
||||||
|
|
||||||
|
if(exterior_modifier)
|
||||||
|
L = origin.resolve()
|
||||||
|
|
||||||
|
else
|
||||||
|
L = holder
|
||||||
|
|
||||||
|
if(L)
|
||||||
|
var/datum/changeling/changeling = L.changeling_power(0,0,100,CONSCIOUS)
|
||||||
|
|
||||||
|
if(changeling)
|
||||||
|
changeling.thermal_sight = FALSE
|
||||||
|
|
||||||
|
..()
|
||||||
@@ -51,6 +51,8 @@
|
|||||||
var/emp_modifier // Added to the EMP strength, which is an inverse scale from 1 to 4, with 1 being the strongest EMP. 5 is a nullification.
|
var/emp_modifier // Added to the EMP strength, which is an inverse scale from 1 to 4, with 1 being the strongest EMP. 5 is a nullification.
|
||||||
var/explosion_modifier // Added to the bomb strength, which is an inverse scale from 1 to 3, with 1 being gibstrength. 4 is a nullification.
|
var/explosion_modifier // Added to the bomb strength, which is an inverse scale from 1 to 3, with 1 being gibstrength. 4 is a nullification.
|
||||||
|
|
||||||
|
var/vision_flags // Vision flags to add to the mob. SEE_MOB, SEE_OBJ, etc.
|
||||||
|
|
||||||
/datum/modifier/New(var/new_holder, var/new_origin)
|
/datum/modifier/New(var/new_holder, var/new_origin)
|
||||||
holder = new_holder
|
holder = new_holder
|
||||||
if(new_origin)
|
if(new_origin)
|
||||||
|
|||||||
@@ -1383,6 +1383,10 @@
|
|||||||
see_in_dark = 8
|
see_in_dark = 8
|
||||||
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||||
|
|
||||||
|
for(var/datum/modifier/M in modifiers)
|
||||||
|
if(!isnull(M.vision_flags))
|
||||||
|
sight |= M.vision_flags
|
||||||
|
|
||||||
if(!glasses_processed && (species.get_vision_flags(src) > 0))
|
if(!glasses_processed && (species.get_vision_flags(src) > 0))
|
||||||
sight |= species.get_vision_flags(src)
|
sight |= species.get_vision_flags(src)
|
||||||
if(!seer && !glasses_processed && seedarkness)
|
if(!seer && !glasses_processed && seedarkness)
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
|||||||
var/obj/item/clothing/suit/suit = wear_suit
|
var/obj/item/clothing/suit/suit = wear_suit
|
||||||
var/suit_sprite
|
var/suit_sprite
|
||||||
|
|
||||||
if(suit.index)
|
if(istype(suit) && suit.index)
|
||||||
suit_sprite = "[INV_SUIT_DEF_ICON]_[suit.index].dmi"
|
suit_sprite = "[INV_SUIT_DEF_ICON]_[suit.index].dmi"
|
||||||
else if(istype(suit, /obj/item/clothing) && !isnull(suit.update_icon_define))
|
else if(istype(suit, /obj/item/clothing) && !isnull(suit.update_icon_define))
|
||||||
suit_sprite = suit.update_icon_define
|
suit_sprite = suit.update_icon_define
|
||||||
|
|||||||
@@ -188,6 +188,13 @@
|
|||||||
see_invisible = SEE_INVISIBLE_NOLIGHTING
|
see_invisible = SEE_INVISIBLE_NOLIGHTING
|
||||||
else
|
else
|
||||||
see_invisible = initial(see_invisible)
|
see_invisible = initial(see_invisible)
|
||||||
|
|
||||||
|
sight = initial(sight)
|
||||||
|
|
||||||
|
for(var/datum/modifier/M in modifiers)
|
||||||
|
if(!isnull(M.vision_flags))
|
||||||
|
sight |= M.vision_flags
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/proc/handle_hud_icons()
|
/mob/living/proc/handle_hud_icons()
|
||||||
|
|||||||
@@ -546,6 +546,7 @@
|
|||||||
#include "code\game\gamemodes\changeling\powers\absorb.dm"
|
#include "code\game\gamemodes\changeling\powers\absorb.dm"
|
||||||
#include "code\game\gamemodes\changeling\powers\armblade.dm"
|
#include "code\game\gamemodes\changeling\powers\armblade.dm"
|
||||||
#include "code\game\gamemodes\changeling\powers\armor.dm"
|
#include "code\game\gamemodes\changeling\powers\armor.dm"
|
||||||
|
#include "code\game\gamemodes\changeling\powers\augmented_eyesight.dm"
|
||||||
#include "code\game\gamemodes\changeling\powers\bioelectrogenesis.dm"
|
#include "code\game\gamemodes\changeling\powers\bioelectrogenesis.dm"
|
||||||
#include "code\game\gamemodes\changeling\powers\blind_sting.dm"
|
#include "code\game\gamemodes\changeling\powers\blind_sting.dm"
|
||||||
#include "code\game\gamemodes\changeling\powers\boost_range.dm"
|
#include "code\game\gamemodes\changeling\powers\boost_range.dm"
|
||||||
@@ -2315,6 +2316,7 @@
|
|||||||
#include "code\modules\mob\typing_indicator.dm"
|
#include "code\modules\mob\typing_indicator.dm"
|
||||||
#include "code\modules\mob\update_icons.dm"
|
#include "code\modules\mob\update_icons.dm"
|
||||||
#include "code\modules\mob\_modifiers\aura.dm"
|
#include "code\modules\mob\_modifiers\aura.dm"
|
||||||
|
#include "code\modules\mob\_modifiers\changeling.dm"
|
||||||
#include "code\modules\mob\_modifiers\cloning.dm"
|
#include "code\modules\mob\_modifiers\cloning.dm"
|
||||||
#include "code\modules\mob\_modifiers\feysight.dm"
|
#include "code\modules\mob\_modifiers\feysight.dm"
|
||||||
#include "code\modules\mob\_modifiers\fire.dm"
|
#include "code\modules\mob\_modifiers\fire.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user