From e0308d091365ba4b23e74d45c5244b1288f611d5 Mon Sep 17 00:00:00 2001 From: Killerqu00 <47712032+Killerqu00@users.noreply.github.com> Date: Fri, 18 Apr 2025 03:23:02 +0200 Subject: [PATCH] Contraband examine changes (again) (#36032) * g * no one caught it in review, damn --- Content.Shared/Contraband/ContrabandSystem.cs | 19 +++++++----------- .../Examine/ExamineSystemShared.Group.cs | 4 ++-- .../Interface/VerbIcons/ATTRIBUTION.txt | 4 ++-- .../Textures/Interface/VerbIcons/lock-red.svg | 1 + .../VerbIcons/lock-red.svg.192dpi.png | Bin 0 -> 2215 bytes .../VerbIcons/lock-red.svg.192dpi.png.yml | 2 ++ .../Interface/VerbIcons/unlock-green.svg | 1 + .../VerbIcons/unlock-green.svg.192dpi.png | Bin 0 -> 2152 bytes .../VerbIcons/unlock-green.svg.192dpi.png.yml | 2 ++ 9 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 Resources/Textures/Interface/VerbIcons/lock-red.svg create mode 100644 Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png create mode 100644 Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png.yml create mode 100644 Resources/Textures/Interface/VerbIcons/unlock-green.svg create mode 100644 Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png create mode 100644 Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png.yml diff --git a/Content.Shared/Contraband/ContrabandSystem.cs b/Content.Shared/Contraband/ContrabandSystem.cs index bfd7100289..c998875c87 100644 --- a/Content.Shared/Contraband/ContrabandSystem.cs +++ b/Content.Shared/Contraband/ContrabandSystem.cs @@ -84,26 +84,21 @@ public sealed class ContrabandSystem : EntitySystem } } - String carryingMessage; - // either its fully restricted, you have no departments, or your departments dont intersect with the restricted departments + // if it is fully restricted, you're department-less, or your department isn't in the allowed list, you cannot carry it. Otherwise, you can. + var carryingMessage = Loc.GetString("contraband-examine-text-avoid-carrying-around"); + var iconTexture = "/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png"; if (departments.Intersect(component.AllowedDepartments).Any() || jobs.Contains(jobId)) { carryingMessage = Loc.GetString("contraband-examine-text-in-the-clear"); + iconTexture = "/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png"; } - else - { - // otherwise fine to use :tm: - carryingMessage = Loc.GetString("contraband-examine-text-avoid-carrying-around"); - } - var examineMarkup = GetContrabandExamine(departmentExamineMessage, carryingMessage); - _examine.AddDetailedExamineVerb(args, + _examine.AddHoverExamineVerb(args, component, - examineMarkup, Loc.GetString("contraband-examinable-verb-text"), - "/Textures/Interface/VerbIcons/lock.svg.192dpi.png", - Loc.GetString("contraband-examinable-verb-message")); + examineMarkup.ToMarkup(), + iconTexture); } private FormattedMessage GetContrabandExamine(String deptMessage, String carryMessage) diff --git a/Content.Shared/Examine/ExamineSystemShared.Group.cs b/Content.Shared/Examine/ExamineSystemShared.Group.cs index 299d3c4af2..64b70d0af3 100644 --- a/Content.Shared/Examine/ExamineSystemShared.Group.cs +++ b/Content.Shared/Examine/ExamineSystemShared.Group.cs @@ -184,9 +184,9 @@ namespace Content.Shared.Examine /// /// Adds an icon aligned to the left of examine window that gives you info on hover. /// - public void AddHoverExamineVerb(GetVerbsEvent verbsEvent, Component component, string hoverMessage, string iconTexture = DefaultIconTexture) + public void AddHoverExamineVerb(GetVerbsEvent verbsEvent, Component component, string verbText, string hoverMessage, string iconTexture = DefaultIconTexture) { - AddDetailedExamineVerb(verbsEvent, component, FormattedMessage.Empty, "", iconTexture, hoverMessage, true); + AddDetailedExamineVerb(verbsEvent, component, FormattedMessage.Empty, verbText, iconTexture, hoverMessage, true); } } } diff --git a/Resources/Textures/Interface/VerbIcons/ATTRIBUTION.txt b/Resources/Textures/Interface/VerbIcons/ATTRIBUTION.txt index 1c71df2d5c..bb584a7c20 100644 --- a/Resources/Textures/Interface/VerbIcons/ATTRIBUTION.txt +++ b/Resources/Textures/Interface/VerbIcons/ATTRIBUTION.txt @@ -2,10 +2,10 @@ All icons are public domain. Pulled mostly from this source https://github.com/apancik/public-domain-icons. -lock.svg by Lorc under CC BY 3.0 +lock.svg and lock-red.svg by Lorc under CC BY 3.0 https://game-icons.net/1x1/lorc/padlock.html -unlock.svg by Delapouite under CC BY 3.0 +unlock.svg and unlock-green by Delapouite under CC BY 3.0 https://game-icons.net/1x1/delapouite/padlock-open.html bubbles.svg by Lorc under CC BY 3.0 diff --git a/Resources/Textures/Interface/VerbIcons/lock-red.svg b/Resources/Textures/Interface/VerbIcons/lock-red.svg new file mode 100644 index 0000000000..ba2546dcab --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/lock-red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png b/Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png new file mode 100644 index 0000000000000000000000000000000000000000..0801b8c27900596d86f74a661872328dc27f438e GIT binary patch literal 2215 zcmeH{c{CJS9LMi4jH!l9wor&B6pb0`Q1v$db@PBuXBM%2Eu)n_lOfFo!CCcOc`X8<4@o>fON z0zfFu(RMdkVBi3d1i)zkeg_~KfHMFj3Mc^L0Z0Yl8~`i;&H@kzK-ynUf%*UXU%Y`I z5BHxdqHjyU#T3~KDqhIv%{???6H@27ksw9?;O^2Jk%fq zV*BK!10g}p+p;YCP1`mUh7uB+dVz6(q$j#DUvM;tkBtRsFcT^xB^bbHR(53AJ7HOA z5o}34w>G4s}$8_lt-elnv2UQG7#aqQl1Fe)KvsW(h%yAMj~9K zD5Nqd10teuR0l=TDU)GF&{524=uN!fI#9= zrd8Tv6Sp;-8L))d0Rop$fAn~rG0$N*<{NCCqAvZRh4~nyVU~7|n}AT#!FW1pZNaol zB6^CDJ@F$Zxjt%2Ny!R!2kYI}cs*#Hfg^o=Tk!C>t^CAu$j9eB+f2D}{0|Yx;l|d4 zB?PPU3c4(0S9@ODb?4q*Y~|`T`?*D5P$1Dgg7r+qVk@R9sE_$-dpB7xK6Q|X>bKtL zubnFh-Y)qi>!p#u?#a6bkQ8UG^4cWs3ELH&sS1(yMYEEPO$lQA^F}x}_!dprOl>*Z z=_M7K$L0*|lrf(;tvaYePn0)HhqKh9t%yKxC33=`W00eHHUC&pqj!iS=6LBsWLhgQP4q+262TN$Nt*)#tnwV_1C7{goR+n zhswt{g3a8v(bA`TdS>h9%L~EyCDY;n@1T%o;GE>YyTRq>ALltKfo|YR_ zcCT*Q(^(t;mUz2k2jS)|CN?{QR6;b}r-VOTga<)aVAlBr0xq#@@ zFl35cgSR%ls-vnfJHmxQgL+kDBn>;leI%kgQ2Kp0R7XgeH6EejZNt4j>B@VQ8jf9X z>n?unp6A~*M&{YnZJ7`g*FEg0;VR5}F?`slS7J$%EX-8N#+7OeOAA%ajleC5JQB(sLt47l!iGy7x@|->*`rtg1Hykt|{q0e5S@=5 zZ+jw>7|f^Sej_N28S3%dD#kl?JXQnVc?m&-AM5F_#wZeUbEff@miLDG_K`UOGt*XK zORvUPqGo2F-MhKk{B3pVk?O2x#Y*I}MlLm&(F8lD04j!$G$Kkf4(RegkFS>;A6A%*S7f6lz ucfdkL_LKln|2qOLFvR~b?LbKQKN%bzr}HDo+S;fH0Ryba_M~DnZ}y)Cg&>Cj literal 0 HcmV?d00001 diff --git a/Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png.yml b/Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png.yml new file mode 100644 index 0000000000..5c43e23305 --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png.yml @@ -0,0 +1,2 @@ +sample: + filter: true diff --git a/Resources/Textures/Interface/VerbIcons/unlock-green.svg b/Resources/Textures/Interface/VerbIcons/unlock-green.svg new file mode 100644 index 0000000000..83a61cca34 --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/unlock-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png b/Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png new file mode 100644 index 0000000000000000000000000000000000000000..baad170847fbd103cd17f56f19f6d5a9a9d19d9a GIT binary patch literal 2152 zcmd^9c{J2p9KU0P^emGlal9s>#AFN-*^PCE3_^(+%nW+jGCX>Al_gQOC|gVmV~Z@I zkd!4nHI^upeG(%3$ouu)Id41X{q_Frp6|V%bMECRXMET#yAI{2~Aw&{g;}0RCtISR?>6(gE1xlUYm91c1ZG z5^rM&5r7K-WB^(4cfd z(SnK$wzs#RZwyvKk?W#aSy+F|-d_ujP<6hX!^n+M=7%dqwatJ1)bfiw43$1Tc2#=k zxzT>d9iq23R^kOD%67kbIWW7Gv5WIc2^q6jOws8s%lZquT$k%;{_31j`{zJDZc2mq zA{BOGQn-V(+$^~E&^X0l;zb1yNA@$>vv%V$Itywu+Jwz_l0)`ALcBp~smZ51PdQ|U zNF6vIEYhX-<38+d--zRyrGw(bS|c}?+@pU;dThQ0ADr5>e<*g zf4VV46fzcjkvwvgR(Vob{o!F@0ZXhaJ*GuI4i+D7V^etavqGND>7GIY0g)PKj1XAR zM=+4tB7~2G`HHy_=9?_grk!m5VQTDnj@_-G(4{Q5>=4ZH#5Uo9m*LW;jeA6`*SNe8 zA)97wx%wHZzZtpVD*>LD@9MJog3l%_Y;WIU)RVoMRa~anc zLa3ADa@KX+cg+Qiz^rmD)4+||d7ggHZECzL;6n6WS$+Y1Fgfn)8QSz#-&?imYjeGn zwnkWl5@>a5O>NOR!Yb6sc--HDt1n$XIHm$h0?ntKYG2;-Ve;BPiR4bBe36naI@3al z?O^Y5iOIpK^s}s@1j!1-{DMAyCIc|8+8JcPz}lsQBuNpN`ovAY6a;e1&U|U;!r}5< zm#E3NHLYObcsEnFN2+l$xc5+jK5NMw`eogKYt5RG@_3)XfER6Rw0W zwLE)st{-M*hv>W{%8$;U;P9og+9ml53$k0iRc6}>sJu;h08v_eb-e_|o{;Ur)h0`z zXb6f9E>EFC+Uc&gXtoY=QBb6^%A>T0wVP>WK<6i+a;0SEc{fd}h$6yC(W?FJCps64SFX(<06J@x6?s#NMR*cM#dg1Y*m_}-MQQMIxfZ?agr`4os%H4i zqB_?rt6gWji3jLa-E{xZS-(XuM~8EGKQ}i&{JEi-pRe>jK;QIPNZWk;?(Eil)XJet zVKZol`m1$p|D49cZI}g>+{^VUcR%zi$j}V!X=G;_MZ@(x1pg)dyczTmPs6qcN5bY5_L4rencA$B9Qv7Jno<9H99Mw=(`lE^L S`;KKu156DquqFDW$ln0vh5O?G literal 0 HcmV?d00001 diff --git a/Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png.yml b/Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png.yml new file mode 100644 index 0000000000..5c43e23305 --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png.yml @@ -0,0 +1,2 @@ +sample: + filter: true -- 2.51.2