mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-11 17:51:18 +00:00
refactors some gun things (#4036)
* wow * wack * fix * fix * fuck you * i am declaring war on gun devs * fix * fix Co-authored-by: fake_vm_user <fake_vm_user>
This commit is contained in:
@@ -95,10 +95,6 @@ GLOBAL_LIST_INIT(bitflags, list(
|
||||
#define PASSBLOB (1<<3)
|
||||
#define PASSMOB (1<<4)
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
//flags for clothing_flags. only 1 exists at the moment because this is an examine refactor not aclothing refactor
|
||||
#define SCAN_REAGENTS (1<<10) // Allows helmets and glasses to scan reagents.
|
||||
|
||||
//silicon_privileges flags on /mob
|
||||
#define PRIVILEGES_SILICON (1<<0)
|
||||
#define PRIVILEGES_PAI (1<<1)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Flags for the item_flags var on /obj/item
|
||||
/*
|
||||
#define BEING_REMOVED (1<<0)
|
||||
*/
|
||||
///is this item equipped into an inventory slot or hand of a mob? used for tooltips
|
||||
#define IN_INVENTORY (1<<1)
|
||||
/*
|
||||
///used for tooltips
|
||||
#define FORCE_STRING_OVERRIDE (1<<2)
|
||||
///Used by security bots to determine if this item is safe for public use.
|
||||
@@ -10,8 +12,10 @@
|
||||
#define SLOWS_WHILE_IN_HAND (1<<4)
|
||||
///Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
#define NO_MAT_REDEMPTION (1<<5)
|
||||
*/
|
||||
///When dropped, it calls qdel on itself
|
||||
#define DROPDEL (1<<6)
|
||||
/*
|
||||
///when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define NOBLUDGEON (1<<7)
|
||||
///for all things that are technically items but used for various different stuff
|
||||
@@ -26,9 +30,12 @@
|
||||
#define ITEM_CAN_PARRY (1<<12)
|
||||
/// This item can be used in the directional blocking system. Only a basic check used to determine if we should proceed with directional block handling at all.
|
||||
#define ITEM_CAN_BLOCK (1<<13)
|
||||
/// is this item in a storage component?
|
||||
#define IN_STORAGE (1<<14)
|
||||
*/
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
|
||||
/*
|
||||
#define LAVAPROTECT (1<<0)
|
||||
#define STOPSPRESSUREDAMAGE (1<<1) // SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
*/
|
||||
@@ -43,8 +50,8 @@
|
||||
#define VOICEBOX_TOGGLABLE (1<<7) // The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<8) // The voicebox is currently turned off.
|
||||
#define IGNORE_HAT_TOSS (1<<9) // Hats with negative effects when worn (i.e the tinfoil hat).
|
||||
#define SCAN_REAGENTS (1<<10) // Allows helmets and glasses to scan reagents.
|
||||
*/
|
||||
#define SCAN_REAGENTS (1<<10) // Allows helmets and glasses to scan reagents.
|
||||
#define FLEXIBLEMATERIAL (1<<11) // At the moment, masks with this flag will not prevent eating even if they are covering your face.
|
||||
#define ALLOW_SURVIVALFOOD (1<<12) // Allows special survival food items to be eaten through it
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
|
||||
#define LUMR 0.2126
|
||||
#define LUMG 0.7152
|
||||
#define LUMB 0.0722
|
||||
#define LUM_R 0.2126
|
||||
#define LUM_G 0.7152
|
||||
#define LUM_B 0.0722
|
||||
|
||||
@@ -15,3 +15,11 @@
|
||||
#define SOUNDS_BULLET_METAL list('sound/effects/projectile_impact/bullet_metal1.ogg', 'sound/effects/projectile_impact/bullet_metal2.ogg', 'sound/effects/projectile_impact/bullet_metal3.ogg')
|
||||
#define SOUNDS_LASER_MEAT list('sound/effects/projectile_impact/energy_meat1.ogg','sound/effects/projectile_impact/energy_meat2.ogg')
|
||||
#define SOUNDS_LASER_METAL list('sound/effects/projectile_impact/energy_metal1.ogg','sound/effects/projectile_impact/energy_metal2.ogg')
|
||||
|
||||
// safety states
|
||||
/// no safeties are on this gun
|
||||
#define GUN_NO_SAFETY -1
|
||||
/// safety off
|
||||
#define GUN_SAFETY_OFF 0
|
||||
/// safety on
|
||||
#define GUN_SAFETY_ON 1
|
||||
|
||||
6
code/__DEFINES/misc/message_ranges.dm
Normal file
6
code/__DEFINES/misc/message_ranges.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/// message range for silenced combat actions
|
||||
#define MESSAGE_RANGE_COMBAT_SILENCED 1
|
||||
/// message range for subtle combat actions
|
||||
#define MESSAGE_RANGE_COMBAT_SUBTLE 3
|
||||
/// message range for loud combat actions
|
||||
#define MESSAGE_RANGE_COMBAT_LOUD 7
|
||||
@@ -1,4 +0,0 @@
|
||||
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
|
||||
#define LUMA_R 0.213
|
||||
#define LUMA_G 0.715
|
||||
#define LUMA_B 0.072
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/* Documenting a couple of potentially useful color matrices here to inspire ideas
|
||||
// Greyscale - indentical to saturation @ 0
|
||||
list(LUMA_R,LUMA_R,LUMA_R,0, LUMA_G,LUMA_G,LUMA_G,0, LUMA_B,LUMA_B,LUMA_B,0, 0,0,0,1, 0,0,0,0)
|
||||
list(LUM_R,LUM_R,LUM_R,0, LUM_G,LUM_G,LUM_G,0, LUM_B,LUM_B,LUM_B,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
// Color inversion
|
||||
list(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,1, 1,1,1,0)
|
||||
@@ -26,9 +26,9 @@ list(0.393,0.349,0.272,0, 0.769,0.686,0.534,0, 0.189,0.168,0.131,0, 0,0,0,1, 0,0
|
||||
//1 is identity, 0 is greyscale, >1 oversaturates colors
|
||||
/proc/color_matrix_saturation(value)
|
||||
var/inv = 1 - value
|
||||
var/R = round(LUMA_R * inv, 0.001)
|
||||
var/G = round(LUMA_G * inv, 0.001)
|
||||
var/B = round(LUMA_B * inv, 0.001)
|
||||
var/R = round(LUM_R * inv, 0.001)
|
||||
var/G = round(LUM_G * inv, 0.001)
|
||||
var/B = round(LUM_B * inv, 0.001)
|
||||
|
||||
return list(R + value,R,R,0, G,G + value,G,0, B,B,B + value,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
@@ -43,9 +43,9 @@ list(0.393,0.349,0.272,0, 0.769,0.686,0.534,0, 0.189,0.168,0.131,0, 0,0,0,1, 0,0
|
||||
percent *= 3
|
||||
var/x = 1 + percent / 100
|
||||
var/inv = 1 - x
|
||||
var/R = LUMA_R * inv
|
||||
var/G = LUMA_G * inv
|
||||
var/B = LUMA_B * inv
|
||||
var/R = LUM_R * inv
|
||||
var/G = LUM_G * inv
|
||||
var/B = LUM_B * inv
|
||||
|
||||
return list(R + x,R,R, G,G + x,G, B,B,B + x)
|
||||
|
||||
@@ -119,9 +119,9 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro
|
||||
var/constB = 0.140
|
||||
var/constC = -0.283
|
||||
return list(
|
||||
LUMA_R + cos * (1-LUMA_R) + sin * -LUMA_R, LUMA_R + cos * -LUMA_R + sin * constA, LUMA_R + cos * -LUMA_R + sin * -(1-LUMA_R),
|
||||
LUMA_G + cos * -LUMA_G + sin * -LUMA_G, LUMA_G + cos * (1-LUMA_G) + sin * constB, LUMA_G + cos * -LUMA_G + sin * LUMA_G,
|
||||
LUMA_B + cos * -LUMA_B + sin * (1-LUMA_B), LUMA_B + cos * -LUMA_B + sin * constC, LUMA_B + cos * (1-LUMA_B) + sin * LUMA_B
|
||||
LUM_R + cos * (1-LUM_R) + sin * -LUM_R, LUM_R + cos * -LUM_R + sin * constA, LUM_R + cos * -LUM_R + sin * -(1-LUM_R),
|
||||
LUM_G + cos * -LUM_G + sin * -LUM_G, LUM_G + cos * (1-LUM_G) + sin * constB, LUM_G + cos * -LUM_G + sin * LUM_G,
|
||||
LUM_B + cos * -LUM_B + sin * (1-LUM_B), LUM_B + cos * -LUM_B + sin * constC, LUM_B + cos * (1-LUM_B) + sin * LUM_B
|
||||
)
|
||||
|
||||
//These next three rotate values about one axis only
|
||||
|
||||
@@ -256,9 +256,9 @@
|
||||
else
|
||||
|
||||
var/no_mask
|
||||
if(!(C.wear_mask && C.wear_mask.item_flags & ALLOWINTERNALS))
|
||||
if(!(C.wear_mask && C.wear_mask.clothing_flags & ALLOWINTERNALS))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!(H.head && H.head.item_flags & ALLOWINTERNALS))
|
||||
if(!(H.head && H.head.clothing_flags & ALLOWINTERNALS))
|
||||
no_mask = 1
|
||||
|
||||
if(no_mask)
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/riding_offhand/equipped()
|
||||
/obj/item/riding_offhand/equipped(mob/user, slot)
|
||||
if(loc != rider && loc != parent)
|
||||
selfdeleting = TRUE
|
||||
qdel(src)
|
||||
|
||||
@@ -556,7 +556,7 @@ GLOBAL_LIST_EMPTY(forced_ambiance_list)
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(H.buckled)
|
||||
return // Being buckled to something solid keeps you in place.
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP))
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.clothing_flags & NOSLIP))
|
||||
return
|
||||
if(H.flags & NO_SLIP)//diona and similar should not slip from moving onto space either.
|
||||
return
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
|
||||
/obj/item/clothing/shoes/magboots/changeling/attack_self(mob/user)
|
||||
if(magpulse)
|
||||
item_flags &= ~NOSLIP
|
||||
clothing_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
set_slowdown()
|
||||
force = 3
|
||||
to_chat(user, "We release our grip on the floor.")
|
||||
else
|
||||
item_flags |= NOSLIP
|
||||
clothing_flags |= NOSLIP
|
||||
magpulse = 1
|
||||
set_slowdown()
|
||||
force = 5
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return ..()
|
||||
|
||||
// Add the spell buttons to the HUD.
|
||||
/obj/item/technomancer_core/equipped(mob/user)
|
||||
/obj/item/technomancer_core/equipped(mob/user, slot)
|
||||
wearer = user
|
||||
for(var/obj/spellbutton/spell in spells)
|
||||
wearer.ability_master.add_technomancer_ability(spell, spell.ability_icon_state)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
name = "boots of speed"
|
||||
desc = "The latest in sure footing technology."
|
||||
icon_state = "swat"
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
siemens_coefficient = 0.6
|
||||
slowdown = -1
|
||||
|
||||
|
||||
@@ -190,11 +190,11 @@ steam.start() -- spawns the effect
|
||||
/obj/effect/smoke/proc/affect(var/mob/living/carbon/M)
|
||||
if (!istype(M))
|
||||
return 0
|
||||
if(M.wear_mask && (M.wear_mask.item_flags & ALLOWINTERNALS))
|
||||
if(M.wear_mask && (M.wear_mask.clothing_flags & ALLOWINTERNALS))
|
||||
return 0
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.head && (H.head.item_flags & ALLOWINTERNALS))
|
||||
if(H.head && (H.head.clothing_flags & ALLOWINTERNALS))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/// flags relating to items - see [code/__DEFINES/_flags/item_flags.dm]
|
||||
var/item_flags = NONE
|
||||
/// Miscellaneous flags pertaining to equippable objects. - see [code/__DEFINES/_flags/item_flags.dm]
|
||||
var/clothing_flags = NONE
|
||||
|
||||
/// This saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/image/blood_overlay = null
|
||||
var/abstract = 0
|
||||
@@ -57,9 +62,6 @@
|
||||
|
||||
var/tool_behaviour = NONE
|
||||
|
||||
/// Miscellaneous flags pertaining to equippable objects.
|
||||
var/item_flags = 0
|
||||
|
||||
/// 0 prevents all transfers, 1 is invisible
|
||||
//var/heat_transfer_coefficient = 1
|
||||
/// For leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
disrupt()
|
||||
..()
|
||||
|
||||
/obj/item/chameleon/equipped()
|
||||
/obj/item/chameleon/equipped(mob/user, slot)
|
||||
..()
|
||||
disrupt()
|
||||
..()
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
/obj/item/shockpaddles/proc/check_contact(mob/living/carbon/human/H)
|
||||
if(!combat)
|
||||
for(var/obj/item/clothing/cloth in list(H.wear_suit, H.w_uniform))
|
||||
if((cloth.body_parts_covered & UPPER_TORSO) && (cloth.item_flags & THICKMATERIAL))
|
||||
if((cloth.body_parts_covered & UPPER_TORSO) && (cloth.clothing_flags & THICKMATERIAL))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
item_flags = NOBLUDGEON
|
||||
clothing_flags = NOBLUDGEON
|
||||
var/list/signs = list()
|
||||
var/max_signs = 10
|
||||
var/creation_time = 0 //time to create a holosign in deciseconds.
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
icon_state = "sheet-goliath_hide"
|
||||
singular_name = "hide plate"
|
||||
max_amount = 6
|
||||
item_flags = NOBLUDGEON
|
||||
clothing_flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
icon_state = "sheet-dragon_hide"
|
||||
singular_name = "drake plate"
|
||||
max_amount = 10
|
||||
item_flags = NOBLUDGEON
|
||||
clothing_flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
var/obj/structure/ore_box/O = user.pulling
|
||||
O.attackby(src, user)
|
||||
|
||||
/obj/item/storage/bag/ore/equipped(mob/user)
|
||||
/obj/item/storage/bag/ore/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/autoload, override = TRUE)
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
max_integrity = 100
|
||||
obj_integrity = 100
|
||||
can_shatter = FALSE
|
||||
item_flags = ITEM_CAN_BLOCK
|
||||
clothing_flags = ITEM_CAN_BLOCK
|
||||
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_KINETIC_STRONG | SHIELD_DISABLER_DISRUPTED
|
||||
var/recharge_timerid
|
||||
var/recharge_delay = 15 SECONDS
|
||||
|
||||
@@ -255,11 +255,11 @@ var/list/global/tank_gauge_cache = list()
|
||||
.["connected"] = FALSE
|
||||
|
||||
.["maskConnected"] = FALSE
|
||||
if(C.wear_mask && (C.wear_mask.item_flags & ALLOWINTERNALS))
|
||||
if(C.wear_mask && (C.wear_mask.clothing_flags & ALLOWINTERNALS))
|
||||
.["maskConnected"] = TRUE
|
||||
else if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && (H.head.item_flags & ALLOWINTERNALS))
|
||||
if(H.head && (H.head.clothing_flags & ALLOWINTERNALS))
|
||||
.["maskConnected"] = TRUE
|
||||
|
||||
return .
|
||||
@@ -299,11 +299,11 @@ var/list/global/tank_gauge_cache = list()
|
||||
location.internals.icon_state = "internal0"
|
||||
else
|
||||
var/can_open_valve
|
||||
if(location.wear_mask && (location.wear_mask.item_flags & ALLOWINTERNALS))
|
||||
if(location.wear_mask && (location.wear_mask.clothing_flags & ALLOWINTERNALS))
|
||||
can_open_valve = 1
|
||||
else if(istype(location,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = location
|
||||
if(H.head && (H.head.item_flags & ALLOWINTERNALS))
|
||||
if(H.head && (H.head.clothing_flags & ALLOWINTERNALS))
|
||||
can_open_valve = 1
|
||||
|
||||
if(can_open_valve)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
slot_wear_mask_str = 'icons/mob/mask.dmi'
|
||||
)
|
||||
|
||||
/obj/item/beartrap/equipped()
|
||||
/obj/item/beartrap/equipped(mob/user, slot)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.wear_mask == src)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
// If they're right next to us then lets just say yes. check_trajectory() tends to spaz out otherwise.
|
||||
if(holder.Adjacent(AM))
|
||||
ai_log("test_projectile_safety() : Adjacent to target. Exiting with TRUE.", AI_LOG_TRACE)
|
||||
ai_log("test_projectile_check_safety() : Adjacent to target. Exiting with TRUE.", AI_LOG_TRACE)
|
||||
return TRUE
|
||||
|
||||
// This will hold a list of all mobs in a line, even those behind the target, and possibly the wall.
|
||||
@@ -153,25 +153,25 @@
|
||||
var/would_hit_primary_target = FALSE
|
||||
if(AM in hit_things)
|
||||
would_hit_primary_target = TRUE
|
||||
ai_log("test_projectile_safety() : Test projectile did[!would_hit_primary_target ? " NOT " : " "]hit \the [AM]", AI_LOG_DEBUG)
|
||||
ai_log("test_projectile_check_safety() : Test projectile did[!would_hit_primary_target ? " NOT " : " "]hit \the [AM]", AI_LOG_DEBUG)
|
||||
|
||||
// Make sure we don't have a chance to shoot our friends.
|
||||
for(var/a in hit_things)
|
||||
var/atom/A = a
|
||||
ai_log("test_projectile_safety() : Evaluating \the [A] ([A.type]).", AI_LOG_TRACE)
|
||||
ai_log("test_projectile_check_safety() : Evaluating \the [A] ([A.type]).", AI_LOG_TRACE)
|
||||
if(isliving(A)) // Don't shoot at our friends, even if they're behind the target, as RNG can make them get hit.
|
||||
var/mob/living/L = A
|
||||
if(holder.IIsAlly(L))
|
||||
ai_log("test_projectile_safety() : Would threaten ally, exiting with FALSE.", AI_LOG_DEBUG)
|
||||
ai_log("test_projectile_check_safety() : Would threaten ally, exiting with FALSE.", AI_LOG_DEBUG)
|
||||
return FALSE
|
||||
|
||||
// Don't fire if we cannot hit the primary target, and we wish to be conservative with our projectiles.
|
||||
// We make an exception for turf targets because manual commanded AIs targeting the floor are generally intending to fire blindly.
|
||||
if(!would_hit_primary_target && !isturf(AM) && conserve_ammo)
|
||||
ai_log("test_projectile_safety() : conserve_ammo is set, and test projectile failed to hit primary target. Exiting with FALSE.", AI_LOG_DEBUG)
|
||||
ai_log("test_projectile_check_safety() : conserve_ammo is set, and test projectile failed to hit primary target. Exiting with FALSE.", AI_LOG_DEBUG)
|
||||
return FALSE
|
||||
|
||||
ai_log("test_projectile_safety() : Passed other tests, exiting with TRUE.", AI_LOG_TRACE)
|
||||
ai_log("test_projectile_check_safety() : Passed other tests, exiting with TRUE.", AI_LOG_TRACE)
|
||||
return TRUE
|
||||
|
||||
// Test if we are within range to attempt an attack, melee or ranged.
|
||||
|
||||
@@ -26,7 +26,7 @@ Contains helper procs for airflow, handled in /connection_group.
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/airflow_stun()
|
||||
if(shoes && (shoes.item_flags & NOSLIP))
|
||||
if(shoes && (shoes.clothing_flags & NOSLIP))
|
||||
to_chat(src, "<span class='notice'>Air suddenly rushes past you!</span>")
|
||||
return 0
|
||||
..()
|
||||
@@ -90,7 +90,7 @@ Contains helper procs for airflow, handled in /connection_group.
|
||||
if(buckled)
|
||||
return 0
|
||||
var/obj/item/shoes = get_equipped_item(slot_shoes)
|
||||
if(istype(shoes) && (shoes.item_flags & NOSLIP))
|
||||
if(istype(shoes) && (shoes.clothing_flags & NOSLIP))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -77,15 +77,15 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||
var/burn_eyes = 1
|
||||
|
||||
//Check for protective glasses
|
||||
if(glasses && (glasses.body_parts_covered & EYES) && (glasses.item_flags & ALLOWINTERNALS))
|
||||
if(glasses && (glasses.body_parts_covered & EYES) && (glasses.clothing_flags & ALLOWINTERNALS))
|
||||
burn_eyes = 0
|
||||
|
||||
//Check for protective maskwear
|
||||
if(burn_eyes && wear_mask && (wear_mask.body_parts_covered & EYES) && (wear_mask.item_flags & ALLOWINTERNALS))
|
||||
if(burn_eyes && wear_mask && (wear_mask.body_parts_covered & EYES) && (wear_mask.clothing_flags & ALLOWINTERNALS))
|
||||
burn_eyes = 0
|
||||
|
||||
//Check for protective helmets
|
||||
if(burn_eyes && head && (head.body_parts_covered & EYES) && (head.item_flags & ALLOWINTERNALS))
|
||||
if(burn_eyes && head && (head.body_parts_covered & EYES) && (head.clothing_flags & ALLOWINTERNALS))
|
||||
burn_eyes = 0
|
||||
|
||||
//VOREStation Edit - NIF Support
|
||||
|
||||
@@ -257,6 +257,13 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Announce"
|
||||
disabled_description = "Silent"
|
||||
|
||||
/datum/client_preference/help_intent_firing
|
||||
description = "Allow firing on help intent"
|
||||
key = "HELP_INTENT_SAFETY"
|
||||
enabled_by_default = FALSE
|
||||
enabled_description = "Allow"
|
||||
disabled_description = "Forbid"
|
||||
|
||||
/datum/client_preference/status_indicators
|
||||
description = "Status Indicators"
|
||||
key = "SHOW_STATUS"
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
var/update_icon_define = null // Only needed if you've got multiple files for the same type of clothing
|
||||
var/recent_struggle = 0
|
||||
|
||||
var/clothing_flags = 0
|
||||
|
||||
//Updates the icons of the mob wearing the clothing item, if any.
|
||||
/obj/item/clothing/proc/update_clothing_icon()
|
||||
return
|
||||
|
||||
@@ -165,7 +165,7 @@ BLIND // can't see anything
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
|
||||
toggleable = 1
|
||||
vision_flags = SEE_TURFS
|
||||
item_flags = ALLOWINTERNALS //cit change
|
||||
clothing_flags = ALLOWINTERNALS //cit change
|
||||
body_parts_covered = EYES //cit change
|
||||
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
|
||||
|
||||
@@ -212,7 +212,7 @@ BLIND // can't see anything
|
||||
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
|
||||
toggleable = 1
|
||||
action_button_name = "Toggle Goggles"
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
body_parts_covered = EYES
|
||||
clothing_flags = SCAN_REAGENTS
|
||||
|
||||
@@ -225,7 +225,7 @@ BLIND // can't see anything
|
||||
desc = "Just some plain old goggles."
|
||||
icon_state = "plaingoggles"
|
||||
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
body_parts_covered = EYES
|
||||
|
||||
/obj/item/clothing/glasses/night
|
||||
@@ -237,7 +237,7 @@ BLIND // can't see anything
|
||||
darkness_view = 7
|
||||
toggleable = 1
|
||||
action_button_name = "Toggle Goggles"
|
||||
item_flags = ALLOWINTERNALS // Cit change
|
||||
clothing_flags = ALLOWINTERNALS // Cit change
|
||||
body_parts_covered = EYES // Cit change
|
||||
off_state = "denight"
|
||||
flash_protection = FLASH_PROTECTION_REDUCED
|
||||
@@ -315,7 +315,7 @@ BLIND // can't see anything
|
||||
toggleable = 1
|
||||
action_button_name = "Toggle Goggles"
|
||||
vision_flags = SEE_OBJS
|
||||
item_flags = ALLOWINTERNALS //cit change
|
||||
clothing_flags = ALLOWINTERNALS //cit change
|
||||
body_parts_covered = EYES //cit change
|
||||
enables_planes = list(VIS_FULLBRIGHT)
|
||||
|
||||
@@ -338,7 +338,7 @@ BLIND // can't see anything
|
||||
action_button_name = "Toggle Goggles"
|
||||
off_state = "denight"
|
||||
vision_flags = SEE_OBJS | SEE_TURFS
|
||||
item_flags = ALLOWINTERNALS // Cit change
|
||||
clothing_flags = ALLOWINTERNALS // Cit change
|
||||
body_parts_covered = EYES // Cit change
|
||||
flash_protection = FLASH_PROTECTION_REDUCED
|
||||
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
|
||||
@@ -458,7 +458,7 @@ BLIND // can't see anything
|
||||
item_state_slots = list(slot_r_hand_str = "welding-g", slot_l_hand_str = "welding-g")
|
||||
action_button_name = "Flip Welding Goggles"
|
||||
matter = list(MAT_STEEL = 1500, MAT_GLASS = 1000)
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
var/up = 0
|
||||
flash_protection = FLASH_PROTECTION_MAJOR
|
||||
tint = TINT_HEAVY
|
||||
@@ -552,7 +552,7 @@ BLIND // can't see anything
|
||||
name = "tactical HUD"
|
||||
desc = "Flash-resistant goggles with inbuilt combat and security information."
|
||||
icon_state = "swatgoggles"
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
body_parts_covered = EYES
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/sechud/aviator
|
||||
@@ -679,7 +679,7 @@ BLIND // can't see anything
|
||||
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
|
||||
action_button_name = "Adjust Orange Goggles"
|
||||
var/up = 0
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
body_parts_covered = EYES
|
||||
species_restricted = list(SPECIES_TESHARI)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "breath mask"
|
||||
icon_state = "breath"
|
||||
item_state_slots = list(slot_r_hand_str = "breath", slot_l_hand_str = "breath")
|
||||
item_flags = ALLOWINTERNALS|FLEXIBLEMATERIAL
|
||||
clothing_flags = ALLOWINTERNALS|FLEXIBLEMATERIAL
|
||||
body_parts_covered = FACE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.10
|
||||
@@ -18,13 +18,13 @@
|
||||
if (hanging)
|
||||
gas_transfer_coefficient = 1
|
||||
body_parts_covered = body_parts_covered & ~FACE
|
||||
item_flags = item_flags & ~ALLOWINTERNALS
|
||||
clothing_flags = clothing_flags & ~ALLOWINTERNALS
|
||||
icon_state = "breathdown"
|
||||
to_chat(user, "Your mask is now hanging on your neck.")
|
||||
else
|
||||
gas_transfer_coefficient = initial(gas_transfer_coefficient)
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
item_flags = initial(item_flags)
|
||||
clothing_flags = initial(clothing_flags)
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(user, "You pull the mask up to cover your face.")
|
||||
update_clothing_icon()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
|
||||
icon_state = "gas_alt"
|
||||
item_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | ALLOW_SURVIVALFOOD
|
||||
clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | ALLOW_SURVIVALFOOD
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
body_parts_covered = FACE|EYES
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
@@ -58,7 +58,7 @@
|
||||
gas_transfer_coefficient = 1
|
||||
gas_filter_strength = 0
|
||||
body_parts_covered = body_parts_covered & ~FACE
|
||||
item_flags = item_flags & ~BLOCK_GAS_SMOKE_EFFECT & ~ALLOWINTERNALS
|
||||
clothing_flags = clothing_flags & ~BLOCK_GAS_SMOKE_EFFECT & ~ALLOWINTERNALS
|
||||
flags_inv = 0
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
icon_state = "halfgas_up"
|
||||
@@ -67,7 +67,7 @@
|
||||
gas_transfer_coefficient = initial(gas_transfer_coefficient)
|
||||
gas_filter_strength = initial(gas_filter_strength)
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
item_flags = initial(item_flags)
|
||||
clothing_flags = initial(clothing_flags)
|
||||
flags_inv = initial(flags_inv)
|
||||
armor = initial(armor)
|
||||
icon_state = initial(icon_state)
|
||||
@@ -104,7 +104,7 @@
|
||||
name = "\improper alien mask"
|
||||
desc = "Clearly not designed for a human face."
|
||||
flags = PHORONGUARD
|
||||
item_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS
|
||||
clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS
|
||||
species_restricted = list(SPECIES_VOX)
|
||||
filtered_gases = list(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
|
||||
var/mask_open = FALSE // Controls if the Vox can eat through this mask
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
item_state_slots = list(slot_r_hand_str = "sterile", slot_l_hand_str = "sterile")
|
||||
w_class = ITEMSIZE_SMALL
|
||||
body_parts_covered = FACE
|
||||
item_flags = FLEXIBLEMATERIAL
|
||||
clothing_flags = FLEXIBLEMATERIAL
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0)
|
||||
@@ -83,7 +83,7 @@
|
||||
desc = "A blue neck scarf."
|
||||
icon_state = "blueneckscarf"
|
||||
body_parts_covered = FACE
|
||||
item_flags = FLEXIBLEMATERIAL
|
||||
clothing_flags = FLEXIBLEMATERIAL
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
desc = "A red and white checkered neck scarf."
|
||||
icon_state = "redwhite_scarf"
|
||||
body_parts_covered = FACE
|
||||
item_flags = FLEXIBLEMATERIAL
|
||||
clothing_flags = FLEXIBLEMATERIAL
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
desc = "A green neck scarf."
|
||||
icon_state = "green_scarf"
|
||||
body_parts_covered = FACE
|
||||
item_flags = FLEXIBLEMATERIAL
|
||||
clothing_flags = FLEXIBLEMATERIAL
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
desc = "A stealthy, dark scarf."
|
||||
icon_state = "ninja_scarf"
|
||||
body_parts_covered = FACE
|
||||
item_flags = FLEXIBLEMATERIAL
|
||||
clothing_flags = FLEXIBLEMATERIAL
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
siemens_coefficient = 0
|
||||
@@ -188,7 +188,7 @@
|
||||
desc = "Antique facial armor hailing from old Earth. Designed to protect against sword blows and potentially arrows. This version has been carefully retrofitted to provide air."
|
||||
icon_state = "menpo"
|
||||
item_state_slots = list(slot_r_hand_str = "bandblack", slot_l_hand_str = "bandblack")
|
||||
item_flags = ALLOWINTERNALS|FLEXIBLEMATERIAL
|
||||
clothing_flags = ALLOWINTERNALS|FLEXIBLEMATERIAL
|
||||
body_parts_covered = FACE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
gas_transfer_coefficient = 0.10
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
desc = "When you want to turn up the heat."
|
||||
icon_state = "swat"
|
||||
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0)
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
/obj/item/clothing/shoes/boots/combat //Basically SWAT shoes combined with galoshes.
|
||||
@@ -183,7 +183,7 @@
|
||||
icon_state = "swat"
|
||||
force = 5
|
||||
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0)
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
cold_protection = FEET
|
||||
@@ -215,11 +215,11 @@
|
||||
/obj/item/clothing/shoes/boots/swat/para/attack_self(mob/user as mob)
|
||||
if(user.mind.isholy && !blessed)
|
||||
blessed = TRUE
|
||||
item_flags |= NOSLIP
|
||||
clothing_flags |= NOSLIP
|
||||
to_chat(user, "<font color=#4F49AF>You repeat the incantations etched into the boots.</font>")
|
||||
else
|
||||
blessed = FALSE
|
||||
item_flags &= ~NOSLIP
|
||||
clothing_flags &= ~NOSLIP
|
||||
to_chat(user, "<font color=#4F49AF>You dispel the incantations etched into the boots for now.</font>")
|
||||
|
||||
if(!user.mind.isholy)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle. They're large enough to be worn over other footwear."
|
||||
name = "magboots"
|
||||
icon_state = "magboots0"
|
||||
item_flags = PHORONGUARD
|
||||
clothing_flags = PHORONGUARD
|
||||
item_state_slots = list(slot_r_hand_str = "magboots", slot_l_hand_str = "magboots")
|
||||
species_restricted = null
|
||||
force = 3
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
/obj/item/clothing/shoes/magboots/attack_self(mob/user)
|
||||
if(magpulse)
|
||||
item_flags &= ~NOSLIP
|
||||
clothing_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
set_slowdown()
|
||||
force = 3
|
||||
if(icon_base) icon_state = "[icon_base]0"
|
||||
to_chat(user, "You disable the mag-pulse traction system.")
|
||||
else
|
||||
item_flags |= NOSLIP
|
||||
clothing_flags |= NOSLIP
|
||||
magpulse = 1
|
||||
set_slowdown()
|
||||
force = 5
|
||||
@@ -80,7 +80,7 @@
|
||||
/obj/item/clothing/shoes/magboots/examine(mob/user)
|
||||
. = ..()
|
||||
var/state = "disabled"
|
||||
if(item_flags & NOSLIP)
|
||||
if(clothing_flags & NOSLIP)
|
||||
state = "enabled"
|
||||
. += "Its mag-pulse traction system appears to be [state]."
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/attack_self(mob/user)
|
||||
if(src.magpulse)
|
||||
item_flags &= ~NOSLIP
|
||||
clothing_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
canremove = 1
|
||||
to_chat(user, "You relax your deathgrip on the flooring.")
|
||||
@@ -110,7 +110,7 @@
|
||||
to_chat(user, "You will have to put on the [src] before you can do that.")
|
||||
return
|
||||
|
||||
item_flags |= NOSLIP
|
||||
clothing_flags |= NOSLIP
|
||||
magpulse = 1
|
||||
canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly.
|
||||
to_chat(user, "You dig your claws deeply into the flooring, bracing yourself.")
|
||||
@@ -121,7 +121,7 @@
|
||||
..()
|
||||
if(src.magpulse)
|
||||
user.visible_message("The [src] go limp as they are removed from [usr]'s feet.", "The [src] go limp as they are removed from your feet.")
|
||||
item_flags &= ~NOSLIP
|
||||
clothing_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
canremove = 1
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "brown shoes"
|
||||
icon_state = "brown"
|
||||
permeability_coefficient = 0.05
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/list/clothing_choices = list()
|
||||
siemens_coefficient = 0.8
|
||||
@@ -23,7 +23,7 @@
|
||||
icon_state = "galoshes"
|
||||
permeability_coefficient = 0.05
|
||||
siemens_coefficient = 0 //They're thick rubber boots! Of course they won't conduct electricity!
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
species_restricted = null
|
||||
drop_sound = 'sound/items/drop/rubber.ogg'
|
||||
@@ -136,7 +136,7 @@ obj/item/clothing/shoes/sandal/clogs
|
||||
name = "swimming fins"
|
||||
icon_state = "flippers"
|
||||
item_state_slots = list(slot_r_hand_str = "galoshes", slot_l_hand_str = "galoshes")
|
||||
item_flags = NOSLIP
|
||||
clothing_flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
species_restricted = null
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/item/clothing/suit/space/vox
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs,/obj/item/tank)
|
||||
armor = list(melee = 60, bullet = 50, laser = 40,energy = 15, bomb = 30, bio = 100, rad = 50)
|
||||
siemens_coefficient = 0.2
|
||||
@@ -44,7 +44,7 @@
|
||||
armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50)
|
||||
siemens_coefficient = 0.2
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL | ALLOWINTERNALS
|
||||
clothing_flags = THICKMATERIAL | ALLOWINTERNALS
|
||||
flags_inv = 0
|
||||
species_restricted = list(SPECIES_VOX)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "space helmet"
|
||||
icon_state = "capspace"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
flags_inv = HIDEFACE|BLOCKHAIR
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
@@ -20,7 +20,7 @@
|
||||
w_class = ITEMSIZE_HUGE
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/tank/emergency/oxygen, /obj/item/flashlight,/obj/item/gun/energy, /obj/item/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/melee/baton,/obj/item/handcuffs)
|
||||
slowdown = 1.5
|
||||
@@ -39,7 +39,7 @@
|
||||
icon_state = "deathsquad"
|
||||
item_state_slots = list(slot_r_hand_str = "syndicate-helm-black-red", slot_l_hand_str = "syndicate-helm-black-red")
|
||||
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 100, rad = 60)
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
flags_inv = BLOCKHAIR
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
icon_state = "beret_badge"
|
||||
item_state_slots = list(slot_r_hand_str = "beret", slot_l_hand_str = "beret")
|
||||
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
flags_inv = BLOCKHAIR
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
name = "Santa's hat"
|
||||
desc = "Ho ho ho. Merrry X-mas!"
|
||||
icon_state = "santahat"
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
flags_inv = BLOCKHAIR
|
||||
body_parts_covered = HEAD
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
desc = "Festive!"
|
||||
icon_state = "santa"
|
||||
slowdown = 0
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
allowed = list(/obj/item) //for stuffing exta special presents
|
||||
|
||||
//Space pirate outfit
|
||||
@@ -77,7 +77,7 @@
|
||||
desc = "Yarr."
|
||||
icon_state = "pirate"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
flags_inv = BLOCKHAIR
|
||||
body_parts_covered = 0
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_override = 'icons/mob/plasmeme/suit.dmi'
|
||||
desc = "A suit designed by NT to keep phoronoids from coming into contact with incompatible atmosphere. Seems like it doesn't protect from much else."
|
||||
slowdown = 1
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/tank)
|
||||
can_breach = 0 // w h y ?
|
||||
@@ -32,7 +32,7 @@
|
||||
icon_state = "plasmaman_helmet"
|
||||
icon_override = 'icons/mob/plasmeme/helmet.dmi'
|
||||
desc = "A helmet designed by NT to keep phoronoids from coming into contact with incompatible atmosphere. Comes with a little light built in!"
|
||||
item_flags = ALLOWINTERNALS | FLEXIBLEMATERIAL
|
||||
clothing_flags = ALLOWINTERNALS | FLEXIBLEMATERIAL
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
light_overlay = "plasmaman_overlay"
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
var/rigsuit_min_pressure = 0 // Min pressure the rig protects against when sealed
|
||||
|
||||
var/emp_protection = 0
|
||||
item_flags = PHORONGUARD //VOREStation add
|
||||
clothing_flags = PHORONGUARD //VOREStation add
|
||||
|
||||
// Wiring! How exciting.
|
||||
var/datum/wires/rig/wires
|
||||
@@ -226,11 +226,11 @@
|
||||
if(seal == 1)
|
||||
piece.min_pressure_protection = rigsuit_min_pressure
|
||||
piece.max_pressure_protection = rigsuit_max_pressure
|
||||
piece.item_flags |= ALLOWINTERNALS
|
||||
piece.clothing_flags |= ALLOWINTERNALS
|
||||
else
|
||||
piece.min_pressure_protection = null
|
||||
piece.max_pressure_protection = null
|
||||
piece.item_flags &= ~ALLOWINTERNALS
|
||||
piece.clothing_flags &= ~ALLOWINTERNALS
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "helmet"
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL|ALLOW_SURVIVALFOOD
|
||||
clothing_flags = THICKMATERIAL|ALLOW_SURVIVALFOOD
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
heat_protection = HEAD|FACE|EYES
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/item/clothing/gloves/gauntlets/rig
|
||||
name = "gauntlets"
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
flags = PHORONGUARD
|
||||
body_parts_covered = HANDS
|
||||
heat_protection = HANDS
|
||||
@@ -70,7 +70,7 @@
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
item_flags = THICKMATERIAL | ALLOWINTERNALS
|
||||
clothing_flags = THICKMATERIAL | ALLOWINTERNALS
|
||||
slowdown = 0
|
||||
//will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits.
|
||||
breach_threshold = 38
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
icon_state = "vox_rig"
|
||||
armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50)
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
siemens_coefficient = 0.2
|
||||
offline_slowdown = 5
|
||||
allowed = list(/obj/item/gun,/obj/item/flashlight,/obj/item/tank,/obj/item/suit_cooling_unit)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
emp_protection = 10
|
||||
slowdown = 0
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_state = "space"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL | ALLOWINTERNALS | ALLOW_SURVIVALFOOD
|
||||
clothing_flags = THICKMATERIAL | ALLOWINTERNALS | ALLOW_SURVIVALFOOD
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR
|
||||
@@ -71,7 +71,7 @@
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/flashlight,/obj/item/tank/emergency/oxygen,/obj/item/suit_cooling_unit)
|
||||
slowdown = 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/clothing/suit/armor
|
||||
allowed = list(/obj/item/gun/projectile/sec/flash, /obj/item/gun/energy,/obj/item/reagent_containers/spray/pepper,/obj/item/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/flashlight/maglight,/obj/item/clothing/head/helmet)
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
valid_accessory_slots = (\
|
||||
ACCESSORY_SLOT_OVER\
|
||||
|ACCESSORY_SLOT_MEDAL\
|
||||
@@ -137,7 +137,7 @@
|
||||
item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat")
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.01
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
|
||||
allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/tank/emergency/oxygen,/obj/item/clothing/head/helmet)
|
||||
slowdown = 1
|
||||
@@ -302,7 +302,7 @@
|
||||
allowed = list(/obj/item/gun,/obj/item/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/flashlight/maglight,/obj/item/clothing/head/helmet)
|
||||
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO
|
||||
min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
siemens_coefficient = 0.9
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL | ALLOW_SURVIVALFOOD
|
||||
clothing_flags = THICKMATERIAL | ALLOW_SURVIVALFOOD
|
||||
|
||||
/obj/item/clothing/suit/bio_suit
|
||||
name = "bio suit"
|
||||
@@ -25,7 +25,7 @@
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||
siemens_coefficient = 0.9
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
|
||||
//Standard biosuit, orange stripe
|
||||
/obj/item/clothing/head/bio_hood/general
|
||||
@@ -103,7 +103,7 @@
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
siemens_coefficient = 0.9
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL | ALLOW_SURVIVALFOOD
|
||||
clothing_flags = THICKMATERIAL | ALLOW_SURVIVALFOOD
|
||||
|
||||
/obj/item/clothing/suit/beekeeper
|
||||
name = "beekeeping suit"
|
||||
@@ -119,4 +119,4 @@
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||
siemens_coefficient = 0.9
|
||||
flags = PHORONGUARD
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
allowed = list(/obj/item/flashlight,/obj/item/tank/emergency/oxygen,/obj/item/extinguisher)
|
||||
slowdown = 1.0
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||
item_flags = 0
|
||||
clothing_flags = 0
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
@@ -82,7 +82,7 @@
|
||||
icon_state = "rad"
|
||||
desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation"
|
||||
flags_inv = BLOCKHAIR
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
|
||||
|
||||
@@ -98,4 +98,4 @@
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||
item_flags = THICKMATERIAL
|
||||
clothing_flags = THICKMATERIAL
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
|
||||
// Solution for race-specific sprites for an accessory which is also a suit.
|
||||
// Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
/obj/item/clothing/accessory/collar/equipped()
|
||||
/obj/item/clothing/accessory/collar/equipped(mob/user, slot)
|
||||
..()
|
||||
setUniqueSpeciesSprite()
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
SPECIES_TESHARI = 'icons/mob/species/teshari/suit.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/accessory/poncho/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
/obj/item/clothing/accessory/poncho/equipped(mob/user, slot) //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.wear_suit == src)
|
||||
@@ -387,7 +387,7 @@
|
||||
SPECIES_TESHARI = 'icons/mob/species/teshari/ties.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/accessory/sweater/equipped() // Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
/obj/item/clothing/accessory/sweater/equipped(mob/user, slot) // Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites.
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.wear_suit == src)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
)
|
||||
if(istype(holstered, /obj/item/gun))
|
||||
var/obj/item/gun/G = holstered
|
||||
if(G.safety() && prob(50)) //Reflex un-safetying if we are drawing our gun with intent to harm
|
||||
if(G.check_safety()) //Reflex un-safetying if we are drawing our gun with intent to harm
|
||||
G.toggle_safety(user)
|
||||
else
|
||||
user.visible_message(
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
to_chat(user, "You drape the veil to one side.")
|
||||
else
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
item_flags = initial(item_flags)
|
||||
clothing_flags = initial(clothing_flags)
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(user, "You pull the veil over to cover your face.")
|
||||
update_clothing_icon()
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
icon = 'icons/antagonists/syndicate/items/clothing.dmi'
|
||||
default_worn_icon = 'icons/antagonists/syndicate/on_mob/clothing.dmi'
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/syndicate/sneaksuit_shoes
|
||||
@@ -112,7 +112,7 @@
|
||||
icon = 'icons/antagonists/syndicate/items/clothing.dmi'
|
||||
default_worn_icon = 'icons/antagonists/syndicate/on_mob/clothing.dmi'
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_masks.dmi',
|
||||
@@ -129,7 +129,7 @@
|
||||
icon = 'icons/antagonists/syndicate/items/clothing.dmi'
|
||||
default_worn_icon = 'icons/antagonists/syndicate/on_mob/clothing.dmi'
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/syndicate/contractor_suit
|
||||
@@ -175,7 +175,7 @@
|
||||
icon = 'icons/antagonists/changeling/items/clothing.dmi'
|
||||
default_worn_icon = 'icons/antagonists/changeling/on_mob/clothing.dmi'
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/changeling/chitin_suit
|
||||
@@ -200,7 +200,7 @@
|
||||
icon = 'icons/antagonists/changeling/items/clothing.dmi'
|
||||
default_worn_icon = 'icons/antagonists/changeling/on_mob/clothing.dmi'
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/changeling/flesh_suit
|
||||
@@ -271,7 +271,7 @@
|
||||
default_worn_icon = 'icons/antagonists/clockcult/on_mob/clothing.dmi'
|
||||
icon_state = "clockwork_helmet"
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/clockcult/suit
|
||||
@@ -434,7 +434,7 @@
|
||||
default_worn_icon = 'icons/antagonists/cult/on_mob/clothing.dmi'
|
||||
icon_state = "cult_helmet"
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/datum/gear/seasonal/masquarade/cult/robes_new
|
||||
@@ -530,7 +530,7 @@
|
||||
default_worn_icon = 'icons/antagonists/heretic/on_mob/clothing.dmi'
|
||||
icon_state = "void_cloak_hood"
|
||||
body_parts_covered = HEAD|EYES
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
cold_protection = HEAD
|
||||
|
||||
/*
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.shoes && H.shoes.item_flags & NOSLIP)
|
||||
if(H.shoes && H.shoes.clothing_flags & NOSLIP)
|
||||
return
|
||||
if(H.flags & NO_SLIP)//Species that dont slip naturally
|
||||
return
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
for(var/obj/item/clothing/clothes in target)
|
||||
if(target.item_is_in_hands(clothes))
|
||||
continue
|
||||
if(clothes.item_flags & THICKMATERIAL)
|
||||
if(clothes.clothing_flags & THICKMATERIAL)
|
||||
body_coverage &= ~(clothes.body_parts_covered)
|
||||
|
||||
if(!body_coverage)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var/can_grab = 1
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP))
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.clothing_flags & NOSLIP))
|
||||
can_grab = 0
|
||||
if(can_grab)
|
||||
if(prob(TRAIT_POTENCY))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A combination autopainter and flash anodizer designed to give electronic assemblies a colorful, wear-resistant finish."
|
||||
icon = 'icons/obj/integrated_electronics/electronic_tools.dmi'
|
||||
icon_state = "detailer"
|
||||
item_flags = NOBLUDGEON
|
||||
clothing_flags = NOBLUDGEON
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/detail_color = COLOR_ASSEMBLY_WHITE
|
||||
var/list/color_list = list(
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// slot uses the slot_X defines found in setup.dm
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
/obj/item/proc/equipped(mob/user, slot)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
current_equipped_slot = slot
|
||||
@@ -34,10 +34,12 @@
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
*/
|
||||
if(item_flags & DROPDEL)
|
||||
qdel(src)
|
||||
|
||||
item_flags &= ~IN_INVENTORY
|
||||
*/
|
||||
|
||||
var/old_slot = current_equipped_slot
|
||||
current_equipped_slot = null
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user, old_slot)
|
||||
@@ -54,7 +56,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
pixel_x = initial(pixel_x)
|
||||
pixel_y = initial(pixel_y)
|
||||
// item_flags |= IN_INVENTORY
|
||||
item_flags |= IN_INVENTORY
|
||||
|
||||
/**
|
||||
* get the slowdown we incur when we're worn
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
#define CATEGORY_ROBOT "ROBOT"
|
||||
#define CATEGORY_MISC "MISC"
|
||||
#define CATEGORY_MOVEMENT "MOVEMENT"
|
||||
#define CATEGORY_ITEM "ITEMS"
|
||||
|
||||
#define WEIGHT_HIGHEST 0
|
||||
#define WEIGHT_ADMIN 10
|
||||
#define WEIGHT_CLIENT 20
|
||||
#define WEIGHT_ROBOT 30
|
||||
#define WEIGHT_ITEM 35
|
||||
#define WEIGHT_MOB 40
|
||||
#define WEIGHT_LIVING 50
|
||||
#define WEIGHT_DEAD 60
|
||||
|
||||
@@ -37,18 +37,3 @@
|
||||
var/mob/living/carbon/human/H = user.mob
|
||||
H.smart_equipbag()
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/human/toggle_gun_safety
|
||||
hotkey_keys = list("C")
|
||||
name = "toggle_gun_safety"
|
||||
full_name = "Toggle Gun Safety"
|
||||
description = "Toggle the safety of a gun in your hand"
|
||||
|
||||
/datum/keybinding/human/toggle_gun_safety/down(client/user)
|
||||
var/mob/living/carbon/human/H = user.mob
|
||||
if(H)
|
||||
var/obj/item/gun/G = H.get_active_hand()
|
||||
if(!G)
|
||||
G = H.get_inactive_hand() //We'll try both hands just in case
|
||||
if(G)
|
||||
G.toggle_safety_verb()
|
||||
|
||||
23
code/modules/keybindings/keybind/item.dm
Normal file
23
code/modules/keybindings/keybind/item.dm
Normal file
@@ -0,0 +1,23 @@
|
||||
/datum/keybinding/item
|
||||
weight = WEIGHT_ITEM
|
||||
category = CATEGORY_ITEM
|
||||
|
||||
/datum/keybinding/item/can_use(client/user)
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/item/unique_action
|
||||
name = "unique_action"
|
||||
full_name = "Unique Action"
|
||||
description = "Triggers an unique action, based on whichever item you're holding."
|
||||
hotkey_keys = list("C")
|
||||
|
||||
/datum/keybinding/item/toggle_gun_safety
|
||||
hotkey_keys = list()
|
||||
name = "toggle_gun_safety"
|
||||
full_name = "Toggle Gun Safety"
|
||||
description = "Toggle the safety of a gun in your hand"
|
||||
|
||||
/datum/keybinding/human/toggle_gun_safety/down(client/user)
|
||||
var/obj/item/gun/G = locate() in user.mob.get_all_held_items()
|
||||
if(G)
|
||||
G.toggle_safety(user)
|
||||
@@ -44,7 +44,7 @@
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!(wear_mask && (wear_mask.item_flags & ALLOWINTERNALS)))
|
||||
if (!(wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)))
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
//Handle possble chem smoke effect
|
||||
/mob/living/carbon/proc/handle_chemical_smoke(var/datum/gas_mixture/environment)
|
||||
if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(wear_mask && (wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
|
||||
for(var/obj/effect/smoke/chem/smoke in view(1, src))
|
||||
|
||||
@@ -1314,10 +1314,10 @@
|
||||
else
|
||||
switch(target_zone)
|
||||
if(BP_HEAD) //If targeting head, check helmets
|
||||
if(head && (head.item_flags & THICKMATERIAL) && !ignore_thickness && !istype(head, /obj/item/clothing/head/helmet/space)) //If they're wearing a head piece, if that head piece is thick, the injector doesn't bypass thickness, and that headpiece isn't a space helmet with an injection port - it fails
|
||||
if(head && (head.clothing_flags & THICKMATERIAL) && !ignore_thickness && !istype(head, /obj/item/clothing/head/helmet/space)) //If they're wearing a head piece, if that head piece is thick, the injector doesn't bypass thickness, and that headpiece isn't a space helmet with an injection port - it fails
|
||||
. = 0
|
||||
else //Otherwise, if not targeting head, check the suit
|
||||
if(wear_suit && (wear_suit.item_flags & THICKMATERIAL) && !ignore_thickness&& !istype(wear_suit, /obj/item/clothing/suit/space)) //If they're wearing a suit piece, if that suit piece is thick, the injector doesn't bypass thickness, and that suit isn't a space suit with an injection port - it fails
|
||||
if(wear_suit && (wear_suit.clothing_flags & THICKMATERIAL) && !ignore_thickness&& !istype(wear_suit, /obj/item/clothing/suit/space)) //If they're wearing a suit piece, if that suit piece is thick, the injector doesn't bypass thickness, and that suit isn't a space suit with an injection port - it fails
|
||||
. = 0
|
||||
if(!. && error_msg && user)
|
||||
if(!fail_msg)
|
||||
@@ -1399,7 +1399,7 @@
|
||||
if(C.body_parts_covered & FEET)
|
||||
footcoverage_check = TRUE
|
||||
break
|
||||
if((species.flags & NO_SLIP && !footcoverage_check) || (shoes && (shoes.item_flags & NOSLIP))) //Footwear negates a species' natural traction.
|
||||
if((species.flags & NO_SLIP && !footcoverage_check) || (shoes && (shoes.clothing_flags & NOSLIP))) //Footwear negates a species' natural traction.
|
||||
return 0
|
||||
if(..(slipped_on,stun_duration))
|
||||
return 1
|
||||
@@ -1462,7 +1462,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/Check_Shoegrip()
|
||||
if(shoes && (shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating
|
||||
if(shoes && (shoes.clothing_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating
|
||||
return 1
|
||||
if(flying) //VOREStation Edit. Checks to see if they have wings and are flying.
|
||||
return 1 //VOREStation Edit.
|
||||
|
||||
@@ -196,7 +196,7 @@ emp_act
|
||||
var/obj/item/organ/external/H = organs_by_name[BP_HEAD]
|
||||
var/list/protective_gear = H.get_covering_clothing(FACE)
|
||||
for(var/obj/item/gear in protective_gear)
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.item_flags & FLEXIBLEMATERIAL))
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.clothing_flags & FLEXIBLEMATERIAL))
|
||||
return gear
|
||||
return null
|
||||
|
||||
@@ -204,7 +204,7 @@ emp_act
|
||||
var/obj/item/organ/external/H = organs_by_name[BP_HEAD]
|
||||
var/list/protective_gear = H.get_covering_clothing(FACE)
|
||||
for(var/obj/item/gear in protective_gear)
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.item_flags & FLEXIBLEMATERIAL) && !(gear.item_flags & ALLOW_SURVIVALFOOD))
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.clothing_flags & FLEXIBLEMATERIAL) && !(gear.clothing_flags & ALLOW_SURVIVALFOOD))
|
||||
return gear
|
||||
return null
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
prob_slip = 0 // Changing this to zero to make it line up with the comment, and also, make more sense.
|
||||
|
||||
//Do we have magboots or such on if so no slip
|
||||
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP))
|
||||
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.clothing_flags & NOSLIP))
|
||||
prob_slip = 0
|
||||
|
||||
//Check hands and mod slip
|
||||
|
||||
@@ -344,11 +344,11 @@
|
||||
/** breathing **/
|
||||
|
||||
/mob/living/carbon/human/handle_chemical_smoke(var/datum/gas_mixture/environment)
|
||||
if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(wear_mask && (wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
if(glasses && (glasses.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(glasses && (glasses.clothing_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
if(head && (head.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(head && (head.clothing_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
|
||||
rig_supply = rig.air_supply
|
||||
|
||||
if ((!rig_supply && !contents.Find(internal)) || !((wear_mask && (wear_mask.item_flags & ALLOWINTERNALS)) || (head && (head.item_flags & ALLOWINTERNALS))))
|
||||
if ((!rig_supply && !contents.Find(internal)) || !((wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)) || (head && (head.clothing_flags & ALLOWINTERNALS))))
|
||||
internal = null
|
||||
|
||||
if(internal)
|
||||
|
||||
@@ -214,7 +214,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL))
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.clothing_flags & FLEXIBLEMATERIAL))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -488,7 +488,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL))
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.clothing_flags & FLEXIBLEMATERIAL))
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
step_towards(hand, S)
|
||||
to_chat(src, "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>")
|
||||
|
||||
if(!lying && (!shoes || !(shoes.item_flags & NOSLIP)) && (!species || !(species.flags & NOSLIP)) && prob(current_size*5))
|
||||
if(!lying && (!shoes || !(shoes.clothing_flags & NOSLIP)) && (!species || !(species.flags & NOSLIP)) && prob(current_size*5))
|
||||
to_chat(src, "<span class='danger'>A strong gravitational force slams you to the ground!</span>")
|
||||
Weaken(current_size)
|
||||
..()
|
||||
|
||||
@@ -88,9 +88,8 @@
|
||||
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
var/tmp/lock_time = -100
|
||||
|
||||
var/safety_state = 1
|
||||
var/has_safety = TRUE
|
||||
var/safety_icon //overlay to apply to gun based on safety state, if any
|
||||
/// whether or not we have safeties and if safeties are on
|
||||
var/safety_state = GUN_SAFETY_ON
|
||||
|
||||
var/dna_lock = 0 //whether or not the gun is locked to dna
|
||||
var/obj/item/dnalockingchip/attached_lock
|
||||
@@ -231,12 +230,12 @@
|
||||
O.emp_act(severity)
|
||||
|
||||
/obj/item/gun/dropped(mob/living/user)
|
||||
update_icon()
|
||||
. = ..()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/gun/equipped()
|
||||
update_icon()
|
||||
/obj/item/gun/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/gun/afterattack(atom/A, mob/living/user, adjacent, params)
|
||||
if(adjacent) return //A is adjacent, is the user, or is on the user's person
|
||||
@@ -396,7 +395,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is not ready to fire again!</span>")
|
||||
return
|
||||
|
||||
if(safety())
|
||||
if(check_safety())
|
||||
//If we are on harm intent (intending to injure someone) but forgot to flick the safety off, there is a 50% chance we
|
||||
//will reflexively do it anyway
|
||||
if(user.a_intent == INTENT_HARM && prob(50))
|
||||
@@ -405,6 +404,10 @@
|
||||
handle_click_safety(user)
|
||||
return
|
||||
|
||||
if(user?.client?.is_preference_enabled(/datum/client_preference/help_intent_firing) && user.a_intent == INTENT_HELP)
|
||||
to_chat(user, SPAN_WARNING("You refrain from firing [src] because your intent is set to help!"))
|
||||
return
|
||||
|
||||
var/shoot_time = (burst - 1)* burst_delay
|
||||
|
||||
//These should apparently be disabled to allow for the automatic system to function without causing near-permanant paralysis. Re-enabling them while we sort that out.
|
||||
@@ -564,11 +567,11 @@
|
||||
if (user)
|
||||
user.visible_message("*click click*", "<span class='danger'>*click*</span>")
|
||||
else
|
||||
src.visible_message("*click click*")
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 100, 1)
|
||||
visible_message("*click click*")
|
||||
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
|
||||
|
||||
/obj/item/gun/proc/handle_click_safety(mob/user)
|
||||
user.visible_message(SPAN_WARNING("[user] squeezes the trigger of \the [src] but it doesn't move!"), SPAN_WARNING("You squeeze the trigger but it doesn't move!"))
|
||||
user.visible_message(SPAN_WARNING("[user] squeezes the trigger of \the [src] but it doesn't move!"), SPAN_WARNING("You squeeze the trigger but it doesn't move!"), range = MESSAGE_RANGE_COMBAT_SILENCED)
|
||||
|
||||
//called after successfully firing
|
||||
/obj/item/gun/proc/handle_post_fire(mob/user, atom/target, var/pointblank=0, var/reflex=0)
|
||||
@@ -780,8 +783,8 @@
|
||||
if(firemodes.len > 1)
|
||||
var/datum/firemode/current_mode = firemodes[sel_mode]
|
||||
. += "The fire selector is set to [current_mode.name]."
|
||||
if(has_safety)
|
||||
to_chat(user, SPAN_NOTICE("The safety is [safety() ? "on" : "off"]."))
|
||||
if(safety_state != GUN_NO_SAFETY)
|
||||
to_chat(user, SPAN_NOTICE("The safety is [check_safety() ? "on" : "off"]."))
|
||||
|
||||
/obj/item/gun/proc/switch_firemodes(mob/user)
|
||||
if(firemodes.len <= 1)
|
||||
@@ -812,41 +815,52 @@
|
||||
to_chat(user, "<span class='warning'>[src]'s trigger is locked. This weapon doesn't have a firing pin installed!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/gun/update_icon()
|
||||
/obj/item/gun/update_overlays()
|
||||
. = ..()
|
||||
//Code for handling safety icon updates
|
||||
overlays.Cut()
|
||||
|
||||
var/mob/living/M = loc
|
||||
if(istype(M)) //If we are currently being held by a mob
|
||||
overlays += image('icons/obj/gun/gui.dmi', "safety[safety()]")
|
||||
if(safety_icon)
|
||||
overlays += image(icon, "[safety_icon][safety()]")
|
||||
|
||||
|
||||
/obj/item/gun/proc/toggle_safety(var/mob/user)
|
||||
if (user.stat || user.restrained() || user.lying)
|
||||
to_chat(user, SPAN_WARNING("You can't do that right now."))
|
||||
if(!(item_flags & IN_INVENTORY))
|
||||
return
|
||||
. += image('icons/obj/gun/common.dmi', "safety_[check_safety()? "on" : "off"]")
|
||||
|
||||
safety_state = !safety_state
|
||||
update_icon()
|
||||
/obj/item/gun/proc/toggle_safety(mob/user)
|
||||
if(user)
|
||||
user.visible_message(SPAN_WARNING("[user] switches the safety of \the [src] [safety_state ? "on" : "off"]."), SPAN_NOTICE("You switch the safety of \the [src] [safety_state ? "on" : "off"]."))
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
if(user.stat || user.restrained() || user.incapacitated(INCAPACITATION_DISABLED))
|
||||
to_chat(user, SPAN_WARNING("You can't do that right now."))
|
||||
return
|
||||
if(safety_state == GUN_NO_SAFETY)
|
||||
to_chat(user, SPAN_WARNING("[src] has no safety."))
|
||||
return
|
||||
var/current = check_safety()
|
||||
switch(safety_state)
|
||||
if(GUN_SAFETY_ON)
|
||||
safety_state = GUN_SAFETY_OFF
|
||||
if(GUN_SAFETY_OFF)
|
||||
safety_state = GUN_SAFETY_ON
|
||||
if(user)
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] switches the safety of \the [src] [current ? "off" : "on"]."),
|
||||
SPAN_NOTICE("You switch the safety of \the [src] [current ? "off" : "on"]."),
|
||||
SPAN_WARNING("You hear a switch being clicked."),
|
||||
MESSAGE_RANGE_COMBAT_SUBTLE
|
||||
)
|
||||
update_appearance()
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 10, 1)
|
||||
|
||||
/obj/item/gun/verb/toggle_safety_verb()
|
||||
set src in usr
|
||||
set category = "Object"
|
||||
set name = "Toggle Gun Safety"
|
||||
|
||||
if(usr == loc)
|
||||
toggle_safety(usr)
|
||||
|
||||
/obj/item/gun/CtrlClick(var/mob/user)
|
||||
/obj/item/gun/AltClick(mob/user)
|
||||
if(loc == user)
|
||||
toggle_safety(user)
|
||||
return TRUE
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/proc/safety()
|
||||
return has_safety && safety_state
|
||||
/**
|
||||
* returns TRUE/FALSE based on if we have safeties on
|
||||
*/
|
||||
/obj/item/gun/proc/check_safety()
|
||||
return !!(safety_state == GUN_SAFETY_ON)
|
||||
|
||||
@@ -187,7 +187,8 @@
|
||||
. += "Does not have a power cell."
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/update_icon(var/ignore_inhands)
|
||||
/obj/item/gun/energy/update_icon(ignore_inhands)
|
||||
. = ..()
|
||||
if(power_supply == null)
|
||||
if(modifystate)
|
||||
icon_state = "[modifystate]_open"
|
||||
@@ -216,7 +217,6 @@
|
||||
|
||||
if(!ignore_inhands)
|
||||
update_held_icon()
|
||||
..()
|
||||
|
||||
/obj/item/gun/energy/proc/start_recharge()
|
||||
if(power_supply == null)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
item_state = "kineticgun"
|
||||
// ammo_type = list(/obj/item/ammo_casing/energy/kinetic)
|
||||
cell_type = /obj/item/cell/device/weapon/empproof
|
||||
item_flags = NONE
|
||||
clothing_flags = NONE
|
||||
charge_meter = FALSE
|
||||
// obj_flags = UNIQUE_RENAME
|
||||
// weapon_weight = WEAPON_LIGHT
|
||||
@@ -146,7 +146,7 @@
|
||||
empty()
|
||||
AddElement(/datum/element/conflict_checking, CONFLICT_ELEMENT_KA)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/equipped(mob/user)
|
||||
/obj/item/gun/energy/kinetic_accelerator/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(power_supply.charge < charge_cost)
|
||||
attempt_reload()
|
||||
@@ -195,10 +195,10 @@
|
||||
overheat = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/gun/energy/kinetic_accelerator/update_overlays()
|
||||
. = ..()
|
||||
if(overheat || (power_supply.charge == 0))
|
||||
add_overlay(emptystate)
|
||||
. += emptystate
|
||||
|
||||
//Projectiles
|
||||
/obj/item/projectile/kinetic
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
fire_sound_text = "a solid thunk"
|
||||
fire_delay = 25
|
||||
slot_flags = SLOT_BACK
|
||||
has_safety = FALSE
|
||||
safety_state = GUN_NO_SAFETY
|
||||
one_handed_penalty = 10
|
||||
|
||||
var/obj/item/bolt
|
||||
@@ -192,7 +192,8 @@
|
||||
bolt.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
|
||||
/obj/item/gun/launcher/crossbow/update_icon()
|
||||
/obj/item/gun/launcher/crossbow/update_icon_state()
|
||||
. = ..()
|
||||
if(tension > 1)
|
||||
icon_state = "crossbow-drawn"
|
||||
else if(bolt)
|
||||
@@ -200,7 +201,6 @@
|
||||
else
|
||||
icon_state = "crossbow"
|
||||
|
||||
|
||||
// Crossbow construction.
|
||||
/obj/item/crossbowframe
|
||||
name = "crossbow frame"
|
||||
|
||||
@@ -125,6 +125,14 @@
|
||||
..()
|
||||
|
||||
/obj/item/gun/launcher/pneumatic/update_icon()
|
||||
. = ..()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
/obj/item/gun/launcher/pneumatic/update_icon_state()
|
||||
. = ..()
|
||||
if(tank)
|
||||
icon_state = "pneumatic-tank"
|
||||
item_state = "pneumatic-tank"
|
||||
@@ -132,11 +140,6 @@
|
||||
icon_state = "pneumatic"
|
||||
item_state = "pneumatic"
|
||||
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
//Constructable pneumatic cannon.
|
||||
|
||||
/obj/item/cannonframe
|
||||
|
||||
@@ -29,26 +29,25 @@
|
||||
|
||||
/obj/item/gun/magnetic/matfed/examine(mob/user)
|
||||
. = ..()
|
||||
show_ammo(user)
|
||||
if(mat_storage)
|
||||
. += SPAN_NOTICE("It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.")
|
||||
|
||||
/obj/item/gun/magnetic/matfed/update_icon()
|
||||
var/list/overlays_to_add = list()
|
||||
/obj/item/gun/magnetic/matfed/update_overlays()
|
||||
. = ..()
|
||||
if(removable_components)
|
||||
if(cell)
|
||||
overlays_to_add += image(icon, "[icon_state]_cell")
|
||||
. += image(icon, "[icon_state]_cell")
|
||||
if(capacitor)
|
||||
overlays_to_add += image(icon, "[icon_state]_capacitor")
|
||||
. += image(icon, "[icon_state]_capacitor")
|
||||
if(!cell || !capacitor)
|
||||
overlays_to_add += image(icon, "[icon_state]_red")
|
||||
. += image(icon, "[icon_state]_red")
|
||||
else if(capacitor.charge < power_cost)
|
||||
overlays_to_add += image(icon, "[icon_state]_amber")
|
||||
. += image(icon, "[icon_state]_amber")
|
||||
else
|
||||
overlays_to_add += image(icon, "[icon_state]_green")
|
||||
. += image(icon, "[icon_state]_green")
|
||||
if(mat_storage)
|
||||
overlays_to_add += image(icon, "[icon_state]_loaded")
|
||||
. += image(icon, "[icon_state]_loaded")
|
||||
|
||||
overlays = overlays_to_add
|
||||
..()
|
||||
/obj/item/gun/magnetic/matfed/attack_hand(var/mob/user) // It doesn't keep a loaded item inside.
|
||||
if(user.get_inactive_hand() == src)
|
||||
var/obj/item/removing
|
||||
@@ -74,10 +73,6 @@
|
||||
/obj/item/gun/magnetic/matfed/use_ammo()
|
||||
mat_storage -= mat_cost
|
||||
|
||||
/obj/item/gun/magnetic/matfed/show_ammo(var/mob/user)
|
||||
if(mat_storage)
|
||||
to_chat(user, "<span class='notice'>It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.</span>")
|
||||
|
||||
/obj/item/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user)
|
||||
if(removable_components)
|
||||
if(istype(thing, /obj/item/cell))
|
||||
|
||||
@@ -31,10 +31,9 @@
|
||||
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(60,30,20), dispersion=list(0.0, 0.3, 0.6))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = (ammo_magazine)? "advanced_smg" : "advanced_smg-empty"
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/loaded
|
||||
magazine_type = /obj/item/ammo_magazine/m9mmAdvanced
|
||||
@@ -58,13 +57,12 @@
|
||||
|
||||
one_handed_penalty = 15
|
||||
|
||||
/obj/item/gun/projectile/automatic/c20r/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/c20r/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "c20r-[round(ammo_magazine.stored_ammo.len,4)]"
|
||||
else
|
||||
icon_state = "c20r"
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/sts35
|
||||
name = "assault rifle"
|
||||
@@ -93,13 +91,17 @@
|
||||
// list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=6, burst_accuracy=list(0,-15,-30,-30,-45), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)),
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/sts35/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/sts35/update_icon_state()
|
||||
. = ..()
|
||||
if(istype(ammo_magazine,/obj/item/ammo_magazine/m545/small))
|
||||
icon_state = "arifle-small" // If using the small magazines, use the small magazine sprite.
|
||||
else
|
||||
icon_state = (ammo_magazine)? "arifle" : "arifle-empty"
|
||||
if(!ignore_inhands) update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/sts35/update_icon(ignore_inhands)
|
||||
. = ..()
|
||||
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550
|
||||
name = "machine pistol"
|
||||
@@ -116,13 +118,12 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m9mmt)
|
||||
projectile_type = /obj/item/projectile/bullet/pistol/medium
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/wt550/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "wt550-[round(ammo_magazine.stored_ammo.len,4)]"
|
||||
else
|
||||
icon_state = "wt550"
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550/lethal
|
||||
magazine_type = /obj/item/ammo_magazine/m9mmt
|
||||
@@ -183,14 +184,16 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/gun/projectile/automatic/z8/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/z8/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "carbine-[round(ammo_magazine.stored_ammo.len,2)]"
|
||||
else
|
||||
icon_state = "carbine"
|
||||
if(!ignore_inhands) update_held_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/z8/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/z8/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -263,13 +266,17 @@
|
||||
return ..() //once open, behave like normal
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/update_icon_state()
|
||||
. = ..()
|
||||
if(istype(ammo_magazine,/obj/item/ammo_magazine/m762))
|
||||
icon_state = "l6[cover_open ? "open" : "closed"]mag"
|
||||
item_state = icon_state
|
||||
else
|
||||
icon_state = "l6[cover_open ? "open" : "closed"][ammo_magazine ? round(ammo_magazine.stored_ammo.len, 25) : "-empty"]"
|
||||
item_state = "l6[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"]"
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/load_ammo(var/obj/item/A, mob/user)
|
||||
if(!cover_open)
|
||||
@@ -308,8 +315,8 @@
|
||||
// list(mode_name="6-round bursts", burst=6, move_delay=6, burst_accuracy = list(0,-15,-15,-30,-30, -30), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2, 1.2)),
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/as24/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/as24/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "ashot"
|
||||
else
|
||||
@@ -332,8 +339,8 @@
|
||||
list(mode_name="3-round bursts", burst=3, burst_delay=1, fire_delay=4, move_delay=4, burst_accuracy = list(60,40,30,20,15), dispersion = list(0.6, 1.0, 1.0))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "mini-uzi"
|
||||
else
|
||||
@@ -345,8 +352,8 @@
|
||||
icon_state = "mini-uzi-custom"
|
||||
pin = /obj/item/firing_pin/explorer
|
||||
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/custom/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/custom/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "mini-uzi-custom"
|
||||
else
|
||||
@@ -358,8 +365,8 @@
|
||||
icon_state = "mini-uzi-taj"
|
||||
item_state = "mini-uzi-taj"
|
||||
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/taj/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/mini_uzi/taj/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "mini-uzi-taj"
|
||||
item_state = "mini-uzi-taj"
|
||||
@@ -386,7 +393,8 @@
|
||||
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(60,30,30), dispersion=list(0.0, 0.6, 1.0))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/p90/update_icon()
|
||||
/obj/item/gun/projectile/automatic/p90/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "p90smg-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 6) : "empty"]"
|
||||
|
||||
/obj/item/gun/projectile/automatic/p90/custom
|
||||
@@ -397,7 +405,8 @@
|
||||
slot_flags = SLOT_BELT|SLOT_BACK
|
||||
pin = /obj/item/firing_pin/explorer
|
||||
|
||||
/obj/item/gun/projectile/automatic/p90/custom/update_icon()
|
||||
/obj/item/gun/projectile/automatic/p90/custom/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "p90smgC-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 6) : "empty"]"
|
||||
|
||||
/obj/item/gun/projectile/automatic/tommygun
|
||||
@@ -417,8 +426,8 @@
|
||||
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(60,30,25), dispersion=list(0.0, 0.6, 1.0))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/tommygun/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/tommygun/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = (ammo_magazine)? "tommygun" : "tommygun-empty"
|
||||
// update_held_icon()
|
||||
|
||||
@@ -444,16 +453,18 @@
|
||||
list(mode_name="2-round bursts", burst=2, fire_delay=null, move_delay=6, burst_accuracy=list(60,45), dispersion=list(0.0, 0.6))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/bullpup/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/bullpup/update_icon_state()
|
||||
. = ..()
|
||||
if(istype(ammo_magazine,/obj/item/ammo_magazine/m762))
|
||||
icon_state = "bullpup-small"
|
||||
else if(istype(ammo_magazine,/obj/item/ammo_magazine/m762m))
|
||||
icon_state = "bullpup"
|
||||
else
|
||||
item_state = "bullpup-empty"
|
||||
if(!ignore_inhands)
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/bullpup/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
obj/item/gun/projectile/automatic/fal
|
||||
name = "FN-FAL"
|
||||
@@ -476,8 +487,8 @@ obj/item/gun/projectile/automatic/fal
|
||||
list(mode_name="2-round bursts", burst=2, fire_delay=null, move_delay=6, burst_accuracy=list(60,35), dispersion=list(0.0, 0.6))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/fal/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/fal/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
@@ -540,13 +551,12 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
list(mode_name="2-round burst", burst=2, move_delay=6, burst_accuracy = list(60,50,40,30,25), dispersion = list(0.0, 0.6, 0.6))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/holyshot/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/holyshot/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "holyshotgun"
|
||||
else
|
||||
icon_state = "holyshotgun_empty"
|
||||
return
|
||||
|
||||
//Clown Rifle
|
||||
/obj/item/gun/projectile/automatic/clown_rifle
|
||||
@@ -574,8 +584,8 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
// list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=6, burst_accuracy=list(0,-15,-30,-30,-45), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)),
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/clown_rifle/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/clown_rifle/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -599,8 +609,8 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
list(mode_name="double tap", burst=4, burst_delay=1, fire_delay=4, move_delay=2, burst_accuracy = list(40,30,20,15), dispersion = list(0.6, 0.6, 1.0, 1.0))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt274/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/wt274/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -617,23 +627,20 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mfoam/smg)
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = (ammo_magazine)? "toy_smg" : "toy_smg-empty"
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/handle_suicide(mob/living/user)
|
||||
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
|
||||
mouthshoot = 0
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/blue
|
||||
icon_state = "toy_smg_blue"
|
||||
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/blue/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/advanced_smg/foam/blue/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = (ammo_magazine)? "toy_smg_blue" : "toy_smg_blue-empty"
|
||||
return
|
||||
|
||||
//Foam c20r
|
||||
/obj/item/gun/projectile/automatic/c20r/foam
|
||||
@@ -649,18 +656,16 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
one_handed_penalty = 5
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/projectile/automatic/c20r/foam/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/c20r/foam/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "toy_c20r-[round(ammo_magazine.stored_ammo.len,4)]"
|
||||
else
|
||||
icon_state = "toy_c20r"
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/automatic/c20r/foam/handle_suicide(mob/living/user)
|
||||
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
|
||||
mouthshoot = 0
|
||||
return
|
||||
|
||||
//Foam LMG
|
||||
/obj/item/gun/projectile/automatic/l6_saw/foam
|
||||
@@ -676,13 +681,17 @@ obj/item/gun/projectile/automatic/automat/taj
|
||||
one_handed_penalty = 45 //It's plastic.
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/foam/update_icon()
|
||||
/obj/item/gun/projectile/automatic/l6_saw/foam/update_icon_state()
|
||||
. = ..()
|
||||
if(istype(ammo_magazine,/obj/item/ammo_magazine/m762))
|
||||
icon_state = "toy_lmg[cover_open ? "open" : "closed"]mag"
|
||||
item_state = icon_state
|
||||
else
|
||||
icon_state = "toy_lmg[cover_open ? "open" : "closed"][ammo_magazine ? round(ammo_magazine.stored_ammo.len, 25) : "-empty"]"
|
||||
item_state = "toy_lmg[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"]"
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/foam/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/foam/handle_suicide(mob/living/user)
|
||||
|
||||
@@ -66,13 +66,14 @@
|
||||
src.ready = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/projectile/bow/update_icon()
|
||||
/obj/item/gun/projectile/bow/update_icon_state()
|
||||
. = ..()
|
||||
if(ready)
|
||||
src.icon_state = "[initial(icon_state)]_firing"
|
||||
icon_state = "[initial(icon_state)]_firing"
|
||||
else if(loaded.len)
|
||||
src.icon_state = "[initial(icon_state)]_loaded"
|
||||
icon_state = "[initial(icon_state)]_loaded"
|
||||
else
|
||||
src.icon_state = initial(icon_state)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/gun/projectile/bow/ashen
|
||||
name = "bone bow"
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m5mmcaseless)
|
||||
one_handed_penalty = 15
|
||||
|
||||
/obj/item/gun/projectile/caseless/prototype/update_icon()
|
||||
/obj/item/gun/projectile/caseless/prototype/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
|
||||
@@ -78,7 +78,8 @@
|
||||
beakers += B
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/projectile/dartgun/update_icon()
|
||||
/obj/item/gun/projectile/dartgun/update_icon_state()
|
||||
. = ..()
|
||||
if(!ammo_magazine)
|
||||
icon_state = "[base_state]-empty"
|
||||
return 1
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
|
||||
load_method = MAGAZINE
|
||||
|
||||
/obj/item/gun/projectile/colt/update_icon()
|
||||
/obj/item/gun/projectile/colt/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
if(unique_reskin)
|
||||
icon_state = unique_reskin
|
||||
@@ -91,8 +92,8 @@
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
|
||||
load_method = MAGAZINE
|
||||
|
||||
/obj/item/gun/projectile/sec/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/sec/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "secguncomp"
|
||||
else
|
||||
@@ -107,8 +108,8 @@
|
||||
name = "custom .45 pistol"
|
||||
icon_state = "secgundark"
|
||||
|
||||
/obj/item/gun/projectile/sec/wood/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/sec/wood/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "secgundark"
|
||||
else
|
||||
@@ -141,8 +142,8 @@
|
||||
magazine_type = /obj/item/ammo_magazine/m44
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m44)
|
||||
|
||||
/obj/item/gun/projectile/deagle/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/deagle/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -178,8 +179,8 @@
|
||||
auto_eject = 1
|
||||
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
|
||||
|
||||
/obj/item/gun/projectile/gyropistol/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/gyropistol/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "gyropistolloaded"
|
||||
else
|
||||
@@ -199,8 +200,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m9mm/compact)
|
||||
projectile_type = /obj/item/projectile/bullet/pistol
|
||||
|
||||
/obj/item/gun/projectile/pistol/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/pistol/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -238,8 +239,8 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/gun/projectile/pistol/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/pistol/update_icon_state()
|
||||
. = ..()
|
||||
if(silenced)
|
||||
icon_state = "pistol-silencer"
|
||||
else
|
||||
@@ -260,7 +261,7 @@
|
||||
recoil = 3 //Improvised weapons = poor ergonomics
|
||||
handle_casings = CYCLE_CASINGS //player has to take the old casing out manually before reloading
|
||||
load_method = SINGLE_CASING
|
||||
has_safety = FALSE
|
||||
safety_state = GUN_NO_SAFETY
|
||||
max_shells = 1 //literally just a barrel
|
||||
|
||||
var/global/list/ammo_types = list(
|
||||
@@ -312,8 +313,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m9mm/compact)
|
||||
projectile_type = /obj/item/projectile/bullet/pistol
|
||||
|
||||
/obj/item/gun/projectile/luger/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/luger/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -332,8 +333,8 @@
|
||||
magazine_type = /obj/item/ammo_magazine/m9mm
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m9mm) // Can accept illegal large capacity magazines, or compact magazines.
|
||||
|
||||
/obj/item/gun/projectile/p92x/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/p92x/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -389,8 +390,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mcompressedbio/compact)
|
||||
projectile_type = /obj/item/projectile/bullet/organic
|
||||
|
||||
/obj/item/gun/projectile/clown_pistol/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/clown_pistol/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
@@ -412,8 +413,8 @@
|
||||
var/collapsible = 1
|
||||
var/extended = 0
|
||||
|
||||
/obj/item/gun/projectile/fnseven/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/fnseven/update_icon_state()
|
||||
. = ..()
|
||||
if(!extended && ammo_magazine)
|
||||
icon_state = "nt57"
|
||||
else if(extended && ammo_magazine)
|
||||
@@ -450,8 +451,8 @@
|
||||
collapsible = 0
|
||||
extended = 1
|
||||
|
||||
/obj/item/gun/projectile/fnseven/vintage/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/fnseven/vintage/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "fnseven"
|
||||
else
|
||||
@@ -471,7 +472,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/biovial)
|
||||
projectile_type = /obj/item/projectile/bullet/organic/wax
|
||||
|
||||
/obj/item/gun/projectile/apinae_pistol/update_icon()
|
||||
/obj/item/gun/projectile/apinae_pistol/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "apipistol-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 2) : "empty"]"
|
||||
|
||||
//Tyrmalin Weapons
|
||||
@@ -501,8 +503,8 @@
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mfoam/pistol)
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/projectile/pistol/foam/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/pistol/foam/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
|
||||
@@ -153,8 +153,8 @@ obj/item/gun/projectile/revolver/detective45/verb/rename_gun()
|
||||
ammo_type = /obj/item/ammo_casing/a38/emp
|
||||
|
||||
|
||||
/obj/item/gun/projectile/revolver/deckard/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/revolver/deckard/update_icon_state()
|
||||
. = ..()
|
||||
if(loaded.len)
|
||||
icon_state = "deckard-loaded"
|
||||
else
|
||||
@@ -333,8 +333,8 @@ obj/item/gun/projectile/revolver/detective45/verb/rename_gun()
|
||||
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3)
|
||||
ammo_type = /obj/item/ammo_casing/a44
|
||||
|
||||
/obj/item/gun/projectile/revolver/combat/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/revolver/combat/update_icon_state()
|
||||
. = ..()
|
||||
if(loaded.len)
|
||||
icon_state = "combatrevolver"
|
||||
else
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
auto_eject_sound = 'sound/weapons/garand_ping.ogg'
|
||||
one_handed_penalty = 15
|
||||
|
||||
/obj/item/gun/projectile/garand/update_icon()
|
||||
/obj/item/gun/projectile/garand/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
@@ -56,5 +57,6 @@
|
||||
projectile_type = /obj/item/projectile/bullet/organic/stinger
|
||||
one_handed_penalty = 25
|
||||
|
||||
/obj/item/gun/projectile/apinae_stinger/update_icon()
|
||||
/obj/item/gun/projectile/apinae_stinger/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "apigun-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 2) : "empty"]"
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/projectile/shotgun/pump/update_icon()//This adds empty sprite capability for shotguns.
|
||||
..()
|
||||
/obj/item/gun/projectile/shotgun/pump/update_icon_state()
|
||||
. = ..()
|
||||
if(!empty_sprite)//Just a dirty check
|
||||
return
|
||||
if((loaded.len) || (chambered))
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
magazine_type = /obj/item/ammo_magazine/m762svd
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/m762svd)
|
||||
|
||||
/obj/item/gun/projectile/SVD/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/SVD/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "SVD"
|
||||
else
|
||||
@@ -115,8 +115,8 @@
|
||||
wielded_item_state = "svd-taj-wielded"
|
||||
|
||||
|
||||
/obj/item/gun/projectile/SVD/taj/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/SVD/taj/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine)
|
||||
icon_state = "SVD-taj"
|
||||
else
|
||||
|
||||
@@ -169,7 +169,8 @@
|
||||
user.put_in_any_hand_if_possible(gun) || gun.dropInto(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gun/projectile/heavysniper/update_icon()
|
||||
/obj/item/gun/projectile/heavysniper/update_icon_state()
|
||||
. = ..()
|
||||
if(bolt_open)
|
||||
icon_state = "heavysniper-open"
|
||||
else
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
. = ..()
|
||||
. += "It has [spikes] spike\s remaining."
|
||||
|
||||
/obj/item/gun/launcher/spikethrower/update_icon()
|
||||
/obj/item/gun/launcher/spikethrower/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "spikethrower[spikes]"
|
||||
|
||||
/obj/item/gun/launcher/spikethrower/update_release_force()
|
||||
|
||||
@@ -551,14 +551,14 @@ End Citadel Change */
|
||||
if(H.head.body_parts_covered & EYES)
|
||||
eyes_covered = 1
|
||||
safe_thing = H.head
|
||||
if((H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL))
|
||||
if((H.head.body_parts_covered & FACE) && !(H.head.clothing_flags & FLEXIBLEMATERIAL))
|
||||
mouth_covered = 1
|
||||
safe_thing = H.head
|
||||
if(H.wear_mask)
|
||||
if(!eyes_covered && H.wear_mask.body_parts_covered & EYES)
|
||||
eyes_covered = 1
|
||||
safe_thing = H.wear_mask
|
||||
if(!mouth_covered && (H.wear_mask.body_parts_covered & FACE) && !(H.wear_mask.item_flags & FLEXIBLEMATERIAL))
|
||||
if(!mouth_covered && (H.wear_mask.body_parts_covered & FACE) && !(H.wear_mask.clothing_flags & FLEXIBLEMATERIAL))
|
||||
mouth_covered = 1
|
||||
safe_thing = H.wear_mask
|
||||
if(H.glasses && H.glasses.body_parts_covered & EYES)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
return
|
||||
|
||||
/*
|
||||
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
|
||||
if(user.a_intent != INTENT_HARM && !(I.clothing_flags & ABSTRACT))
|
||||
if(user.transferItemToLoc(I, drop_location(), silent = FALSE))
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
|
||||
@@ -1075,7 +1075,7 @@ END OF CITADEL CHANGES */
|
||||
)
|
||||
armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 20, rad = 25)
|
||||
|
||||
/obj/item/clothing/suit/storage/trek/ds9/equipped()
|
||||
/obj/item/clothing/suit/storage/trek/ds9/equipped(mob/user, slot)
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.wear_suit == src)
|
||||
@@ -1098,7 +1098,7 @@ END OF CITADEL CHANGES */
|
||||
icon_state = "trek_command"
|
||||
item_state = "trek_ds9_command"
|
||||
|
||||
/obj/item/clothing/under/rank/trek/command/ds9/equipped() // Cit change to take into account weirdness with defines. When put on it forces the correct sprite sheet. However when removed it shows a missing sprite for either uniform or suit depending on if it's the overcoat or uniform. Don't know how to fix
|
||||
/obj/item/clothing/under/rank/trek/command/ds9/equipped(mob/user, slot) // Cit change to take into account weirdness with defines. When put on it forces the correct sprite sheet. However when removed it shows a missing sprite for either uniform or suit depending on if it's the overcoat or uniform. Don't know how to fix
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.w_uniform == src)
|
||||
@@ -1113,7 +1113,7 @@ END OF CITADEL CHANGES */
|
||||
icon_state = "trek_engsec"
|
||||
item_state = "trek_ds9_engsec"
|
||||
|
||||
/obj/item/clothing/under/rank/trek/engsec/ds9/equipped() // Cit change, ditto
|
||||
/obj/item/clothing/under/rank/trek/engsec/ds9/equipped(mob/user, slot) // Cit change, ditto
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.w_uniform == src)
|
||||
@@ -1128,7 +1128,7 @@ END OF CITADEL CHANGES */
|
||||
icon_state = "trek_medsci"
|
||||
item_state = "trek_ds9_medsci"
|
||||
|
||||
/obj/item/clothing/under/rank/trek/medsci/ds9/equipped() // Cit change, ditto
|
||||
/obj/item/clothing/under/rank/trek/medsci/ds9/equipped(mob/user, slot) // Cit change, ditto
|
||||
..()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.w_uniform == src)
|
||||
|
||||
@@ -85,13 +85,16 @@
|
||||
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-15,-30), dispersion=list(0.0, 0.6, 0.6))
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/automatic/pdw/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/pdw/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/pdw/update_icon_state()
|
||||
. = ..()
|
||||
if(istype(ammo_magazine,/obj/item/ammo_magazine/m9mm))
|
||||
icon_state = "pdw-short"
|
||||
else
|
||||
icon_state = (ammo_magazine)? "pdw" : "pdw-empty"
|
||||
if(!ignore_inhands) update_held_icon()
|
||||
|
||||
// For general use
|
||||
/obj/item/gun/energy/imperial
|
||||
@@ -225,11 +228,14 @@ END OF CITADEL CHANGES */
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mtg)
|
||||
load_method = MAGAZINE
|
||||
|
||||
/obj/item/gun/projectile/automatic/stg/update_icon(var/ignore_inhands)
|
||||
..()
|
||||
/obj/item/gun/projectile/automatic/stg/update_icon()
|
||||
. = ..()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/gun/projectile/automatic/stg/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = (ammo_magazine)? "stg60" : "stg60-empty"
|
||||
item_state = (ammo_magazine)? "arifle" : "arifle-empty"
|
||||
if(!ignore_inhands) update_held_icon()
|
||||
|
||||
//-----------------------Tranq Gun----------------------------------
|
||||
/obj/item/gun/projectile/dartgun/tranq
|
||||
@@ -248,19 +254,6 @@ END OF CITADEL CHANGES */
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/chemdart)
|
||||
auto_eject = 0
|
||||
|
||||
/obj/item/gun/projectile/dartgun/tranq/update_icon()
|
||||
if(!ammo_magazine)
|
||||
icon_state = "tranqgun"
|
||||
return 1
|
||||
|
||||
if(!ammo_magazine.stored_ammo || ammo_magazine.stored_ammo.len)
|
||||
icon_state = "tranqgun"
|
||||
else if(ammo_magazine.stored_ammo.len > 5)
|
||||
icon_state = "tranqgun"
|
||||
else
|
||||
icon_state = "tranqgun"
|
||||
return 1
|
||||
|
||||
// Removed because gun64_vr.dmi guns don't work.
|
||||
/*//-----------------------UF-ARC----------------------------------
|
||||
/obj/item/gun/projectile/automatic/carbine/fluff/ufarc
|
||||
@@ -409,8 +402,8 @@ END OF CITADEL CHANGES */
|
||||
fire_sound = 'sound/weapons/gunshot_pathetic.ogg'
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 3)
|
||||
|
||||
/obj/item/gun/projectile/giskard/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/giskard/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine && ammo_magazine.stored_ammo.len)
|
||||
icon_state = "giskardcivil"
|
||||
else
|
||||
@@ -426,8 +419,8 @@ END OF CITADEL CHANGES */
|
||||
list(mode_name="2-round bursts", burst=2, fire_delay=0.2, move_delay=4, burst_accuracy=list(0,-15), dispersion=list(1.2, 1.8)),
|
||||
)
|
||||
|
||||
/obj/item/gun/projectile/giskard/olivaw/update_icon()
|
||||
..()
|
||||
/obj/item/gun/projectile/giskard/olivaw/update_icon_state()
|
||||
. = ..()
|
||||
if(ammo_magazine && ammo_magazine.stored_ammo.len)
|
||||
icon_state = "olivawcivil"
|
||||
else
|
||||
@@ -444,15 +437,12 @@ END OF CITADEL CHANGES */
|
||||
handle_casings = CYCLE_CASINGS
|
||||
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3)
|
||||
|
||||
/obj/item/gun/projectile/revolver/consul/proc/update_charge()
|
||||
/obj/item/gun/projectile/revolver/consul/update_overlays()
|
||||
. = ..()
|
||||
if(loaded.len==0)
|
||||
overlays += "inspector_off"
|
||||
. += "inspector_off"
|
||||
else
|
||||
overlays += "inspector_on"
|
||||
|
||||
/obj/item/gun/projectile/revolver/consul/update_icon()
|
||||
overlays.Cut()
|
||||
update_charge()
|
||||
. += "inspector_on"
|
||||
|
||||
// No idea what this is for.
|
||||
/obj/item/gun/projectile/automatic/sol
|
||||
@@ -507,15 +497,14 @@ END OF CITADEL CHANGES */
|
||||
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', charge_cost = 1200),
|
||||
)
|
||||
|
||||
/obj/item/gun/energy/gun/martin/proc/update_mode()
|
||||
/obj/item/gun/energy/gun/martin/update_overlays()
|
||||
. = ..()
|
||||
var/datum/firemode/current_mode = firemodes[sel_mode]
|
||||
switch(current_mode.name)
|
||||
if("stun") add_overlay("taser_pdw")
|
||||
if("lethal") add_overlay("lazer_pdw")
|
||||
|
||||
/obj/item/gun/energy/gun/martin/update_icon()
|
||||
cut_overlays()
|
||||
update_mode()
|
||||
if("stun")
|
||||
. += "taser_pdw"
|
||||
if("lethal")
|
||||
. += "lazer_pdw"
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////////// Custom Ammo ////////////////////
|
||||
@@ -786,12 +775,11 @@ END OF CITADEL CHANGES */
|
||||
list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, modifystate="carbinestun", charge_cost = 60),
|
||||
)
|
||||
|
||||
/obj/item/gun/energy/frontier/locked/carbine/update_icon()
|
||||
/obj/item/gun/energy/frontier/locked/carbine/update_icon_state()
|
||||
. = ..()
|
||||
if(recharging)
|
||||
icon_state = "[modifystate]_pump"
|
||||
update_held_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
//Expeditionary Holdout Phaser Pistol
|
||||
/obj/item/gun/energy/frontier/locked/holdout
|
||||
|
||||
@@ -1213,7 +1213,7 @@
|
||||
desc = "The goggles really do nothing this time!"
|
||||
icon_state = "purple"
|
||||
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
|
||||
item_flags = ALLOWINTERNALS
|
||||
clothing_flags = ALLOWINTERNALS
|
||||
|
||||
//General use, Verk felt like sharing.
|
||||
/obj/item/clothing/glasses/fluff/spiffygogs
|
||||
|
||||
@@ -106,10 +106,11 @@
|
||||
chambered = null
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/cell_loaded/update_icon()
|
||||
/obj/item/gun/projectile/cell_loaded/update_overlays()
|
||||
. = ..()
|
||||
|
||||
update_charge()
|
||||
|
||||
cut_overlays()
|
||||
if(!chambered)
|
||||
return
|
||||
|
||||
@@ -119,13 +120,13 @@
|
||||
//Mode bar
|
||||
var/image/mode_bar = image(icon, icon_state = "[initial(icon_state)]_type")
|
||||
mode_bar.color = batt_color
|
||||
add_overlay(mode_bar)
|
||||
. += mode_bar
|
||||
|
||||
//Barrel color
|
||||
var/image/barrel_color = image(icon, icon_state = "[initial(icon_state)]_barrel")
|
||||
barrel_color.alpha = 150
|
||||
barrel_color.color = batt_color
|
||||
add_overlay(barrel_color)
|
||||
. += barrel_color
|
||||
|
||||
//Charge bar
|
||||
var/ratio = CEILING(((charge_left / max_charge) * charge_sections), 1)
|
||||
@@ -133,8 +134,7 @@
|
||||
var/image/charge_bar = image(icon, icon_state = "[initial(icon_state)]_charge")
|
||||
charge_bar.pixel_x = i
|
||||
charge_bar.color = batt_color
|
||||
add_overlay(charge_bar)
|
||||
|
||||
. += charge_bar
|
||||
|
||||
// The Magazine //
|
||||
/obj/item/ammo_magazine/cell_mag
|
||||
|
||||
@@ -97,6 +97,11 @@
|
||||
item_state = itemState
|
||||
*/
|
||||
|
||||
// todo: burn this entire proc to the ground, because the writer deserves to have their eyelids replaced with lemons
|
||||
// "this goodd system but i'm going to snowflake it for one gun"
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
// Protector beams
|
||||
/obj/item/projectile/beam/stun/protector
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
//snowflake guns for xenoarch because you can't override the update_icon() proc inside the giant mess that is find creation
|
||||
|
||||
// no eat a dick fuck you you don't deserve update icon overrides if you think this is acceptable
|
||||
// todo: refactor archeology
|
||||
|
||||
/obj/item/gun/energy/laser/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
|
||||
/obj/item/gun/energy/laser/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/laser/practice/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
|
||||
/obj/item/gun/energy/laser/practice/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/laser/practice/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
|
||||
/obj/item/gun/energy/laser/practice/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/xray/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
|
||||
/obj/item/gun/energy/xray/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/captain/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
|
||||
/obj/item/gun/energy/captain/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
BIN
icons/obj/gun/common.dmi
Normal file
BIN
icons/obj/gun/common.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 251 B |
Binary file not shown.
|
Before Width: | Height: | Size: 261 B |
@@ -149,7 +149,7 @@
|
||||
#include "code\__DEFINES\jobs\factions.dm"
|
||||
#include "code\__DEFINES\jobs\join_types.dm"
|
||||
#include "code\__DEFINES\jobs\spawnpoints.dm"
|
||||
#include "code\__DEFINES\misc\misc.dm"
|
||||
#include "code\__DEFINES\misc\message_ranges.dm"
|
||||
#include "code\__DEFINES\mobs\cooldowns.dm"
|
||||
#include "code\__DEFINES\mobs\intent.dm"
|
||||
#include "code\__DEFINES\mobs\stat.dm"
|
||||
@@ -2396,6 +2396,7 @@
|
||||
#include "code\modules\keybindings\keybind\client.dm"
|
||||
#include "code\modules\keybindings\keybind\emote.dm"
|
||||
#include "code\modules\keybindings\keybind\human.dm"
|
||||
#include "code\modules\keybindings\keybind\item.dm"
|
||||
#include "code\modules\keybindings\keybind\living.dm"
|
||||
#include "code\modules\keybindings\keybind\mob.dm"
|
||||
#include "code\modules\keybindings\keybind\movement.dm"
|
||||
|
||||
Reference in New Issue
Block a user