mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
fix soulcatcher SR sight (#9074)
This commit is contained in:
@@ -10,3 +10,4 @@
|
||||
#define SOULGEM_ACTIVE 0x400
|
||||
#define SOULGEM_SHOW_VORE_SFX 0x800
|
||||
#define SOULGEM_CATCHING_DRAIN 0x1000
|
||||
#define SOULGEM_SEE_SR_SOULS 0x2000
|
||||
|
||||
@@ -204,6 +204,11 @@
|
||||
compiled_vis += VIS_CH_STOMACH
|
||||
//Vore Stomach addition end
|
||||
|
||||
//CHOMPAdd Start Soulcatcher
|
||||
if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS))
|
||||
compiled_vis += VIS_SOULCATCHER
|
||||
//CHOMPAdd End
|
||||
|
||||
if(!compiled_vis.len && !vis_enabled.len)
|
||||
return //Nothin' doin'.
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/mob/recalculate_vis()
|
||||
. = ..()
|
||||
|
||||
if(!plane_holder || !vis_enabled)
|
||||
return
|
||||
|
||||
if(stomach_vision && !(VIS_CH_STOMACH in vis_enabled))
|
||||
plane_holder.set_vis(VIS_CH_STOMACH,TRUE)
|
||||
vis_enabled += VIS_CH_STOMACH
|
||||
@@ -8,9 +11,6 @@
|
||||
plane_holder.set_vis(VIS_CH_STOMACH,FALSE)
|
||||
vis_enabled -= VIS_CH_STOMACH
|
||||
|
||||
if(!plane_holder || !vis_enabled)
|
||||
return
|
||||
|
||||
if(vantag_hud)
|
||||
if(!(VIS_CH_VANTAG in vis_enabled))
|
||||
plane_holder.set_vis(VIS_CH_VANTAG,TRUE)
|
||||
@@ -19,6 +19,15 @@
|
||||
if(VIS_CH_VANTAG in vis_enabled)
|
||||
plane_holder.set_vis(VIS_CH_VANTAG,FALSE)
|
||||
vis_enabled -= VIS_CH_VANTAG
|
||||
|
||||
//CHOMPAdd Start Soulcatcher
|
||||
if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS))
|
||||
plane_holder.set_vis(VIS_SOULCATCHER, TRUE)
|
||||
vis_enabled += VIS_SOULCATCHER
|
||||
else
|
||||
plane_holder.set_vis(VIS_SOULCATCHER, FALSE)
|
||||
vis_enabled -= VIS_SOULCATCHER
|
||||
//CHOMPAdd End
|
||||
return
|
||||
|
||||
|
||||
@@ -33,16 +42,11 @@
|
||||
return
|
||||
if(toggle =="Yes")
|
||||
stomach_vision = 1 //Simple! Easy!
|
||||
if(!(VIS_CH_STOMACH in vis_enabled))
|
||||
plane_holder.set_vis(VIS_CH_STOMACH,TRUE)
|
||||
vis_enabled += VIS_CH_STOMACH
|
||||
to_chat(src, "You can now see stomachs!")
|
||||
else
|
||||
stomach_vision = 0
|
||||
if(VIS_CH_STOMACH in vis_enabled)
|
||||
plane_holder.set_vis(VIS_CH_STOMACH,FALSE)
|
||||
vis_enabled -= VIS_CH_STOMACH
|
||||
to_chat(src, "You will no longer see stomachs!")
|
||||
recalculate_vis()
|
||||
|
||||
/* //Leaving this in as an example of 'how to properly enable a plane to hide/show itself' for future PRs.
|
||||
if(stomach_vision && !(VIS_CH_STOMACH in vis_enabled))
|
||||
|
||||
@@ -584,7 +584,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
|
||||
data["soulcatcher"]["mind_backups"] = host.soulgem.flag_check(NIF_SC_BACKUPS)
|
||||
data["soulcatcher"]["sr_projecting"] = host.soulgem.flag_check(NIF_SC_PROJECTING)
|
||||
data["soulcatcher"]["show_vore_sfx"] = host.soulgem.flag_check(SOULGEM_SHOW_VORE_SFX)
|
||||
data["soulcatcher"]["see_sr_projecting"] = (VIS_SOULCATCHER in host.vis_enabled)
|
||||
data["soulcatcher"]["see_sr_projecting"] = host.soulgem.flag_check(SOULGEM_SEE_SR_SOULS)
|
||||
var/nutri_value = 0
|
||||
if(istype(host, /mob/living))
|
||||
var/mob/living/H = host
|
||||
@@ -2315,7 +2315,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_sr_vision")
|
||||
host.soulgem.toggle_sr_vision()
|
||||
host.soulgem.toggle_setting(SOULGEM_SEE_SR_SOULS)
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("soulcatcher_rename")
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
icon_sprite_tag = "wolf"
|
||||
vore_tail_sprite_variant = "N"
|
||||
fullness_icons = 3
|
||||
struggle_anim = TRUE
|
||||
|
||||
/datum/sprite_accessory/tail/taur/ch/sergal/fatwheaties
|
||||
name = "Fat Sergal (Taur)"
|
||||
@@ -90,6 +91,7 @@
|
||||
icon_sprite_tag = "wolf"
|
||||
vore_tail_sprite_variant = "N"
|
||||
fullness_icons = 3
|
||||
struggle_anim = TRUE
|
||||
|
||||
/datum/sprite_accessory/tail/taur/ch/sergal/wheaties_2c
|
||||
name = "Sergal (Taur, dual-color)"
|
||||
@@ -98,6 +100,7 @@
|
||||
icon_sprite_tag = "wolf"
|
||||
vore_tail_sprite_variant = "N"
|
||||
fullness_icons = 3
|
||||
struggle_anim = TRUE
|
||||
|
||||
/datum/sprite_accessory/tail/taur/ch/sergal/fatwheaties_2c
|
||||
name = "Fat Sergal (Taur, dual-color)"
|
||||
@@ -106,6 +109,7 @@
|
||||
icon_sprite_tag = "wolf"
|
||||
vore_tail_sprite_variant = "N"
|
||||
fullness_icons = 3
|
||||
struggle_anim = TRUE
|
||||
|
||||
/datum/sprite_accessory/tail/taur/ch/longvirus
|
||||
name = "Long Virus (Taur)"
|
||||
@@ -131,6 +135,7 @@
|
||||
icon_loaf = 'icons/mob/vore/taurs_ch_loaf.dmi'
|
||||
vore_tail_sprite_variant = "SectDrone"
|
||||
belly_variant_when_loaf = TRUE
|
||||
struggle_anim = TRUE
|
||||
loaf_offset = 3
|
||||
fullness_icons = 3
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
owner = loc
|
||||
owner.recalculate_vis()
|
||||
|
||||
// Store the vars_to_save into the save file
|
||||
/obj/soulgem/deserialize(list/data)
|
||||
@@ -236,6 +237,8 @@
|
||||
soulgem_sight()
|
||||
if(flag & NIF_SC_PROJECTING)
|
||||
soulgem_projecting()
|
||||
if(flag & SOULGEM_SEE_SR_SOULS)
|
||||
owner.recalculate_vis()
|
||||
|
||||
// Checks a single flag, or if all combined flags are true
|
||||
/obj/soulgem/proc/flag_check(var/flag, var/match_all = FALSE)
|
||||
@@ -526,11 +529,3 @@
|
||||
ghost.abandon_mob()
|
||||
qdel(M)
|
||||
return TRUE
|
||||
|
||||
/obj/soulgem/proc/toggle_sr_vision()
|
||||
if(VIS_SOULCATCHER in owner.vis_enabled)
|
||||
owner.plane_holder.set_vis(VIS_SOULCATCHER, FALSE)
|
||||
owner.vis_enabled -= VIS_SOULCATCHER
|
||||
else
|
||||
owner.plane_holder.set_vis(VIS_SOULCATCHER, TRUE)
|
||||
owner.vis_enabled += VIS_SOULCATCHER
|
||||
|
||||
Reference in New Issue
Block a user