mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
fix multiple issues (#9366)
This commit is contained in:
@@ -202,12 +202,12 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
return
|
return
|
||||||
var/list/overrides = list()
|
var/list/overrides = list()
|
||||||
for(var/image/target_image as anything in target.images)
|
for(var/image/target_image as anything in target.images)
|
||||||
if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override)
|
if(!target_image.loc || target_image.loc.loc != target.tracked_turf || !target_image.override)
|
||||||
continue
|
continue
|
||||||
overrides += target_image.loc
|
overrides += target_image.loc
|
||||||
|
|
||||||
var/list/atoms_to_display = list(target_mob.listed_turf)
|
var/list/atoms_to_display = list(target.tracked_turf)
|
||||||
for(var/atom/movable/turf_content as anything in target_mob.listed_turf)
|
for(var/atom/movable/turf_content as anything in target.tracked_turf)
|
||||||
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
|
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
|
||||||
continue
|
continue
|
||||||
if(turf_content.invisibility > target_mob.see_invisible)
|
if(turf_content.invisibility > target_mob.see_invisible)
|
||||||
@@ -318,12 +318,11 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
|
|
||||||
// Handle turfs
|
// Handle turfs
|
||||||
|
|
||||||
if(target_mob?.listed_turf)
|
if(target.tracked_turf)
|
||||||
if(!target_mob.TurfAdjacent(target_mob.listed_turf))
|
if(!target_mob.TurfAdjacent(target.tracked_turf))
|
||||||
target.stat_panel.send_message("removed_listedturf")
|
target_mob.set_listed_turf(null)
|
||||||
target_mob.listed_turf = null
|
|
||||||
|
|
||||||
else if(target.stat_tab == target_mob?.listed_turf.name || !(target_mob?.listed_turf.name in target.panel_tabs))
|
else if(target.stat_tab == target.tracked_turf.name || !(target.tracked_turf.name in target.panel_tabs))
|
||||||
set_turf_examine_tab(target, target_mob)
|
set_turf_examine_tab(target, target_mob)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -350,6 +349,8 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
|
|
||||||
/// Stat panel window declaration
|
/// Stat panel window declaration
|
||||||
/client/var/datum/tgui_window/stat_panel
|
/client/var/datum/tgui_window/stat_panel
|
||||||
|
/// Turf examine turf
|
||||||
|
/client/var/turf/tracked_turf
|
||||||
|
|
||||||
/// Datum that holds and tracks info about a client's object window
|
/// Datum that holds and tracks info about a client's object window
|
||||||
/// Really only exists because I want to be able to do logic with signals
|
/// Really only exists because I want to be able to do logic with signals
|
||||||
@@ -364,8 +365,6 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
var/list/atoms_to_imagify = list()
|
var/list/atoms_to_imagify = list()
|
||||||
/// Our owner client
|
/// Our owner client
|
||||||
var/client/parent
|
var/client/parent
|
||||||
/// Are we currently tracking a turf?
|
|
||||||
var/actively_tracking = FALSE
|
|
||||||
///For reusing this logic for examines
|
///For reusing this logic for examines
|
||||||
var/atom/examine_target
|
var/atom/examine_target
|
||||||
var/flags = 0
|
var/flags = 0
|
||||||
@@ -417,28 +416,31 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
if(!length(to_make))
|
if(!length(to_make))
|
||||||
return PROCESS_KILL
|
return PROCESS_KILL
|
||||||
|
|
||||||
/datum/object_window_info/proc/start_turf_tracking()
|
/datum/object_window_info/proc/start_turf_tracking(turf/new_turf)
|
||||||
if(actively_tracking)
|
if(parent.tracked_turf)
|
||||||
stop_turf_tracking()
|
stop_turf_tracking()
|
||||||
var/static/list/connections = list(
|
var/static/list/connections = list(
|
||||||
COMSIG_MOVABLE_MOVED = PROC_REF(on_mob_move),
|
COMSIG_MOVABLE_MOVED = PROC_REF(on_mob_move),
|
||||||
COMSIG_MOB_LOGOUT = PROC_REF(on_mob_logout),
|
COMSIG_MOB_LOGOUT = PROC_REF(on_mob_logout),
|
||||||
)
|
)
|
||||||
AddComponent(/datum/component/connect_mob_behalf, parent, connections)
|
AddComponent(/datum/component/connect_mob_behalf, parent, connections)
|
||||||
RegisterSignal(parent.mob.listed_turf, COMSIG_ATOM_ENTERED, PROC_REF(turflist_changed))
|
RegisterSignal(parent.tracked_turf, COMSIG_ATOM_ENTERED, PROC_REF(turflist_changed))
|
||||||
RegisterSignal(parent.mob.listed_turf, COMSIG_ATOM_EXITED, PROC_REF(turflist_changed))
|
RegisterSignal(parent.tracked_turf, COMSIG_ATOM_EXITED, PROC_REF(turflist_changed))
|
||||||
actively_tracking = TRUE
|
parent.stat_panel.send_message("create_listedturf", new_turf)
|
||||||
|
parent.tracked_turf = new_turf
|
||||||
|
|
||||||
/datum/object_window_info/proc/stop_turf_tracking()
|
/datum/object_window_info/proc/stop_turf_tracking()
|
||||||
qdel(GetComponent(/datum/component/connect_mob_behalf))
|
if(GetComponent(/datum/component/connect_mob_behalf))
|
||||||
UnregisterSignal(parent.mob.listed_turf, COMSIG_ATOM_ENTERED)
|
qdel(GetComponent(/datum/component/connect_mob_behalf))
|
||||||
UnregisterSignal(parent.mob.listed_turf, COMSIG_ATOM_EXITED)
|
if(parent.tracked_turf)
|
||||||
actively_tracking = FALSE
|
UnregisterSignal(parent.tracked_turf, COMSIG_ATOM_ENTERED)
|
||||||
|
UnregisterSignal(parent.tracked_turf, COMSIG_ATOM_EXITED)
|
||||||
|
parent.stat_panel.send_message("remove_listedturf")
|
||||||
|
parent.tracked_turf = null
|
||||||
|
|
||||||
/datum/object_window_info/proc/on_mob_move(mob/source)
|
/datum/object_window_info/proc/on_mob_move(mob/source)
|
||||||
SIGNAL_HANDLER
|
SIGNAL_HANDLER
|
||||||
var/turf/listed = source.listed_turf
|
if(!parent.tracked_turf || !source.TurfAdjacent(parent.tracked_turf))
|
||||||
if(!listed || !source.TurfAdjacent(listed))
|
|
||||||
source.set_listed_turf(null)
|
source.set_listed_turf(null)
|
||||||
|
|
||||||
/datum/object_window_info/proc/on_mob_logout(mob/source)
|
/datum/object_window_info/proc/on_mob_logout(mob/source)
|
||||||
@@ -465,16 +467,12 @@ SUBSYSTEM_DEF(statpanels)
|
|||||||
|
|
||||||
/mob/proc/set_listed_turf(turf/new_turf)
|
/mob/proc/set_listed_turf(turf/new_turf)
|
||||||
if(!client)
|
if(!client)
|
||||||
listed_turf = new_turf
|
|
||||||
return
|
return
|
||||||
if(!client.obj_window)
|
if(!client.obj_window)
|
||||||
client.obj_window = new(client)
|
client.obj_window = new(client)
|
||||||
|
if(client.tracked_turf == new_turf)
|
||||||
|
return
|
||||||
if(!new_turf)
|
if(!new_turf)
|
||||||
client.obj_window.stop_turf_tracking() //Needs to go before listed_turf is set to null so signals can be removed
|
client.obj_window.stop_turf_tracking() //Needs to go before listed_turf is set to null so signals can be removed
|
||||||
listed_turf = new_turf
|
return
|
||||||
|
client.obj_window.start_turf_tracking(new_turf)
|
||||||
if(listed_turf)
|
|
||||||
client.stat_panel.send_message("create_listedturf", listed_turf.name)
|
|
||||||
client.obj_window.start_turf_tracking()
|
|
||||||
else
|
|
||||||
client.stat_panel.send_message("remove_listedturf")
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
|
|
||||||
if(new_character.client)
|
if(new_character.client)
|
||||||
new_character.client.init_verbs() // re-initialize character specific verbs
|
new_character.client.init_verbs() // re-initialize character specific verbs
|
||||||
|
new_character.set_listed_turf(null)
|
||||||
|
|
||||||
/datum/mind/proc/store_memory(new_text)
|
/datum/mind/proc/store_memory(new_text)
|
||||||
memory += "[new_text]<BR>"
|
memory += "[new_text]<BR>"
|
||||||
|
|||||||
@@ -446,7 +446,7 @@
|
|||||||
blob.mob_radio = R
|
blob.mob_radio = R
|
||||||
R.forceMove(blob)
|
R.forceMove(blob)
|
||||||
if(wear_id)
|
if(wear_id)
|
||||||
blob.myid = wear_id
|
blob.myid = wear_id.GetID()
|
||||||
wear_id.forceMove(blob)
|
wear_id.forceMove(blob)
|
||||||
//ChompAdd End
|
//ChompAdd End
|
||||||
//Mail them to nullspace
|
//Mail them to nullspace
|
||||||
|
|||||||
@@ -125,12 +125,16 @@
|
|||||||
var/obj/machinery/vr_sleeper/V = vr_holder.loc
|
var/obj/machinery/vr_sleeper/V = vr_holder.loc
|
||||||
V.go_out()
|
V.go_out()
|
||||||
|
|
||||||
|
//CHOMPAdd Start
|
||||||
if(died_in_vr)
|
if(died_in_vr)
|
||||||
spawn(3000) //Delete the body after 5 minutes to make sure mob subsystem doesn't cry
|
addtimer(CALLBACK(src, PROC_REF(cleanup_vr)), 3000, TIMER_DELETE_ME) //Delete the body after 5 minutes
|
||||||
var/list/slots = list(slot_back,slot_handcuffed,slot_l_store,slot_r_store,slot_wear_mask,slot_l_hand,slot_r_hand,slot_wear_id,slot_glasses,slot_gloves,slot_head,slot_shoes,slot_belt,slot_wear_suit,slot_w_uniform,slot_s_store,slot_l_ear,slot_r_ear)
|
|
||||||
for(var/slot in slots)
|
/mob/living/carbon/human/proc/cleanup_vr()
|
||||||
var/obj/item/I = get_equipped_item(slot = slot)
|
var/list/slots = list(slot_back,slot_handcuffed,slot_l_store,slot_r_store,slot_wear_mask,slot_l_hand,slot_r_hand,slot_wear_id,slot_glasses,slot_gloves,slot_head,slot_shoes,slot_belt,slot_wear_suit,slot_w_uniform,slot_s_store,slot_l_ear,slot_r_ear)
|
||||||
if(I)
|
for(var/slot in slots)
|
||||||
unEquip(I,force = TRUE)
|
var/obj/item/I = get_equipped_item(slot = slot)
|
||||||
release_vore_contents(include_absorbed = TRUE, silent = TRUE)
|
if(I)
|
||||||
qdel(src)
|
unEquip(I,force = TRUE)
|
||||||
|
release_vore_contents(include_absorbed = TRUE, silent = TRUE)
|
||||||
|
qdel(src)
|
||||||
|
//CHOMPAdd End
|
||||||
|
|||||||
@@ -208,7 +208,6 @@
|
|||||||
//so don't treat them as being SSD even though their client var is null.
|
//so don't treat them as being SSD even though their client var is null.
|
||||||
var/mob/teleop = null
|
var/mob/teleop = null
|
||||||
|
|
||||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
|
||||||
var/list/shouldnt_see = list(/mob/observer/eye) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
|
var/list/shouldnt_see = list(/mob/observer/eye) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
|
||||||
|
|
||||||
var/list/active_genes=list()
|
var/list/active_genes=list()
|
||||||
|
|||||||
@@ -497,7 +497,7 @@
|
|||||||
blob.mob_radio = R
|
blob.mob_radio = R
|
||||||
R.forceMove(blob)
|
R.forceMove(blob)
|
||||||
if(wear_id)
|
if(wear_id)
|
||||||
blob.myid = wear_id
|
blob.myid = wear_id.GetID()
|
||||||
wear_id.forceMove(blob)
|
wear_id.forceMove(blob)
|
||||||
|
|
||||||
//Mail them to nullspace
|
//Mail them to nullspace
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ Maybe later, gotta figure out a way to click yourself when in a locker etc.
|
|||||||
new_mob.vore_organs += B
|
new_mob.vore_organs += B
|
||||||
new_mob.nutrition = src.nutrition
|
new_mob.nutrition = src.nutrition
|
||||||
|
|
||||||
src.soulgem.transfer_self(new_mob) //CHOMPAdd Soulcatcher
|
src.soulgem?.transfer_self(new_mob) //CHOMPAdd Soulcatcher
|
||||||
|
|
||||||
new_mob.ckey = src.ckey
|
new_mob.ckey = src.ckey
|
||||||
if(new_mob.tf_form_ckey)
|
if(new_mob.tf_form_ckey)
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
/mob/living/simple_mob/vore/alienanimals/teppi/baby
|
/mob/living/simple_mob/vore/alienanimals/teppi/baby
|
||||||
mob_size = MOB_MEDIUM
|
mob_size = MOB_MEDIUM
|
||||||
allow_mind_transfer = TRUE
|
|
||||||
|
|||||||
Reference in New Issue
Block a user