mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
Slot_tie flags.
This commit is contained in:
@@ -393,6 +393,19 @@
|
||||
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
|
||||
return 1
|
||||
return 0
|
||||
if(slot_tie)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
var/obj/item/clothing/under/uniform = H.w_uniform
|
||||
if(uniform.hastie)
|
||||
if (!disable_warning)
|
||||
H << "\red You already have [uniform.hastie] attached to your [uniform]."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_TIE) )
|
||||
return 0
|
||||
return 1
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "" //no inhands
|
||||
item_color = "bluetie"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = 0
|
||||
slot_flags = SLOT_TIE
|
||||
w_class = 2.0
|
||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||
@@ -390,7 +390,7 @@
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
icon_state = "holobadge"
|
||||
item_color = "holobadge"
|
||||
slot_flags = SLOT_BELT
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
var/stored_name = null
|
||||
@@ -398,7 +398,7 @@
|
||||
/obj/item/clothing/tie/holobadge/cord
|
||||
icon_state = "holobadge-cord"
|
||||
item_color = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/tie/holobadge/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
|
||||
@@ -1140,7 +1140,6 @@
|
||||
item_color = "radi_pendant"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2.0
|
||||
slot_flags = 0
|
||||
|
||||
//////////// Masks ////////////
|
||||
|
||||
@@ -1186,7 +1185,7 @@
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
////// Silver locket - Konaa Hirano - Konaa_Hirano
|
||||
|
||||
@@ -1200,7 +1199,7 @@
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
|
||||
@@ -1230,7 +1229,7 @@
|
||||
icon_state = "nasir_khayyam_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
////// Emerald necklace - Ty Foster - Nega
|
||||
|
||||
@@ -1458,7 +1457,7 @@
|
||||
follow_dist = 2
|
||||
var/near_dist = max(follow_dist - 3, 1)
|
||||
var/current_dist = get_dist(src, bff)
|
||||
|
||||
|
||||
if (movement_target != bff)
|
||||
if (current_dist > follow_dist && !istype(movement_target, /mob/living/simple_animal/mouse) && (bff in oview(src)))
|
||||
//stop existing movement
|
||||
@@ -1469,7 +1468,7 @@
|
||||
stop_automated_movement = 1
|
||||
movement_target = bff
|
||||
walk_to(src, movement_target, near_dist, 4)
|
||||
|
||||
|
||||
//already following and close enough, stop
|
||||
else if (current_dist <= near_dist)
|
||||
walk_to(src,0)
|
||||
@@ -1481,15 +1480,15 @@
|
||||
|
||||
/mob/living/simple_animal/cat/fluff/Life()
|
||||
..()
|
||||
if (stat || !bff)
|
||||
if (stat || !bff)
|
||||
return
|
||||
if (get_dist(src, bff) <= 1)
|
||||
if (bff.stat >= DEAD || bff.health <= config.health_threshold_softcrit)
|
||||
if (prob((bff.stat < DEAD)? 50 : 15))
|
||||
if (prob((bff.stat < DEAD)? 50 : 15))
|
||||
audible_emote(pick("meows in distress.", "meows anxiously."))
|
||||
else
|
||||
if (prob(5))
|
||||
visible_emote(pick("nuzzles [bff].",
|
||||
if (prob(5))
|
||||
visible_emote(pick("nuzzles [bff].",
|
||||
"brushes against [bff].",
|
||||
"rubs against [bff].",
|
||||
"purrs."))
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
return has_organ("chest")
|
||||
if(slot_in_backpack)
|
||||
return 1
|
||||
if(slot_tie)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
@@ -202,13 +204,6 @@
|
||||
if(!istype(W)) return
|
||||
if(!has_organ_for_slot(slot)) return
|
||||
|
||||
if(W == src.l_hand)
|
||||
src.l_hand = null
|
||||
update_inv_l_hand() //So items actually disappear from hands.
|
||||
else if(W == src.r_hand)
|
||||
src.r_hand = null
|
||||
update_inv_r_hand()
|
||||
|
||||
W.loc = src
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
@@ -311,10 +306,20 @@
|
||||
if(src.get_active_hand() == W)
|
||||
src.u_equip(W)
|
||||
W.loc = src.back
|
||||
if(slot_tie)
|
||||
var/obj/item/clothing/under/uniform = src.w_uniform
|
||||
uniform.attackby(W,src)
|
||||
else
|
||||
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
if(W == src.l_hand)
|
||||
src.l_hand = null
|
||||
update_inv_l_hand() //So items actually disappear from hands.
|
||||
else if(W == src.r_hand)
|
||||
src.r_hand = null
|
||||
update_inv_r_hand()
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
@@ -801,4 +806,4 @@ It can still be worn/put on as normal.
|
||||
if(source && target)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
del(src)
|
||||
del(src)
|
||||
@@ -612,4 +612,7 @@
|
||||
if(slot_back in equip_slots)
|
||||
equip_slots |= slot_in_backpack
|
||||
|
||||
if(slot_w_uniform in equip_slots)
|
||||
equip_slots |= slot_tie
|
||||
|
||||
equip_slots |= slot_legcuffed
|
||||
@@ -165,6 +165,7 @@ var/list/slot_equipment_priority = list( \
|
||||
slot_glasses,\
|
||||
slot_belt,\
|
||||
slot_s_store,\
|
||||
slot_tie,\
|
||||
slot_l_store,\
|
||||
slot_r_store\
|
||||
)
|
||||
|
||||
+2
-1
@@ -185,7 +185,7 @@ var/MAX_EXPLOSION_RANGE = 14
|
||||
#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets.
|
||||
#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets.
|
||||
#define SLOT_TWOEARS 8192
|
||||
#define SLOT_LEGS = 16384
|
||||
#define SLOT_TIE 16384
|
||||
|
||||
//FLAGS BITMASK
|
||||
#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
|
||||
@@ -267,6 +267,7 @@ var/MAX_EXPLOSION_RANGE = 14
|
||||
#define slot_legcuffed 19
|
||||
#define slot_r_ear 20
|
||||
#define slot_legs 21
|
||||
#define slot_tie 22
|
||||
|
||||
//Cant seem to find a mob bitflags area other than the powers one
|
||||
|
||||
|
||||
Reference in New Issue
Block a user