Ears matter (and other antenna stuff.) (#10790)

This commit is contained in:
Wowzewow (Wezzy)
2021-01-03 16:36:37 +01:00
committed by GitHub
parent 2c9c34b245
commit f4f95e6c2a
21 changed files with 243 additions and 154 deletions
@@ -64,7 +64,7 @@
/datum/gear/ears/antennae
display_name = "antennae"
path = /obj/item/clothing/head/antenna
path = /obj/item/clothing/ears/antenna
cost = 1
whitelisted = list(SPECIES_IPC, SPECIES_IPC_G1, SPECIES_IPC_G2, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, SPECIES_IPC_BISHOP, SPECIES_IPC_SHELL)
sort_category = "Xenowear - IPC"
@@ -73,23 +73,21 @@
/datum/gear/ears/antennae/New()
..()
var/antenna = list()
antenna["antenna, curved"] = /obj/item/clothing/head/antenna
antenna["antenna, straight"] = /obj/item/clothing/head/antenna/straight
antenna["antenna, spiked"] = /obj/item/clothing/head/antenna/spiked
antenna["antenna, small spiked"] = /obj/item/clothing/head/antenna/spiked/small
antenna["antenna, side"] = /obj/item/clothing/head/antenna/side
antenna["antenna, dish"] = /obj/item/clothing/head/antenna/dish
antenna["antenna, double"] = /obj/item/clothing/head/antenna/double
antenna["antenna, left"] = /obj/item/clothing/head/antenna/double/left
antenna["antenna, right"] = /obj/item/clothing/head/antenna/double/right
antenna["antenna, left horn"] = /obj/item/clothing/head/antenna/double/left/horn
antenna["antenna, right horn"] = /obj/item/clothing/head/antenna/double/right/horn
antenna["antenna, circle"] = /obj/item/clothing/head/antenna/circle
antenna["antenna, curved"] = /obj/item/clothing/ears/antenna/curved
antenna["antenna, straight"] = /obj/item/clothing/ears/antenna/straight
antenna["antenna, circle"] = /obj/item/clothing/ears/antenna/circle
antenna["antenna, tusk"] = /obj/item/clothing/ears/antenna/tusk
antenna["antenna, horn crown"] = /obj/item/clothing/ears/antenna/horncrown
antenna["antenna, dual horns"] = /obj/item/clothing/ears/antenna/horn
antenna["antenna, horn"] = /obj/item/clothing/ears/antenna/horn/single
antenna["antenna, dishes"] = /obj/item/clothing/ears/antenna/dish
antenna["antenna, dual whips"] = /obj/item/clothing/ears/antenna/whip
antenna["antenna, whip"] = /obj/item/clothing/ears/antenna/whip/single
gear_tweaks += new/datum/gear_tweak/path(antenna)
/datum/gear/ears/trinary_halo
display_name = "trinary perfection antenna"
path = /obj/item/clothing/head/antenna/trinary_halo
path = /obj/item/clothing/ears/antenna/trinary_halo
cost = 1
whitelisted = list(SPECIES_IPC, SPECIES_IPC_G1, SPECIES_IPC_G2, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, SPECIES_IPC_BISHOP, SPECIES_IPC_SHELL)
sort_category = "Xenowear - IPC"
+2 -1
View File
@@ -295,7 +295,8 @@
/obj/item/clothing/ears/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_ears()
M.update_inv_l_ear()
M.update_inv_r_ear()
/obj/item/clothing/ears/offear
name = "Other ear"
+74
View File
@@ -0,0 +1,74 @@
//ipc 'pins'
/obj/item/clothing/ears/antenna
name = "antenna"
slot_flags = SLOT_HEAD | SLOT_EARS
body_parts_covered = 0
matter = list(DEFAULT_WALL_MATERIAL = 10)
drop_sound = 'sound/items/drop/component.ogg'
pickup_sound = 'sound/items/pickup/component.ogg'
/obj/item/clothing/ears/antenna/curved
name = "curved antennae"
desc = "A set of decorative antennae. This particular pair is curved in the middle point, arcing upwards. Unfortunately, it doesn't get FM here."
icon_state = "curvedantennae"
item_state = "curvedantennae"
/obj/item/clothing/ears/antenna/straight
name = "straight antennae"
desc = "A set of decorative antennae. This particular pair is straight, jutting out to what is reasonably shoulder width. They don't seem to plug into anything."
icon_state = "straightantennae"
item_state = "straightantennae"
/obj/item/clothing/ears/antenna/circle
name = "circle antennae"
desc = "A set of decorative antennae. This particular pair is circular, mimicking a sattelite dish. Still better than cable, though."
icon_state = "circleantennae"
item_state = "circleantennae"
/obj/item/clothing/ears/antenna/tusk
name = "tusk antennae"
desc = "A set of decorative antennae. This particular pair is stylized like animal tusks, for combat down the runway, of course."
icon_state = "tusk"
item_state = "tusk"
/obj/item/clothing/ears/antenna/horncrown
name = "horn crown antennae"
desc = "A set of decorative antennae. This particular pair is in a spring shape, attached to a large chassis. Careful for doorways."
icon_state = "horncrown"
item_state = "horncrown"
/obj/item/clothing/ears/antenna/horn
name = "horn antennae"
desc = "A set of decorative antennae. This particular pair is in a spring shape, mimicking animal horns."
icon_state = "dual_horn"
item_state = "dual_horn"
/obj/item/clothing/ears/antenna/horn/single
name = "horn antenna"
desc = "A set of decorative antennae. This particular one is in a spring shape, mimicking an animal's horn."
icon_state = "horn"
item_state = "horn"
/obj/item/clothing/ears/antenna/dish
name = "antenna dishes"
desc = "A set of decorative antennae. This particular one is stylized as two tiny dishes, intended to hold excess wiring in a very specific manner. If only they picked up holodramas."
icon_state = "dual_dish"
item_state = "dual_dish"
/obj/item/clothing/ears/antenna/whip
name = "whip antennae"
desc = "A set of decorative antennae. Despite being commonly seen on Shells, nobody knows what these actually do."
icon_state = "dual_whip"
item_state = "dual_whip"
/obj/item/clothing/ears/antenna/whip/single
name = "whip antenna"
desc = "A decorative antenna. Despite being commonly seen on Shells, nobody knows what these actually do."
icon_state = "whip"
item_state = "whip"
/obj/item/clothing/ears/antenna/trinary_halo
name = "trinary perfection antenna"
desc = "A decorative antenna that is commonly worn by IPCs who serve the Trinary Perfection. It resembles a golden gear."
icon_state = "trinary_halo"
item_state = "trinary_halo"
+1 -81
View File
@@ -281,6 +281,7 @@
)
flags_inv = BLOCKHAIR
siemens_coefficient = 2.0 //why is it so conductive?!
/obj/item/clothing/head/hijab //It might've taken a year but here's your Hijab's, Dea.
name = "hijab"
desc = "Encompassing cloth headwear worn by some human cultures and religions."
@@ -508,87 +509,6 @@
icon_state = "ruby_crest"
item_state = "ruby_crest"
//ipc 'pins'
/obj/item/clothing/head/antenna
name = "curved antennae"
desc = "A set of decorative antennae. This particular pair is curved in the middle point, arcing upwards. Unfortunately, it doesn't get FM here."
icon_state = "curvedantennae"
item_state = "curvedantennae"
slot_flags = SLOT_HEAD | SLOT_EARS
body_parts_covered = 0
matter = list(DEFAULT_WALL_MATERIAL = 10)
drop_sound = 'sound/items/drop/component.ogg'
pickup_sound = 'sound/items/pickup/component.ogg'
/obj/item/clothing/head/antenna/straight
name = "straight antennae"
desc = "A set of decorative antennae. This particular pair is straight, jutting out to what is reasonably shoulder width. They don't seem to plug into anything."
icon_state = "straightantennae"
item_state = "straightantennae"
/obj/item/clothing/head/antenna/spiked
name = "spiked chassis mounts"
desc = "Two large mounts holding up chassis protrusions on either side of the head. Careful for doorways."
icon_state = "horncrown"
item_state = "horncrown"
/obj/item/clothing/head/antenna/spiked/small
name = "small chassis horns"
desc = "Two small mounts holding up chassis protrusions on either side of the head, sans head crown."
icon_state = "horn"
item_state = "horncrown"
/obj/item/clothing/head/antenna/side
name = "side chassis mounts"
desc = "Two large mounts holding up chassis protrusions on either side of the head."
icon_state = "tusk"
item_state = "tusk"
/obj/item/clothing/head/antenna/dish
name = "head dishes"
desc = "Two tiny dishes intended to hold excess wiring in a very specific manner and mostly end up being used as decoration. If only they picked up holodramas."
icon_state = "dish"
item_state = "dish"
/obj/item/clothing/head/antenna/double
name = "antenna ears"
desc = "Despite being commonly seen on Shells, nobody knows what these actually do."
icon_state = "dual_robot_antennae"
item_state = "dual_robot_antennae"
/obj/item/clothing/head/antenna/double/left/horn
name = "left antenna horn"
icon_state = "left_horn"
item_state = "left_horn"
/obj/item/clothing/head/antenna/double/left
name = "left antenna ear"
icon_state = "left_robot_antennae"
item_state = "left_robot_antennae"
/obj/item/clothing/head/antenna/double/right
name = "right antenna ear"
icon_state = "right_robot_antennae"
item_state = "right_robot_antennae"
/obj/item/clothing/head/antenna/double/right/horn
name = "right antenna horn"
icon_state = "right_horn"
item_state = "right_horn"
/obj/item/clothing/head/antenna/circle
name = "circle antenna"
icon_state = "circleantenna"
item_state = "dish"
/obj/item/clothing/head/antenna/trinary_halo
name = "trinary perfection antenna"
desc = "A decorative antenna that is commonly worn by IPCs who serve the Trinary Perfection. It resembles a golden gear."
icon_state = "trinary_halo"
item_state = "trinary_halo"
/obj/item/clothing/head/fake_culthood
name = "occultist hood"
icon_state = "culthood"
@@ -120,15 +120,16 @@ This saves us from having to call add_fingerprint() any time something is put in
var/obj/item/I = W
if(I.flags_inv & (HIDEMASK|BLOCKHAIR|BLOCKHEADHAIR))
update_hair(0) //rebuild hair
update_inv_ears(0)
update_inv_l_ear(0)
update_inv_r_ear(0)
update_inv_wear_mask(0)
update_inv_head()
else if (W == l_ear)
l_ear = null
update_inv_ears()
update_inv_l_ear()
else if (W == r_ear)
r_ear = null
update_inv_ears()
update_inv_r_ear()
else if (W == shoes)
shoes = null
update_inv_shoes()
@@ -142,7 +143,8 @@ This saves us from having to call add_fingerprint() any time something is put in
var/obj/item/I = W
if(I.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR))
update_hair(0) //rebuild hair
update_inv_ears(0)
update_inv_l_ear(0)
update_inv_r_ear(0)
if(internal)
if(internals)
internals.icon_state = "internal0"
@@ -203,7 +205,8 @@ This saves us from having to call add_fingerprint() any time something is put in
src.wear_mask = W
if(wear_mask.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR))
update_hair(redraw_mob) //rebuild hair
update_inv_ears(0)
update_inv_l_ear(0)
update_inv_r_ear(0)
W.equipped(src, slot)
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
@@ -237,7 +240,7 @@ This saves us from having to call add_fingerprint() any time something is put in
src.r_ear = O
O.layer = SCREEN_LAYER+0.01
W.equipped(src, slot)
update_inv_ears(redraw_mob)
update_inv_l_ear(redraw_mob)
if(slot_r_ear)
src.r_ear = W
if(r_ear.slot_flags & SLOT_TWOEARS)
@@ -246,7 +249,7 @@ This saves us from having to call add_fingerprint() any time something is put in
src.l_ear = O
O.layer = SCREEN_LAYER+0.01
W.equipped(src, slot)
update_inv_ears(redraw_mob)
update_inv_r_ear(redraw_mob)
if(slot_glasses)
src.glasses = W
W.equipped(src, slot)
@@ -259,7 +262,8 @@ This saves us from having to call add_fingerprint() any time something is put in
src.head = W
if(head.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR|HIDEMASK))
update_hair(redraw_mob) //rebuild hair
update_inv_ears(0)
update_inv_l_ear(0)
update_inv_r_ear(0)
update_inv_wear_mask(0)
W.equipped(src, slot)
update_inv_head(redraw_mob)
@@ -41,7 +41,8 @@ There are several things that need to be remembered:
update_inv_r_hand()
update_inv_belt()
update_inv_wear_id()
update_inv_ears()
update_inv_l_ear()
update_inv_r_ear()
update_inv_s_store()
update_inv_pockets()
update_inv_back()
@@ -103,16 +104,17 @@ There are several things that need to be remembered:
#define SUIT_STORE_LAYER 17
#define BACK_LAYER 18
#define HAIR_LAYER 19
#define EARS_LAYER 20
#define FACEMASK_LAYER 21
#define HEAD_LAYER 22
#define COLLAR_LAYER 23
#define HANDCUFF_LAYER 24
#define LEGCUFF_LAYER 25
#define L_HAND_LAYER 26
#define R_HAND_LAYER 27
#define FIRE_LAYER 28 //If you're on fire
#define TOTAL_LAYERS 28
#define L_EAR_LAYER 20
#define R_EAR_LAYER 21
#define FACEMASK_LAYER 22
#define HEAD_LAYER 23
#define COLLAR_LAYER 24
#define HANDCUFF_LAYER 25
#define LEGCUFF_LAYER 26
#define L_HAND_LAYER 27
#define R_HAND_LAYER 28
#define FIRE_LAYER 29 //If you're on fire
#define TOTAL_LAYERS 29
//////////////////////////////////
#define UNDERSCORE_OR_NULL(target) "[target ? "[target]_" : ""]"
@@ -496,7 +498,8 @@ There are several things that need to be remembered:
update_inv_wear_id(FALSE)
update_inv_gloves(FALSE)
update_inv_glasses(FALSE)
update_inv_ears(FALSE)
update_inv_l_ear(FALSE)
update_inv_r_ear(FALSE)
update_inv_shoes(FALSE)
update_inv_s_store(FALSE)
update_inv_wear_mask(FALSE)
@@ -706,50 +709,88 @@ There are several things that need to be remembered:
if(update_icons)
update_icon()
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
if (QDELING(src))
/mob/living/carbon/human/update_inv_l_ear(var/update_icons=1)
if(QDELING(src))
return
overlays_raw[EARS_LAYER] = null
if (check_draw_ears())
var/result_layer
if(check_draw_ears())
if(l_ear)
var/t_type = l_ear.icon_state
l_ear.screen_loc = ui_l_ear
var/image/result_layer = null
//Determine the icon to use
var/t_icon = INV_L_EAR_DEF_ICON
if(l_ear.contained_sprite)
l_ear.auto_adapt_species(src)
t_type = "[UNDERSCORE_OR_NULL(l_ear.icon_species_tag)][l_ear.item_state][WORN_LEAR]"
result_layer = image(l_ear.icon_override || l_ear.icon, t_type)
else if(l_ear.icon_override)
result_layer = image(l_ear.icon_override, "[t_type]_l")
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[GET_BODY_TYPE])
result_layer = image(l_ear.sprite_sheets[GET_BODY_TYPE], "[t_type]_l")
else
result_layer = image('icons/mob/ears.dmi', "[t_type]")
var/t_state = "[UNDERSCORE_OR_NULL(l_ear.icon_species_tag)][l_ear.item_state][WORN_LEAR]"
result_layer = image(l_ear.icon_override || l_ear.icon, t_state)
else if(l_ear.icon_override)
t_icon = l_ear.icon_override
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[GET_BODY_TYPE])
t_icon = l_ear.sprite_sheets[GET_BODY_TYPE]
else if(l_ear.item_icons && (slot_l_ear_str in l_ear.item_icons))
t_icon = l_ear.item_icons[slot_l_ear_str]
else
t_icon = INV_L_EAR_DEF_ICON
if(!result_layer) //Create the image
result_layer = image(t_icon, l_ear.icon_state)
if(l_ear.color)
result_layer.color = l_ear.color
var/image/worn_overlays = l_ear.worn_overlays(t_icon)
if(worn_overlays)
result_layer.overlays.Add(worn_overlays)
overlays_raw[L_EAR_LAYER] = result_layer
else
overlays_raw[L_EAR_LAYER] = null
if(update_icons)
update_icon()
/mob/living/carbon/human/update_inv_r_ear(var/update_icons=1)
if(QDELING(src))
return
if(check_draw_ears())
if(r_ear)
var/image/I
var/t_type = r_ear.icon_state
r_ear.screen_loc = ui_r_ear
var/image/result_layer = null
//Determine the icon to use
var/t_icon = INV_R_EAR_DEF_ICON
if(r_ear.contained_sprite)
r_ear.auto_adapt_species(src)
t_type = "[UNDERSCORE_OR_NULL(r_ear.icon_species_tag)][r_ear.item_state][WORN_REAR]"
I = image(r_ear.icon_override || r_ear.icon, t_type)
var/t_state = "[UNDERSCORE_OR_NULL(r_ear.icon_species_tag)][r_ear.item_state][WORN_REAR]"
result_layer = image(r_ear.icon_override || r_ear.icon, t_state)
else if(r_ear.icon_override)
I = image(r_ear.icon_override, "[t_type]_r")
t_icon = r_ear.icon_override
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[GET_BODY_TYPE])
I = image(r_ear.sprite_sheets[GET_BODY_TYPE], "[t_type]_r")
t_icon = r_ear.sprite_sheets[GET_BODY_TYPE]
else if(r_ear.item_icons && (slot_r_ear_str in r_ear.item_icons))
t_icon = r_ear.item_icons[slot_r_ear_str]
else
I = image('icons/mob/ears.dmi', "[t_type]")
t_icon = INV_R_EAR_DEF_ICON
if (result_layer)
result_layer = list(result_layer, I)
I.color = r_ear.color
else
result_layer = I
if(!result_layer) //Create the image
result_layer = image(t_icon, r_ear.icon_state)
overlays_raw[EARS_LAYER] = result_layer
if(r_ear.color)
result_layer.color = r_ear.color
var/image/worn_overlays = r_ear.worn_overlays(t_icon)
if(worn_overlays)
result_layer.overlays.Add(worn_overlays)
overlays_raw[R_EAR_LAYER] = result_layer
else
overlays_raw[R_EAR_LAYER] = null
if(update_icons)
update_icon()
@@ -1515,7 +1556,8 @@ There are several things that need to be remembered:
#undef SUIT_STORE_LAYER
#undef BACK_LAYER
#undef HAIR_LAYER
#undef EARS_LAYER
#undef L_EAR_LAYER
#undef R_EAR_LAYER
#undef FACEMASK_LAYER
#undef HEAD_LAYER
#undef COLLAR_LAYER
+4 -1
View File
@@ -58,7 +58,10 @@
/mob/proc/update_inv_pockets()
return
/mob/proc/update_inv_ears()
/mob/proc/update_inv_l_ear()
return
/mob/proc/update_inv_r_ear()
return
/mob/proc/update_targeted()