mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Quick Armor Swap (#19902)
* You can now instantly replace the armor accessories on plate carriers by clicking on it with the new plate or guard you want to replace them with.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/clothing/accessory/A = attacking_item
|
||||
A.before_attached(src, user)
|
||||
if(can_attach_accessory(A))
|
||||
user.drop_item()
|
||||
attach_accessory(user, A)
|
||||
|
||||
@@ -150,6 +150,14 @@
|
||||
bomb = ARMOR_BOMB_PADDED
|
||||
)
|
||||
|
||||
/obj/item/clothing/accessory/armor_plate/before_attached(var/obj/item/clothing/clothing, var/mob/user)
|
||||
if(!clothing.valid_accessory_slots || !(slot in clothing.valid_accessory_slots))
|
||||
return
|
||||
var/obj/item/clothing/accessory/armor_plate/existing_plate = locate() in clothing.accessories
|
||||
if(!existing_plate)
|
||||
return
|
||||
clothing.remove_accessory(user, existing_plate)
|
||||
|
||||
/obj/item/clothing/accessory/armor_plate/generic
|
||||
name = "standard armor plate"
|
||||
desc = "A light-weight kevlar armor plate in drab black colors. A galactic favourite of Zavodskoi fans."
|
||||
|
||||
@@ -83,6 +83,10 @@
|
||||
accessory_mob_overlay.appearance_flags = RESET_ALPHA|RESET_COLOR
|
||||
return accessory_mob_overlay
|
||||
|
||||
/// Gets called before 'can_attach_accessory()' is called in clothing_accessories.dm
|
||||
/obj/item/clothing/accessory/proc/before_attached(var/obj/item/clothing/S, var/mob/user)
|
||||
return
|
||||
|
||||
//when user attached an accessory to S
|
||||
/obj/item/clothing/accessory/proc/on_attached(var/obj/item/clothing/S, var/mob/user)
|
||||
if(!istype(S))
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
drop_sound = 'sound/items/drop/boots.ogg'
|
||||
pickup_sound = 'sound/items/pickup/boots.ogg'
|
||||
|
||||
/obj/item/clothing/accessory/leg_guard/before_attached(var/obj/item/clothing/clothing, var/mob/user)
|
||||
if(!clothing.valid_accessory_slots || !(slot in clothing.valid_accessory_slots))
|
||||
return
|
||||
var/obj/item/clothing/accessory/leg_guard/existing_guard = locate() in clothing.accessories
|
||||
if(!existing_guard)
|
||||
return
|
||||
clothing.remove_accessory(user, existing_guard)
|
||||
|
||||
/obj/item/clothing/accessory/leg_guard/generic
|
||||
name = "standard leg guards"
|
||||
icon_state = "legguards_generic"
|
||||
@@ -195,6 +203,14 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/obj/item/clothing/accessory/arm_guard/before_attached(var/obj/item/clothing/clothing, var/mob/user)
|
||||
if(!clothing.valid_accessory_slots || !(slot in clothing.valid_accessory_slots))
|
||||
return
|
||||
var/obj/item/clothing/accessory/arm_guard/existing_guard = locate() in clothing.accessories
|
||||
if(!existing_guard)
|
||||
return
|
||||
clothing.remove_accessory(user, existing_guard)
|
||||
|
||||
/obj/item/clothing/accessory/arm_guard/generic
|
||||
name = "standard arm guards"
|
||||
icon_state = "armguards_generic"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "You can now instantly replace the armor accessories on plate carriers by clicking on it with the new plate or guard you want to replace them with."
|
||||
Reference in New Issue
Block a user