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:
NanakoAC
2016-08-25 16:55:42 +02:00
committed by skull132
parent c77b9d2793
commit e240def2bf
51 changed files with 672 additions and 273 deletions
+36 -15
View File
@@ -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
+3 -1
View File
@@ -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