mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-15 20:02:16 +00:00
Refactored hitby to be in line with TG's version. Refactored item weight defines to a more clear naming scheme, also in line with TG's version. Refactored how the movement bumps are handled, ported signals to handle them, in preparation for the movement update. Fixed disposal hit bouncing the hitting atom on the wall. Items do not push other items anymore if they are tiny.
64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
/obj/item/key
|
|
name = "key"
|
|
desc = "Used to unlock things."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "keys"
|
|
drop_sound = 'sound/items/drop/ring.ogg'
|
|
pickup_sound = 'sound/items/pickup/ring.ogg'
|
|
w_class = WEIGHT_CLASS_TINY
|
|
var/key_data = ""
|
|
|
|
/obj/item/key/New(var/newloc,var/data)
|
|
if(data)
|
|
key_data = data
|
|
..(newloc)
|
|
|
|
/obj/item/key/proc/get_data(var/mob/user)
|
|
return key_data
|
|
|
|
/obj/item/key/soap
|
|
name = "soap key"
|
|
desc = "a fragile key made using a bar of soap."
|
|
var/uses = 0
|
|
|
|
/obj/item/key/soap/get_data(var/mob/user)
|
|
uses--
|
|
if(uses <= 0)
|
|
user.drop_from_inventory(src,user)
|
|
to_chat(user, SPAN_WARNING("\The [src] crumbles in your hands!"))
|
|
qdel(src)
|
|
return ..()
|
|
|
|
/obj/item/key/bike
|
|
name = "bike key"
|
|
desc = "Used to start a bike."
|
|
icon_state = "key_tag_gray"
|
|
|
|
/obj/item/key/bike/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
|
. = ..()
|
|
if(distance <= 1)
|
|
. += "\The [src] has a small tag attached to it, written on it is '[key_data]'."
|
|
|
|
/obj/item/key/bike/sport
|
|
name = "sports bike key"
|
|
desc = "Used to start a sporty, fast bike."
|
|
icon_state = "key_tag_red"
|
|
|
|
/obj/item/key/bike/sport/Initialize(mapload, ...)
|
|
. = ..()
|
|
icon_state = pick("key_tag_red", "key_tag_blue")
|
|
|
|
/obj/item/key/bike/moped
|
|
name = "moped key"
|
|
desc = "Used to start a cheap moped bike."
|
|
icon_state = "key_tag_green"
|
|
|
|
/obj/item/key/bike/moped/Initialize(mapload, ...)
|
|
. = ..()
|
|
icon_state = pick("key_tag_gray", "key_tag_green", "key_tag_purple")
|
|
|
|
/obj/item/key/bike/police
|
|
name = "police bike key"
|
|
desc = "Used to start a police bike."
|
|
icon_state = "key_tag_police"
|