diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 7f963710a1..93d9ff4289 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -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/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/thermal_sight = FALSE // Is our Vision Augmented? With thermals?
/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.changeling) mind.changeling = new /datum/changeling(gender)
- verbs += /datum/changeling/proc/EvolutionMenu
- verbs += /mob/proc/changeling_respec
+ verbs.Add(/datum/changeling/proc/EvolutionMenu)
+ verbs.Add(/mob/proc/changeling_respec)
add_language("Changeling")
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(lesser_form && !P.allowduringlesserform) continue
if(!(P in src.verbs))
- src.verbs += P.verbpath
+ verbs.Add(P.verbpath)
if(P.make_hud_button)
if(!src.ability_master)
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
for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
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)
if(C)
ability_master.remove_ability(C)
diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index e4eb45a9e9..6e29bf939c 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -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
name = "Augmented Eyesight"
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"
genomecost = 2
- var/active = 0 //Whether or not vision is enhanced
verbpath = /mob/proc/changeling_augmented_eyesight
/mob/proc/changeling_augmented_eyesight()
@@ -17,23 +16,22 @@
var/datum/changeling/changeling = changeling_power(5,0,100,CONSCIOUS)
if(!changeling)
return 0
- src.mind.changeling.chem_charges -= 5
- src.sight |= SEE_MOBS
- /*
+
var/mob/living/carbon/human/C = src
- active = !active
+ changeling.thermal_sight = !changeling.thermal_sight
+
+ var/active = changeling.thermal_sight
+
if(active)
- to_chat(C, "We feel a minute twitch in our eyes, and darkness creeps away.")
- C.sight |= SEE_MOBS
- C.permanent_sight_flags |= SEE_MOBS
- C.see_in_dark = 8
- C.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
+ src.mind.changeling.chem_charges -= 5
+ to_chat(C, "We feel a minute twitch in our eyes, and a hidden layer to the world is revealed.")
+ C.add_modifier(/datum/modifier/changeling/thermal_sight, 0, src)
+// C.permanent_sight_flags |= SEE_MOBS
+// C.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
else
- to_chat(C, "Our vision dulls. Shadows gather.")
- C.sight &= ~SEE_MOBS
- C.permanent_sight_flags &= ~SEE_MOBS
- C.see_in_dark = 0
- C.dna.species.invis_sight = initial(user.dna.species.invis_sight)
+ to_chat(C, "Our vision dulls.")
+ C.remove_modifiers_of_type(/datum/modifier/changeling/thermal_sight)
+// C.permanent_sight_flags &= ~SEE_MOBS
+// C.dna.species.invis_sight = initial(user.dna.species.invis_sight)
return 1
- */
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/endoarmor.dm b/code/game/gamemodes/changeling/powers/endoarmor.dm
index 536aef26ce..d62c52141a 100644
--- a/code/game/gamemodes/changeling/powers/endoarmor.dm
+++ b/code/game/gamemodes/changeling/powers/endoarmor.dm
@@ -14,7 +14,6 @@
on_expired_text = "Our protective armor underneath our skin fades as we absorb it."
max_health_flat = 50
-//Increases macimum chemical storage
/mob/proc/changeling_endoarmor()
if(ishuman(src))
var/mob/living/carbon/human/H = src
diff --git a/code/game/gamemodes/changeling/powers/fake_death.dm b/code/game/gamemodes/changeling/powers/fake_death.dm
index cd34ebfc5c..65fce3cecf 100644
--- a/code/game/gamemodes/changeling/powers/fake_death.dm
+++ b/code/game/gamemodes/changeling/powers/fake_death.dm
@@ -43,7 +43,10 @@
spawn(rand(2 MINUTES, 4 MINUTES))
//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, "We are ready to rise. Use the Revive verb when you are ready.")
feedback_add_details("changeling_powers","FD")
diff --git a/code/game/gamemodes/changeling/powers/respec.dm b/code/game/gamemodes/changeling/powers/respec.dm
index a50a41269f..935092ff65 100644
--- a/code/game/gamemodes/changeling/powers/respec.dm
+++ b/code/game/gamemodes/changeling/powers/respec.dm
@@ -17,6 +17,7 @@
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.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
ling_datum.chem_storage = 50
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 61a061170e..420b1173c8 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -82,10 +82,28 @@
C.set_stat(CONSCIOUS)
C.forbid_seeing_deadchat = FALSE
C.timeofdeath = null
- src.verbs -= /mob/proc/changeling_revive
+ verbs.Remove(/mob/proc/changeling_revive)
// re-add our changeling powers
C.make_changeling()
-
-
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)
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index ec9e62c86b..204ebb6f89 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -14,7 +14,6 @@
desc = "Murder device."
icon = 'icons/obj/weapons.dmi'
icon_state = "baton"
- item_state = "classic_baton"
slot_flags = SLOT_BELT
force = 10
drop_sound = 'sound/items/drop/metalweapon.ogg'
diff --git a/code/modules/mob/_modifiers/changeling.dm b/code/modules/mob/_modifiers/changeling.dm
new file mode 100644
index 0000000000..7e83c45461
--- /dev/null
+++ b/code/modules/mob/_modifiers/changeling.dm
@@ -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 = "Your sight returns to what it once was."
+ 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
+
+ ..()
diff --git a/code/modules/mob/_modifiers/modifiers.dm b/code/modules/mob/_modifiers/modifiers.dm
index 5950d9e98d..72da563a22 100644
--- a/code/modules/mob/_modifiers/modifiers.dm
+++ b/code/modules/mob/_modifiers/modifiers.dm
@@ -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/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)
holder = new_holder
if(new_origin)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index db0ff10881..1d920a3cb1 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1371,6 +1371,10 @@
see_in_dark = 8
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))
sight |= species.get_vision_flags(src)
if(!seer && !glasses_processed && seedarkness)
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 0590984fbe..6753ba0896 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -731,7 +731,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
var/obj/item/clothing/suit/suit = wear_suit
var/suit_sprite
- if(suit.index)
+ if(istype(suit) && suit.index)
suit_sprite = "[INV_SUIT_DEF_ICON]_[suit.index].dmi"
else if(istype(suit, /obj/item/clothing) && !isnull(suit.update_icon_define))
suit_sprite = suit.update_icon_define
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 0718dc9421..bf3de8f6b7 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -189,6 +189,13 @@
see_invisible = SEE_INVISIBLE_NOLIGHTING
else
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
/mob/living/proc/handle_hud_icons()
diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi
index 1fb8bea105..d18cd6a4a5 100644
Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ
diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi
index 02990b507a..355f909616 100644
Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ
diff --git a/polaris.dme b/polaris.dme
index 1b6cc35def..180c70f652 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -479,6 +479,7 @@
#include "code\game\gamemodes\changeling\powers\absorb.dm"
#include "code\game\gamemodes\changeling\powers\armblade.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\blind_sting.dm"
#include "code\game\gamemodes\changeling\powers\boost_range.dm"
@@ -1989,6 +1990,7 @@
#include "code\modules\mob\typing_indicator.dm"
#include "code\modules\mob\update_icons.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\feysight.dm"
#include "code\modules\mob\_modifiers\fire.dm"