mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
Merge pull request #8554 from RemieRichards/MonkeyHats
Monkeys can wear hats!
This commit is contained in:
@@ -322,6 +322,7 @@
|
||||
<HR>
|
||||
<B><FONT size=3>[name]</FONT></B>
|
||||
<HR>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=[slot_head]'> [(head && !(head.flags&ABSTRACT)) ? head : "Nothing"]</A>
|
||||
<BR><B>Mask:</B> <A href='?src=\ref[src];item=[slot_wear_mask]'> [(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Nothing"]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=[slot_l_hand]'> [(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "Nothing"]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=[slot_r_hand]'> [(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Nothing"]</A>"}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/obj/item/back = null
|
||||
var/obj/item/clothing/mask/wear_mask = null
|
||||
var/obj/item/weapon/tank/internal = null
|
||||
var/obj/item/head = null
|
||||
|
||||
var/datum/dna/dna = null//Carbon
|
||||
var/heart_attack = 0
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
var/obj/item/belt = null
|
||||
var/obj/item/gloves = null
|
||||
var/obj/item/glasses = null
|
||||
var/obj/item/head = null
|
||||
var/obj/item/ears = null
|
||||
var/obj/item/wear_id = null
|
||||
var/obj/item/r_store = null
|
||||
|
||||
@@ -268,11 +268,6 @@
|
||||
else if(I == glasses)
|
||||
glasses = null
|
||||
update_inv_glasses(0)
|
||||
else if(I == head)
|
||||
head = null
|
||||
if(I.flags & BLOCKHAIR)
|
||||
update_hair(0) //rebuild hair
|
||||
update_inv_head(0)
|
||||
else if(I == ears)
|
||||
ears = null
|
||||
update_inv_ears(0)
|
||||
|
||||
@@ -138,7 +138,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
|
||||
//HAIR OVERLAY
|
||||
/mob/living/carbon/human/proc/update_hair()
|
||||
/mob/living/carbon/human/update_hair()
|
||||
//Reset our hair
|
||||
remove_overlay(HAIR_LAYER)
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
return back
|
||||
if(slot_wear_mask)
|
||||
return wear_mask
|
||||
if(slot_head)
|
||||
return head
|
||||
if(slot_handcuffed)
|
||||
return handcuffed
|
||||
if(slot_legcuffed)
|
||||
@@ -12,4 +14,17 @@
|
||||
return l_hand
|
||||
if(slot_r_hand)
|
||||
return r_hand
|
||||
return null
|
||||
return null
|
||||
|
||||
|
||||
/mob/living/carbon/unEquip(obj/item/I)
|
||||
. = ..()
|
||||
if(!. || !I)
|
||||
return
|
||||
|
||||
if(I == head)
|
||||
head = null
|
||||
if(I.flags & BLOCKHAIR)
|
||||
update_hair(0)
|
||||
update_inv_head(0)
|
||||
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
if (src.handcuffed)
|
||||
msg += "It is \icon[src.handcuffed] handcuffed!\n"
|
||||
if (src.head)
|
||||
msg += "It has \icon[src.head] \a [src.head] on its head. \n"
|
||||
if (src.wear_mask)
|
||||
msg += "It has \icon[src.wear_mask] \a [src.wear_mask] on its head.\n"
|
||||
msg += "It has \icon[src.wear_mask] \a [src.wear_mask] on its face.\n"
|
||||
if (src.l_hand)
|
||||
msg += "It has \icon[src.l_hand] \a [src.l_hand] in its left hand.\n"
|
||||
if (src.r_hand)
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
if( !(I.slot_flags & SLOT_MASK) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_head)
|
||||
if(head)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_HEAD) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_back)
|
||||
if(back)
|
||||
return 0
|
||||
@@ -43,6 +49,10 @@
|
||||
wear_mask = I
|
||||
I.equipped(src, slot)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_head)
|
||||
head = I
|
||||
I.equipped(src, slot)
|
||||
update_inv_head(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
handcuffed = I
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
@@ -70,3 +80,6 @@
|
||||
I.loc = src
|
||||
I.equipped(src, slot)
|
||||
I.layer = 20
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
//Monkey Overlays Indexes////////
|
||||
#define M_FIRE_LAYER 6
|
||||
#define M_MASK_LAYER 5
|
||||
#define M_FIRE_LAYER 7
|
||||
#define M_MASK_LAYER 6
|
||||
#define M_HEAD_LAYER 5
|
||||
#define M_BACK_LAYER 4
|
||||
#define M_HANDCUFF_LAYER 3
|
||||
#define M_L_HAND_LAYER 2
|
||||
#define M_R_HAND_LAYER 1
|
||||
#define M_TOTAL_LAYERS 6
|
||||
#define M_TOTAL_LAYERS 7
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
@@ -14,6 +15,7 @@
|
||||
/mob/living/carbon/monkey/regenerate_icons()
|
||||
..()
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_head(0)
|
||||
update_inv_back(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
@@ -39,7 +41,7 @@
|
||||
if(client && hud_used)
|
||||
client.screen += wear_mask
|
||||
overlays -= overlays_standing[M_MASK_LAYER]
|
||||
var/image/standing = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]", "layer" = -M_MASK_LAYER)
|
||||
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]", "layer" = -M_MASK_LAYER)
|
||||
if(!istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
overlays_standing[M_MASK_LAYER] = standing
|
||||
@@ -50,6 +52,21 @@
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_head(var/update_icons=1)
|
||||
if(head)
|
||||
head.screen_loc = ui_monkey_head
|
||||
if(client && hud_used)
|
||||
client.screen += head
|
||||
overlays -= overlays_standing[M_HEAD_LAYER]
|
||||
var/image/standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]", "layer" = -M_HEAD_LAYER)
|
||||
overlays_standing[M_HEAD_LAYER] = standing
|
||||
overlays += overlays_standing[M_HEAD_LAYER]
|
||||
else
|
||||
overlays -= overlays_standing[M_HEAD_LAYER]
|
||||
overlays_standing[M_HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
||||
if (handcuffed)
|
||||
drop_r_hand()
|
||||
@@ -61,7 +78,9 @@
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays -= overlays_standing[M_R_HAND_LAYER]
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state" = t_state, "layer" = -M_R_HAND_LAYER)
|
||||
var/image/standing = image("icon" = r_hand.righthand_file, "icon_state" = t_state, "layer" = -M_R_HAND_LAYER)
|
||||
standing.pixel_y = 2
|
||||
overlays_standing[M_R_HAND_LAYER] = standing
|
||||
overlays += overlays_standing[M_R_HAND_LAYER]
|
||||
else
|
||||
overlays -= overlays_standing[M_R_HAND_LAYER]
|
||||
@@ -80,7 +99,9 @@
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays -= overlays_standing[M_L_HAND_LAYER]
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state" = t_state, "layer" = -M_L_HAND_LAYER)
|
||||
var/image/standing = image("icon" = l_hand.lefthand_file, "icon_state" = t_state, "layer" = -M_L_HAND_LAYER)
|
||||
standing.pixel_y = 2
|
||||
overlays_standing[M_L_HAND_LAYER] = standing
|
||||
overlays += overlays_standing[M_L_HAND_LAYER]
|
||||
else
|
||||
overlays -= overlays_standing[M_L_HAND_LAYER]
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
/mob/proc/update_inv_head()
|
||||
return
|
||||
|
||||
/mob/proc/update_hair()
|
||||
return
|
||||
|
||||
/mob/proc/update_inv_gloves()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user