From 269d8527d64e96ec2f52986647507b5242e01d2b Mon Sep 17 00:00:00 2001 From: Superlagg Date: Sun, 28 Apr 2024 19:22:28 -0700 Subject: [PATCH 1/2] misc fix --- code/__DEFINES/artifacts.dm | 2 +- code/controllers/subsystem/chat.dm | 6 +++++- code/modules/mob/mob.dm | 9 +++++++-- code/modules/projectiles/projectile.dm | 3 +++ .../datums/modules/client/verbs/character_directory.dm | 3 ++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/artifacts.dm b/code/__DEFINES/artifacts.dm index 04de386c3ff..21bee178c18 100644 --- a/code/__DEFINES/artifacts.dm +++ b/code/__DEFINES/artifacts.dm @@ -112,7 +112,7 @@ #define ARTVAR_MAX_DELTA "ARTVAR_MAX_DELTA" #define ART_IDENT_MAX_DELTA 1 SECONDS // fun fact this barely works -#define ART_IDENT_TIME 10 MINUTES +#define ART_IDENT_TIME 5 SECONDS #define ART_PENANCE_TIME 20 MINUTES diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm index e45f09eb86c..6a7f11dd9f0 100644 --- a/code/controllers/subsystem/chat.dm +++ b/code/controllers/subsystem/chat.dm @@ -766,7 +766,11 @@ SUBSYSTEM_DEF(chat) SSchat.start_page(viower, viowed) return TRUE if(action == "show_pic") - var/dat = {""} + var/dat = {" + +
+ [profile_pic] <- Copy this link to your browser to view the full sized image. + "} var/datum/browser/popup = new(viower, "enlargeImage", "Full Sized Picture!",1024,768) popup.set_content(dat) popup.open() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 23f87ca8ebb..b8fbf93844c 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -674,8 +674,13 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) usr << browse(text("[][]", name, replacetext(oocnotes, "\n", "
")), text("window=[];size=500x200", name)) onclose(usr, "[name]") if(href_list["enlargeImageCreature"]) - var/dat = {""} - var/datum/browser/popup = new(usr, "enlargeImage", "Full Sized Picture!",1024,1024) + var/followers_clinic_full_of_big_strong_gay_dogs_in_it = PfpHostLink(profilePicture) + var/dat = {" + +
+ [followers_clinic_full_of_big_strong_gay_dogs_in_it] <- Copy this link to your browser to view the full sized image. + "} + var/datum/browser/popup = new(usr, "enlargeImage", "Full Sized Picture!",1024,768) popup.set_content(dat) popup.open() diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 1c69ed46431..283a077bc4a 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -131,6 +131,7 @@ var/damage_mult = 1 /// dont touch this var/finalmost_damage = 0 + var/not_harmful = FALSE var/damage = 10 var/damage_mod = 1 // Makes the gun's damage mod scale faction damage @@ -595,6 +596,8 @@ return hit_something /obj/item/projectile/proc/faction_check(atom/target) + if(not_harmful) + return FALSE // its something that shouldnt be harmful if(!isliving(target) || !LAZYLEN(faction)) return var/mob/living/maybehit = target diff --git a/modular_splurt/code/datums/modules/client/verbs/character_directory.dm b/modular_splurt/code/datums/modules/client/verbs/character_directory.dm index 6c7992db4c4..d33f17e45a7 100644 --- a/modular_splurt/code/datums/modules/client/verbs/character_directory.dm +++ b/modular_splurt/code/datums/modules/client/verbs/character_directory.dm @@ -126,6 +126,7 @@ GLOBAL_LIST_INIT(char_directory_erptags, list("Top", "Bottom", "Switch", "No ERP flavor_text = C.prefs.features["flavor_text"] fricklist = C.prefs.features["flist"] || FALSE + var/thepic = C.prefs.profilePicture ? PfpHostLink(C.prefs.profilePicture, C.prefs.pfphost) : "" directory_mobs.Add(list(list( "name" = name, @@ -142,7 +143,7 @@ GLOBAL_LIST_INIT(char_directory_erptags, list("Top", "Bottom", "Switch", "No ERP "quid" = C.prefs.quester_uid, // love is a quest, and I'm on a quest for love "dms_r_open" = TRUE, "looking_for_friends" = C.prefs.needs_a_friend, - "profile_pic" = PfpHostLink(C.prefs.profilePicture, C.prefs.pfphost) + "profile_pic" = thepic, ))) if(SSchat.debug_character_directory) From 998683944ce92ddc13872f0ae283ace313b4f730 Mon Sep 17 00:00:00 2001 From: Superlagg Date: Sun, 28 Apr 2024 19:22:46 -0700 Subject: [PATCH 2/2] that too --- .../tgui/interfaces/CharacterInspection.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tgui/packages/tgui/interfaces/CharacterInspection.js b/tgui/packages/tgui/interfaces/CharacterInspection.js index fec0f44fba9..fc8f930a817 100644 --- a/tgui/packages/tgui/interfaces/CharacterInspection.js +++ b/tgui/packages/tgui/interfaces/CharacterInspection.js @@ -136,13 +136,15 @@ const MainWindow = (props, context) => { // main screen turn on SelectedTab, setSelectedTab, ] = useLocalState(context, 'SelectedTab', 1); + /// check if data.profile_pic contains what is liokely a URL + const isURL = (data.profile_pic && data.profile_pic.match(/^(http|https):\/\//)); return ( <> {SelectedTab === 1 && ( - {data.profile_pic && ( + {isURL && data.profile_pic ? ( + ) : ( + )}