Uppercases slot defines.

This commit is contained in:
oranges
2018-04-28 13:13:56 +12:00
committed by CitadelStationBot
parent ab3c55ab23
commit 7d45e045a3
207 changed files with 1507 additions and 692 deletions
+2 -2
View File
@@ -63,8 +63,8 @@
// it's NODROP_1
D.dropItemToGround(target, TRUE)
qdel(old_headgear)
// where is `slot_head` defined? WHO KNOWS
D.equip_to_slot(new_headgear, slot_head)
// where is `SLOT_HEAD` defined? WHO KNOWS
D.equip_to_slot(new_headgear, SLOT_HEAD)
return 1
+49
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
@@ -44,3 +45,51 @@
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
=======
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
slot_flags = ITEM_SLOT_EARS
resistance_flags = NONE
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon_state = "earmuffs"
item_state = "earmuffs"
strip_delay = 15
equip_delay_other = 25
resistance_flags = FLAMMABLE
flags_2 = BANG_PROTECT_2|HEALS_EARS_2
/obj/item/clothing/ears/headphones
name = "headphones"
desc = "Unce unce unce unce. Boop!"
icon = 'icons/obj/clothing/accessories.dmi'
icon_state = "headphones"
item_state = "headphones"
slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want!
actions_types = list(/datum/action/item_action/toggle_headphones)
var/headphones_on = FALSE
/obj/item/clothing/ears/headphones/Initialize()
. = ..()
update_icon()
/obj/item/clothing/ears/headphones/update_icon()
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
/obj/item/clothing/ears/headphones/proc/toggle(owner)
headphones_on = !headphones_on
update_icon()
var/mob/living/carbon/human/H = owner
if(istype(H))
H.update_inv_ears()
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
+3 -3
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/clothing/glasses.dmi'
w_class = WEIGHT_CLASS_SMALL
flags_cover = GLASSESCOVERSEYES
slot_flags = SLOT_EYES
slot_flags = ITEM_SLOT_EYES
strip_delay = 20
equip_delay_other = 25
resistance_flags = NONE
@@ -100,7 +100,7 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
/obj/item/clothing/glasses/science/item_action_slot_check(slot)
if(slot == slot_glasses)
if(slot == SLOT_GLASSES)
return 1
/obj/item/clothing/glasses/night
@@ -263,7 +263,7 @@
/obj/item/clothing/glasses/sunglasses/blindfold/equipped(mob/living/carbon/human/user, slot)
. = ..()
if(slot == slot_glasses)
if(slot == SLOT_GLASSES)
user.become_blind("blindfold_[REF(src)]")
/obj/item/clothing/glasses/sunglasses/blindfold/dropped(mob/living/carbon/human/user)
@@ -123,7 +123,7 @@
item_state = icon_state
if(isliving(loc))
var/mob/living/user = loc
if(user.get_item_by_slot(slot_glasses) == src)
if(user.get_item_by_slot(SLOT_GLASSES) == src)
user.update_inv_glasses()
else
user.update_inv_hands()
+1 -1
View File
@@ -6,7 +6,7 @@
/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot)
..()
if(hud_type && slot == slot_glasses)
if(hud_type && slot == SLOT_GLASSES)
var/datum/atom_hud/H = GLOB.huds[hud_type]
H.add_hud_to(user)
+1 -1
View File
@@ -5,7 +5,7 @@
icon = 'icons/obj/clothing/gloves.dmi'
siemens_coefficient = 0.5
body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
slot_flags = ITEM_SLOT_GLOVES
attack_verb = list("challenged")
var/transfer_prints = FALSE
strip_delay = 20
+1 -1
View File
@@ -209,7 +209,7 @@
var/obj/item/clothing/gloves/color/selected = pick(gloves)
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.equip_to_slot_or_del(new selected(H), slot_gloves)
H.equip_to_slot_or_del(new selected(H), SLOT_GLOVES)
else
new selected(loc)
return INITIALIZE_HINT_QDEL
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "top_hat"
item_state = "that"
body_parts_covered = HEAD
slot_flags = SLOT_HEAD
slot_flags = ITEM_SLOT_HEAD
var/blockTracking = 0 //For AI tracking
var/can_toggle = null
dynamic_hair_suffix = "+generic"
+3 -3
View File
@@ -131,7 +131,7 @@
dog_fashion = /datum/dog_fashion/head/kitty
/obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot)
if(ishuman(user) && slot == slot_head)
if(ishuman(user) && slot == SLOT_HEAD)
update_icon(user)
user.update_inv_head() //Color might have been changed by update_icon.
..()
@@ -169,7 +169,7 @@
/obj/item/clothing/head/cardborg/equipped(mob/living/user, slot)
..()
if(ishuman(user) && slot == slot_head)
if(ishuman(user) && slot == SLOT_HEAD)
var/mob/living/carbon/human/H = user
if(istype(H.wear_suit, /obj/item/clothing/suit/cardborg))
var/obj/item/clothing/suit/cardborg/CB = H.wear_suit
@@ -240,7 +240,7 @@
/obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot)
..()
if(slot == slot_head)
if(slot == SLOT_HEAD)
if(paranoia)
QDEL_NULL(paranoia)
paranoia = new()
+1 -1
View File
@@ -2,7 +2,7 @@
name = "mask"
icon = 'icons/obj/clothing/masks.dmi'
body_parts_covered = HEAD
slot_flags = SLOT_MASK
slot_flags = ITEM_SLOT_MASK
strip_delay = 40
equip_delay_other = 40
var/mask_adjusted = 0
+2 -2
View File
@@ -222,8 +222,8 @@ obj/item/clothing/mask/frog/cursed
flags_inv = HIDEFACE|HIDEFACIALHAIR
visor_flags_inv = HIDEFACE|HIDEFACIALHAIR
visor_flags_cover = MASKCOVERSMOUTH
slot_flags = SLOT_MASK
adjusted_flags = SLOT_HEAD
slot_flags = ITEM_SLOT_MASK
adjusted_flags = ITEM_SLOT_HEAD
icon_state = "bandbotany"
/obj/item/clothing/mask/bandana/attack_self(mob/user)
+1 -1
View File
@@ -2,7 +2,7 @@
name = "necklace"
icon = 'icons/obj/clothing/neck.dmi'
body_parts_covered = NECK
slot_flags = SLOT_NECK
slot_flags = ITEM_SLOT_NECK
strip_delay = 40
equip_delay_other = 40
+1 -1
View File
@@ -6,7 +6,7 @@
var/chained = 0
body_parts_covered = FEET
slot_flags = SLOT_FEET
slot_flags = ITEM_SLOT_FEET
permeability_coefficient = 0.5
slowdown = SHOES_SLOWDOWN
+1 -1
View File
@@ -264,7 +264,7 @@
/obj/item/clothing/shoes/wheelys/ui_action_click(mob/user, action)
if(!isliving(user))
return
if(!istype(user.get_item_by_slot(slot_shoes), /obj/item/clothing/shoes/wheelys))
if(!istype(user.get_item_by_slot(SLOT_SHOES), /obj/item/clothing/shoes/wheelys))
to_chat(user, "<span class='warning'>You must be wearing the wheely-heels to use them!</span>")
return
if(!(W.is_occupant(user)))
@@ -115,7 +115,7 @@
teleport_now.UpdateButtonIcon()
var/list/nonsafe_slots = list(slot_belt, slot_back)
var/list/nonsafe_slots = list(SLOT_BELT, SLOT_BACK)
var/list/exposed = list()
for(var/slot in nonsafe_slots)
var/obj/item/slot_item = user.get_item_by_slot(slot)
+16 -6
View File
@@ -21,7 +21,7 @@
actions_types = list(/datum/action/item_action/flightpack/toggle_flight, /datum/action/item_action/flightpack/engage_boosters, /datum/action/item_action/flightpack/toggle_stabilizers, /datum/action/item_action/flightpack/change_power, /datum/action/item_action/flightpack/toggle_airbrake)
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 10, "bomb" = 30, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75)
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
resistance_flags = FIRE_PROOF
var/processing_mode = FLIGHTSUIT_PROCESSING_FULL
@@ -544,8 +544,13 @@
changeWearer()
..()
<<<<<<< HEAD
/obj/item/device/flightpack/item_action_slot_check(slot)
if(slot == SLOT_BACK)
=======
/obj/item/flightpack/item_action_slot_check(slot)
if(slot == ITEM_SLOT_BACK)
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
return TRUE
/obj/item/device/flightpack/equipped(mob/user, slot)
@@ -571,8 +576,13 @@
momentum_speed_y = 0
momentum_speed = max(momentum_speed_x, momentum_speed_y)
<<<<<<< HEAD
/obj/item/device/flightpack/item_action_slot_check(slot)
return slot == slot_back
=======
/obj/item/flightpack/item_action_slot_check(slot)
return slot == SLOT_BACK
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
/obj/item/device/flightpack/proc/enable_stabilizers()
if(requires_suit && suit && !suit.deployedshoes)
@@ -728,7 +738,7 @@
src.flags_1 &= ~NOSLIP_1
/obj/item/clothing/shoes/flightshoes/item_action_slot_check(slot)
return slot == slot_shoes
return slot == SLOT_SHOES
/obj/item/clothing/shoes/flightshoes/proc/delink_suit()
if(suit)
@@ -893,7 +903,7 @@
if(user.back)
usermessage("You're already wearing something on your back!", "boldwarning")
return FALSE
user.equip_to_slot_if_possible(pack,slot_back,0,0,1)
user.equip_to_slot_if_possible(pack,SLOT_BACK,0,0,1)
pack.flags_1 |= NODROP_1
resync()
user.visible_message("<span class='notice'>A [pack.name] extends from [user]'s [name] and clamps to their back!</span>")
@@ -931,7 +941,7 @@
if(user.shoes)
usermessage("You're already wearing something on your feet!", "boldwarning")
return FALSE
user.equip_to_slot_if_possible(shoes,slot_shoes,0,0,1)
user.equip_to_slot_if_possible(shoes,SLOT_SHOES,0,0,1)
shoes.flags_1 |= NODROP_1
user.visible_message("<span class='notice'>[user]'s [name] extends a pair of [shoes.name] over their feet!</span>")
user.update_inv_wear_suit()
@@ -962,7 +972,7 @@
/obj/item/clothing/suit/space/hardsuit/flightsuit/equipped(mob/M, slot)
if(ishuman(M))
user = M
if(slot != slot_wear_suit)
if(slot != SLOT_WEAR_SUIT)
if(deployedpack)
retract_flightpack(TRUE)
if(deployedshoes)
@@ -997,7 +1007,7 @@
/obj/item/clothing/suit/space/hardsuit/flightsuit/attackby(obj/item/I, mob/wearer, params)
user = wearer
if(src == user.get_item_by_slot(slot_wear_suit))
if(src == user.get_item_by_slot(SLOT_WEAR_SUIT))
usermessage("You can not perform any service without taking the suit off!", "boldwarning")
return FALSE
else if(locked)
+8 -8
View File
@@ -48,12 +48,12 @@
soundloop.stop(user)
/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot)
if(slot == slot_head)
if(slot == SLOT_HEAD)
return 1
/obj/item/clothing/head/helmet/space/hardsuit/equipped(mob/user, slot)
..()
if(slot != slot_head)
if(slot != SLOT_HEAD)
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
@@ -119,7 +119,7 @@
if(jetpack)
to_chat(user, "<span class='warning'>[src] already has a jetpack installed.</span>")
return
if(src == user.get_item_by_slot(slot_wear_suit)) //Make sure the player is not wearing the suit before applying the upgrade.
if(src == user.get_item_by_slot(SLOT_WEAR_SUIT)) //Make sure the player is not wearing the suit before applying the upgrade.
to_chat(user, "<span class='warning'>You cannot install the upgrade to [src] while wearing it.</span>")
return
@@ -131,7 +131,7 @@
if(!jetpack)
to_chat(user, "<span class='warning'>[src] has no jetpack installed.</span>")
return
if(src == user.get_item_by_slot(slot_wear_suit))
if(src == user.get_item_by_slot(SLOT_WEAR_SUIT))
to_chat(user, "<span class='warning'>You cannot remove the jetpack from [src] while wearing it.</span>")
return
@@ -144,7 +144,7 @@
/obj/item/clothing/suit/space/hardsuit/equipped(mob/user, slot)
..()
if(jetpack)
if(slot == slot_wear_suit)
if(slot == SLOT_WEAR_SUIT)
for(var/X in jetpack.actions)
var/datum/action/A = X
A.Grant(user)
@@ -157,7 +157,7 @@
A.Remove(user)
/obj/item/clothing/suit/space/hardsuit/item_action_slot_check(slot)
if(slot == slot_wear_suit) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit.
if(slot == SLOT_WEAR_SUIT) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit.
return 1
//Engineering
@@ -460,7 +460,7 @@
/obj/item/clothing/head/helmet/space/hardsuit/rd/equipped(mob/living/carbon/human/user, slot)
..()
if (slot == slot_head)
if (slot == SLOT_HEAD)
var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC]
DHUD.add_hud_to(user)
@@ -615,7 +615,7 @@
/obj/item/clothing/suit/space/hardsuit/ancient/equipped(mob/user, slot)
. = ..()
if (slot == slot_wear_suit)
if (slot == SLOT_WEAR_SUIT)
if (mobhook && mobhook.parent != user)
QDEL_NULL(mobhook)
if (!mobhook)
+1 -1
View File
@@ -4,7 +4,7 @@
var/fire_resist = T0C+100
allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
slot_flags = SLOT_OCLOTHING
slot_flags = ITEM_SLOT_OCLOTHING
var/blood_overlay_type = "suit"
var/togglename = null
var/suittoggled = FALSE
+1 -1
View File
@@ -173,7 +173,7 @@
/obj/item/clothing/suit/cardborg/equipped(mob/living/user, slot)
..()
if(slot == slot_wear_suit)
if(slot == SLOT_WEAR_SUIT)
disguise(user)
/obj/item/clothing/suit/cardborg/dropped(mob/living/user)
+6 -6
View File
@@ -24,11 +24,11 @@
ToggleHood()
/obj/item/clothing/suit/hooded/item_action_slot_check(slot, mob/user)
if(slot == slot_wear_suit)
if(slot == SLOT_WEAR_SUIT)
return 1
/obj/item/clothing/suit/hooded/equipped(mob/user, slot)
if(slot != slot_wear_suit)
if(slot != SLOT_WEAR_SUIT)
RemoveHood()
..()
@@ -59,7 +59,7 @@
if(H.head)
to_chat(H, "<span class='warning'>You're already wearing something on your head!</span>")
return
else if(H.equip_to_slot_if_possible(hood,slot_head,0,0,1))
else if(H.equip_to_slot_if_possible(hood,SLOT_HEAD,0,0,1))
suittoggled = TRUE
src.icon_state = "[initial(icon_state)]_t"
H.update_inv_wear_suit()
@@ -83,7 +83,7 @@
/obj/item/clothing/head/hooded/equipped(mob/user, slot)
..()
if(slot != slot_head)
if(slot != SLOT_HEAD)
if(suit)
suit.RemoveHood()
else
@@ -155,7 +155,7 @@
/obj/item/clothing/suit/space/hardsuit/equipped(mob/user, slot)
if(!helmettype)
return
if(slot != slot_wear_suit)
if(slot != SLOT_WEAR_SUIT)
RemoveHelmet()
..()
@@ -192,7 +192,7 @@
if(H.head)
to_chat(H, "<span class='warning'>You're already wearing something on your head!</span>")
return
else if(H.equip_to_slot_if_possible(helmet,slot_head,0,0,1))
else if(H.equip_to_slot_if_possible(helmet,SLOT_HEAD,0,0,1))
to_chat(H, "<span class='notice'>You engage the helmet on the hardsuit.</span>")
suittoggled = TRUE
H.update_inv_wear_suit()
+2 -2
View File
@@ -3,7 +3,7 @@
name = "under"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
permeability_coefficient = 0.9
slot_flags = SLOT_ICLOTHING
slot_flags = ITEM_SLOT_ICLOTHING
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women
var/has_sensor = HAS_SENSORS // For the crew computer
@@ -65,7 +65,7 @@
adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
if(attached_accessory && slot != slot_hands && ishuman(user))
if(attached_accessory && slot != SLOT_HANDS && ishuman(user))
var/mob/living/carbon/human/H = user
attached_accessory.on_uniform_equip(src, user)
if(attached_accessory.above_suit)
+1 -1
View File
@@ -9,7 +9,7 @@
var/obj/item/clothing/under/color/C = pick(subtypesof(/obj/item/clothing/under/color) - /obj/item/clothing/under/color/random - /obj/item/clothing/under/color/grey/glorf - /obj/item/clothing/under/color/black/ghost)
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.equip_to_slot_or_del(new C(H), slot_w_uniform) //or else you end up with naked assistants running around everywhere...
H.equip_to_slot_or_del(new C(H), SLOT_W_UNIFORM) //or else you end up with naked assistants running around everywhere...
else
new C(loc)
return INITIALIZE_HINT_QDEL