From ac695cfccd648ecffa934921b139b393221d526d Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Thu, 8 Feb 2024 21:20:24 +0500 Subject: [PATCH 1/7] Radial menu to toolsets augments bam --- code/modules/augment/active/polytool.dm | 12 +++++-- .../augment/active/tool/engineering.dm | 2 ++ code/modules/augment/active/tool/surgical.dm | 32 +++++++++++++----- .../loadout/lists/augments.dm | 5 +++ icons/obj/augment_tools.dmi | Bin 1081 -> 1988 bytes 5 files changed, 41 insertions(+), 10 deletions(-) diff --git a/code/modules/augment/active/polytool.dm b/code/modules/augment/active/polytool.dm index 4985cd0a57..abb03c2840 100644 --- a/code/modules/augment/active/polytool.dm +++ b/code/modules/augment/active/polytool.dm @@ -4,6 +4,7 @@ icon_state = "multitool" allowed_organs = list(BP_AUGMENT_R_HAND, BP_AUGMENT_L_HAND) var/list/items = list() + var/list/images = list() var/list/paths = list() //We may lose them augment_flags = AUGMENTATION_MECHANIC @@ -50,7 +51,14 @@ else to_chat(owner, SPAN_WARNING("You must drop [I] before tool can be extend.")) else - var/obj/item = input(owner, "Select item for deploy") as null|anything in src + //var/obj/item = input(owner, "Select item for deploy") as null|anything in src //<- Здесь меняй + var/obj/item + //Здесь нам потребуется создать лист иконок, код листов крайне выёбывается + for(var/obj/item/i in items) + var/image/j = image(icon = i.icon, icon_state = i.item_state) + j.name = i + images[i] = j + item = show_radial_menu(owner, owner, images , radius = 32, require_near = TRUE) if(!item || !(src in owner.internal_organs)) return if(owner.equip_to_slot_if_possible(item, slot)) @@ -60,4 +68,4 @@ owner.visible_message( SPAN_WARNING("[owner] extends \his [item.name] from [limb]."), SPAN_NOTICE("You extend your [item.name] from [limb].") - ) \ No newline at end of file + ) diff --git a/code/modules/augment/active/tool/engineering.dm b/code/modules/augment/active/tool/engineering.dm index 60fc18c941..9eba51988f 100644 --- a/code/modules/augment/active/tool/engineering.dm +++ b/code/modules/augment/active/tool/engineering.dm @@ -17,6 +17,7 @@ name = "digital welder" desc = "A precise, high quality welding tool." icon_state = "welder_finger" + var/aug_state = "welder" icon = 'icons/obj/augment_tools.dmi' @@ -73,4 +74,5 @@ name = "digital multitool" desc = "A multitool inside of a multitool. Doubletool?" icon_state = "multitool_finger" + item_state = "multitool" icon = 'icons/obj/augment_tools.dmi' diff --git a/code/modules/augment/active/tool/surgical.dm b/code/modules/augment/active/tool/surgical.dm index fc8efc799c..faabbb0a77 100644 --- a/code/modules/augment/active/tool/surgical.dm +++ b/code/modules/augment/active/tool/surgical.dm @@ -4,11 +4,27 @@ desc = "Part of Zeng-Hu Pharmaceutical's line of biomedical augmentations, this device contains the full set of tools any surgeon would ever need." icon_state = "multitool_medical" paths = list( - /obj/item/bonesetter, - /obj/item/cautery, - /obj/item/circular_saw, - /obj/item/hemostat, - /obj/item/retractor, - /obj/item/scalpel, - /obj/item/surgicaldrill - ) \ No newline at end of file + /obj/item/bonesetter/finger, + /obj/item/cautery/finger, + /obj/item/circular_saw/finger, + /obj/item/hemostat/finger, + /obj/item/retractor/finger, + /obj/item/scalpel/finger, + /obj/item/surgicaldrill/finger + ) +// Если вы вдруг захотите сделать инструменты в этом наборе особенными - воспользуйтесь тем что ниже. Эти обьекты были созданы +//лишь для прописания item_state, дабы show_radial_menu работало адекватно +/obj/item/bonesetter/finger + item_state = "bone setter" +/obj/item/cautery/finger + item_state = "cautery" +/obj/item/circular_saw/finger + item_state = "saw3" +/obj/item/hemostat/finger + item_state = "hemostat" +/obj/item/retractor/finger + item_state = "retractor" +/obj/item/scalpel/finger + item_state = "scalpel" +/obj/item/surgicaldrill/finger + item_state = "drill" diff --git a/code/modules/client/preference_setup/loadout/lists/augments.dm b/code/modules/client/preference_setup/loadout/lists/augments.dm index ebc54c4c9c..d19fe5cdbe 100644 --- a/code/modules/client/preference_setup/loadout/lists/augments.dm +++ b/code/modules/client/preference_setup/loadout/lists/augments.dm @@ -2,6 +2,11 @@ sort_category = "Augments" category = /datum/gear/augment +/datum/gear/augment/enginiiring_tools + display_name = "Engineering toolselt" + cost = 2 + path = /obj/item/organ/internal/augment/active/polytool + /datum/gear/augment/minor_head display_name = "minor augments selection (head)" description = "A minor augment with no in-game effects." diff --git a/icons/obj/augment_tools.dmi b/icons/obj/augment_tools.dmi index cedfe88eec48dc65899b5b0bdcd1e2cb750aafb0..18f386dca71fcde81d95399a011044bf063443b7 100644 GIT binary patch literal 1988 zcmV;#2RrzQP)004jp0{{R3ySJH8ny)LP|)X8-?YnZUrnnVJ90|NmzH|1>l-TU%R&g@rCIE^u#e zW@ctpR8%G=CLSIhnVFeXR8%S{DW|8WKR-XLFANzO8PA^&nRX6hBN8z&F-J#7NHzc~ zDk^+l1Q8Jt78VvvOiUOU7z_*yL_$JUQ&UJtNNH(loS8CNBqXpjG?6+wv#>S2OG{Ex zQcJytG_Yklkz^7&a1}#;d3kxStE?Dd)fY;P6jrPpS*Q*cI9gg-aBy&miHZOJ|DmBL zTVQ92i9qo1IDmivUtCV!Z z0d!JMQvg8b*k%9#0Lgk(Sad{Xb7OL8aCB*JZU6vyoSl--3WG2V#?SUCieAUqzw0hz zGCa&z5ND$Xv>j=+`1b1*#&#H1Z%Oz*e&I_Zeu-~M%CGl?^*|bxV%Ip@l{OWhKfAC}e>^(r&(IK}mTFQ~go5U1QKF)%Y58L0|=8Kf`eA z325@+J>GozErBfRbyg%OI%8InpENvj?_hpn%#>WlDo9xeo2QIvcrLT#HnUp)&-kZ| zc${9x7kvSoHOTa$gClVO00n4CL_t(|ob8&Ad)h=8#}jB9b3$p?xw)}TNGTBtSvPDq zb#tP#Dp0Jy9xA2nrr7`gPw?`KkjuTfO9^7PmtyfKtX;yHWN)+w(gFfca8h4#4mZ0bnU#k^)c<_e9WxID=C3AecdE zdXND0dlC`N8QCvgoV8n2M2Yc9T_9EfX$8hSNRPALHj<%)8C-Te+G7cOaM^JRAT$pO z0*qeD!ac#d)GaR_v>ZKyqT_zAfjuZX?oTI?0eX;fp>dxy(gVaN6c!g=!gYz)CHCi` z$hDZ5r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i;|S z-;-d(^pZDU{(xW`wa%&$nt^C#@&l*4SX|6cjkU9jvNB#&`Fph|-dBXJuY+JH0008O zNklu!KyMGWu zEC~?~Dt&&wGeDLj^`8n*uw_qxL%|lO%(5&|x;UhCyb1t*Nh_Mb>LO|h6ey)fX+;xQ zT_nPBo+ki`rq~8R&JzGl(QE=x$)yr~fVIFTeL&j+oArSO0Php9=p4#^NPUV$3D`wZ zFIF^B)|PQ#U02S~vjwoaT4T>XfYnz3bmKrI0ClL9OKls9!*x;e^%jV&^IB{BKx~~~ zZc0KWnk=f$Nt7Bb&LEneN{~u0U8l--!QwiOrB5T?^d-f=?fCoHI^1IT&t9jM@$CkB z#R5+KO9f>)t_&L>zTPJQlrX%WP9SZFua61S_9;{TfOvX}{~(BM%7ZxC@$=h|1X_^;R2>G+4=YzffweE2f~I1z+ey1M~{TDrXf0NAJJ2D1lnZJoSeC;(*utzl1~ zSCcFvun$zX7HAE7R;&e_<^y(bfk0b-KLD%k*Xhf71Yey;u)pUwouT?HFU(%+?s{Ey zJb=diy6QZ_{rzxv8?LAMfn-io2~r8t{6Lx?Nb>`;XotugxSpx)ChO|V(V18DDR z-Sh|mmgfsX#sL$6>hEpO7g*+;oB`1O9}R$YK3D*>`E&CX!GeD-+kx+HYh Date: Fri, 9 Feb 2024 19:33:17 +0500 Subject: [PATCH 2/7] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=B0=D1=82=20=D0=B3?= =?UTF-8?q?=D0=BE=D0=B2=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/preference_setup/loadout/lists/augments.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/modules/client/preference_setup/loadout/lists/augments.dm b/code/modules/client/preference_setup/loadout/lists/augments.dm index d19fe5cdbe..ebc54c4c9c 100644 --- a/code/modules/client/preference_setup/loadout/lists/augments.dm +++ b/code/modules/client/preference_setup/loadout/lists/augments.dm @@ -2,11 +2,6 @@ sort_category = "Augments" category = /datum/gear/augment -/datum/gear/augment/enginiiring_tools - display_name = "Engineering toolselt" - cost = 2 - path = /obj/item/organ/internal/augment/active/polytool - /datum/gear/augment/minor_head display_name = "minor augments selection (head)" description = "A minor augment with no in-game effects." From 75b3809f7a95b115717e1386f432e8c7db0db7e4 Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:33:48 +0500 Subject: [PATCH 3/7] =?UTF-8?q?=D0=90=D0=BF=20=D1=80=D0=B0=D0=B4=D0=B8?= =?UTF-8?q?=D1=83=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/augment/active/polytool.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/augment/active/polytool.dm b/code/modules/augment/active/polytool.dm index abb03c2840..ea8abd4703 100644 --- a/code/modules/augment/active/polytool.dm +++ b/code/modules/augment/active/polytool.dm @@ -58,7 +58,7 @@ var/image/j = image(icon = i.icon, icon_state = i.item_state) j.name = i images[i] = j - item = show_radial_menu(owner, owner, images , radius = 32, require_near = TRUE) + item = show_radial_menu(owner, owner, images , radius = 48, require_near = TRUE) if(!item || !(src in owner.internal_organs)) return if(owner.equip_to_slot_if_possible(item, slot)) From 72fb5653e5e85aff44002082baf79a2a6fa45e65 Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Fri, 9 Feb 2024 20:19:13 +0500 Subject: [PATCH 4/7] =?UTF-8?q?=D0=93=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=20=D0=BB=D0=B8=D1=81=D1=82=D0=BE=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BE=D0=BA=20=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B8=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Бэм --- code/modules/augment/active/polytool.dm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/augment/active/polytool.dm b/code/modules/augment/active/polytool.dm index abb03c2840..1da32ddfab 100644 --- a/code/modules/augment/active/polytool.dm +++ b/code/modules/augment/active/polytool.dm @@ -14,6 +14,10 @@ var/obj/item/I = new path (src) I.canremove = FALSE items += I + for(var/obj/item/i in items) + var/image/j = image(icon = i.icon, icon_state = i.item_state) + j.name = i + images[i] = j /obj/item/organ/internal/augment/active/polytool/Destroy() QDEL_NULL_LIST(items) . = ..() @@ -51,13 +55,7 @@ else to_chat(owner, SPAN_WARNING("You must drop [I] before tool can be extend.")) else - //var/obj/item = input(owner, "Select item for deploy") as null|anything in src //<- Здесь меняй var/obj/item - //Здесь нам потребуется создать лист иконок, код листов крайне выёбывается - for(var/obj/item/i in items) - var/image/j = image(icon = i.icon, icon_state = i.item_state) - j.name = i - images[i] = j item = show_radial_menu(owner, owner, images , radius = 32, require_near = TRUE) if(!item || !(src in owner.internal_organs)) return From febde730042693971b11fac0d5f7c6c7c4ead80b Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Sat, 10 Feb 2024 12:34:31 +0500 Subject: [PATCH 5/7] =?UTF-8?q?=D0=9E=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ок --- code/modules/augment/active/polytool.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/augment/active/polytool.dm b/code/modules/augment/active/polytool.dm index db059fb752..b82a864520 100644 --- a/code/modules/augment/active/polytool.dm +++ b/code/modules/augment/active/polytool.dm @@ -14,10 +14,9 @@ var/obj/item/I = new path (src) I.canremove = FALSE items += I - for(var/obj/item/i in items) - var/image/j = image(icon = i.icon, icon_state = i.item_state) - j.name = i - images[i] = j + var/image/img = image(icon = I.icon, icon_state = I.item_state) + img.name = I.name + images[I] = img /obj/item/organ/internal/augment/active/polytool/Destroy() QDEL_NULL_LIST(items) . = ..() From 002bc72e283454e03eff6e8d8713bbfa08f29dfb Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Sat, 10 Feb 2024 12:37:21 +0500 Subject: [PATCH 6/7] Update polytool.dm --- code/modules/augment/active/polytool.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/augment/active/polytool.dm b/code/modules/augment/active/polytool.dm index b82a864520..d1aac193f1 100644 --- a/code/modules/augment/active/polytool.dm +++ b/code/modules/augment/active/polytool.dm @@ -54,8 +54,7 @@ else to_chat(owner, SPAN_WARNING("You must drop [I] before tool can be extend.")) else - var/obj/item - item = show_radial_menu(owner, owner, images , radius = 48, require_near = TRUE) + var/obj/item = show_radial_menu(owner, owner, images , radius = 48, require_near = TRUE) if(!item || !(src in owner.internal_organs)) return if(owner.equip_to_slot_if_possible(item, slot)) From 4069061444b836cd78237e2d90d3ddfb599fb949 Mon Sep 17 00:00:00 2001 From: AmShegars <88627712+AmShegars@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:42:16 +0500 Subject: [PATCH 7/7] Update code/modules/augment/active/tool/engineering.dm Co-authored-by: SuhEugene <32931701+SuhEugene@users.noreply.github.com> --- code/modules/augment/active/tool/engineering.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/augment/active/tool/engineering.dm b/code/modules/augment/active/tool/engineering.dm index 9eba51988f..6c97357be4 100644 --- a/code/modules/augment/active/tool/engineering.dm +++ b/code/modules/augment/active/tool/engineering.dm @@ -17,7 +17,6 @@ name = "digital welder" desc = "A precise, high quality welding tool." icon_state = "welder_finger" - var/aug_state = "welder" icon = 'icons/obj/augment_tools.dmi'