mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 16:08:32 +01:00
Merge remote-tracking branch 'upstream/master' into bobross
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
var/ghetto = FALSE
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
var/datum/component/mobhook
|
||||
var/datum/radial_menu/persistent/wiring_gui_menu
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -86,7 +86,7 @@
|
||||
/obj/item/twohanded/rcl/Destroy()
|
||||
QDEL_NULL(loaded)
|
||||
last = null
|
||||
QDEL_NULL(mobhook)
|
||||
listeningTo = null
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return ..()
|
||||
|
||||
@@ -141,9 +141,8 @@
|
||||
|
||||
/obj/item/twohanded/rcl/dropped(mob/wearer)
|
||||
..()
|
||||
if(mobhook)
|
||||
active = FALSE
|
||||
QDEL_NULL(mobhook)
|
||||
UnregisterSignal(wearer, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
last = null
|
||||
|
||||
/obj/item/twohanded/rcl/attack_self(mob/user)
|
||||
@@ -158,13 +157,12 @@
|
||||
break
|
||||
|
||||
obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
if(to_hook)
|
||||
if(mobhook && mobhook.parent != to_hook)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = to_hook.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger)))
|
||||
else
|
||||
QDEL_NULL(mobhook)
|
||||
if(listeningTo == to_hook)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(to_hook, COMSIG_MOVABLE_MOVED, .proc/trigger)
|
||||
listeningTo = to_hook
|
||||
|
||||
/obj/item/twohanded/rcl/proc/trigger(mob/user)
|
||||
if(active)
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
return
|
||||
@@ -204,8 +203,8 @@
|
||||
var/M = get(paddles, /mob)
|
||||
remove_paddles(M)
|
||||
QDEL_NULL(paddles)
|
||||
. = ..()
|
||||
update_icon()
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/defibrillator/proc/deductcharge(chrgdeductamt)
|
||||
if(cell)
|
||||
@@ -246,7 +245,6 @@
|
||||
|
||||
/obj/item/defibrillator/compact/loaded/Initialize()
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
|
||||
@@ -258,7 +256,6 @@
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/Initialize()
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
cell = new /obj/item/stock_parts/cell/infinite(src)
|
||||
update_icon()
|
||||
|
||||
@@ -293,31 +290,28 @@
|
||||
var/grab_ghost = FALSE
|
||||
var/tlimit = DEFIB_TIME_LIMIT * 10
|
||||
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(req_defib)
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/check_range)))
|
||||
if(!req_defib)
|
||||
return
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/Moved()
|
||||
. = ..()
|
||||
check_range()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_range()
|
||||
if(!req_defib)
|
||||
if(!req_defib || !defib)
|
||||
return
|
||||
if(!in_range(src,defib))
|
||||
var/mob/living/L = loc
|
||||
if(istype(L))
|
||||
to_chat(L, "<span class='warning'>[defib]'s paddles overextend and come out of your hands!</span>")
|
||||
L.temporarilyRemoveItemFromInventory(src,TRUE)
|
||||
else
|
||||
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
|
||||
snap_back()
|
||||
snap_back()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
|
||||
if(req_defib || !time)
|
||||
@@ -358,14 +352,14 @@
|
||||
/obj/item/twohanded/shockpaddles/dropped(mob/user)
|
||||
if(!req_defib)
|
||||
return ..()
|
||||
if (mobhook)
|
||||
QDEL_NULL(mobhook)
|
||||
if(user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
snap_back()
|
||||
if(user != loc)
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
snap_back()
|
||||
return unwield(user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/snap_back()
|
||||
|
||||
@@ -205,21 +205,25 @@
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/item/geiger_counter/cyborg
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_RAD_ACT = CALLBACK(src, .proc/redirect_rad_act)))
|
||||
if(listeningTo == user)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
RegisterSignal(user, COMSIG_ATOM_RAD_ACT, .proc/redirect_rad_act)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
rad_act(amount)
|
||||
|
||||
/obj/item/geiger_counter/cyborg/dropped()
|
||||
. = ..()
|
||||
QDEL_NULL(mobhook)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
listeningTo = null
|
||||
|
||||
#undef RAD_LEVEL_NORMAL
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
|
||||
@@ -35,6 +35,24 @@
|
||||
drop_sound = 'sound/items/handling/multitool_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/multitool_pickup.ogg'
|
||||
|
||||
/obj/item/multitool/chaplain
|
||||
name = "\improper hypertool"
|
||||
desc = "Used for pulsing wires to test which to cut. Also emits microwaves to fry some brains!"
|
||||
damtype = BRAIN
|
||||
force = 18
|
||||
armour_penetration = 35
|
||||
hitsound = 'sound/effects/sparks4.ogg'
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/obj/item/multitool/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/multitool/examine(mob/user)
|
||||
. = ..()
|
||||
if(selected_io)
|
||||
|
||||
@@ -547,7 +547,9 @@ GENE SCANNER
|
||||
var/turf/location = user.loc
|
||||
if(!istype(location))
|
||||
return
|
||||
scan_turf(user, location)
|
||||
|
||||
/obj/item/analyzer/proc/scan_turf(mob/user, turf/location)
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
@@ -658,6 +660,20 @@ GENE SCANNER
|
||||
amount += inaccurate
|
||||
return DisplayTimeText(max(1,amount))
|
||||
|
||||
/obj/item/analyzer/ranged
|
||||
desc = "A hand-held scanner which uses advanced spectroscopy and infrared readings to analyze gases as a distance. Alt-Click to use the built in barometer function."
|
||||
name = "long-range analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "ranged_analyzer"
|
||||
|
||||
/obj/item/analyzer/ranged/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(target.tool_act(user, src, tool_behaviour))
|
||||
return
|
||||
// Tool act didn't scan it, so let's get it's turf.
|
||||
var/turf/location = get_turf(target)
|
||||
scan_turf(user, location)
|
||||
|
||||
/proc/atmosanalyzer_scan(mixture, mob/living/user, atom/target = src)
|
||||
var/icon = target
|
||||
user.visible_message("[user] has used the analyzer on [icon2html(icon, viewers(src))] [target].", "<span class='notice'>You use the analyzer on [icon2html(icon, user)] [target].</span>")
|
||||
|
||||
@@ -48,4 +48,10 @@
|
||||
icon_state = "clustaur"
|
||||
item_state = "clustaur"
|
||||
deliveryamt = 5
|
||||
spawner_type = /obj/item/reagent_containers/glass/beaker/waterbottle/wataur
|
||||
spawner_type = /obj/item/reagent_containers/glass/beaker/waterbottle/wataur
|
||||
|
||||
/obj/item/grenade/spawnergrenade/mimics
|
||||
desc = "Months after their first arrival, compression tests were already successful and thus Kinaris created the first mimic bioweapon, a simple payload to quickly release a cluster of them."
|
||||
name = "mimic delivery grenade"
|
||||
spawner_type = /mob/living/simple_animal/hostile/hs13mimic
|
||||
deliveryamt = 10
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
GLOB.poi_list += src
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_POST_THROW = CALLBACK(src, .proc/move_gracefully)))
|
||||
RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, .proc/move_gracefully)
|
||||
|
||||
/obj/item/his_grace/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
@@ -229,12 +229,12 @@
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/reskinned = FALSE
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/nullrod/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE)
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/nullrod/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is killing [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to get closer to god!</span>")
|
||||
@@ -248,7 +248,12 @@
|
||||
if(GLOB.holy_weapon_type)
|
||||
return
|
||||
var/obj/item/holy_weapon
|
||||
var/list/holy_weapons_list = subtypesof(/obj/item/nullrod)
|
||||
var/list/holy_weapons_list = subtypesof(/obj/item/nullrod) + list(
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/chaplain,
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain,
|
||||
/obj/item/multitool/chaplain,
|
||||
/obj/item/melee/baseball_bat/chaplain
|
||||
)
|
||||
var/list/display_names = list()
|
||||
var/list/nullrod_icons = list()
|
||||
for(var/V in holy_weapons_list)
|
||||
@@ -289,6 +294,13 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
|
||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||
user.setDir(i)
|
||||
if(i == WEST)
|
||||
user.emote("flip")
|
||||
sleep(1)
|
||||
|
||||
/obj/item/nullrod/godhand
|
||||
icon_state = "disintegrate"
|
||||
item_state = "disintegrate"
|
||||
@@ -344,7 +356,6 @@
|
||||
sharpness = IS_SHARP
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
@@ -541,7 +552,6 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
attack_verb = list("smashed", "bashed", "hammered", "crunched")
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/nullrod/chainsaw
|
||||
name = "chainsaw hand"
|
||||
@@ -606,6 +616,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 12
|
||||
reach = 2
|
||||
attack_verb = list("whipped", "lashed")
|
||||
hitsound = 'sound/weapons/chainhit.ogg'
|
||||
@@ -682,6 +693,44 @@
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
|
||||
/obj/item/nullrod/claymore/bostaff/attack(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(iscyborg(target))
|
||||
return ..()
|
||||
if(!isliving(target))
|
||||
return ..()
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat || C.health < 0 || C.staminaloss > 130 )
|
||||
to_chat(user, "<span class='warning'>It would be dishonorable to attack a foe while they cannot retaliate.</span>")
|
||||
return
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/list/fluffmessages = list("[user] clubs [H] with [src]!", \
|
||||
"[user] smacks [H] with the butt of [src]!", \
|
||||
"[user] broadsides [H] with [src]!", \
|
||||
"[user] smashes [H]'s head with [src]!", \
|
||||
"[user] beats [H] with front of [src]!", \
|
||||
"[user] twirls and slams [H] with [src]!")
|
||||
H.visible_message("<span class='warning'>[pick(fluffmessages)]</span>", \
|
||||
"<span class='userdanger'>[pick(fluffmessages)]</span>")
|
||||
playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
H.adjustStaminaLoss(rand(12,18))
|
||||
if(prob(25))
|
||||
(INVOKE_ASYNC(src, .proc/jedi_spin, user))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/nullrod/tribal_knife
|
||||
icon_state = "crysknife"
|
||||
item_state = "crysknife"
|
||||
@@ -695,7 +744,6 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -223,6 +223,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("sauna oven", /obj/structure/sauna_oven, 30, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
|
||||
@@ -1,439 +1,441 @@
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/storage/bag
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/storage/bag/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_quick_gather = TRUE
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.click_gather = TRUE
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/insertable = TRUE
|
||||
|
||||
/obj/item/storage/bag/trash/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_combined_w_class = 30
|
||||
STR.max_items = 30
|
||||
STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
|
||||
|
||||
/obj/item/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
/obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 60
|
||||
STR.max_items = 60
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
|
||||
var/datum/component/mobhook
|
||||
|
||||
/obj/item/storage/bag/ore/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 50
|
||||
|
||||
/obj/item/storage/bag/ore/equipped(mob/user)
|
||||
. = ..()
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/Pickup_ores)))
|
||||
|
||||
/obj/item/storage/bag/ore/dropped()
|
||||
. = ..()
|
||||
if (mobhook)
|
||||
QDEL_NULL(mobhook)
|
||||
|
||||
/obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user)
|
||||
var/show_message = FALSE
|
||||
var/obj/structure/ore_box/box
|
||||
var/turf/tile = user.loc
|
||||
if (!isturf(tile))
|
||||
return
|
||||
if (istype(user.pulling, /obj/structure/ore_box))
|
||||
box = user.pulling
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
for(var/A in tile)
|
||||
if (!is_type_in_typecache(A, STR.can_hold))
|
||||
continue
|
||||
if (box)
|
||||
user.transferItemToLoc(A, box)
|
||||
show_message = TRUE
|
||||
else if(SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, A, user, TRUE))
|
||||
show_message = TRUE
|
||||
else
|
||||
if(!spam_protection)
|
||||
to_chat(user, "<span class='warning'>Your [name] is full and can't hold any more!</span>")
|
||||
spam_protection = TRUE
|
||||
continue
|
||||
if(show_message)
|
||||
playsound(user, "rustle", 50, TRUE)
|
||||
if (box)
|
||||
user.visible_message("<span class='notice'>[user] offloads the ores beneath [user.p_them()] into [box].</span>", \
|
||||
"<span class='notice'>You offload the ores beneath you into your [box].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scoops up the ores beneath [user.p_them()].</span>", \
|
||||
"<span class='notice'>You scoop up the ores beneath you with your [name].</span>")
|
||||
spam_protection = FALSE
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/large
|
||||
name = "large mining satchel"
|
||||
desc = "This bag can hold three times the ore in many small pockets. Shockingly foldable and compact for its volume."
|
||||
|
||||
/obj/item/storage/bag/ore/large/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
/obj/item/storage/bag/ore/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_items = INFINITY
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_combined_stack_amount = INFINITY
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/plants/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 100
|
||||
STR.max_items = 100
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb))
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Kinaris storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/sheet))
|
||||
STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood))
|
||||
STR.max_combined_stack_amount = 300
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_combined_stack_amount = 500
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/books/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_items = 7
|
||||
STR.display_numerical_stacking = FALSE
|
||||
STR.can_hold = typecacheof(list(/obj/item/book, /obj/item/storage/book, /obj/item/spellbook))
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
materials = list(MAT_METAL=3000)
|
||||
|
||||
/obj/item/storage/bag/tray/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 15 //I want my sushi god damn it
|
||||
STR.insert_preposition = "on"
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/reagent_containers/food,
|
||||
/obj/item/kitchen,
|
||||
/obj/item/storage/box/donkpockets))
|
||||
|
||||
/obj/item/storage/bag/tray/pre_attack(atom/A, mob/living/user, params)
|
||||
if(istype(A, /obj/structure/table) && user.a_intent == INTENT_HELP) //I want my tray god damn it
|
||||
if(user.transferItemToLoc(src, get_turf(A)))
|
||||
var/list/click_params = params2list(params)
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.quick_empty()
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/update_icon()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
var/mutable_appearance/MA = new (I) //I want my icons god damn it
|
||||
MA.pixel_x = rand(-6, 6)
|
||||
MA.pixel_y = rand(-6, 6)
|
||||
add_overlay(MA)
|
||||
|
||||
/obj/item/storage/bag/tray/Entered()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/Exited()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/chemistry/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 50
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/syringe/dart, /obj/item/reagent_containers/chem_pack))
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/bio/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 25
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube))
|
||||
|
||||
/obj/item/storage/bag/bio/holding
|
||||
name = "bio bag of holding"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bspace_biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
|
||||
/obj/item/storage/bag/bio/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_items = 100
|
||||
|
||||
/*
|
||||
* Construction bag (for engineering, holds stock parts and electronics)
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/construction
|
||||
name = "construction bag"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "construction_bag"
|
||||
desc = "A bag for storing small construction components."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/construction/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 100
|
||||
STR.max_items = 50
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore/bluespace_crystal, /obj/item/assembly, /obj/item/stock_parts, /obj/item/reagent_containers/glass/beaker, /obj/item/stack/cable_coil, /obj/item/circuitboard, /obj/item/electronics))
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/storage/bag
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/storage/bag/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_quick_gather = TRUE
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.click_gather = TRUE
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/insertable = TRUE
|
||||
|
||||
/obj/item/storage/bag/trash/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_combined_w_class = 30
|
||||
STR.max_items = 30
|
||||
STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
|
||||
|
||||
/obj/item/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
/obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 60
|
||||
STR.max_items = 60
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
|
||||
var/mob/listeningTo
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/bag/ore/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 50
|
||||
|
||||
/obj/item/storage/bag/ore/equipped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo == user)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/storage/bag/ore/dropped()
|
||||
. = ..()
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
|
||||
/obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user)
|
||||
var/show_message = FALSE
|
||||
var/obj/structure/ore_box/box
|
||||
var/turf/tile = user.loc
|
||||
if (!isturf(tile))
|
||||
return
|
||||
if (istype(user.pulling, /obj/structure/ore_box))
|
||||
box = user.pulling
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
for(var/A in tile)
|
||||
if (!is_type_in_typecache(A, STR.can_hold))
|
||||
continue
|
||||
if (box)
|
||||
user.transferItemToLoc(A, box)
|
||||
show_message = TRUE
|
||||
else if(SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, A, user, TRUE))
|
||||
show_message = TRUE
|
||||
else
|
||||
if(!spam_protection)
|
||||
to_chat(user, "<span class='warning'>Your [name] is full and can't hold any more!</span>")
|
||||
spam_protection = TRUE
|
||||
continue
|
||||
if(show_message)
|
||||
playsound(user, "rustle", 50, TRUE)
|
||||
if (box)
|
||||
user.visible_message("<span class='notice'>[user] offloads the ores beneath [user.p_them()] into [box].</span>", \
|
||||
"<span class='notice'>You offload the ores beneath you into your [box].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scoops up the ores beneath [user.p_them()].</span>", \
|
||||
"<span class='notice'>You scoop up the ores beneath you with your [name].</span>")
|
||||
spam_protection = FALSE
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/large
|
||||
name = "large mining satchel"
|
||||
desc = "This bag can hold three times the ore in many small pockets. Shockingly foldable and compact for its volume."
|
||||
|
||||
/obj/item/storage/bag/ore/large/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
/obj/item/storage/bag/ore/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_items = INFINITY
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_combined_stack_amount = INFINITY
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/plants/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 100
|
||||
STR.max_items = 100
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb))
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Kinaris storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/sheet))
|
||||
STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood))
|
||||
STR.max_combined_stack_amount = 300
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_combined_stack_amount = 500
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/books/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_items = 7
|
||||
STR.display_numerical_stacking = FALSE
|
||||
STR.can_hold = typecacheof(list(/obj/item/book, /obj/item/storage/book, /obj/item/spellbook))
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/storage/bag/tray
|
||||
name = "serving tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
materials = list(MAT_METAL=3000)
|
||||
|
||||
/obj/item/storage/bag/tray/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL //Allows stuff such as Bowls, and normal sized foods, to fit.
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/reagent_containers/food,
|
||||
/obj/item/reagent_containers/glass,
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/storage/fancy,
|
||||
/obj/item/storage/box/matches,
|
||||
/obj/item/trash,
|
||||
/obj/item/lighter,
|
||||
/obj/item/rollingpaper,
|
||||
/obj/item/kitchen,
|
||||
/obj/item/organ,
|
||||
)) //Should cover: Bottles, Beakers, Bowls, Booze, Glasses, Food, Food Containers, Food Trash, Organs, Tobacco Products, Lighters, and Kitchen Tools.
|
||||
STR.insert_preposition = "on"
|
||||
STR.max_items = 10
|
||||
|
||||
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_QUICK_EMPTY)
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
INVOKE_ASYNC(src, .proc/do_scatter, I)
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, TRUE)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, TRUE)
|
||||
|
||||
if(ishuman(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/proc/do_scatter(obj/item/I)
|
||||
for(var/i in 1 to rand(1,2))
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
/obj/item/storage/bag/tray/update_overlays()
|
||||
. = ..()
|
||||
for(var/obj/item/I in contents)
|
||||
var/mutable_appearance/I_copy = new(I)
|
||||
I_copy.plane = FLOAT_PLANE
|
||||
I_copy.layer = FLOAT_LAYER
|
||||
. += I_copy
|
||||
|
||||
/obj/item/storage/bag/tray/Entered()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/Exited()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/chemistry/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 50
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/syringe/dart, /obj/item/reagent_containers/chem_pack))
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/bio/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 25
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube))
|
||||
|
||||
/obj/item/storage/bag/bio/holding
|
||||
name = "bio bag of holding"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bspace_biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
|
||||
/obj/item/storage/bag/bio/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_items = 100
|
||||
|
||||
/*
|
||||
* Construction bag (for engineering, holds stock parts and electronics)
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/construction
|
||||
name = "construction bag"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "construction_bag"
|
||||
desc = "A bag for storing small construction components."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/construction/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 100
|
||||
STR.max_items = 50
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore/bluespace_crystal, /obj/item/assembly, /obj/item/stock_parts, /obj/item/reagent_containers/glass/beaker, /obj/item/stack/cable_coil, /obj/item/circuitboard, /obj/item/electronics))
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
new /obj/item/extinguisher/mini(src)
|
||||
new /obj/item/analyzer(src)
|
||||
new /obj/item/analyzer/ranged(src)
|
||||
//much roomier now that we've managed to remove two tools
|
||||
|
||||
/obj/item/storage/belt/utility/full/PopulateContents()
|
||||
|
||||
@@ -849,18 +849,20 @@
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
var/zoom_out_amt = 6
|
||||
var/zoom_amt = 10
|
||||
|
||||
/obj/item/twohanded/binoculars/Destroy()
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/binoculars/wield(mob/user)
|
||||
. = ..()
|
||||
if(!wielded)
|
||||
return
|
||||
if(QDELETED(mobhook))
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/unwield)))
|
||||
else
|
||||
user.TakeComponent(mobhook)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/unwield)
|
||||
listeningTo = user
|
||||
user.visible_message("[user] holds [src] up to [user.p_their()] eyes.","You hold [src] up to your eyes.")
|
||||
item_state = "binoculars_wielded"
|
||||
user.regenerate_icons()
|
||||
@@ -884,7 +886,8 @@
|
||||
|
||||
/obj/item/twohanded/binoculars/unwield(mob/user)
|
||||
. = ..()
|
||||
mobhook.RemoveComponent()
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
user.visible_message("[user] lowers [src].","You lower [src].")
|
||||
item_state = "binoculars"
|
||||
user.regenerate_icons()
|
||||
|
||||
@@ -531,6 +531,19 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
var/homerun_able = 0
|
||||
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain
|
||||
name = "blessed baseball bat"
|
||||
desc = "There ain't a cult in the league that can withstand a swatter."
|
||||
force = 14
|
||||
throwforce = 14
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/melee/baseball_bat/homerun
|
||||
name = "home run bat"
|
||||
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
|
||||
|
||||
Reference in New Issue
Block a user