mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
[REFACTOR] Consolidates SLOT_FLAG and SLOT_HUD into one ITEM_SLOT flag (#26743)
* IT WORKS UP UNTIL THIS POINT * Consolidates SLOT_FLAG and SLOT_HUD into one * Remove cover_both_ears * SLOT_HUD to ITEM_SLOT * Remove clothing_trait changes for the time being * Remove accidental copy-paste * Re-add no-slip var * More failure to copy-paste correctly * Leftover flag * Combine left and right slot flags where possible * UNGOOF MY DEFINES, PHAND IS NOT A THING * Minor spacing changes * Some more fixes from merge * Seperates ITEM SLOT AMOUNT into two defines * ON SECOND THOUGHT LETS NOT DO THAT. * Addresses Contra's review * Thank you GREP * Rename ITEM_SLOT_FEET to ITEM_SLOT_SHOES * Added a comment to the bitmasks in clothing defines * Rename ITEM_SLOT_TIE to ITEM_SLOT_ACCESSORY * These are for a seperate PR. * Magboot fixes * Requested changes * Re-add accidental removal * Wrong flags * Update code/__DEFINES/clothing_defines.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Chap <erwin@lombok.demon.nl> * Requested changes * Merge fixes * Fix double headset * Fixes multiple accessories --------- Signed-off-by: Chap <erwin@lombok.demon.nl> Co-authored-by: Adrer <adrermail@gmail.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/fire_sound = null //What sound should play when this ammo is fired
|
||||
@@ -118,7 +118,7 @@
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "10mmbox" // placeholder icon
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_state = "syringe_kit"
|
||||
materials = list(MAT_METAL = 30000)
|
||||
throwforce = 2
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "revolver_bright"
|
||||
item_state = "gun"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list(MAT_METAL=2000)
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throwforce = 5
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
can_holster = FALSE
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
|
||||
@@ -218,7 +218,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 12
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
can_holster = FALSE
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
origin_tech = "combat=6;magnets=6;powerstorage=4"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
force = 10
|
||||
modifystate = TRUE
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
cell_type = /obj/item/stock_parts/cell/pulse
|
||||
execution_speed = 2 SECONDS
|
||||
@@ -57,7 +57,7 @@
|
||||
name = "pulse carbine"
|
||||
desc = "A lighter, more compact version of the pulse rifle. Easier to store and transport, but has fewer shots. It has a mounting point for a flashlight. The fire selector has three settings: 'stun', 'kill', 'DESTROY'."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = /obj/item/stock_parts/cell/pulse/carbine
|
||||
@@ -81,7 +81,7 @@
|
||||
name = "pulse pistol"
|
||||
desc = "A pulse gun miniaturised into a pistol-sized form factor. Easy to conceal, but has a low capacity. The fire selector has three settings: 'stun', 'kill', 'DESTROY'."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = null
|
||||
can_holster = TRUE
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
can_holster = FALSE
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
shaded_charge = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||
ammo_x_offset = 3
|
||||
@@ -69,7 +69,7 @@
|
||||
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient, it packs the exact same punch and capacity in a smaller, easier to transport package."
|
||||
icon_state = "ioncarbine"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
ammo_x_offset = 2
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 11
|
||||
@@ -610,7 +610,7 @@
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
can_holster = FALSE
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
cell_type = /obj/item/stock_parts/cell/bsg
|
||||
shaded_charge = TRUE
|
||||
can_fit_in_turrets = FALSE //Crystal would shatter, or someone would try to put an empty gun in the frame.
|
||||
@@ -733,7 +733,7 @@
|
||||
icon = 'icons/obj/guns/gun_temperature.dmi'
|
||||
icon_state = "tempgun_4"
|
||||
item_state = "tempgun_4"
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
origin_tech = "combat=4;materials=4;powerstorage=3;magnets=2"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/gun/magic/staff
|
||||
lefthand_file = 'icons/mob/inhands/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/staves_righthand.dmi'
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
execution_speed = 3 SECONDS
|
||||
|
||||
@@ -240,7 +240,7 @@ CONTENTS:
|
||||
|
||||
// This is needed to you don't try to perform an execution/suicide when lighting a cigarette.
|
||||
/obj/item/gun/magic/wand/fireball/handle_suicide(mob/user, mob/living/carbon/human/target, params)
|
||||
var/mask_item = target.get_item_by_slot(SLOT_HUD_WEAR_MASK)
|
||||
var/mask_item = target.get_item_by_slot(ITEM_SLOT_MASK)
|
||||
if(istype(mask_item, /obj/item/clothing/mask/cigarette) && user.zone_selected == "mouth" && user.a_intent == INTENT_HELP)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
icon_state = "speargun"
|
||||
item_state = "speargun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
origin_tech = "combat=4;engineering=4"
|
||||
force = 10
|
||||
can_suppress = FALSE
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_shotgun.ogg'
|
||||
sawn_desc = "Omar's coming!"
|
||||
@@ -442,7 +442,7 @@
|
||||
if(sling)
|
||||
to_chat(user, "<span class='warning'>The shotgun already has a sling!</span>")
|
||||
else if(C.use(10))
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
|
||||
sling = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
can_holster = FALSE
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
origin_tech = "combat=4;materials=2"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_shotgun.ogg'
|
||||
@@ -137,8 +137,8 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
current_skin = "riotshotgun_sawn"
|
||||
item_state = "riotshotgun_sawn" //phil235 is it different with different skin?
|
||||
slot_flags &= ~SLOT_FLAG_BACK //you can't sling it on your back
|
||||
slot_flags |= SLOT_FLAG_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
sawn_state = SAWN_OFF
|
||||
magazine.max_ammo = 3
|
||||
update_appearance()
|
||||
@@ -178,8 +178,8 @@
|
||||
w_class = initial(w_class)
|
||||
current_skin = "riotshotgun"
|
||||
item_state = initial(item_state)
|
||||
slot_flags &= ~SLOT_FLAG_BELT
|
||||
slot_flags |= SLOT_FLAG_BACK
|
||||
slot_flags &= ~ITEM_SLOT_BELT
|
||||
slot_flags |= ITEM_SLOT_BACK
|
||||
sawn_state = SAWN_INTACT
|
||||
magazine.max_ammo = 6
|
||||
update_appearance()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
can_unsuppress = TRUE
|
||||
can_suppress = TRUE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = SLOT_FLAG_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
actions_types = list()
|
||||
execution_speed = 8 SECONDS
|
||||
var/zoomable = TRUE
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
inhand_y_dimension = 32
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/gun/projectile/automatic/c20r/toy
|
||||
|
||||
@@ -231,8 +231,8 @@
|
||||
user.visible_message("[user] shortens \the [src]!", "<span class='notice'>You shorten \the [src].</span>")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
item_state = "gun"//phil235 is it different with different skin?
|
||||
slot_flags &= ~SLOT_FLAG_BACK //you can't sling it on your back
|
||||
slot_flags |= SLOT_FLAG_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
sawn_state = SAWN_OFF
|
||||
update_appearance()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user