mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Contained Sprites v2 (#758)
Overhauls the contained sprites system to be feature complete in terms of what it can do and offers. Now almost all cases of clothing and other items may use the system properly.
This commit is contained in:
@@ -43,10 +43,13 @@
|
||||
var/zoomdevicename = null //name used for message when binoculars/scope is used
|
||||
var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars.
|
||||
var/contained_sprite = 0 //1 if item_state, lefthand, righthand, and worn sprite are all in one dmi
|
||||
|
||||
var/item_state = null // Used to specify the item state for the on-mob overlays.
|
||||
|
||||
//Item_state definition moved to /obj
|
||||
//var/item_state = null // Used to specify the item state for the on-mob overlays.
|
||||
var/item_state_slots = null //overrides the default item_state for particular slots.
|
||||
|
||||
|
||||
//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
// Used to specify the icon file to be used when the item is worn. If not set the default icon for that slot will be used.
|
||||
// If icon_override or sprite_sheets are set they will take precendence over this, assuming they apply to the slot in question.
|
||||
// Only slot_l_hand/slot_r_hand are implemented at the moment. Others to be implemented as needed.
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
user << "The [O] is empty."
|
||||
else if(O.reagents.total_volume >= 1)
|
||||
if(O.reagents.has_reagent("pacid", 1))
|
||||
user << "The acid chews through the balloon!"
|
||||
user << "The acid chews through the balloon!"
|
||||
O.reagents.splash(user, reagents.total_volume)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
else
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
user << "\blue You fill the balloon with the contents of [O]."
|
||||
@@ -142,7 +142,7 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
item_state = "revolver"
|
||||
item_icons = list(
|
||||
item_icons = list(//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
|
||||
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
@@ -224,7 +224,7 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow"
|
||||
item_icons = list(
|
||||
item_icons = list(//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
|
||||
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
feedback_add_details("handcuffs","H")
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
|
||||
|
||||
target.drop_r_hand()
|
||||
target.drop_l_hand()
|
||||
// Apply cuffs.
|
||||
var/obj/item/weapon/handcuffs/cuffs = src
|
||||
if(dispenser)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/obj/item/weapon/storage/backpack
|
||||
name = "backpack"
|
||||
desc = "You wear this on your back and put items into it."
|
||||
item_icons = list(
|
||||
item_icons = list(//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_backpacks.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_backpacks.dmi',
|
||||
)
|
||||
|
||||
@@ -126,15 +126,24 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Welding Tool
|
||||
*/
|
||||
/obj/item/weapon/weldingtool
|
||||
name = "welding tool"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
desc = "A welding tool with a built-in fuel tank, designed for welding and cutting metal."
|
||||
icon = 'icons/obj/tools/welding.dmi'
|
||||
icon_state = "welder"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/base_iconstate = "welder"//These are given an _on/_off suffix before being used
|
||||
var/base_itemstate = "welder"
|
||||
contained_sprite = 1
|
||||
|
||||
//Amount of OUCH when it's thrown
|
||||
force = 3.0
|
||||
@@ -154,14 +163,69 @@
|
||||
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A welding tool with an extended-capacity built-in fuel tank, standard issue for engineers."
|
||||
max_fuel = 40
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "glass" = 60)
|
||||
origin_tech = "engineering=2"
|
||||
base_iconstate = "ind_welder"
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/hugetank
|
||||
name = "advanced welding tool"
|
||||
desc = "A rare and powerful welding tool with a super-extended fuel tank."
|
||||
max_fuel = 80
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200, "glass" = 120)
|
||||
origin_tech = "engineering=3"
|
||||
base_iconstate = "adv_welder"
|
||||
|
||||
|
||||
//The Experimental Welding Tool!
|
||||
/obj/item/weapon/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "A scientifically-enhanced welding tool that uses fuel-producing microbes to gradually replenish its fuel supply"
|
||||
max_fuel = 40
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "glass" = 120)
|
||||
origin_tech = "engineering=4;biotech=4"
|
||||
base_iconstate = "exp_welder"
|
||||
base_itemstate = "exp_welder"
|
||||
|
||||
var/last_gen = 0
|
||||
var/fuelgen_delay = 800//The time, in deciseconds, required to regenerate one unit of fuel
|
||||
//800 = 1 unit per 1 minute and 20 seconds,
|
||||
//This is roughly half the rate that fuel is lost if the welder is left idle, so it you carelessly leave it on it will still run out
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Welding tool functionality here
|
||||
/obj/item/weapon/weldingtool/New()
|
||||
// var/random_fuel = min(rand(10,20),max_fuel)
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("fuel", max_fuel)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldingtool/update_icon()
|
||||
..()
|
||||
var/add = welding ? "_on" : "_off"
|
||||
icon_state = base_iconstate + add //These are given an _on/_off suffix before being used
|
||||
item_state = base_itemstate + add
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/weldingtool/Destroy()
|
||||
if(welding)
|
||||
processing_objects -= src
|
||||
@@ -228,6 +292,33 @@
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
if(hasorgans(M))
|
||||
|
||||
var/obj/item/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
|
||||
|
||||
if (!S) return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
|
||||
return ..()
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
if(M == user)
|
||||
user << "\red You can't repair damage to your own body - it's against OH&S."
|
||||
return
|
||||
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
|
||||
return
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
@@ -298,13 +389,7 @@
|
||||
/obj/item/weapon/weldingtool/proc/isOn()
|
||||
return src.welding
|
||||
|
||||
/obj/item/weapon/weldingtool/update_icon()
|
||||
..()
|
||||
icon_state = welding ? "welder1" : "welder"
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
|
||||
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
|
||||
//so that the welding tool updates accordingly
|
||||
@@ -396,34 +481,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
max_fuel = 40
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60)
|
||||
origin_tech = "engineering=2"
|
||||
|
||||
/obj/item/weapon/weldingtool/hugetank
|
||||
name = "upgraded welding tool"
|
||||
max_fuel = 80
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
|
||||
origin_tech = "engineering=3"
|
||||
|
||||
|
||||
|
||||
|
||||
//The Experimental Welding Tool!
|
||||
/obj/item/weapon/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "A scientifically-enhanced welding tool that uses fuel-producing microbes to gradually replenish its fuel supply"
|
||||
max_fuel = 40
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
|
||||
origin_tech = "engineering=4;biotech=4"
|
||||
var/last_gen = 0
|
||||
var/fuelgen_delay = 800//The time, in deciseconds, required to regenerate one unit of fuel
|
||||
//800 = 1 unit per 1 minute and 20 seconds,
|
||||
//This is roughly half the rate that fuel is lost if the welder is left idle, so it you carelessly leave it on it will still run out
|
||||
|
||||
/obj/item/weapon/weldingtool/Destroy()
|
||||
processing_objects.Remove(src)//Stop processing when destroyed regardless of conditions
|
||||
@@ -486,32 +544,7 @@
|
||||
icon_state = "red_crowbar"
|
||||
item_state = "crowbar_red"
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
if(hasorgans(M))
|
||||
|
||||
var/obj/item/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
|
||||
|
||||
if (!S) return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
|
||||
return ..()
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
if(M == user)
|
||||
user << "\red You can't repair damage to your own body - it's against OH&S."
|
||||
return
|
||||
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
|
||||
return
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*/obj/item/weapon/combitool
|
||||
name = "combi-tool"
|
||||
|
||||
@@ -18,6 +18,13 @@
|
||||
|
||||
var/being_shocked = 0
|
||||
|
||||
var/item_state // Base name of the image used for when the item is worn. Suffixes are added to this.
|
||||
var/icon_species_tag = ""//If set, this holds the 3-letter shortname of a species, used for species-specific worn icons
|
||||
var/icon_auto_adapt = 0//If 1, this item will automatically change its species tag to match the wearer's species.
|
||||
//requires that the wearer's species is listed in icon_supported_species_tags
|
||||
var/list/icon_supported_species_tags //Used with icon_auto_adapt, a list of species which have differing appearances for this item
|
||||
var/icon_species_in_hand = 0//If 1, we will use the species tag even for rendering this item in the left/right hand.
|
||||
|
||||
/obj/Destroy()
|
||||
processing_objects -= src
|
||||
nanomanager.close_uis(src)
|
||||
@@ -167,3 +174,13 @@
|
||||
if(src)
|
||||
step(src, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
|
||||
/obj/proc/auto_adapt_species(var/mob/living/carbon/human/wearer)
|
||||
if(icon_auto_adapt)
|
||||
icon_species_tag = ""
|
||||
if (loc == wearer && icon_supported_species_tags.len)
|
||||
if (wearer.species.short_name in icon_supported_species_tags)
|
||||
icon_species_tag = wearer.species.short_name
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -185,6 +185,15 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
|
||||
|
||||
/obj/item/clothing/suit/straight_jacket/equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_wear_suit)
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.drop_r_hand()
|
||||
H.drop_l_hand()
|
||||
H.drop_from_inventory(H.handcuffed)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/ianshirt
|
||||
name = "worn shirt"
|
||||
desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in."
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
mob_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else if(contained_sprite)
|
||||
tmp_icon_state = "[tmp_icon_state]_w"
|
||||
tmp_icon_state = "[src.item_state][WORN_UNDER]"
|
||||
mob_overlay = image("icon" = icon, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
mob_overlay = image("icon" = INV_ACCESSORIES_DEF_ICON, "icon_state" = "[tmp_icon_state]")
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
desc = "An old orange-ish-yellow bandana. It has a few stains from engine grease, and the color has been dulled."
|
||||
icon = 'icons/obj/custom_items/motaki_bandana.dmi'
|
||||
icon_state = "motaki_bandana"
|
||||
item_state = "motaki_bandana"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
@@ -40,6 +41,7 @@
|
||||
desc = "A well tailored unathi styled armored jacket, fitted for one too."
|
||||
icon = 'icons/obj/custom_items/zubari_jacket.dmi'
|
||||
icon_state = "zubari_jacket"
|
||||
item_state = "zubari_jacket"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
@@ -48,6 +50,7 @@
|
||||
desc = "A withered mantle sewn from threshbeast's hides, the pauldrons that holds it on the shoulders seems to be the remains of some kind of old armor."
|
||||
icon = 'icons/obj/custom_items/yinzr_mantle.dmi'
|
||||
icon_state = "yinzr_mantle" //special thanks to Araskael
|
||||
item_state = "yinzr_mantle"
|
||||
species_restricted = list("Unathi") //forged for lizardmen
|
||||
contained_sprite = 1
|
||||
|
||||
@@ -57,6 +60,7 @@
|
||||
desc = "A stylish pair of glasses. They look custom made."
|
||||
icon = 'icons/obj/custom_items/nebula_glasses.dmi'
|
||||
icon_state = "nebula_glasses"
|
||||
item_state = "nebula_glasses"
|
||||
contained_sprite = 1
|
||||
|
||||
/obj/item/clothing/glasses/fluff/nebula_glasses/var/chip
|
||||
@@ -72,10 +76,10 @@
|
||||
|
||||
/obj/item/clothing/glasses/fluff/nebula_glasses/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/disk/fluff/nebula_chip) && !chip)
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
//user.u_equip(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.forceMove(src)
|
||||
chip = W
|
||||
W.dropped(user)
|
||||
W.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
user << "You slot the [W] back into its place in the frames of the [src]."
|
||||
@@ -105,13 +109,14 @@
|
||||
slot_flags = SLOT_MASK
|
||||
|
||||
|
||||
/obj/item/clothing/ears/skrell/fluff/doompesh_cloth // Skrell Purple Head Cloth - Shkor-Dyet Dom'Pesh - mofo1995 - DONE
|
||||
/obj/item/clothing/ears/skrell/fluff/dompesh_cloth // Skrell Purple Head Cloth - Shkor-Dyet Dom'Pesh - mofo1995 - DONE
|
||||
name = "male skrell purple head cloth"
|
||||
desc = "A purple cloth band worn by male skrell around their head tails."
|
||||
icon = 'icons/obj/custom_items/doompesh_cloth.dmi'
|
||||
icon = 'icons/obj/custom_items/dompesh_cloth.dmi'
|
||||
icon_state = "dompesh_cloth"
|
||||
item_state = "dompesh_cloth"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
|
||||
/obj/item/weapons/fluff/kiara_altar // Pocket Altar - Kiara Branwen - nursiekitty - DONE
|
||||
name = "pocket altar"
|
||||
@@ -135,6 +140,7 @@
|
||||
desc = "A worn mid 20th century brown hat. It seems to have aged very well."
|
||||
icon = 'icons/obj/custom_items/bell_hat.dmi'
|
||||
icon_state = "bell_hat"
|
||||
item_state = "bell_hat"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
@@ -143,6 +149,7 @@
|
||||
desc = "A worn mid 20th century brown trenchcoat. If you look closely at the breast, you can see an ID flap stitched into the leather - 'Avery Bell, Silhouette Co.'."
|
||||
icon = 'icons/obj/custom_items/bell_coat.dmi'
|
||||
icon_state = "bell_coat"
|
||||
item_state = "bell_coat"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
@@ -171,7 +178,7 @@
|
||||
allowed_types = list("ripley","firefighter")
|
||||
|
||||
|
||||
/obj/item/weapon/cane/fluff/uski_cane // Inscribed Silver-handled Cane - Usiki Guwan - fireandglory - DONE
|
||||
/obj/item/weapon/cane/fluff/usiki_cane // Inscribed Silver-handled Cane - Usiki Guwan - fireandglory - DONE
|
||||
name = "inscribed silver-handled cane"
|
||||
desc = "This silver-handled cane has letters carved into the sides."
|
||||
icon = 'icons/obj/custom_items/usiki_cane.dmi'
|
||||
@@ -191,6 +198,7 @@
|
||||
desc = "A pretty normal looking glove to be worn on the left hand."
|
||||
icon = 'icons/obj/custom_items/kathleen_glove.dmi'
|
||||
icon_state = "kathleen_glove"
|
||||
item_state = "kathleen_glove"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
@@ -222,6 +230,7 @@
|
||||
desc = "Stitched together clothing with bandages covering them, looks tailored for an unathi."
|
||||
icon = 'icons/obj/custom_items/karnaikai_wrappings.dmi'
|
||||
icon_state = "karnaikai_wrappings" //special thanks to Araskael
|
||||
item_state = "karnaikai_wrappings"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
species_restricted = list("Unathi")
|
||||
@@ -233,10 +242,11 @@
|
||||
desc = "A bunch of stitched together bandages with a fibreglass breath mask on it, openings for the eyes. Looks tailored for an unathi."
|
||||
icon = 'icons/obj/custom_items/karnaikai_mask.dmi'
|
||||
icon_state = "karnaikai_mask" //special thanks to Araskael
|
||||
item_state = "karnaikai_mask"
|
||||
species_restricted = list("Unathi")
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/contraband/poster/fluff/conservan_poster //ATLAS poster - Conservan Xullie - conservatron - DONE
|
||||
name = "ATLAS poster"
|
||||
|
||||
@@ -274,7 +284,7 @@
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/paper(src)
|
||||
|
||||
|
||||
/obj/item/weapon/clipboard/fluff/zakiya_sketchpad/update_icon()
|
||||
if(toppaper)
|
||||
icon_state = "zakiya_sketchpad1"
|
||||
@@ -332,6 +342,7 @@
|
||||
desc = "A small energy dagger given to Golden Tigers."
|
||||
icon = 'icons/obj/custom_items/moon_baton.dmi'
|
||||
icon_state = "tigerclaw"
|
||||
item_state = "tigerclaw"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 2
|
||||
w_class = 2
|
||||
@@ -344,21 +355,25 @@
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
user << "\blue \The [src] is now energised."
|
||||
icon_state = "tigerclaw_active"
|
||||
item_state = icon_state
|
||||
slot_flags = null
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
else
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
user << "\blue \The [src] is de-energised."
|
||||
icon_state = initial(icon_state)
|
||||
item_state = icon_state
|
||||
slot_flags = initial(slot_flags)
|
||||
attack_verb = list()
|
||||
|
||||
|
||||
user.regenerate_icons()
|
||||
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/fabian_coat //NT APF Armor - Fabian Goellstein - mirkoloio - DONE
|
||||
name = "NT APF armor"
|
||||
desc = "This is a NT Asset Protection Force Armor, it is fashioned as a jacket in NT Security Colors. The nameplate carries the Name 'Goellstein'."
|
||||
icon = 'icons/obj/custom_items/fabian_coat.dmi'
|
||||
icon_state = "fabian_coat_open"
|
||||
item_state = "fabian_coat_open"
|
||||
contained_sprite = 1
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/fabian_coat/verb/toggle()
|
||||
@@ -372,9 +387,11 @@
|
||||
switch(icon_state)
|
||||
if("fabian_coat_open")
|
||||
icon_state = "fabian_coat_closed"
|
||||
item_state = icon_state
|
||||
usr << "You zip up \the [src]."
|
||||
if("fabian_coat_closed")
|
||||
icon_state = "fabian_coat_open"
|
||||
item_state = icon_state
|
||||
usr << "You unzip \the [src]."
|
||||
else
|
||||
usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are."
|
||||
@@ -392,6 +409,7 @@
|
||||
desc = "This is an atlas armband showing anyone who sees this person, as a member of the Political party Atlas."
|
||||
icon = 'icons/obj/custom_items/vittorio_armband.dmi'
|
||||
icon_state = "vittorio_armband"
|
||||
item_state = "vittorio_armband"
|
||||
contained_sprite = 1
|
||||
|
||||
/obj/item/clothing/head/fluff/vittorio_fez //Black Fez - Vittorio Giurifiglio - tytostyris - DONE
|
||||
@@ -399,14 +417,16 @@
|
||||
desc = "It is a black fez, it bears an Emblem of the Astronomical symbol of Earth, It also has some nice tassels."
|
||||
icon = 'icons/obj/custom_items/vittorio_fez.dmi'
|
||||
icon_state = "vittorio_fez"
|
||||
item_state = "vittorio_fez"
|
||||
contained_sprite = 1
|
||||
|
||||
|
||||
/obj/item/clothing/suit/fluff/centurion_cloak //Paludamentum - Centurion - cakeisossim - DONE
|
||||
|
||||
/obj/item/clothing/suit/fluff/centurion_cloak //Paludamentum - Centurion - cakeisossim - DONE
|
||||
name = "paludamentum"
|
||||
desc = "A cloak-like piece of silky, red fabric. Fashioned at one point where the shoulder would be with a golden pin."
|
||||
icon = 'icons/obj/custom_items/centurion_cloak.dmi'
|
||||
icon_state = "centurion_cloak"
|
||||
item_state = "centurion_cloak"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
contained_sprite = 1
|
||||
|
||||
@@ -416,4 +436,5 @@
|
||||
desc = "A worn and faded purple bandanna with a knotted, dragon-like design on it."
|
||||
icon = 'icons/obj/custom_items/kir_bandanna.dmi'
|
||||
icon_state = "kir_bandanna"
|
||||
contained_sprite = 1
|
||||
item_state = "kir_bandanna"
|
||||
contained_sprite = 1
|
||||
@@ -15,6 +15,8 @@
|
||||
// Kits must also have hardsuit icons in CUSTOM_ITEM_MOB as [kit_icon]_suit
|
||||
// and [kit_icon]_helmet, and in CUSTOM_ITEM_OBJ as [kit_icon].
|
||||
|
||||
|
||||
//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
/var/list/custom_items = list()
|
||||
|
||||
/datum/custom_item
|
||||
@@ -80,7 +82,7 @@
|
||||
var/obj/item/device/kit/suit/kit = item
|
||||
kit.new_light_overlay = additional_data
|
||||
kit.new_mob_icon_file = CUSTOM_ITEM_MOB
|
||||
|
||||
|
||||
// for snowflake implants
|
||||
else if(istype(item, /obj/item/weapon/implanter/fluff))
|
||||
var/obj/item/weapon/implanter/fluff/L = item
|
||||
|
||||
@@ -15,10 +15,13 @@
|
||||
var/last_loc_general//This stores a general location of the object. Ie, a container or a mob
|
||||
var/last_loc_specific//This stores specific extra information about the location, pocket, hand, worn on head, etc. Only relevant to mobs
|
||||
|
||||
|
||||
/obj/item/weapon/holder/New()
|
||||
if (!item_state)
|
||||
item_state = icon_state
|
||||
|
||||
flags_inv |= ALWAYSDRAW
|
||||
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
@@ -277,21 +280,28 @@
|
||||
name = "mouse"
|
||||
desc = "It's a fuzzy little critter."
|
||||
desc_dead = "It's filthy vermin, throw it in the trash."
|
||||
icon_state = "mouse_brown"
|
||||
icon = 'icons/mob/mouse.dmi'
|
||||
icon_state = "mouse_brown_sleep"
|
||||
item_state = "mouse_brown"
|
||||
icon_state_dead = "mouse_brown_dead"
|
||||
//slot_flags = SLOT_EARS //Re-enable this once superballs finishes the sprites
|
||||
contained_sprite = 1
|
||||
origin_tech = "biotech=2"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/holder/mouse/white
|
||||
icon_state = "mouse_white"
|
||||
icon_state = "mouse_white_sleep"
|
||||
item_state = "mouse_white"
|
||||
icon_state_dead = "mouse_white_dead"
|
||||
|
||||
/obj/item/weapon/holder/mouse/gray
|
||||
icon_state = "mouse_gray"
|
||||
icon_state = "mouse_gray_sleep"
|
||||
item_state = "mouse_gray"
|
||||
icon_state_dead = "mouse_gray_dead"
|
||||
|
||||
/obj/item/weapon/holder/mouse/brown
|
||||
icon_state = "mouse_brown"
|
||||
icon_state = "mouse_brown_sleep"
|
||||
item_state = "mouse_brown"
|
||||
icon_state_dead = "mouse_brown_dead"
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
set name = "Give"
|
||||
|
||||
// TODO : Change to incapacitated() on merge.
|
||||
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||
//Edit by Nanako: Removed buckled check so people can give while sitting,
|
||||
//added restrained check so people cant give/recieve while cuffed or straitjacketed
|
||||
if(usr.stat || usr.lying || usr.resting || usr.restrained())
|
||||
usr << "\red You're in no condition to handle items!"
|
||||
return
|
||||
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null)
|
||||
if(!istype(target) || target.stat || target.lying || target.resting || target.restrained() || target.client == null)
|
||||
usr << "\red [target.name] is in no condition to handle items!"
|
||||
return
|
||||
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
|
||||
@@ -190,6 +190,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(!has_organ_for_slot(slot)) return
|
||||
if(!species || !species.hud || !(slot in species.hud.equip_slots)) return
|
||||
W.loc = src
|
||||
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
@@ -295,7 +296,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
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..."
|
||||
src << "\red You are trying to equip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
if((W == src.l_hand) && (slot != slot_l_hand))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/species/vox
|
||||
name = "Vox"
|
||||
short_name = "vox"
|
||||
name_plural = "Vox"
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_vox.dmi'
|
||||
@@ -66,7 +67,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/vox(H.back), slot_in_backpack)
|
||||
H.internal = H.r_hand
|
||||
H.internals.icon_state = "internal1"
|
||||
|
||||
|
||||
|
||||
/datum/species/vox/get_station_variant()
|
||||
return "Vox Pariah"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// Descriptors and strings.
|
||||
var/name // Species name.
|
||||
var/name_plural // Pluralized name (since "[name]s" is not always valid)
|
||||
var/short_name // Shortened form of the name, for code use. Must be exactly 3 letter long, and all lowercase
|
||||
var/blurb = "A completely nondescript species." // A brief lore summary for use in the chargen screen.
|
||||
|
||||
// Icon/appearance vars.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/species/monkey
|
||||
name = "Monkey"
|
||||
short_name = "mon"
|
||||
name_plural = "Monkeys"
|
||||
blurb = "Ook."
|
||||
|
||||
@@ -52,6 +53,7 @@
|
||||
|
||||
/datum/species/monkey/tajaran
|
||||
name = "Farwa"
|
||||
short_name = "far"
|
||||
name_plural = "Farwa"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_farwa.dmi'
|
||||
@@ -66,6 +68,7 @@
|
||||
|
||||
/datum/species/monkey/skrell
|
||||
name = "Neaera"
|
||||
short_name = "nea"
|
||||
name_plural = "Neaera"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_neaera.dmi'
|
||||
@@ -81,6 +84,7 @@
|
||||
|
||||
/datum/species/monkey/unathi
|
||||
name = "Stok"
|
||||
short_name = "sto"
|
||||
name_plural = "Stok"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_stok.dmi'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/species/human
|
||||
name = "Human"
|
||||
short_name = "hum"
|
||||
name_plural = "Humans"
|
||||
language = "Sol Common"
|
||||
primitive_form = "Monkey"
|
||||
@@ -14,6 +15,7 @@
|
||||
|
||||
/datum/species/unathi
|
||||
name = "Unathi"
|
||||
short_name = "una"
|
||||
name_plural = "Unathi"
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_lizard.dmi'
|
||||
@@ -67,6 +69,7 @@
|
||||
|
||||
/datum/species/tajaran
|
||||
name = "Tajara"
|
||||
short_name = "taj"
|
||||
name_plural = "Tajaran"
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
|
||||
@@ -114,6 +117,7 @@
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
short_name = "skr"
|
||||
name_plural = "Skrell"
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_skrell.dmi'
|
||||
@@ -138,6 +142,7 @@
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
short_name = "dio"
|
||||
name_plural = "Dionaea"
|
||||
icobase = 'icons/mob/human_races/r_diona.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_plant.dmi'
|
||||
@@ -230,6 +235,7 @@
|
||||
|
||||
/datum/species/machine
|
||||
name = "Machine"
|
||||
short_name = "ipc"
|
||||
name_plural = "machines"
|
||||
|
||||
icobase = 'icons/mob/human_races/r_machine.dmi'
|
||||
@@ -275,6 +281,7 @@
|
||||
|
||||
/datum/species/bug
|
||||
name = "Vaurca"
|
||||
short_name = "vau"
|
||||
name_plural = "Vaurcae"
|
||||
language = "Hivenet"
|
||||
icobase = 'icons/mob/human_races/r_vaurca.dmi'
|
||||
|
||||
@@ -121,19 +121,24 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define SUIT_STORE_LAYER 13
|
||||
#define BACK_LAYER 14
|
||||
#define HAIR_LAYER 15 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 16
|
||||
#define FACEMASK_LAYER 17
|
||||
#define HEAD_LAYER 18
|
||||
#define COLLAR_LAYER 19
|
||||
#define HANDCUFF_LAYER 20
|
||||
#define LEGCUFF_LAYER 21
|
||||
#define L_HAND_LAYER 22
|
||||
#define R_HAND_LAYER 23
|
||||
#define FIRE_LAYER 24 //If you're on fire
|
||||
#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 25
|
||||
#define L_EAR_LAYER 16
|
||||
#define R_EAR_LAYER 17
|
||||
#define FACEMASK_LAYER 18
|
||||
#define HEAD_LAYER 19
|
||||
#define COLLAR_LAYER 20
|
||||
#define HANDCUFF_LAYER 21
|
||||
#define LEGCUFF_LAYER 22
|
||||
#define L_HAND_LAYER 23
|
||||
#define R_HAND_LAYER 24
|
||||
#define FIRE_LAYER 25 //If you're on fire
|
||||
#define TARGETED_LAYER 26 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 26
|
||||
//////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
|
||||
@@ -463,32 +468,42 @@ var/global/list/damage_icon_parts = list()
|
||||
//vvvvvv UPDATE_INV PROCS vvvvvv
|
||||
|
||||
/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1)
|
||||
if(w_uniform && istype(w_uniform, /obj/item/clothing/under) )
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
if(check_draw_underclothing())
|
||||
w_uniform.screen_loc = ui_iclothing
|
||||
|
||||
//determine the icon to use
|
||||
var/icon/under_icon
|
||||
if(w_uniform.icon_override)
|
||||
var/under_state = ""
|
||||
|
||||
if(w_uniform.contained_sprite)//Do all the containedsprite stuff in one place
|
||||
w_uniform.auto_adapt_species(src)
|
||||
if(w_uniform.icon_override)
|
||||
under_icon = w_uniform.icon_override
|
||||
else
|
||||
under_icon = w_uniform.icon
|
||||
|
||||
if (w_uniform.icon_species_tag)
|
||||
under_state += "[w_uniform.icon_species_tag]_"
|
||||
under_state += w_uniform.item_state + WORN_UNDER
|
||||
|
||||
else if(w_uniform.icon_override)
|
||||
under_icon = w_uniform.icon_override
|
||||
else if(w_uniform.sprite_sheets && w_uniform.sprite_sheets[species.get_bodytype()])
|
||||
under_icon = w_uniform.sprite_sheets[species.get_bodytype()]
|
||||
else if(w_uniform.item_icons && w_uniform.item_icons[slot_w_uniform_str])
|
||||
under_icon = w_uniform.item_icons[slot_w_uniform_str]
|
||||
else if(w_uniform.contained_sprite)
|
||||
under_icon = w_uniform.icon
|
||||
else
|
||||
under_icon = INV_W_UNIFORM_DEF_ICON
|
||||
|
||||
//determine state to use
|
||||
var/under_state
|
||||
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
|
||||
under_state = w_uniform.item_state_slots[slot_w_uniform_str] + "_s"
|
||||
else if(w_uniform.item_state)
|
||||
under_state = w_uniform.item_state + "_s"
|
||||
else if (w_uniform.contained_sprite)
|
||||
under_state = w_uniform.icon_state + "_w"
|
||||
else
|
||||
under_state = w_uniform.icon_state + "_s"
|
||||
if (!under_state)
|
||||
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
|
||||
under_state = w_uniform.item_state_slots[slot_w_uniform_str] + "_s"
|
||||
else if(w_uniform.item_state)
|
||||
under_state = w_uniform.item_state + "_s"
|
||||
else
|
||||
under_state = w_uniform.icon_state + "_s"
|
||||
|
||||
//need to append _s to the icon state for legacy compatibility
|
||||
var/image/standing = image(icon = under_icon, icon_state = under_state)
|
||||
@@ -500,29 +515,34 @@ var/global/list/damage_icon_parts = list()
|
||||
standing.overlays += bloodsies
|
||||
|
||||
//accessories
|
||||
var/obj/item/clothing/under/under = w_uniform
|
||||
if(under.accessories.len)
|
||||
for(var/obj/item/clothing/accessory/A in under.accessories)
|
||||
standing.overlays |= A.get_mob_overlay()
|
||||
if (istype(w_uniform, /obj/item/clothing/under))//Prevent runtime errors with unusual objects
|
||||
var/obj/item/clothing/under/under = w_uniform
|
||||
if(under.accessories.len)
|
||||
for(var/obj/item/clothing/accessory/A in under.accessories)
|
||||
standing.overlays |= A.get_mob_overlay()
|
||||
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
|
||||
overlays_standing[ID_LAYER] = null
|
||||
if(wear_id)
|
||||
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
if(w_uniform && w_uniform:displays_id)
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
else if(wear_id.contained_sprite)
|
||||
overlays_standing[ID_LAYER] = image("icon" = wear_id.icon, "icon_state" = "[wear_id.icon_state]_w")
|
||||
else
|
||||
overlays_standing[ID_LAYER] = null
|
||||
else
|
||||
overlays_standing[ID_LAYER] = null
|
||||
if(wear_id.contained_sprite)
|
||||
wear_id.auto_adapt_species(src)
|
||||
var/icon/IDIcon
|
||||
if(wear_id.icon_override)
|
||||
IDIcon = wear_id.icon_override
|
||||
else
|
||||
IDIcon = wear_id.icon
|
||||
|
||||
overlays_standing[ID_LAYER] = image("icon" = IDIcon, "icon_state" = "[wear_id.item_state][WORN_ID]")
|
||||
else
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
|
||||
BITSET(hud_updateflag, ID_HUD)
|
||||
BITSET(hud_updateflag, WANTED_HUD)
|
||||
@@ -530,17 +550,28 @@ var/global/list/damage_icon_parts = list()
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
|
||||
if(gloves)
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(check_draw_gloves())
|
||||
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
|
||||
var/image/standing
|
||||
if(gloves.icon_override)
|
||||
if(gloves.contained_sprite)
|
||||
gloves.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (gloves.icon_species_tag)
|
||||
state += "[gloves.icon_species_tag]_"
|
||||
state += "[gloves.item_state][WORN_GLOVES]"
|
||||
|
||||
if(gloves.icon_override)
|
||||
standing = image("icon" = gloves.icon_override, "icon_state" = state)
|
||||
else
|
||||
standing = image("icon" = gloves.icon, "icon_state" = state)
|
||||
else if(gloves.icon_override)
|
||||
standing = image("icon" = gloves.icon_override, "icon_state" = "[t_state]")
|
||||
else if(gloves.sprite_sheets && gloves.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = gloves.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_state]")
|
||||
else if(gloves.contained_sprite)
|
||||
standing = image("icon" = gloves.icon, "icon_state" = "[gloves.icon_state]_w")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
@@ -555,76 +586,110 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "bloodyhands")
|
||||
bloodsies.color = hand_blood_color
|
||||
overlays_standing[GLOVES_LAYER] = bloodsies
|
||||
else
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
|
||||
if(glasses)
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(check_draw_glasses())
|
||||
if(glasses.contained_sprite)
|
||||
glasses.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (glasses.icon_species_tag)
|
||||
state += "[glasses.icon_species_tag]_"
|
||||
state += "[glasses.item_state][WORN_EYES]"
|
||||
|
||||
if(glasses.icon_override)
|
||||
if(glasses.icon_override)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = state)
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon, "icon_state" = state)
|
||||
|
||||
|
||||
else if(glasses.icon_override)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype()])
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.get_bodytype()], "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.contained_sprite)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon, "icon_state" = "[glasses.icon_state]_w")
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if( (head && (head.flags & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags & (BLOCKHAIR | BLOCKHEADHAIR))))
|
||||
overlays_standing[L_EAR_LAYER] = null
|
||||
overlays_standing[R_EAR_LAYER] = null
|
||||
|
||||
if (!check_draw_ears())
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
if(l_ear || r_ear)
|
||||
else
|
||||
if(l_ear)
|
||||
|
||||
var/t_type = l_ear.icon_state
|
||||
if(l_ear.icon_override)
|
||||
|
||||
if(l_ear.contained_sprite)
|
||||
l_ear.auto_adapt_species(src)
|
||||
t_type = ""
|
||||
if (l_ear.icon_species_tag)
|
||||
t_type += "[l_ear.icon_species_tag]_"
|
||||
t_type += "[l_ear.item_state][WORN_LEAR]"
|
||||
if(l_ear.icon_override)
|
||||
overlays_standing[L_EAR_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = t_type)
|
||||
else
|
||||
overlays_standing[L_EAR_LAYER] = image("icon" = l_ear.icon, "icon_state" = t_type)
|
||||
else if(l_ear.icon_override)
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]")
|
||||
overlays_standing[L_EAR_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]")
|
||||
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype()])
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else if(l_ear.contained_sprite)
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.icon, "icon_state" = "[l_ear.icon_state]_w")
|
||||
overlays_standing[L_EAR_LAYER] = image("icon" = l_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
overlays_standing[L_EAR_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
|
||||
if(r_ear)
|
||||
|
||||
var/t_type = r_ear.icon_state
|
||||
if(r_ear.icon_override)
|
||||
if(r_ear.contained_sprite)
|
||||
r_ear.auto_adapt_species(src)
|
||||
t_type = ""
|
||||
if (r_ear.icon_species_tag)
|
||||
t_type += "[r_ear.icon_species_tag]_"
|
||||
t_type += "[r_ear.item_state][WORN_REAR]"
|
||||
if(r_ear.icon_override)
|
||||
overlays_standing[R_EAR_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = t_type)
|
||||
else
|
||||
overlays_standing[R_EAR_LAYER] = image("icon" = r_ear.icon, "icon_state" = t_type)
|
||||
|
||||
else if(r_ear.icon_override)
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]")
|
||||
overlays_standing[R_EAR_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]")
|
||||
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype()])
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else if(r_ear.contained_sprite)
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.icon, "icon_state" = "[r_ear.icon_state]_w")
|
||||
overlays_standing[R_EAR_LAYER] = image("icon" = r_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
overlays_standing[R_EAR_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
|
||||
if(shoes && !(wear_suit && wear_suit.flags_inv & HIDESHOES))
|
||||
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
if(check_draw_shoes())
|
||||
var/image/standing
|
||||
if(shoes.icon_override)
|
||||
if(shoes.contained_sprite)
|
||||
shoes.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (shoes.icon_species_tag)
|
||||
state += "[shoes.icon_species_tag]_"
|
||||
state += "[shoes.item_state][WORN_SHOES]"
|
||||
|
||||
if(shoes.icon_override)
|
||||
standing = image("icon" = shoes.icon_override, "icon_state" = state)
|
||||
else
|
||||
standing = image("icon" = shoes.icon, "icon_state" = state)
|
||||
|
||||
else if(shoes.icon_override)
|
||||
standing = image("icon" = shoes.icon_override, "icon_state" = "[shoes.icon_state]")
|
||||
else if(shoes.sprite_sheets && shoes.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = shoes.sprite_sheets[species.get_bodytype()], "icon_state" = "[shoes.icon_state]")
|
||||
else if(shoes.contained_sprite)
|
||||
standing = image("icon" = shoes.icon, "icon_state" = "[shoes.icon_state]_w")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
|
||||
@@ -638,12 +703,12 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood")
|
||||
bloodsies.color = feet_blood_color
|
||||
overlays_standing[SHOES_LAYER] = bloodsies
|
||||
else
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
|
||||
if(s_store)
|
||||
//s_store.auto_adapt_species(src)
|
||||
var/t_state = s_store.item_state
|
||||
if(!t_state) t_state = s_store.icon_state
|
||||
overlays_standing[SUIT_STORE_LAYER] = image("icon" = 'icons/mob/belt_mirror.dmi', "icon_state" = "[t_state]")
|
||||
@@ -654,27 +719,37 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_head(var/update_icons=1)
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
if(head)
|
||||
head.screen_loc = ui_head //TODO
|
||||
|
||||
var/image/standing = null
|
||||
//Determine the icon to use
|
||||
var/t_icon = INV_HEAD_DEF_ICON
|
||||
if(head.icon_override)
|
||||
if(head.contained_sprite)
|
||||
head.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (head.icon_species_tag)
|
||||
state += "[head.icon_species_tag]_"
|
||||
state += "[head.item_state][WORN_HEAD]"
|
||||
|
||||
|
||||
if(head.icon_override)
|
||||
standing = image("icon" = head.icon_override, "icon_state" = state)
|
||||
else
|
||||
standing = image("icon" = head.icon, "icon_state" = state)
|
||||
else if(head.icon_override)
|
||||
t_icon = head.icon_override
|
||||
else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype()])
|
||||
t_icon = head.sprite_sheets[species.get_bodytype()]
|
||||
else if(head.item_icons && (icon_head in head.item_icons))
|
||||
t_icon = head.item_icons[icon_head]
|
||||
|
||||
//Determine the state to use
|
||||
var/t_state = head.icon_state
|
||||
if(istype(head, /obj/item/weapon/paper))
|
||||
/* I don't like this, but bandaid to fix half the hats in the game
|
||||
being completely broken without re-breaking paper hats */
|
||||
t_state = "paper"
|
||||
if (!standing)
|
||||
//Determine the state to use
|
||||
var/t_state = head.icon_state
|
||||
|
||||
//Create the image
|
||||
var/image/standing = image(icon = t_icon, icon_state = t_state)
|
||||
//Create the image
|
||||
standing = image(icon = t_icon, icon_state = t_state)
|
||||
|
||||
if(head.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "helmetblood")
|
||||
@@ -685,72 +760,101 @@ var/global/list/damage_icon_parts = list()
|
||||
var/obj/item/clothing/head/hat = head
|
||||
if(hat.on && light_overlay_cache["[hat.light_overlay]"])
|
||||
standing.overlays |= light_overlay_cache["[hat.light_overlay]"]
|
||||
else if(head.contained_sprite)
|
||||
standing = image("icon" = head.icon, "icon_state" = "[head.icon_state]_w")
|
||||
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
|
||||
else
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_belt(var/update_icons=1)
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
if(belt)
|
||||
|
||||
belt.screen_loc = ui_belt //TODO
|
||||
var/t_state = belt.item_state
|
||||
var/t_icon = belt.icon
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
var/image/standing = image("icon_state" = "[t_state]")
|
||||
|
||||
if(belt.icon_override)
|
||||
standing.icon = belt.icon_override
|
||||
else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype()])
|
||||
standing.icon = belt.sprite_sheets[species.get_bodytype()]
|
||||
else if(belt.contained_sprite)
|
||||
standing = image("icon" = belt.icon, "icon_state" = "[belt.icon_state]_w")
|
||||
else
|
||||
standing.icon = 'icons/mob/belt.dmi'
|
||||
if(belt.contained_sprite)
|
||||
belt.auto_adapt_species(src)
|
||||
t_state = ""
|
||||
if (belt.icon_species_tag)
|
||||
t_state += "[belt.icon_species_tag]_"
|
||||
t_state += "[belt.item_state][WORN_BELT]"
|
||||
|
||||
var/belt_layer = BELT_LAYER
|
||||
if(belt.icon_override)
|
||||
t_icon = belt.icon_override
|
||||
|
||||
else if(belt.icon_override)
|
||||
t_icon = belt.icon_override
|
||||
else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype()])
|
||||
t_icon = belt.sprite_sheets[species.get_bodytype()]
|
||||
else
|
||||
t_icon = 'icons/mob/belt.dmi'
|
||||
|
||||
standing = image("icon" = t_icon, "icon_state" = t_state)
|
||||
|
||||
if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt))
|
||||
for(var/obj/item/i in belt.contents)
|
||||
var/c_state
|
||||
var/c_icon
|
||||
if(i.contained_sprite)
|
||||
c_state = ""
|
||||
if (i.icon_species_tag)
|
||||
c_state += "[i.icon_species_tag]_"
|
||||
c_state += "[i.item_state][WORN_BELT]"
|
||||
|
||||
c_icon = belt.icon
|
||||
if(belt.icon_override)
|
||||
c_icon = belt.icon_override
|
||||
|
||||
else
|
||||
c_icon = 'icons/mob/belt.dmi'
|
||||
c_state = i.item_state
|
||||
if(!c_state) c_state = i.icon_state
|
||||
standing.overlays += image("icon" = c_icon, "icon_state" = c_state)
|
||||
|
||||
|
||||
var/beltlayer = BELT_LAYER
|
||||
var/otherlayer = BELT_LAYER_ALT
|
||||
if(istype(belt, /obj/item/weapon/storage/belt))
|
||||
var/obj/item/weapon/storage/belt/ubelt = belt
|
||||
if(ubelt.show_above_suit)
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
belt_layer = BELT_LAYER_ALT
|
||||
else
|
||||
overlays_standing[BELT_LAYER_ALT] = null
|
||||
if(belt.contents.len)
|
||||
for(var/obj/item/i in belt.contents)
|
||||
var/i_state = i.item_state
|
||||
if(!i_state) i_state = i.icon_state
|
||||
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
|
||||
beltlayer = BELT_LAYER_ALT
|
||||
otherlayer = BELT_LAYER
|
||||
|
||||
overlays_standing[belt_layer] = standing
|
||||
else
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
overlays_standing[BELT_LAYER_ALT] = null
|
||||
overlays_standing[beltlayer] = standing
|
||||
overlays_standing[otherlayer] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
|
||||
|
||||
if( wear_suit && istype(wear_suit, /obj/item/) )
|
||||
|
||||
wear_suit.screen_loc = ui_oclothing
|
||||
|
||||
var/image/standing
|
||||
|
||||
if(wear_suit.icon_override)
|
||||
if(wear_suit.contained_sprite)
|
||||
wear_suit.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (wear_suit.icon_species_tag)
|
||||
state += "[wear_suit.icon_species_tag]_"
|
||||
state += "[wear_suit.item_state][WORN_SUIT]"
|
||||
|
||||
if(wear_suit.icon_override)
|
||||
standing = image("icon" = wear_suit.icon_override, "icon_state" = state)
|
||||
else
|
||||
standing = image("icon" = wear_suit.icon, "icon_state" = state)
|
||||
|
||||
else if(wear_suit.icon_override)
|
||||
standing = image("icon" = wear_suit.icon_override, "icon_state" = "[wear_suit.icon_state]")
|
||||
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = wear_suit.sprite_sheets[species.get_bodytype()], "icon_state" = "[wear_suit.icon_state]")
|
||||
else if(wear_suit.contained_sprite)
|
||||
standing = image("icon" = wear_suit.icon, "icon_state" = "[wear_suit.icon_state]_w")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "[S.blood_overlay_type]blood")
|
||||
@@ -776,16 +880,26 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) ) && !(head && head.flags_inv & HIDEMASK))
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
if(check_draw_mask())
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
|
||||
var/image/standing
|
||||
if(wear_mask.icon_override)
|
||||
|
||||
if(wear_mask.contained_sprite)
|
||||
wear_mask.auto_adapt_species(src)
|
||||
var/state = ""
|
||||
if (wear_mask.icon_species_tag)
|
||||
state += "[wear_mask.icon_species_tag]_"
|
||||
state += "[wear_mask.item_state][WORN_MASK]"
|
||||
|
||||
if(wear_mask.icon_override)
|
||||
standing = image("icon" = wear_mask.icon_override, "icon_state" = state)
|
||||
else
|
||||
standing = image("icon" = wear_mask.icon, "icon_state" = state)
|
||||
else if(wear_mask.icon_override)
|
||||
standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]")
|
||||
else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype()], "icon_state" = "[wear_mask.icon_state]")
|
||||
else if(wear_mask.contained_sprite)
|
||||
standing = image("icon" = wear_mask.icon, "icon_state" = "[wear_mask.icon_state]_w")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
|
||||
@@ -794,18 +908,31 @@ var/global/list/damage_icon_parts = list()
|
||||
bloodsies.color = wear_mask.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
else
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
|
||||
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
if(back)
|
||||
|
||||
back.screen_loc = ui_back //TODO
|
||||
|
||||
//determine the icon to use
|
||||
var/icon/overlay_icon
|
||||
if(back.icon_override)
|
||||
var/overlay_state = ""
|
||||
|
||||
if(back.contained_sprite)
|
||||
back.auto_adapt_species(src)
|
||||
if (back.icon_species_tag)
|
||||
overlay_state += "[back.icon_species_tag]_"
|
||||
overlay_state += "[back.item_state][WORN_BACK]"
|
||||
|
||||
if(back.icon_override)
|
||||
overlay_icon = back.icon_override
|
||||
else
|
||||
overlay_icon = back.icon
|
||||
else if(back.icon_override)
|
||||
overlay_icon = back.icon_override
|
||||
else if(istype(back, /obj/item/weapon/rig))
|
||||
//If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
|
||||
@@ -819,20 +946,19 @@ var/global/list/damage_icon_parts = list()
|
||||
overlay_icon = INV_BACK_DEF_ICON
|
||||
|
||||
//determine state to use
|
||||
var/overlay_state
|
||||
if(back.item_state_slots && back.item_state_slots[slot_back_str])
|
||||
overlay_state = back.item_state_slots[slot_back_str]
|
||||
else if(back.item_state)
|
||||
overlay_state = back.item_state
|
||||
else if(back.contained_sprite)
|
||||
overlay_icon = image("icon" = back.icon, "icon_state" = "[back.icon_state]_w")
|
||||
else
|
||||
overlay_state = back.icon_state
|
||||
if (!overlay_state)
|
||||
if(back.item_state_slots && back.item_state_slots[slot_back_str])
|
||||
overlay_state = back.item_state_slots[slot_back_str]
|
||||
else if(back.item_state)
|
||||
overlay_state = back.item_state
|
||||
else if(back.contained_sprite)
|
||||
overlay_icon = image("icon" = back.icon, "icon_state" = "[back.icon_state]_w")
|
||||
else
|
||||
overlay_state = back.icon_state
|
||||
|
||||
//create the image
|
||||
overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state)
|
||||
else
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
@@ -869,71 +995,85 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
|
||||
t_state = r_hand.item_state_slots[slot_r_hand_str]
|
||||
else if(r_hand.item_state)
|
||||
t_state = r_hand.item_state
|
||||
if(r_hand.contained_sprite)
|
||||
r_hand.auto_adapt_species(src)
|
||||
if (r_hand.icon_species_tag && r_hand.icon_species_in_hand)
|
||||
t_state += "[r_hand.icon_species_tag]_"
|
||||
t_state += "[r_hand.item_state][WORN_RHAND]"
|
||||
|
||||
if(r_hand.icon_override)
|
||||
overlays_standing[R_HAND_LAYER] = image(icon = r_hand.icon_override, icon_state = t_state)
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = image(icon = r_hand.icon, icon_state = t_state)
|
||||
|
||||
else
|
||||
t_state = r_hand.icon_state
|
||||
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
|
||||
t_state = r_hand.item_state_slots[slot_r_hand_str]
|
||||
else if(r_hand.item_state)
|
||||
t_state = r_hand.item_state
|
||||
else
|
||||
t_state = r_hand.icon_state
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||
else if(r_hand.icon_override)
|
||||
t_state += "_r"
|
||||
t_icon = r_hand.icon_override
|
||||
else if(r_hand.contained_sprite)
|
||||
t_state = "[t_state]_r"
|
||||
t_icon = image("icon" = r_hand.icon, "icon_state" = "[t_state]")
|
||||
else
|
||||
t_icon = INV_R_HAND_DEF_ICON
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||
else if(r_hand.icon_override)
|
||||
t_state += "_r"
|
||||
t_icon = r_hand.icon_override
|
||||
else
|
||||
t_icon = INV_R_HAND_DEF_ICON
|
||||
|
||||
overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
|
||||
if (handcuffed) drop_r_hand() //this should be moved out of icon code
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
|
||||
t_state = l_hand.item_state_slots[slot_l_hand_str]
|
||||
else if(l_hand.item_state)
|
||||
t_state = l_hand.item_state
|
||||
if(l_hand.contained_sprite)
|
||||
l_hand.auto_adapt_species(src)
|
||||
if (l_hand.icon_species_tag && l_hand.icon_species_in_hand)
|
||||
t_state += "[l_hand.icon_species_tag]_"
|
||||
t_state += "[l_hand.item_state][WORN_LHAND]"
|
||||
|
||||
if(l_hand.icon_override)
|
||||
overlays_standing[L_HAND_LAYER] = image(icon = l_hand.icon_override, icon_state = t_state)
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = image(icon = l_hand.icon, icon_state = t_state)
|
||||
|
||||
else
|
||||
t_state = l_hand.icon_state
|
||||
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
|
||||
t_state = l_hand.item_state_slots[slot_l_hand_str]
|
||||
else if(l_hand.item_state)
|
||||
t_state = l_hand.item_state
|
||||
else
|
||||
t_state = l_hand.icon_state
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||
else if(l_hand.icon_override)
|
||||
t_state += "_l"
|
||||
t_icon = l_hand.icon_override
|
||||
else if(l_hand.contained_sprite)
|
||||
t_state = "[t_state]_l"
|
||||
t_icon = image("icon" = l_hand.icon, "icon_state" = "[t_state]")
|
||||
else
|
||||
t_icon = INV_L_HAND_DEF_ICON
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||
else if(l_hand.icon_override)
|
||||
t_state += "_l"
|
||||
t_icon = l_hand.icon_override
|
||||
else
|
||||
t_icon = INV_L_HAND_DEF_ICON
|
||||
|
||||
overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
|
||||
|
||||
if (handcuffed) drop_l_hand() //This probably should not be here
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -1051,6 +1191,75 @@ var/global/list/damage_icon_parts = list()
|
||||
overlays_standing[SURGERY_LEVEL] = total
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
|
||||
//Drawcheck functions
|
||||
//These functions check if an item should be drawn, or if its covered up by something else
|
||||
/mob/living/carbon/human/proc/check_draw_gloves()
|
||||
if (!gloves)
|
||||
return 0
|
||||
else if (gloves.flags_inv & ALWAYSDRAW)
|
||||
return 1
|
||||
else if (wear_suit && (wear_suit.flags_inv & HIDEGLOVES))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/check_draw_ears()
|
||||
if (!l_ear && !r_ear)
|
||||
return 0
|
||||
else if ((l_ear && (l_ear.flags_inv & ALWAYSDRAW)) || (r_ear && (r_ear.flags_inv & ALWAYSDRAW)))
|
||||
return 1
|
||||
else if( (head && (head.flags_inv & (HIDEEARS))) || (wear_mask && (wear_mask.flags_inv & (HIDEEARS))))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/check_draw_glasses()
|
||||
if (!glasses)
|
||||
return 0
|
||||
else if (glasses.flags_inv & ALWAYSDRAW)
|
||||
return 1
|
||||
else if( (head && (head.flags_inv & (HIDEEYES))) || (wear_mask && (wear_mask.flags_inv & (HIDEEYES))))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/check_draw_mask()
|
||||
if (!wear_mask)
|
||||
return 0
|
||||
else if (wear_mask.flags_inv & ALWAYSDRAW)
|
||||
return 1
|
||||
else if( head && (head.flags_inv & HIDEEYES))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/check_draw_shoes()
|
||||
if (!shoes)
|
||||
return 0
|
||||
else if (shoes.flags_inv & ALWAYSDRAW)
|
||||
return 1
|
||||
else if(wear_suit && (wear_suit.flags_inv & HIDESHOES))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/check_draw_underclothing()
|
||||
if (!w_uniform)
|
||||
return 0
|
||||
else if (w_uniform.flags_inv & ALWAYSDRAW)
|
||||
return 1
|
||||
else if(wear_suit && (wear_suit.flags_inv & HIDEJUMPSUIT))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#undef MUTATIONS_LAYER
|
||||
#undef DAMAGE_LAYER
|
||||
@@ -1077,3 +1286,4 @@ var/global/list/damage_icon_parts = list()
|
||||
#undef TARGETED_LAYER
|
||||
#undef FIRE_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "paper"
|
||||
item_state = "paper"
|
||||
contained_sprite = 1
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_range = 1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
name = "gun"
|
||||
desc = "Its a gun. It's pretty terrible, though."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
item_icons = list(
|
||||
item_icons = list(//DEPRECATED. USE CONTAINED SPRITES IN FUTURE
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
|
||||
@@ -191,6 +191,12 @@
|
||||
#define SLOT_TIE 16384
|
||||
#define SLOT_HOLSTER 32768 //16th bit
|
||||
|
||||
//Shortcut for allowing an item to fit in any slot. doesnt include denypocket and twoears
|
||||
//This is a helper value, just a sum of several lower ones. it doesn't use a 17th bit
|
||||
#define SLOT_ANY 53247
|
||||
|
||||
|
||||
|
||||
// Flags bitmasks.
|
||||
#define STOPPRESSUREDAMAGE 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
|
||||
// To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
@@ -230,6 +236,7 @@
|
||||
// Turf-only flags.
|
||||
#define NOJAUNT 1 // This is used in literally one place, turf.dm, to block ethereal jaunt.
|
||||
|
||||
|
||||
// Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses.
|
||||
// WARNING: The following flags apply only to the external suit!
|
||||
#define HIDEGLOVES 1
|
||||
@@ -244,6 +251,12 @@
|
||||
#define HIDEEYES 4 // Glasses.
|
||||
#define HIDEFACE 8 // Dictates whether we appear as "Unknown".
|
||||
|
||||
//This flag applies to gloves, uniforms, shoes, masks, ear items, glasses
|
||||
#define ALWAYSDRAW 32//If set, this item is always rendered even if its slot is hidden by other clothing
|
||||
//Note that the item may still not be visible if its sprite is actually covered up.
|
||||
|
||||
|
||||
|
||||
// Slots.
|
||||
#define slot_back 1
|
||||
#define slot_wear_mask 2
|
||||
@@ -276,6 +289,27 @@
|
||||
#define slot_w_uniform_str "w_uniform"
|
||||
#define icon_head "slot_head"
|
||||
|
||||
|
||||
//itemstate suffixes. Used for containedsprite worn items
|
||||
#define WORN_LHAND "_lh"
|
||||
#define WORN_RHAND "_rh"
|
||||
#define WORN_LSTORE "_ls"
|
||||
#define WORN_RSTORE "_rs"
|
||||
#define WORN_SSTORE "_ss"
|
||||
#define WORN_LEAR "_le"
|
||||
#define WORN_REAR "_re"
|
||||
#define WORN_HEAD "_he"
|
||||
#define WORN_UNDER "_un"
|
||||
#define WORN_SUIT "_su"
|
||||
#define WORN_GLOVES "_gl"
|
||||
#define WORN_SHOES "_sh"
|
||||
#define WORN_EYES "_ey"
|
||||
#define WORN_BELT "_be"
|
||||
#define WORN_BACK "_ba"
|
||||
#define WORN_ID "_id"
|
||||
#define WORN_MASK "_ma"
|
||||
|
||||
|
||||
// Bitflags for clothing parts.
|
||||
#define HEAD 1
|
||||
#define FACE 2
|
||||
|
||||
Reference in New Issue
Block a user