mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Duffelbag tweaks (#22513)
- Duffelbags no longer give slowdown. Instead, you'll have to set them down first before using them. Slowdown is a pretty abhorrent malus, so much so that they've mostly went extinct on the server. Experimenting with this feature inspired from Eris. Might extend it to backpacks (also very unused due to lack of drip) and look for it as an alternative to trading something other than slowdown for slots.
This commit is contained in:
@@ -31,6 +31,14 @@
|
||||
* Suffix used for overlays with an attached sleeping bag, because satchels are at people's sides while other bags are on people's backs.
|
||||
*/
|
||||
var/attached_icon = "backpack"
|
||||
/**
|
||||
* If the object may be accessed while equipped in a storage slot.
|
||||
*/
|
||||
var/worn_access = TRUE
|
||||
/**
|
||||
* If the object may be accessed while equipped anywhere on a character, including hands.
|
||||
*/
|
||||
var/equip_access = TRUE
|
||||
|
||||
/obj/item/storage/backpack/antagonist_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
@@ -104,6 +112,8 @@
|
||||
H.drop_from_inventory(attached_bag)
|
||||
attached_bag.loc = null
|
||||
return
|
||||
if (!worn_check())
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/update_icon()
|
||||
@@ -131,6 +141,33 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/open(mob/user)
|
||||
if (!worn_check())
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/storage/backpack/proc/worn_check(no_message = FALSE)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(!istype(M))
|
||||
return TRUE //not equipped
|
||||
if(!worn_access && (slot_flags & SLOT_BACK) && M.get_equipped_item(slot_back) == src)
|
||||
if(!no_message)
|
||||
to_chat(M, SPAN_WARNING("Your arms are not long enough to open \the [src] while it is on your back!"))
|
||||
if(use_sound)
|
||||
playsound(loc, use_sound, 50, 1, -5)
|
||||
if(animated)
|
||||
animate_parent()
|
||||
return FALSE
|
||||
if(!equip_access && (ismob(loc)))
|
||||
if(!no_message)
|
||||
to_chat(M, SPAN_WARNING("\The [src] is too cumbersome to handle, you're going to have to set it down somewhere!"))
|
||||
if(use_sound)
|
||||
playsound(loc, use_sound, 50, 1, -5)
|
||||
if(animated)
|
||||
animate_parent()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
* Backpack Types
|
||||
@@ -592,7 +629,8 @@
|
||||
icon = 'icons/obj/storage/duffelbag.dmi'
|
||||
icon_state = "duffel"
|
||||
item_state = "duffel"
|
||||
slowdown = 0.3
|
||||
worn_access = FALSE
|
||||
equip_access = FALSE
|
||||
max_storage_space = DEFAULT_DUFFELBAG_STORAGE
|
||||
straps = TRUE
|
||||
|
||||
@@ -657,7 +695,8 @@
|
||||
desc = "A snazzy black and red duffel bag, perfect for smuggling C4 and Parapens. It seems to be made of a lighter material."
|
||||
icon_state = "duffel-syndie"
|
||||
item_state = "duffel-syndie"
|
||||
slowdown = 0
|
||||
worn_access = TRUE
|
||||
equip_access = TRUE
|
||||
empty_delay = 0.8 SECOND
|
||||
|
||||
/obj/item/storage/backpack/duffel/cmo
|
||||
|
||||
Reference in New Issue
Block a user