mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 03:26:21 +01:00
- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of. - Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions! This commit should not bring any change whatsoever to the game from a player's perspective. Revision: r3659 Author: baloh.matevz
63 lines
1.2 KiB
Plaintext
63 lines
1.2 KiB
Plaintext
// EARS
|
|
|
|
/obj/item/clothing/ears
|
|
name = "ears"
|
|
w_class = 1.0
|
|
throwforce = 2
|
|
slot_flags = SLOT_EARS
|
|
var/twoeared = 0
|
|
|
|
/obj/item/clothing/ears/attack_hand(mob/user as mob)
|
|
if (!user) return
|
|
|
|
if (src.loc != user || !istype(user,/mob/living/carbon/human))
|
|
..()
|
|
return
|
|
var/mob/living/carbon/human/H = user
|
|
if(H.l_ear != src && H.r_ear != src)
|
|
..()
|
|
return
|
|
|
|
if(!canremove)
|
|
return
|
|
|
|
var/obj/item/clothing/ears/O
|
|
if(twoeared)
|
|
O = (H.l_ear == src ? H.r_ear : H.l_ear)
|
|
user.u_equip(O)
|
|
if(!istype(src,/obj/item/clothing/ears/offear))
|
|
del(O)
|
|
O = src
|
|
else
|
|
O = src
|
|
|
|
user.u_equip(src)
|
|
|
|
if (O)
|
|
user.put_in_hand(O)
|
|
O.add_fingerprint(user)
|
|
|
|
if(istype(src,/obj/item/clothing/ears/offear))
|
|
del(src)
|
|
|
|
/obj/item/clothing/ears/offear
|
|
name = "Other ear"
|
|
w_class = 5.0
|
|
icon = 'screen1_old.dmi'
|
|
icon_state = "block"
|
|
twoeared = 1
|
|
|
|
New(var/obj/O)
|
|
name = O.name
|
|
desc = O.desc
|
|
icon = O.icon
|
|
icon_state = O.icon_state
|
|
dir = O.dir
|
|
|
|
/obj/item/clothing/ears/earmuffs
|
|
name = "earmuffs"
|
|
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
|
icon_state = "earmuffs"
|
|
protective_temperature = 500
|
|
item_state = "earmuffs"
|
|
twoeared = 1 |