Merge branch 'master' into upstream-merge-37582

This commit is contained in:
LetterJay
2018-05-22 07:22:42 -05:00
committed by GitHub
302 changed files with 2217 additions and 1980 deletions
@@ -234,6 +234,7 @@
if(POLLTYPE_IRV)
if (!href_list["IRVdata"])
to_chat(src, "<span class='danger'>No ordering data found. Please try again or contact an administrator.</span>")
return
var/list/votelist = splittext(href_list["IRVdata"], ",")
if (!vote_on_irv_poll(pollid, votelist))
to_chat(src, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
+2 -2
View File
@@ -211,7 +211,7 @@
src << browse(null ,"window=playerpolllist")
src << browse(output,"window=playerpoll;size=500x250")
if(POLLTYPE_IRV)
var/datum/asset/irv_assets = get_asset_datum(/datum/asset/simple/IRV)
var/datum/asset/irv_assets = get_asset_datum(/datum/asset/group/IRV)
irv_assets.send(src)
var/datum/DBQuery/query_irv_get_votes = SSdbcore.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
@@ -267,7 +267,7 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="jquery-1.10.2.min.js"></script>
<script src="jquery.min.js"></script>
<script src="jquery-ui.custom-core-widgit-mouse-sortable-min.js"></script>
<style>
#sortable { list-style-type: none; margin: 0; padding: 2em; }
+4 -4
View File
@@ -180,7 +180,7 @@
held_items[hand_index] = I
I.layer = ABOVE_HUD_LAYER
I.plane = ABOVE_HUD_PLANE
I.equipped(src, slot_hands)
I.equipped(src, SLOT_HANDS)
if(I.pulledby)
I.pulledby.stop_pulling()
update_inv_hands()
@@ -399,7 +399,7 @@
if(M.active_storage && M.active_storage.parent && M.active_storage.parent.SendSignal(COMSIG_TRY_STORAGE_INSERT, src,M))
return TRUE
var/list/obj/item/possible = list(M.get_inactive_held_item(), M.get_item_by_slot(slot_belt), M.get_item_by_slot(slot_generic_dextrous_storage), M.get_item_by_slot(slot_back))
var/list/obj/item/possible = list(M.get_inactive_held_item(), M.get_item_by_slot(SLOT_BELT), M.get_item_by_slot(SLOT_GENERC_DEXTROUS_STORAGE), M.get_item_by_slot(SLOT_BACK))
for(var/i in possible)
if(!i)
continue
@@ -421,10 +421,10 @@
//used in code for items usable by both carbon and drones, this gives the proper back slot for each mob.(defibrillator, backpack watertank, ...)
/mob/proc/getBackSlot()
return slot_back
return SLOT_BACK
/mob/proc/getBeltSlot()
return slot_belt
return SLOT_BELT
@@ -45,13 +45,13 @@
<HR>"}
for(var/i in 1 to held_items.len)
var/obj/item/I = get_item_for_held_index(i)
dat += "<BR><B>[get_held_index_name(i)]:</B><A href='?src=[REF(src)];item=[slot_hands];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a>"
dat += "<BR><B>[get_held_index_name(i)]:</B><A href='?src=[REF(src)];item=[SLOT_HANDS];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a>"
dat += "<BR><A href='?src=[REF(src)];pouches=1'>Empty Pouches</A>"
if(handcuffed)
dat += "<BR><A href='?src=[REF(src)];item=[slot_handcuffed]'>Handcuffed</A>"
dat += "<BR><A href='?src=[REF(src)];item=[SLOT_HANDCUFFED]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=[REF(src)];item=[slot_legcuffed]'>Legcuffed</A>"
dat += "<BR><A href='?src=[REF(src)];item=[SLOT_LEGCUFFED]'>Legcuffed</A>"
dat += {"
<BR>
@@ -15,7 +15,7 @@
icon_state = "facehugger"
item_state = "facehugger"
w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4
flags_1 = MASKINTERNALS_1
clothing_flags = MASKINTERNALS
throw_range = 5
tint = 3
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
@@ -169,7 +169,7 @@
if(target.dropItemToGround(W))
target.visible_message("<span class='danger'>[src] tears [W] off of [target]'s face!</span>", \
"<span class='userdanger'>[src] tears [W] off of [target]'s face!</span>")
target.equip_to_slot_if_possible(src, slot_wear_mask, 0, 1, 1)
target.equip_to_slot_if_possible(src, SLOT_WEAR_MASK, 0, 1, 1)
return TRUE // time for a smoke
/obj/item/clothing/mask/facehugger/proc/Attach(mob/living/M)
@@ -254,7 +254,7 @@
return 1
var/mob/living/carbon/C = M
if(ishuman(C) && !(slot_wear_mask in C.dna.species.no_equip))
if(ishuman(C) && !(SLOT_WEAR_MASK in C.dna.species.no_equip))
var/mob/living/carbon/human/H = C
if(H.is_mouth_covered(head_only = 1))
return 0
+9 -9
View File
@@ -202,23 +202,23 @@
<HR>
<B><FONT size=3>[name]</FONT></B>
<HR>
<BR><B>Head:</B> <A href='?src=[REF(src)];item=[slot_head]'> [(head && !(head.flags_1&ABSTRACT_1)) ? head : "Nothing"]</A>
<BR><B>Mask:</B> <A href='?src=[REF(src)];item=[slot_wear_mask]'> [(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Nothing"]</A>
<BR><B>Neck:</B> <A href='?src=[REF(src)];item=[slot_neck]'> [(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Nothing"]</A>"}
<BR><B>Head:</B> <A href='?src=[REF(src)];item=[SLOT_HEAD]'> [(head && !(head.flags_1&ABSTRACT_1)) ? head : "Nothing"]</A>
<BR><B>Mask:</B> <A href='?src=[REF(src)];item=[SLOT_WEAR_MASK]'> [(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Nothing"]</A>
<BR><B>Neck:</B> <A href='?src=[REF(src)];item=[SLOT_NECK]'> [(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Nothing"]</A>"}
for(var/i in 1 to held_items.len)
var/obj/item/I = get_item_for_held_index(i)
dat += "<BR><B>[get_held_index_name(i)]:</B></td><td><A href='?src=[REF(src)];item=[slot_hands];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Nothing"]</a>"
dat += "<BR><B>[get_held_index_name(i)]:</B></td><td><A href='?src=[REF(src)];item=[SLOT_HANDS];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Nothing"]</a>"
dat += "<BR><B>Back:</B> <A href='?src=[REF(src)];item=[slot_back]'>[back ? back : "Nothing"]</A>"
dat += "<BR><B>Back:</B> <A href='?src=[REF(src)];item=[SLOT_BACK]'>[back ? back : "Nothing"]</A>"
if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/tank))
dat += "<BR><A href='?src=[REF(src)];internal=1'>[internal ? "Disable Internals" : "Set Internals"]</A>"
if(handcuffed)
dat += "<BR><A href='?src=[REF(src)];item=[slot_handcuffed]'>Handcuffed</A>"
dat += "<BR><A href='?src=[REF(src)];item=[SLOT_HANDCUFFED]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=[REF(src)];item=[slot_legcuffed]'>Legcuffed</A>"
dat += "<BR><A href='?src=[REF(src)];item=[SLOT_LEGCUFFED]'>Legcuffed</A>"
dat += {"
<BR>
@@ -234,7 +234,7 @@
if(href_list["internal"])
var/slot = text2num(href_list["internal"])
var/obj/item/ITEM = get_item_by_slot(slot)
if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1))
if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & MASKINTERNALS))
visible_message("<span class='danger'>[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].</span>", \
"<span class='userdanger'>[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].</span>")
if(do_mob(usr, src, POCKET_STRIP_DELAY))
@@ -242,7 +242,7 @@
internal = null
update_internals_hud_icon(0)
else if(ITEM && istype(ITEM, /obj/item/tank))
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if((wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = ITEM
update_internals_hud_icon(1)
@@ -19,7 +19,7 @@
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
//uniform
if(w_uniform && !(slot_w_uniform in obscured))
if(w_uniform && !(SLOT_W_UNIFORM in obscured))
//accessory
var/accessory_msg
if(istype(w_uniform, /obj/item/clothing/under))
@@ -48,7 +48,7 @@
GET_COMPONENT(FR, /datum/component/forensics)
//gloves
if(gloves && !(slot_gloves in obscured))
if(gloves && !(SLOT_GLOVES in obscured))
msg += "[t_He] [t_has] [gloves.get_examine_string(user)] on [t_his] hands.\n"
else if(FR && length(FR.blood_DNA))
var/hand_number = get_num_arms()
@@ -69,22 +69,22 @@
msg += "[t_He] [t_has] [belt.get_examine_string(user)] about [t_his] waist.\n"
//shoes
if(shoes && !(slot_shoes in obscured))
if(shoes && !(SLOT_SHOES in obscured))
msg += "[t_He] [t_is] wearing [shoes.get_examine_string(user)] on [t_his] feet.\n"
//mask
if(wear_mask && !(slot_wear_mask in obscured))
if(wear_mask && !(SLOT_WEAR_MASK in obscured))
msg += "[t_He] [t_has] [wear_mask.get_examine_string(user)] on [t_his] face.\n"
if (wear_neck && !(slot_neck in obscured))
if (wear_neck && !(SLOT_NECK in obscured))
msg += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck.\n"
//eyes
if(glasses && !(slot_glasses in obscured))
if(glasses && !(SLOT_GLASSES in obscured))
msg += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes.\n"
//ears
if(ears && !(slot_ears in obscured))
if(ears && !(SLOT_EARS in obscured))
msg += "[t_He] [t_has] [ears.get_examine_string(user)] on [t_his] ears.\n"
//ID
+48 -43
View File
@@ -115,80 +115,80 @@
dat += "<table>"
for(var/i in 1 to held_items.len)
var/obj/item/I = get_item_for_held_index(i)
dat += "<tr><td><B>[get_held_index_name(i)]:</B></td><td><A href='?src=[REF(src)];item=[slot_hands];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a></td></tr>"
dat += "<tr><td><B>[get_held_index_name(i)]:</B></td><td><A href='?src=[REF(src)];item=[SLOT_HANDS];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a></td></tr>"
dat += "<tr><td>&nbsp;</td></tr>"
dat += "<tr><td><B>Back:</B></td><td><A href='?src=[REF(src)];item=[slot_back]'>[(back && !(back.flags_1&ABSTRACT_1)) ? back : "<font color=grey>Empty</font>"]</A>"
dat += "<tr><td><B>Back:</B></td><td><A href='?src=[REF(src)];item=[SLOT_BACK]'>[(back && !(back.flags_1&ABSTRACT_1)) ? back : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(back, /obj/item/tank))
dat += "&nbsp;<A href='?src=[REF(src)];internal=[slot_back]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "&nbsp;<A href='?src=[REF(src)];internal=[SLOT_BACK]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr><tr><td>&nbsp;</td></tr>"
dat += "<tr><td><B>Head:</B></td><td><A href='?src=[REF(src)];item=[slot_head]'>[(head && !(head.flags_1&ABSTRACT_1)) ? head : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Head:</B></td><td><A href='?src=[REF(src)];item=[SLOT_HEAD]'>[(head && !(head.flags_1&ABSTRACT_1)) ? head : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_wear_mask in obscured)
if(SLOT_WEAR_MASK in obscured)
dat += "<tr><td><font color=grey><B>Mask:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[REF(src)];item=[slot_wear_mask]'>[(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[REF(src)];item=[SLOT_WEAR_MASK]'>[(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_neck in obscured)
if(SLOT_NECK in obscured)
dat += "<tr><td><font color=grey><B>Neck:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Neck:</B></td><td><A href='?src=[REF(src)];item=[slot_neck]'>[(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Neck:</B></td><td><A href='?src=[REF(src)];item=[SLOT_NECK]'>[(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_glasses in obscured)
if(SLOT_GLASSES in obscured)
dat += "<tr><td><font color=grey><B>Eyes:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Eyes:</B></td><td><A href='?src=[REF(src)];item=[slot_glasses]'>[(glasses && !(glasses.flags_1&ABSTRACT_1)) ? glasses : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Eyes:</B></td><td><A href='?src=[REF(src)];item=[SLOT_GLASSES]'>[(glasses && !(glasses.flags_1&ABSTRACT_1)) ? glasses : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_ears in obscured)
if(SLOT_EARS in obscured)
dat += "<tr><td><font color=grey><B>Ears:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Ears:</B></td><td><A href='?src=[REF(src)];item=[slot_ears]'>[(ears && !(ears.flags_1&ABSTRACT_1)) ? ears : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Ears:</B></td><td><A href='?src=[REF(src)];item=[SLOT_EARS]'>[(ears && !(ears.flags_1&ABSTRACT_1)) ? ears : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;</td></tr>"
dat += "<tr><td><B>Exosuit:</B></td><td><A href='?src=[REF(src)];item=[slot_wear_suit]'>[(wear_suit && !(wear_suit.flags_1&ABSTRACT_1)) ? wear_suit : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Exosuit:</B></td><td><A href='?src=[REF(src)];item=[SLOT_WEAR_SUIT]'>[(wear_suit && !(wear_suit.flags_1&ABSTRACT_1)) ? wear_suit : "<font color=grey>Empty</font>"]</A></td></tr>"
if(wear_suit)
dat += "<tr><td>&nbsp;&#8627;<B>Suit Storage:</B></td><td><A href='?src=[REF(src)];item=[slot_s_store]'>[(s_store && !(s_store.flags_1&ABSTRACT_1)) ? s_store : "<font color=grey>Empty</font>"]</A>"
dat += "<tr><td>&nbsp;&#8627;<B>Suit Storage:</B></td><td><A href='?src=[REF(src)];item=[SLOT_S_STORE]'>[(s_store && !(s_store.flags_1&ABSTRACT_1)) ? s_store : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(s_store, /obj/item/tank))
dat += "&nbsp;<A href='?src=[REF(src)];internal=[slot_s_store]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "&nbsp;<A href='?src=[REF(src)];internal=[SLOT_S_STORE]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr>"
else
dat += "<tr><td><font color=grey>&nbsp;&#8627;<B>Suit Storage:</B></font></td></tr>"
if(slot_shoes in obscured)
if(SLOT_SHOES in obscured)
dat += "<tr><td><font color=grey><B>Shoes:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Shoes:</B></td><td><A href='?src=[REF(src)];item=[slot_shoes]'>[(shoes && !(shoes.flags_1&ABSTRACT_1)) ? shoes : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Shoes:</B></td><td><A href='?src=[REF(src)];item=[SLOT_SHOES]'>[(shoes && !(shoes.flags_1&ABSTRACT_1)) ? shoes : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_gloves in obscured)
if(SLOT_GLOVES in obscured)
dat += "<tr><td><font color=grey><B>Gloves:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Gloves:</B></td><td><A href='?src=[REF(src)];item=[slot_gloves]'>[(gloves && !(gloves.flags_1&ABSTRACT_1)) ? gloves : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Gloves:</B></td><td><A href='?src=[REF(src)];item=[SLOT_GLOVES]'>[(gloves && !(gloves.flags_1&ABSTRACT_1)) ? gloves : "<font color=grey>Empty</font>"]</A></td></tr>"
if(slot_w_uniform in obscured)
if(SLOT_W_UNIFORM in obscured)
dat += "<tr><td><font color=grey><B>Uniform:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Uniform:</B></td><td><A href='?src=[REF(src)];item=[slot_w_uniform]'>[(w_uniform && !(w_uniform.flags_1&ABSTRACT_1)) ? w_uniform : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Uniform:</B></td><td><A href='?src=[REF(src)];item=[SLOT_W_UNIFORM]'>[(w_uniform && !(w_uniform.flags_1&ABSTRACT_1)) ? w_uniform : "<font color=grey>Empty</font>"]</A></td></tr>"
if((w_uniform == null && !(dna && dna.species.nojumpsuit)) || (slot_w_uniform in obscured))
if((w_uniform == null && !(dna && dna.species.nojumpsuit)) || (SLOT_W_UNIFORM in obscured))
dat += "<tr><td><font color=grey>&nbsp;&#8627;<B>Pockets:</B></font></td></tr>"
dat += "<tr><td><font color=grey>&nbsp;&#8627;<B>ID:</B></font></td></tr>"
dat += "<tr><td><font color=grey>&nbsp;&#8627;<B>Belt:</B></font></td></tr>"
else
dat += "<tr><td>&nbsp;&#8627;<B>Belt:</B></td><td><A href='?src=[REF(src)];item=[slot_belt]'>[(belt && !(belt.flags_1&ABSTRACT_1)) ? belt : "<font color=grey>Empty</font>"]</A>"
dat += "<tr><td>&nbsp;&#8627;<B>Belt:</B></td><td><A href='?src=[REF(src)];item=[SLOT_BELT]'>[(belt && !(belt.flags_1&ABSTRACT_1)) ? belt : "<font color=grey>Empty</font>"]</A>"
if(has_breathable_mask && istype(belt, /obj/item/tank))
dat += "&nbsp;<A href='?src=[REF(src)];internal=[slot_belt]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "&nbsp;<A href='?src=[REF(src)];internal=[SLOT_BELT]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>Pockets:</B></td><td><A href='?src=[REF(src)];pockets=left'>[(l_store && !(l_store.flags_1&ABSTRACT_1)) ? "Left (Full)" : "<font color=grey>Left (Empty)</font>"]</A>"
dat += "&nbsp;<A href='?src=[REF(src)];pockets=right'>[(r_store && !(r_store.flags_1&ABSTRACT_1)) ? "Right (Full)" : "<font color=grey>Right (Empty)</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>ID:</B></td><td><A href='?src=[REF(src)];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags_1&ABSTRACT_1)) ? wear_id : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>ID:</B></td><td><A href='?src=[REF(src)];item=[SLOT_WEAR_ID]'>[(wear_id && !(wear_id.flags_1&ABSTRACT_1)) ? wear_id : "<font color=grey>Empty</font>"]</A></td></tr>"
if(handcuffed)
dat += "<tr><td><B>Handcuffed:</B> <A href='?src=[REF(src)];item=[slot_handcuffed]'>Remove</A></td></tr>"
dat += "<tr><td><B>Handcuffed:</B> <A href='?src=[REF(src)];item=[SLOT_HANDCUFFED]'>Remove</A></td></tr>"
if(legcuffed)
dat += "<tr><td><A href='?src=[REF(src)];item=[slot_legcuffed]'>Legcuffed</A></td></tr>"
dat += "<tr><td><A href='?src=[REF(src)];item=[SLOT_LEGCUFFED]'>Legcuffed</A></td></tr>"
dat += {"</table>
<A href='?src=[REF(user)];mach_close=mob[REF(src)]'>Close</A>
@@ -241,8 +241,8 @@
if(href_list["pockets"])
var/pocket_side = href_list["pockets"]
var/pocket_id = (pocket_side == "right" ? slot_r_store : slot_l_store)
var/obj/item/pocket_item = (pocket_id == slot_r_store ? r_store : l_store)
var/pocket_id = (pocket_side == "right" ? SLOT_R_STORE : SLOT_L_STORE)
var/obj/item/pocket_item = (pocket_id == SLOT_R_STORE ? r_store : l_store)
var/obj/item/place_item = usr.get_active_held_item() // Item to place in the pocket, if it's empty
var/delay_denominator = 1
@@ -258,7 +258,7 @@
if(do_mob(usr, src, POCKET_STRIP_DELAY/delay_denominator)) //placing an item into the pocket is 4 times faster
if(pocket_item)
if(pocket_item == (pocket_id == slot_r_store ? r_store : l_store)) //item still in the pocket we search
if(pocket_item == (pocket_id == SLOT_R_STORE ? r_store : l_store)) //item still in the pocket we search
dropItemToGround(pocket_item)
else
if(place_item)
@@ -495,12 +495,17 @@
. = 0
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
if(above_neck(target_zone))
if(head && head.flags_1 & THICKMATERIAL_1 && !penetrate_thick)
. = 0
else
if(wear_suit && wear_suit.flags_1 & THICKMATERIAL_1 && !penetrate_thick)
. = 0
if (!penetrate_thick)
if(above_neck(target_zone))
if(head && is_type_in_typecache(head, GLOB.typecache_clothing))
var/obj/item/clothing/CH = head
if (CH.clothing_flags & THICKMATERIAL)
. = 0
else
if(wear_suit && is_type_in_typecache(wear_suit, GLOB.typecache_clothing))
var/obj/item/clothing/CS = wear_suit
if (CS.clothing_flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
to_chat(user, "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>")
@@ -510,23 +515,23 @@
if(wear_suit)
if(wear_suit.flags_inv & HIDEGLOVES)
obscured |= slot_gloves
obscured |= SLOT_GLOVES
if(wear_suit.flags_inv & HIDEJUMPSUIT)
obscured |= slot_w_uniform
obscured |= SLOT_W_UNIFORM
if(wear_suit.flags_inv & HIDESHOES)
obscured |= slot_shoes
obscured |= SLOT_SHOES
if(head)
if(head.flags_inv & HIDEMASK)
obscured |= slot_wear_mask
obscured |= SLOT_WEAR_MASK
if(head.flags_inv & HIDEEYES)
obscured |= slot_glasses
obscured |= SLOT_GLASSES
if(head.flags_inv & HIDEEARS)
obscured |= slot_ears
obscured |= SLOT_EARS
if(wear_mask)
if(wear_mask.flags_inv & HIDEEYES)
obscured |= slot_glasses
obscured |= SLOT_GLASSES
if(obscured.len)
return obscured
@@ -8,14 +8,21 @@
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube)
if(has_trait(TRAIT_NOSLIPALL))
return 0
if((isobj(shoes) && (shoes.flags_1&NOSLIP_1)) || has_trait(TRAIT_NOSLIPWATER) && !(lube&GALOSHES_DONT_HELP))
return 0
if (!(lube&GALOSHES_DONT_HELP))
if(has_trait(TRAIT_NOSLIPWATER))
return 0
if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing))
var/obj/item/clothing/CS = shoes
if (CS.clothing_flags & NOSLIP)
return 0
return ..()
/mob/living/carbon/human/experience_pressure_difference()
playsound(src, 'sound/effects/space_wind.ogg', 50, 1)
if(shoes && shoes.flags_1&NOSLIP_1)
return 0
if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing))
var/obj/item/clothing/S = shoes
if (S.clothing_flags & NOSLIP)
return 0
return ..()
/mob/living/carbon/human/mob_has_gravity()
@@ -4,39 +4,39 @@
// Return the item currently in the slot ID
/mob/living/carbon/human/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_back)
if(SLOT_BACK)
return back
if(slot_wear_mask)
if(SLOT_WEAR_MASK)
return wear_mask
if(slot_neck)
if(SLOT_NECK)
return wear_neck
if(slot_handcuffed)
if(SLOT_HANDCUFFED)
return handcuffed
if(slot_legcuffed)
if(SLOT_LEGCUFFED)
return legcuffed
if(slot_belt)
if(SLOT_BELT)
return belt
if(slot_wear_id)
if(SLOT_WEAR_ID)
return wear_id
if(slot_ears)
if(SLOT_EARS)
return ears
if(slot_glasses)
if(SLOT_GLASSES)
return glasses
if(slot_gloves)
if(SLOT_GLOVES)
return gloves
if(slot_head)
if(SLOT_HEAD)
return head
if(slot_shoes)
if(SLOT_SHOES)
return shoes
if(slot_wear_suit)
if(SLOT_WEAR_SUIT)
return wear_suit
if(slot_w_uniform)
if(SLOT_W_UNIFORM)
return w_uniform
if(slot_l_store)
if(SLOT_L_STORE)
return l_store
if(slot_r_store)
if(SLOT_R_STORE)
return r_store
if(slot_s_store)
if(SLOT_S_STORE)
return s_store
return null
@@ -84,17 +84,17 @@
var/not_handled = FALSE //Added in case we make this type path deeper one day
switch(slot)
if(slot_belt)
if(SLOT_BELT)
belt = I
update_inv_belt()
if(slot_wear_id)
if(SLOT_WEAR_ID)
wear_id = I
sec_hud_set_ID()
update_inv_wear_id()
if(slot_ears)
if(SLOT_EARS)
ears = I
update_inv_ears()
if(slot_glasses)
if(SLOT_GLASSES)
glasses = I
var/obj/item/clothing/glasses/G = I
if(G.glass_colour_type)
@@ -107,13 +107,13 @@
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
update_sight()
update_inv_glasses()
if(slot_gloves)
if(SLOT_GLOVES)
gloves = I
update_inv_gloves()
if(slot_shoes)
if(SLOT_SHOES)
shoes = I
update_inv_shoes()
if(slot_wear_suit)
if(SLOT_WEAR_SUIT)
wear_suit = I
if(I.flags_inv & HIDEJUMPSUIT)
update_inv_w_uniform()
@@ -121,17 +121,17 @@
stop_pulling() //can't pull if restrained
update_action_buttons_icon() //certain action buttons will no longer be usable.
update_inv_wear_suit()
if(slot_w_uniform)
if(SLOT_W_UNIFORM)
w_uniform = I
update_suit_sensors()
update_inv_w_uniform()
if(slot_l_store)
if(SLOT_L_STORE)
l_store = I
update_inv_pockets()
if(slot_r_store)
if(SLOT_R_STORE)
r_store = I
update_inv_pockets()
if(slot_s_store)
if(SLOT_S_STORE)
s_store = I
update_inv_s_store()
else
+13 -10
View File
@@ -44,14 +44,16 @@
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1)))
return ONE_ATMOSPHERE
if(istype(loc, /obj/belly))
if(istype(loc, /obj/belly)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn
return ONE_ATMOSPHERE
if(istype(loc, /obj/item/dogborg/sleeper))
return ONE_ATMOSPHERE
else
return pressure
return ONE_ATMOSPHERE //END OF CIT CHANGES
if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(head, GLOB.typecache_clothing))
var/obj/item/clothing/CS = wear_suit
var/obj/item/clothing/CH = head
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
return ONE_ATMOSPHERE
return pressure
/mob/living/carbon/human/handle_traits()
@@ -286,13 +288,14 @@
/mob/living/carbon/human/has_smoke_protection()
if(wear_mask)
if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
return TRUE
if(glasses)
if(glasses.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
if(glasses.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
return TRUE
if(head)
if(head.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
if(head && is_type_in_typecache(head, GLOB.typecache_clothing))
var/obj/item/clothing/CH = head
if(CH.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
return TRUE
return ..()
+35 -35
View File
@@ -864,48 +864,48 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/num_legs = H.get_num_legs()
switch(slot)
if(slot_hands)
if(SLOT_HANDS)
if(H.get_empty_held_indexes())
return TRUE
return FALSE
if(slot_wear_mask)
if(SLOT_WEAR_MASK)
if(H.wear_mask)
return FALSE
if(!(I.slot_flags & SLOT_MASK))
if(!(I.slot_flags & ITEM_SLOT_MASK))
return FALSE
if(!H.get_bodypart(BODY_ZONE_HEAD))
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_neck)
if(SLOT_NECK)
if(H.wear_neck)
return FALSE
if( !(I.slot_flags & SLOT_NECK) )
if( !(I.slot_flags & ITEM_SLOT_NECK) )
return FALSE
return TRUE
if(slot_back)
if(SLOT_BACK)
if(H.back)
return FALSE
if( !(I.slot_flags & SLOT_BACK) )
if( !(I.slot_flags & ITEM_SLOT_BACK) )
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_wear_suit)
if(SLOT_WEAR_SUIT)
if(H.wear_suit)
return FALSE
if( !(I.slot_flags & SLOT_OCLOTHING) )
if( !(I.slot_flags & ITEM_SLOT_OCLOTHING) )
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_gloves)
if(SLOT_GLOVES)
if(H.gloves)
return FALSE
if( !(I.slot_flags & SLOT_GLOVES) )
if( !(I.slot_flags & ITEM_SLOT_GLOVES) )
return FALSE
if(num_arms < 2)
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_shoes)
if(SLOT_SHOES)
if(H.shoes)
return FALSE
if( !(I.slot_flags & SLOT_FEET) )
if( !(I.slot_flags & ITEM_SLOT_FEET) )
return FALSE
if(num_legs < 2)
return FALSE
@@ -914,7 +914,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
to_chat(H, "<span class='warning'>The footwear around here isn't compatible with your feet!</span>")
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_belt)
if(SLOT_BELT)
if(H.belt)
return FALSE
@@ -924,40 +924,40 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return FALSE
if(!(I.slot_flags & SLOT_BELT))
if(!(I.slot_flags & ITEM_SLOT_BELT))
return
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_glasses)
if(SLOT_GLASSES)
if(H.glasses)
return FALSE
if(!(I.slot_flags & SLOT_EYES))
if(!(I.slot_flags & ITEM_SLOT_EYES))
return FALSE
if(!H.get_bodypart(BODY_ZONE_HEAD))
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_head)
if(SLOT_HEAD)
if(H.head)
return FALSE
if(!(I.slot_flags & SLOT_HEAD))
if(!(I.slot_flags & ITEM_SLOT_HEAD))
return FALSE
if(!H.get_bodypart(BODY_ZONE_HEAD))
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_ears)
if(SLOT_EARS)
if(H.ears)
return FALSE
if(!(I.slot_flags & SLOT_EARS))
if(!(I.slot_flags & ITEM_SLOT_EARS))
return FALSE
if(!H.get_bodypart(BODY_ZONE_HEAD))
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_w_uniform)
if(SLOT_W_UNIFORM)
if(H.w_uniform)
return FALSE
if( !(I.slot_flags & SLOT_ICLOTHING) )
if( !(I.slot_flags & ITEM_SLOT_ICLOTHING) )
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_wear_id)
if(SLOT_WEAR_ID)
if(H.wear_id)
return FALSE
@@ -966,10 +966,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return FALSE
if( !(I.slot_flags & SLOT_ID) )
if( !(I.slot_flags & ITEM_SLOT_ID) )
return FALSE
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(slot_l_store)
if(SLOT_L_STORE)
if(I.flags_1 & NODROP_1) //Pockets aren't visible, so you can't move NODROP_1 items into them.
return FALSE
if(H.l_store)
@@ -981,11 +981,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return FALSE
if(I.slot_flags & SLOT_DENYPOCKET)
if(I.slot_flags & ITEM_SLOT_DENYPOCKET)
return FALSE
if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) )
if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & ITEM_SLOT_POCKET) )
return TRUE
if(slot_r_store)
if(SLOT_R_STORE)
if(I.flags_1 & NODROP_1)
return FALSE
if(H.r_store)
@@ -997,12 +997,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return FALSE
if(I.slot_flags & SLOT_DENYPOCKET)
if(I.slot_flags & ITEM_SLOT_DENYPOCKET)
return FALSE
if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) )
if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & ITEM_SLOT_POCKET) )
return TRUE
return FALSE
if(slot_s_store)
if(SLOT_S_STORE)
if(I.flags_1 & NODROP_1)
return FALSE
if(H.s_store)
@@ -1022,7 +1022,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if( istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed) )
return TRUE
return FALSE
if(slot_handcuffed)
if(SLOT_HANDCUFFED)
if(H.handcuffed)
return FALSE
if(!istype(I, /obj/item/restraints/handcuffs))
@@ -1030,7 +1030,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(num_arms < 2)
return FALSE
return TRUE
if(slot_legcuffed)
if(SLOT_LEGCUFFED)
if(H.legcuffed)
return FALSE
if(!istype(I, /obj/item/restraints/legcuffs))
@@ -1038,7 +1038,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(num_legs < 2)
return FALSE
return TRUE
if(slot_in_backpack)
if(SLOT_IN_BACKPACK)
if(H.back)
if(H.back.SendSignal(COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE))
return TRUE
@@ -6,7 +6,7 @@
mutant_bodyparts = list("wings")
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "Angel")
use_skintones = 1
no_equip = list(slot_back)
no_equip = list(SLOT_BACK)
blacklisted = 1
limbs_id = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
@@ -12,7 +12,7 @@
punchdamagelow = 5
punchdamagehigh = 14
punchstunthreshold = 11 //about 40% chance to stun
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store)
no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE)
nojumpsuit = 1
sexes = 1
damage_overlay_type = ""
@@ -17,7 +17,7 @@
punchdamagehigh = 14
punchstunthreshold = 14 //about 44% chance to stun
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform)
no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM)
burnmod = 1.25
heatmod = 1.5
@@ -24,7 +24,12 @@
/datum/species/plasmaman/spec_life(mob/living/carbon/human/H)
var/datum/gas_mixture/environment = H.loc.return_air()
var/atmos_sealed = (H.wear_suit && (H.wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (H.head && (H.head.flags_1 & STOPSPRESSUREDMAGE_1))
var/atmos_sealed = FALSE
if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.head, GLOB.typecache_clothing))
var/obj/item/clothing/CS = H.wear_suit
var/obj/item/clothing/CH = H.head
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
atmos_sealed = TRUE
if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed)
if(environment)
if(environment.total_moles())
@@ -37,7 +37,7 @@
limbs_id = "shadow"
burnmod = 1.5
blacklisted = TRUE
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store)
no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE)
species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES)
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_NOBREATH,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER)
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
@@ -101,7 +101,7 @@ There are several things that need to be remembered:
remove_overlay(UNIFORM_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_w_uniform]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM]
inv.update_icon()
if(istype(w_uniform, /obj/item/clothing/under))
@@ -148,7 +148,7 @@ There are several things that need to be remembered:
remove_overlay(ID_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_id]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_ID]
inv.update_icon()
var/mutable_appearance/id_overlay = overlays_standing[ID_LAYER]
@@ -171,8 +171,8 @@ There are several things that need to be remembered:
/mob/living/carbon/human/update_inv_gloves()
remove_overlay(GLOVES_LAYER)
if(client && hud_used && hud_used.inv_slots[slot_gloves])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_gloves]
if(client && hud_used && hud_used.inv_slots[SLOT_GLOVES])
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLOVES]
inv.update_icon()
if(!gloves && bloody_hands)
@@ -211,7 +211,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLASSES]
inv.update_icon()
if(glasses)
@@ -238,7 +238,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_ears]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_EARS]
inv.update_icon()
if(ears)
@@ -264,7 +264,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_shoes]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES]
inv.update_icon()
if(shoes)
@@ -286,7 +286,7 @@ There are several things that need to be remembered:
remove_overlay(SUIT_STORE_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_s_store]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_S_STORE]
inv.update_icon()
if(s_store)
@@ -322,7 +322,7 @@ There are several things that need to be remembered:
remove_overlay(BELT_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_belt]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BELT]
inv.update_icon()
if(belt)
@@ -349,7 +349,7 @@ There are several things that need to be remembered:
remove_overlay(SUIT_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit]
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_SUIT]
inv.update_icon()
if(istype(wear_suit, /obj/item/clothing/suit))
@@ -375,10 +375,10 @@ There are several things that need to be remembered:
if(client && hud_used)
var/obj/screen/inventory/inv
inv = hud_used.inv_slots[slot_l_store]
inv = hud_used.inv_slots[SLOT_L_STORE]
inv.update_icon()
inv = hud_used.inv_slots[slot_r_store]
inv = hud_used.inv_slots[SLOT_R_STORE]
inv.update_icon()
if(l_store)
+14 -14
View File
@@ -1,16 +1,16 @@
/mob/living/carbon/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_back)
if(SLOT_BACK)
return back
if(slot_wear_mask)
if(SLOT_WEAR_MASK)
return wear_mask
if(slot_neck)
if(SLOT_NECK)
return wear_neck
if(slot_head)
if(SLOT_HEAD)
return head
if(slot_handcuffed)
if(SLOT_HANDCUFFED)
return handcuffed
if(slot_legcuffed)
if(SLOT_LEGCUFFED)
return legcuffed
return null
@@ -50,28 +50,28 @@
I.appearance_flags |= NO_CLIENT_COLOR
var/not_handled = FALSE
switch(slot)
if(slot_back)
if(SLOT_BACK)
back = I
update_inv_back()
if(slot_wear_mask)
if(SLOT_WEAR_MASK)
wear_mask = I
wear_mask_update(I, toggle_off = 0)
if(slot_head)
if(SLOT_HEAD)
head = I
head_update(I)
if(slot_neck)
if(SLOT_NECK)
wear_neck = I
update_inv_neck(I)
if(slot_handcuffed)
if(SLOT_HANDCUFFED)
handcuffed = I
update_handcuffed()
if(slot_legcuffed)
if(SLOT_LEGCUFFED)
legcuffed = I
update_inv_legcuffed()
if(slot_hands)
if(SLOT_HANDS)
put_in_hands(I)
update_inv_hands()
if(slot_in_backpack)
if(SLOT_IN_BACKPACK)
if(!back.SendSignal(COMSIG_TRY_STORAGE_INSERT, I, src, TRUE))
not_handled = TRUE
else
+1 -1
View File
@@ -237,7 +237,7 @@
if(internal.loc != src)
internal = null
update_internals_hud_icon(0)
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = null
update_internals_hud_icon(0)
else
@@ -1,34 +1,31 @@
/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0)
switch(slot)
if(slot_hands)
if(SLOT_HANDS)
if(get_empty_held_indexes())
return TRUE
return FALSE
if(slot_wear_mask)
if(SLOT_WEAR_MASK)
if(wear_mask)
return FALSE
if( !(I.slot_flags & SLOT_MASK) )
if( !(I.slot_flags & ITEM_SLOT_MASK) )
return FALSE
return TRUE
if(slot_neck)
if(SLOT_NECK)
if(wear_neck)
return FALSE
if( !(I.slot_flags & SLOT_NECK) )
if( !(I.slot_flags & ITEM_SLOT_NECK) )
return FALSE
return TRUE
if(slot_head)
if(SLOT_HEAD)
if(head)
return FALSE
if( !(I.slot_flags & SLOT_HEAD) )
if( !(I.slot_flags & ITEM_SLOT_HEAD) )
return FALSE
return TRUE
if(slot_back)
if(SLOT_BACK)
if(back)
return FALSE
if( !(I.slot_flags & SLOT_BACK) )
if( !(I.slot_flags & ITEM_SLOT_BACK) )
return FALSE
return TRUE
return FALSE //Unsupported slot
@@ -19,7 +19,7 @@
if(!client)
if(stat == CONSCIOUS)
if(on_fire || buckled || restrained() || (resting && canmove))
if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting
if(!resisting && prob(MONKEY_RESIST_PROB))
resisting = TRUE
walk_to(src,0)
@@ -146,7 +146,7 @@
/mob/living/carbon/monkey/has_smoke_protection()
if(wear_mask)
if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
return 1
/mob/living/carbon/monkey/handle_fire()
@@ -183,4 +183,4 @@
#undef COLD_DAMAGE_LEVEL_1
#undef COLD_DAMAGE_LEVEL_2
#undef COLD_DAMAGE_LEVEL_3
#undef COLD_DAMAGE_LEVEL_3
@@ -168,5 +168,5 @@
. = ..()
if(prob(10))
var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src)
equip_to_slot_or_del(helmet,slot_head)
equip_to_slot_or_del(helmet,SLOT_HEAD)
helmet.attack_self(src) // todo encapsulate toggle
@@ -27,9 +27,9 @@
//bodyparts are actually created before we try to equip things to
//those slots
if(relic_hat)
equip_to_slot_or_del(new relic_hat, slot_head)
equip_to_slot_or_del(new relic_hat, SLOT_HEAD)
if(relic_mask)
equip_to_slot_or_del(new relic_mask, slot_wear_mask)
equip_to_slot_or_del(new relic_mask, SLOT_WEAR_MASK)
/mob/living/carbon/monkey/punpun/Life()
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
@@ -118,8 +118,8 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[slot_wear_mask])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_mask]
if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK])
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon()
if(wear_mask)
@@ -132,8 +132,8 @@
/mob/living/carbon/update_inv_neck()
remove_overlay(NECK_LAYER)
if(client && hud_used && hud_used.inv_slots[slot_neck])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_neck]
if(client && hud_used && hud_used.inv_slots[SLOT_NECK])
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK]
inv.update_icon()
if(wear_neck)
@@ -146,8 +146,8 @@
/mob/living/carbon/update_inv_back()
remove_overlay(BACK_LAYER)
if(client && hud_used && hud_used.inv_slots[slot_back])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_back]
if(client && hud_used && hud_used.inv_slots[SLOT_BACK])
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK]
inv.update_icon()
if(back)
@@ -162,8 +162,8 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[slot_back])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_head]
if(client && hud_used && hud_used.inv_slots[SLOT_BACK])
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon()
if(head)
@@ -85,7 +85,7 @@
else
to_chat(src, "<span class='warning'>You need to disable a module first!</span>")
if(.)
O.equipped(src, slot_hands)
O.equipped(src, SLOT_HANDS)
O.mouse_opacity = initial(O.mouse_opacity)
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
@@ -357,8 +357,11 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
if((H.head && (H.head.flags_1 & THICKMATERIAL_1)) && (H.wear_suit && (H.wear_suit.flags_1 & THICKMATERIAL_1)))
return FALSE // Skip over them if they have no exposed flesh.
if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing))
var/obj/item/clothing/CS = H.wear_suit
var/obj/item/clothing/CH = H.head
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
return FALSE // Skip over them if they have no exposed flesh.
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
declare(C)
@@ -89,10 +89,10 @@
if(default_storage)
var/obj/item/I = new default_storage(src)
equip_to_slot_or_del(I, slot_generic_dextrous_storage)
equip_to_slot_or_del(I, SLOT_GENERC_DEXTROUS_STORAGE)
if(default_hatmask)
var/obj/item/I = new default_hatmask(src)
equip_to_slot_or_del(I, slot_head)
equip_to_slot_or_del(I, SLOT_HEAD)
access_card.flags_1 |= NODROP_1
@@ -59,7 +59,7 @@
if(!D.default_hatmask && seasonal_hats && possible_seasonal_hats.len)
var/hat_type = pick(possible_seasonal_hats)
var/obj/item/new_hat = new hat_type(D)
D.equip_to_slot_or_del(new_hat, slot_head)
D.equip_to_slot_or_del(new_hat, SLOT_HEAD)
D.admin_spawned = admin_spawned
D.key = user.key
qdel(src)
@@ -21,13 +21,13 @@
/mob/living/simple_animal/drone/can_equip(obj/item/I, slot)
switch(slot)
if(slot_head)
if(SLOT_HEAD)
if(head)
return 0
if(!((I.slot_flags & SLOT_HEAD) || (I.slot_flags & SLOT_MASK)))
if(!((I.slot_flags & ITEM_SLOT_HEAD) || (I.slot_flags & ITEM_SLOT_MASK)))
return 0
return 1
if(slot_generic_dextrous_storage)
if(SLOT_GENERC_DEXTROUS_STORAGE)
if(internal_storage)
return 0
return 1
@@ -36,9 +36,9 @@
/mob/living/simple_animal/drone/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_head)
if(SLOT_HEAD)
return head
if(slot_generic_dextrous_storage)
if(SLOT_GENERC_DEXTROUS_STORAGE)
return internal_storage
return ..()
@@ -63,10 +63,10 @@
I.plane = ABOVE_HUD_PLANE
switch(slot)
if(slot_head)
if(SLOT_HEAD)
head = I
update_inv_head()
if(slot_generic_dextrous_storage)
if(SLOT_GENERC_DEXTROUS_STORAGE)
internal_storage = I
update_inv_internal_storage()
else
@@ -77,7 +77,7 @@
I.equipped(src, slot)
/mob/living/simple_animal/drone/getBackSlot()
return slot_generic_dextrous_storage
return SLOT_GENERC_DEXTROUS_STORAGE
/mob/living/simple_animal/drone/getBeltSlot()
return slot_generic_dextrous_storage
return SLOT_GENERC_DEXTROUS_STORAGE
@@ -54,7 +54,7 @@
/mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot)
switch(slot)
if(slot_generic_dextrous_storage)
if(SLOT_GENERC_DEXTROUS_STORAGE)
if(internal_storage)
return 0
return 1
@@ -65,17 +65,17 @@
return
switch(slot)
if(slot_generic_dextrous_storage)
if(SLOT_GENERC_DEXTROUS_STORAGE)
internal_storage = I
update_inv_internal_storage()
else
to_chat(src, "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>")
/mob/living/simple_animal/hostile/guardian/dextrous/getBackSlot()
return slot_generic_dextrous_storage
return SLOT_GENERC_DEXTROUS_STORAGE
/mob/living/simple_animal/hostile/guardian/dextrous/getBeltSlot()
return slot_generic_dextrous_storage
return SLOT_GENERC_DEXTROUS_STORAGE
/mob/living/simple_animal/hostile/guardian/dextrous/proc/update_inv_internal_storage()
if(internal_storage && client && hud_used && hud_used.hud_shown)
@@ -153,7 +153,7 @@ Difficulty: Medium
icon_state = "staffofstorms"
item_state = "staffofstorms"
icon = 'icons/obj/guns/magic.dmi'
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
force = 25
damtype = BURN
+8 -8
View File
@@ -237,14 +237,14 @@
if(!slot_priority)
slot_priority = list( \
slot_back, slot_wear_id,\
slot_w_uniform, slot_wear_suit,\
slot_wear_mask, slot_head, slot_neck,\
slot_shoes, slot_gloves,\
slot_ears, slot_glasses,\
slot_belt, slot_s_store,\
slot_l_store, slot_r_store,\
slot_generic_dextrous_storage\
SLOT_BACK, SLOT_WEAR_ID,\
SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\
SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\
SLOT_SHOES, SLOT_GLOVES,\
SLOT_EARS, SLOT_GLASSES,\
SLOT_BELT, SLOT_S_STORE,\
SLOT_L_STORE, SLOT_R_STORE,\
SLOT_GENERC_DEXTROUS_STORAGE\
)
for(var/slot in slot_priority)