From e672fb7da38f15c736aea141aaf4289edfbc5db1 Mon Sep 17 00:00:00 2001 From: Raiden Mei Date: Fri, 3 Nov 2023 11:00:28 +0300 Subject: [PATCH] add&fix: Minor updates for Beretta M9 (#610) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Что этот PR делает Я не хотел делать фикс ради одной цифры в коде, поэтому этот фикс добавляет 2 новых скина для беретты (Пустынный и черный) добавляет возможность установить фонарь на Беретту, а также увеличивает цену ящика с Береттами в карго. Fixes #575 ## Почему это хорошо для игры Фиксы это хорошо. ## Изображения изменений ![2023-11-02_19-02-45](https://github.com/ss220club/Paradise-SS220/assets/134269426/455e9100-6578-4974-b067-1ea13502bae8) ## Тестирование Зашел в игру, ALT+Click по Беретте и поменял ей скин, установил фонарь и побегал по техам, вышел. ## Changelog :cl: fix: Поднял цену ящику с Береттами в карго, добавил строчку в описание пистолета. add: Добавил возможность установить фонарик на Беретту, добавил парочку скинов. /:cl: --- modular_ss220/objects/code/beretta.dm | 33 +++++++++++++++--- modular_ss220/objects/icons/guns.dmi | Bin 1845 -> 3889 bytes .../objects/icons/inhands/guns_lefthand.dmi | Bin 1797 -> 1804 bytes .../objects/icons/inhands/guns_righthand.dmi | Bin 1797 -> 1804 bytes 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/modular_ss220/objects/code/beretta.dm b/modular_ss220/objects/code/beretta.dm index 7eb64a8f52a3..c62687a8ff90 100644 --- a/modular_ss220/objects/code/beretta.dm +++ b/modular_ss220/objects/code/beretta.dm @@ -2,17 +2,42 @@ /obj/item/gun/projectile/automatic/pistol/beretta name = "Беретта M9" - desc = "Один из самых распространенных и узнаваемых пистолетов во вселенной. Старая добрая классика." + desc = "Один из самых распространенных и узнаваемых пистолетов во вселенной. К сожалению, из-за особенности ствола, на пистолет нельзя приделать глушитель. Старая добрая классика." icon = 'modular_ss220/objects/icons/guns.dmi' lefthand_file = 'modular_ss220/objects/icons/inhands/guns_lefthand.dmi' righthand_file = 'modular_ss220/objects/icons/inhands/guns_righthand.dmi' - icon_state = "beretta" - item_state = "beretta" + icon_state = "beretta_modified" + item_state = "beretta_modified" w_class = WEIGHT_CLASS_NORMAL can_suppress = FALSE + can_flashlight = TRUE + unique_reskin = TRUE mag_type = /obj/item/ammo_box/magazine/beretta fire_sound = 'modular_ss220/objects/sound/weapons/gunshots/beretta_shot.ogg' +/obj/item/gun/projectile/automatic/pistol/beretta/Initialize(mapload) + . = ..() + options["Modified grip"] = "beretta_modified" + options["Black skin"] = "beretta_black" + options["Desert skin"] = "beretta_desert" + +/obj/item/gun/projectile/automatic/pistol/beretta/update_icon_state() + if(current_skin) + icon_state = "[current_skin][chambered ? "" : "-e"]" + else + icon_state = "[initial(icon_state)][chambered ? "" : "-e"]" + +/obj/item/gun/projectile/automatic/pistol/beretta/update_overlays() + . = list() + if(gun_light) + var/flashlight = "beretta_light" + if(gun_light.on) + flashlight = "beretta_light-on" + . += image(icon = icon, icon_state = flashlight, pixel_x = 0) + +/obj/item/gun/projectile/automatic/pistol/beretta/ui_action_click() + toggle_gunlight() + /obj/item/ammo_box/magazine/beretta name = "beretta rubber 9x19mm magazine" desc = "Магазин резиновых патронов калибра 9x19mm." @@ -117,7 +142,7 @@ name = "Beretta M9 Crate" contains = list(/obj/item/gun/projectile/automatic/pistol/beretta, /obj/item/gun/projectile/automatic/pistol/beretta) - cost = 450 + cost = 650 containername = "beretta m9 pack" /datum/supply_packs/security/armory/berettarubberammo diff --git a/modular_ss220/objects/icons/guns.dmi b/modular_ss220/objects/icons/guns.dmi index 5cd2099631b45646617b043e93f764a1998ac3ef..bbcd23cbe675a36f824f160155d367b831b1ace3 100644 GIT binary patch literal 3889 zcmZu!byU<(wEr#}AhL8UOQ&=$A-M?1qJSukG)f68u!w|o`BOlVlu(co6%j!?C03+e z5X41tNvWm#t^d7q-aBXV&YhWiXYOY{XZ|xaF@Vz|X#oI$8)EcsQR+xacA|k%%F&Pz zLrPT@Vs0IvcNgdC@97)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?;3>(mLL-M*Z0r^Y5UjPLmb~|Hu%a4Z`^3| z23*Z%^Jb%Q!%2YP{`y|46pLAw_a@MQQTTfmWcp4F#eMa?qE$3)gt;<+5dWB{1`i&_ z2;5)aYom&iQF2~~R(lP`GZ-84jUu?OzE|W*<;?s6_Zq>dcB_p681G>q;KBM{27`m1 zHR5Kg-7;_5->R_qA|5Di6*M@ccnplSwzhT(Lq8P+$0OfFDZ*Bkpc$|gHu?oU46h`4Wd5WKQ7hAh# zkrc_$zJgrMt+_)JNG|&N4h~M@c;Gud&hsU#@Jp~yu1!jY!*n=W^OC3u4yVzY#PUe` ziKe6shmJDcOODi86QwpdOxA3bc5ZMOzOc45jDOXQE349VFBMTX;rMIlF|Qte3HA+- OAT+$RSk7dzu~Y^Yz)Oh$ delta 153 zcmV;K0A~M;4uuYoB!7f@R9JLGWpiV4X>fFDZ*Bkpc$|gIF%H5o3`XHOKEKo(+B+CxNCr|Vw&3~<3`~geNuOSi^Ss0jVU6^Zre&}2m<~sBuaYdo<1~`XQtsJ4 zp~fcg=(zHAuZcTysWgShMDEu3AqtP-3!CO){Hrd~#O&v-#}2#&gf-F|kB>1NClZ@^ HvA9$Q1Z7G4 diff --git a/modular_ss220/objects/icons/inhands/guns_righthand.dmi b/modular_ss220/objects/icons/inhands/guns_righthand.dmi index 14e797c984aa2af021deee0cf792066df0bd417d..94a6c51310ff3fcefa49bd4ba67b662201429853 100644 GIT binary patch delta 160 zcmV;R0AK%w4vY?vB!7!~R9JLGWpiV4X>fFDZ*Bkpc$|gHu?oU46h`4Wd5WKQ7hAh# zkrc_$zJgrMt+_)JNG|&N4h~M@c;Gud&hsU#@Jp~yu1!jY!*n=W^OC3u4yVzY#PUe` ziKe6shmJDcOODi86QwpdOxA3bc5ZMOzOc45jDOXQE349VFBMTX;rMIlF|Qte3HA+- OAT+$RSk7dzu~Y^Yz)Oh$ delta 153 zcmV;K0A~M;4uuYoB!7f@R9JLGWpiV4X>fFDZ*Bkpc$|gIF%H5o3`XHOKEKo(+B+CxNCr|Vw&3~<3`~geNuOSi^Ss0jVU6^Zre&}2m<~sBuaYdo<1~`XQtsJ4 zp~fcg=(zHAuZcTysWgShMDEu3AqtP-3!CO){Hrd~#O&v-#}2#&gf-F|kB>1NClZ@^ HvA9$Q1Z7G4