simple research (#26806)

Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
This commit is contained in:
jjpark-kb
2024-04-18 17:32:02 +02:00
committed by GitHub
co-authored by Useroth
parent b2a97d82de
commit 8b02b8360c
12 changed files with 364 additions and 14 deletions
@@ -128,11 +128,13 @@
if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
to_chat(user, span_notice("You do not have an experiment selected!"))
return
if(!(config_flags & EXPERIMENT_CONFIG_IMMEDIATE_ACTION) && !do_after(user, 1 SECONDS, target = target))
var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/research, SKILL_SPEED_MODIFIER) //SKYRAT EDIT: Research Skill (simple research)
if(!(config_flags & EXPERIMENT_CONFIG_IMMEDIATE_ACTION) && !do_after(user, 1 SECONDS * skill_modifier, target = target)) //SKYRAT EDIT: Research Skill (simple research)
return
if(action_experiment(source, target))
playsound(user, 'sound/machines/ping.ogg', 25)
to_chat(user, span_notice("You scan [target]."))
user.mind.adjust_experience(/datum/skill/research, 5) //SKYRAT EDIT: Research Skill (simple research)
else if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
playsound(user, 'sound/machines/buzz-sigh.ogg', 25)
to_chat(user, span_notice("[target] is not related to your currently selected experiment."))
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1,145 @@
/datum/crafting_recipe/research_paper
name = "Reseach Paper"
result = /obj/item/research_paper
time = 4 SECONDS
reqs = list(
/obj/item/stack/sheet/cloth = 4,
)
category = CAT_TOOLS
/obj/item/research_paper
name = "research paper"
desc = "Some people want to return to simpler technology, and some want to only begin researching those simple technologies."
icon = 'modular_skyrat/modules/simple_research/researching.dmi'
icon_state = "scroll"
///the list of discovered items
var/list/discovered_items = list()
///list of the shapes we use
var/static/list/shape_list = list("pyramid", "cube", "sphere")
///the list that is used when we wonder about the shapes
var/static/list/shape_parts = list("faces", "edges", "vertices")
///the list that is used when we wonder about the shape parts
var/static/list/thinking_list = list("wonder", "think", "ponder", "reason", "meditate", "reflect")
///Contains images of all radial icons
var/static/list/radial_icons_cache = list()
/obj/item/research_paper/Initialize(mapload)
. = ..()
if(!length(GLOB.simple_research))
var/list/possible_combinations = list()
for(var/shape_one in shape_list)
for(var/shape_two in shape_list)
for(var/shape_three in shape_list)
possible_combinations += "[shape_one][shape_two][shape_three]"
//lets assign the research items to the patterns
for(var/datum_path in subtypesof(/datum/simple_research))
var/shape_pattern = pick_n_take(possible_combinations)
GLOB.simple_research += list("[shape_pattern]" = datum_path)
radial_icons_cache = list(
"pyramid" = image(icon = 'modular_skyrat/modules/simple_research/researching.dmi', icon_state = "pyramid"),
"cube" = image(icon = 'modular_skyrat/modules/simple_research/researching.dmi', icon_state = "cube"),
"sphere" = image(icon = 'modular_skyrat/modules/simple_research/researching.dmi', icon_state = "sphere"),
)
/obj/item/research_paper/attack_self(mob/user, modifiers)
. = ..()
var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/research, SKILL_SPEED_MODIFIER)
var/shape_one = show_radial_menu(user, src, radial_icons_cache, require_near = TRUE)
to_chat(user, span_notice("You begin to [pick(thinking_list)] about the [shape_one]... and then [pick(thinking_list)] about their [pick(shape_parts)]..."))
if(!do_after(user, 5 SECONDS * skill_modifier, src))
to_chat(user, span_warning("You stopped researching."))
return
user.mind.adjust_experience(/datum/skill/research, 5)
var/shape_two = show_radial_menu(user, src, radial_icons_cache, require_near = TRUE)
to_chat(user, span_notice("You begin to [pick(thinking_list)] about the [shape_two]... and then [pick(thinking_list)] about their [pick(shape_parts)]..."))
if(!do_after(user, 5 SECONDS * skill_modifier, src))
to_chat(user, span_warning("You stopped researching."))
return
user.mind.adjust_experience(/datum/skill/research, 5)
var/shape_three = show_radial_menu(user, src, radial_icons_cache, require_near = TRUE)
to_chat(user, span_notice("You begin to [pick(thinking_list)] about the [shape_three]... and then [pick(thinking_list)] about their [pick(shape_parts)]..."))
if(!do_after(user, 5 SECONDS * skill_modifier, src))
to_chat(user, span_warning("You stopped researching."))
return
user.mind.adjust_experience(/datum/skill/research, 5)
var/datum/simple_research/find_research = GLOB.simple_research["[shape_one][shape_two][shape_three]"]
if(!find_research)
to_chat(user, span_warning("You were researching a dead end!"))
return
find_research = new find_research()
var/failure_amount = length(find_research.required_items)
for(var/check_required in find_research.required_items)
for(var/check_discovered in discovered_items)
if(check_required == check_discovered)
--failure_amount
if(failure_amount > 0)
to_chat(user, span_warning("You are unable to research this! You are missing [failure_amount] pre-requisite items!"))
return
if(!locate(find_research.type) in discovered_items)
discovered_items += find_research.type
var/obj/item/research_scrap/spawned_scrap = new(get_turf(src))
var/prob_modifier = user.mind.get_skill_modifier(/datum/skill/research, SKILL_PROBS_MODIFIER)
if(find_research.skilled_item && prob(prob_modifier))
spawned_scrap.spawning_item = find_research.skilled_item
else
spawned_scrap.spawning_item = find_research.research_item
user.mind.adjust_experience(/datum/skill/research, 10)
qdel(find_research)
/obj/item/research_scrap
name = "research scrap"
desc = "Small sketches of an item are drawn on the scrap-- if you use the materials, you might be able to craft the item on the scrap!"
icon = 'modular_skyrat/modules/simple_research/researching.dmi'
icon_state = "scrap"
///what will be spawned
var/obj/spawning_item
///has both glass and metal been used to build the item?
var/material_satisfied = list(FALSE, FALSE)
/obj/item/research_scrap/attackby(obj/item/attacking_item, mob/user, params)
if(istype(attacking_item, /obj/item/stack/sheet/iron))
research_use(attacking_item, user, 2)
return
if(istype(attacking_item, /obj/item/stack/sheet/glass))
research_use(attacking_item, user, 1)
return
return ..()
/obj/item/research_scrap/proc/research_use(obj/item/stack/attacking_stack, mob/user, number = 1)
if(!attacking_stack || !istype(attacking_stack))
return
if(material_satisfied[number])
to_chat(user, span_warning("You have already used [attacking_stack] on this scrap!"))
return
if(!attacking_stack.use(1))
to_chat(user, span_warning("You were unable to use [attacking_stack]!"))
return
to_chat(user, span_notice("You use [attacking_stack] on [src]."))
material_satisfied[number] = TRUE
if(material_satisfied[1] && material_satisfied[2])
new spawning_item(get_turf(src))
to_chat(user, span_notice("You completed [src]."))
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(src)
@@ -0,0 +1,18 @@
/datum/skill/research
name = "Researching"
title = "Researcher"
desc = "Those who desire to discover the mysteries of the universe-- or taste rocks."
modifiers = list(
SKILL_SPEED_MODIFIER = list(1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.25),
SKILL_PROBS_MODIFIER = list(0, 5, 10, 20, 40, 80, 100)
)
skill_item_path = /obj/item/clothing/neck/cloak/skill_reward/researching
/obj/item/clothing/neck/cloak/skill_reward/researching
name = "legendary researcher's cloak"
desc = "This legendary cloak is awarded only to those who have created a large stir within the scientific community with their contributions. \
Those who wear this cloak create the scientific foundations, and have the ability to discern the truth of the universe even from the most mundane things."
icon = 'modular_skyrat/modules/simple_research/cloaks.dmi'
worn_icon = 'modular_skyrat/modules/simple_research/neck.dmi'
icon_state = "researchcloak"
associated_skill_path = /datum/skill/research
Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

@@ -0,0 +1,114 @@
GLOBAL_LIST_EMPTY(simple_research)
/datum/simple_research
///the item that results from successful research symbols
var/research_item
///the item that, if you hit the probability from research skill, will spawn instead
var/skilled_item
///any pre-req items for this simple research
var/list/required_items = list()
/**
* 19 items
*/
/datum/simple_research/scanner
research_item = /obj/item/stock_parts/scanning_module
skilled_item = /obj/item/stock_parts/scanning_module/adv
/datum/simple_research/capacitor
research_item = /obj/item/stock_parts/capacitor
skilled_item = /obj/item/stock_parts/capacitor/adv
/datum/simple_research/servo
research_item = /obj/item/stock_parts/servo
skilled_item = /obj/item/stock_parts/servo/nano
/datum/simple_research/micro_laser
research_item = /obj/item/stock_parts/micro_laser
skilled_item = /obj/item/stock_parts/micro_laser/high
/datum/simple_research/matter_bin
research_item = /obj/item/stock_parts/matter_bin
skilled_item = /obj/item/stock_parts/matter_bin/adv
/datum/simple_research/cell
research_item = /obj/item/stock_parts/cell
skilled_item = /obj/item/stock_parts/cell/high
/datum/simple_research/cable
research_item = /obj/item/stack/cable_coil/five
skilled_item = /obj/item/stack/cable_coil
/datum/simple_research/part_replacer
research_item = /obj/item/storage/part_replacer
skilled_item = /obj/item/storage/part_replacer/bluespace
required_items = list(
/datum/simple_research/cable,
)
/datum/simple_research/protolathe
research_item = /obj/item/circuitboard/machine/protolathe/offstation
required_items = list(
/datum/simple_research/part_replacer,
)
/datum/simple_research/circuit_imprinter
research_item = /obj/item/circuitboard/machine/circuit_imprinter/offstation
required_items = list(
/datum/simple_research/part_replacer,
)
/datum/simple_research/rdconsole
research_item = /obj/item/circuitboard/computer/rdconsole
required_items = list(
/datum/simple_research/protolathe,
/datum/simple_research/circuit_imprinter,
)
/datum/simple_research/pipe_dispenser
research_item = /obj/item/pipe_dispenser
skilled_item = /obj/item/pipe_dispenser/bluespace
required_items = list(
/datum/simple_research/multitool,
)
/datum/simple_research/inducer
research_item = /obj/item/inducer/empty
skilled_item = /obj/item/inducer/syndicate
required_items = list(
/datum/simple_research/cell,
)
/datum/simple_research/pacman
research_item = /obj/item/circuitboard/machine/pacman
skilled_item = /obj/item/circuitboard/machine/rtg
required_items = list(
/datum/simple_research/cell,
)
/datum/simple_research/smes
research_item = /obj/item/circuitboard/machine/smes
required_items = list(
/datum/simple_research/pacman,
)
/datum/simple_research/drill
research_item = /obj/item/pickaxe/drill
skilled_item = /obj/item/pickaxe/drill/diamonddrill
/datum/simple_research/chem_dispenser
research_item = /obj/item/circuitboard/machine/chem_dispenser
required_items = list(
/datum/simple_research/igniter,
/datum/simple_research/condenser,
)
/datum/simple_research/igniter
research_item = /obj/item/assembly/igniter
/datum/simple_research/condenser
research_item = /obj/item/assembly/igniter/condenser
/datum/simple_research/multitool
research_item = /obj/item/multitool
skilled_item = /obj/item/multitool/abductor
@@ -46,6 +46,7 @@
. += span_notice("[scanned ? "This item has been scanned. Max Depth: [max_depth] cm. Safe Depth: [safe_depth] cm." : "This item has not been scanned."]")
if(adv_scanned)
. += span_notice("The item depth is [item_depth] cm.")
. += span_notice("[measured ? "This item has been measured. Dug Depth: [dug_depth]." : "This item has not been measured."]")
if(measured && dug_depth > item_depth)
. += span_warning("The rock is crumbling, even just brushing it will destroy it!")
@@ -56,9 +57,11 @@
if(1 to 60)
hidden_item = pick_weight(GLOB.tier1_reward)
choose_tier = REWARD_ONE
if(61 to 87)
hidden_item = pick_weight(GLOB.tier2_reward)
choose_tier = REWARD_TWO
if(88 to 100)
hidden_item = pick_weight(GLOB.tier3_reward)
choose_tier = REWARD_THREE
@@ -73,6 +76,7 @@
/obj/item/xenoarch/strange_rock/proc/get_measured()
if(measured)
return FALSE
measured = TRUE
return TRUE
@@ -82,91 +86,113 @@
if(!adv_scanned && use_advanced)
adv_scanned = TRUE
return TRUE
return FALSE
scanned = TRUE
if(use_advanced)
adv_scanned = TRUE
return TRUE
/obj/item/xenoarch/strange_rock/proc/try_dig(dig_amount)
if(!dig_amount)
return DIG_UNDEFINED
dug_depth += dig_amount
if(dug_depth > item_depth)
qdel(src)
return DIG_DELETE
return DIG_ROCK
/obj/item/xenoarch/strange_rock/proc/try_uncover()
if(dug_depth > item_depth)
qdel(src)
return BRUSH_DELETE
if(dug_depth == item_depth)
new hidden_item(get_turf(src))
qdel(src)
return BRUSH_UNCOVER
try_dig(1)
return BRUSH_NONE
/obj/item/xenoarch/strange_rock/attackby(obj/item/I, mob/living/user, params)
/obj/item/xenoarch/strange_rock/attackby(obj/item/attacking_item, mob/living/user, params)
. = ..()
if(istype(I, /obj/item/xenoarch/hammer))
var/obj/item/xenoarch/hammer/xeno_hammer = I
var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/research, SKILL_SPEED_MODIFIER)
if(istype(attacking_item, /obj/item/xenoarch/hammer))
var/obj/item/xenoarch/hammer/xeno_hammer = attacking_item
to_chat(user, span_notice("You begin carefully using your hammer."))
if(!do_after(user, xeno_hammer.dig_speed, target = src))
if(!do_after(user, xeno_hammer.dig_speed * skill_modifier, target = src))
to_chat(user, span_warning("You interrupt your careful planning, damaging the rock in the process!"))
dug_depth += rand(1,5)
return
switch(try_dig(xeno_hammer.dig_amount))
if(DIG_UNDEFINED)
message_admins("Tell coders something broke with xenoarch hammers and dig amount.")
return
if(DIG_DELETE)
to_chat(user, span_warning("The rock crumbles, leaving nothing behind."))
return
if(DIG_ROCK)
to_chat(user, span_notice("You successfully dig around the item."))
user.mind.adjust_experience(/datum/skill/research, xeno_hammer.dig_amount)
if(istype(I, /obj/item/xenoarch/brush))
var/obj/item/xenoarch/brush/xeno_brush = I
if(istype(attacking_item, /obj/item/xenoarch/brush))
var/obj/item/xenoarch/brush/xeno_brush = attacking_item
to_chat(user, span_notice("You begin carefully using your brush."))
if(!do_after(user, xeno_brush.dig_speed, target = src))
if(!do_after(user, xeno_brush.dig_speed * skill_modifier, target = src))
to_chat(user, span_warning("You interrupt your careful planning, damaging the rock in the process!"))
dug_depth += rand(1,5)
return
switch(try_uncover())
if(BRUSH_DELETE)
to_chat(user, span_warning("The rock crumbles, leaving nothing behind."))
return
if(BRUSH_UNCOVER)
to_chat(user, span_notice("You successfully brush around the item, fully revealing the item!"))
user.mind.adjust_experience(/datum/skill/research, 20)
return
if(BRUSH_NONE)
to_chat(user, span_notice("You brush around the item, but it wasn't revealed... hammer some more."))
if(istype(I, /obj/item/xenoarch/tape_measure))
if(istype(attacking_item, /obj/item/xenoarch/tape_measure))
to_chat(user, span_notice("You begin carefully using your measuring tape."))
if(!do_after(user, 4 SECONDS, target = src))
if(!do_after(user, 4 SECONDS * skill_modifier, target = src))
to_chat(user, span_warning("You interrupt your careful planning, damaging the rock in the process!"))
dug_depth += rand(1,5)
return
if(get_measured())
to_chat(user, span_notice("You successfully attach a holo measuring tape to the strange rock; the strange rock will now report its dug depth always!"))
user.mind.adjust_experience(/datum/skill/research, 5)
return
to_chat(user, span_warning("The strange rock was already marked with a holo measuring tape."))
if(istype(I, /obj/item/xenoarch/handheld_scanner))
var/obj/item/xenoarch/handheld_scanner/item_scanner = I
if(istype(attacking_item, /obj/item/xenoarch/handheld_scanner))
var/obj/item/xenoarch/handheld_scanner/item_scanner = attacking_item
to_chat(user, span_notice("You begin to scan [src] using [item_scanner]."))
if(!do_after(user, item_scanner.scanning_speed, target = src))
if(!do_after(user, item_scanner.scanning_speed * skill_modifier, target = src))
to_chat(user, span_warning("You interrupt your scanning, damaging the rock in the process!"))
dug_depth += rand(1,5)
return
if(get_scanned(item_scanner.scan_advanced))
to_chat(user, span_notice("You successfully attach a holo scanning module to the strange rock; the strange rock will now report its depth information always!"))
user.mind.adjust_experience(/datum/skill/research, 5)
if(adv_scanned)
to_chat(user, span_notice("The rock's item depth is being reported!"))
return
to_chat(user, span_warning("The strange rock was already marked with a holo scanning module."))
//turfs
@@ -15,16 +15,21 @@
if(istype(src, /obj/item/xenoarch/useless_relic/magnified))
balloon_alert(user, "already magnified!")
return
if(!HAS_TRAIT(user, TRAIT_XENOARCH_QUALIFIED))
balloon_alert(user, "needs training!") // it was very tempting to replace this with "skill issue"
return
balloon_alert(user, "starting analysis!")
if(!do_after(user, 5 SECONDS, target = src))
balloon_alert(user, "stand still!")
return
loc.balloon_alert(user, "magnified!")
user.mind.adjust_experience(/datum/skill/research, 5)
spawn_magnified(magnified_number)
return
return ..()
#define ANCIENT_URN 1
@@ -45,41 +50,49 @@
new_item.desc = "This useless relic is an ancient urn that dates from around [rand(400,600)] years ago. \
It has made of a ceramic substance and is clearly crumbling at the edges. Perhaps it has ashes \
of someone from long ago."
if(ANCIENT_BOWL)
new_item.name = "ancient bowl"
new_item.desc = "This useless relic is an ancient bowl that dates from around [rand(400,600)] years ago. \
It is made of a bronze alloy and is dented, with some scratches along the inside. Perhaps it could \
have had DNA of someone from long ago."
if(ANCIENT_CROWN)
new_item.name = "ancient crown"
new_item.desc = "This useless relic is an ancient crown that dates from around [rand(900,1100)] years ago. \
It is made from some unknown alloy, with small inlets that would have been used for jewels. Perhaps if we \
look around, we could find some of those old jewels."
if(ANCIENT_COIL)
new_item.name = "ancient coil"
new_item.desc = "This useless relic is an ancient coil that dates from around [rand(400,600)] years ago. \
It is made of iron and copper. It has some burn marks around the iron rod. Perhaps later on, we could \
use it for some machines."
if(ANCIENT_LIGHT)
new_item.name = "ancient light"
new_item.desc = "This useless relic is an ancient light that dates from around [rand(400,600)] years ago. \
It is made of iron and has glass shards around it. It has dents on the iron and clear damage from misuse. \
Perhaps we could research this later on to see how the ancients made lights."
if(ANCIENT_CUP)
new_item.name = "ancient cup"
new_item.desc = "This useless relic is an ancient cup that dates from around [rand(900,1100)] years ago. \
It is made of hardened stone. There are small cracks all along the surface, as long as chisel marks. \
Perhaps it will give insight into the ancient's eating and drinking habits."
if(ANCIENT_UTENSILS)
new_item.name = "ancient utensils"
new_item.desc = "These useless relics are ancient utensils that dates from around [rand(900,1100)] years ago. \
It is made of hardened stone. There are small cracks all along the surface, as long as chisel marks. \
Perhaps it will give insight into the ancient's eating and drinking habits."
if(ANCIENT_R_BOWL)
new_item.name = "ancient rock bowl"
new_item.desc = "This useless relic is an ancient rock bowl that dates from around [rand(900,1100)] years ago. \
It is made of hardened stone. There are small cracks all along the surface, as long as chisel marks. \
Perhaps it will give insight into the ancient's eating and drinking habits."
new_item.desc += " Whatever use it possibly had in the past, its only use now is either as a museum piece, or being sold off to collectors via the Cargo shuttle."
qdel(src)
@@ -106,6 +106,7 @@
var/choice = tgui_input_list(user, "Remove the rocks from [src]?", "Rock Removal", list("Yes", "No"))
if(choice != "Yes")
return
var/turf/src_turf = get_turf(src)
for(var/obj/item/removed_item in storage_unit.contents)
removed_item.forceMove(src_turf)
@@ -16,6 +16,7 @@
. = ..()
if(advanced)
. += span_notice("This is an advanced hammer. It can change its digging depth from 1 to 30. Click to change depth.")
. += span_notice("Current Digging Depth: [dig_amount]cm")
/obj/item/xenoarch/hammer/attack_self(mob/user, modifiers)
@@ -23,20 +24,24 @@
if(!advanced)
to_chat(user, span_warning("This is not an advanced hammer, it cannot change its digging depth."))
return
var/user_choice = input(user, "Choose the digging depth. 1 to 30", "Digging Depth Selection") as null|num
if(!user_choice)
dig_amount = 1
dig_speed = 1
return
if(dig_amount <= 0)
dig_amount = 1
dig_speed = 1
return
var/round_dig = round(user_choice)
if(round_dig >= 30)
dig_amount = 30
dig_speed = 30
return
dig_amount = round_dig
dig_speed = round_dig * 0.5
to_chat(user, span_notice("You change the hammer's digging depth to [round_dig]cm."))
@@ -131,45 +136,61 @@
/obj/item/xenoarch/handheld_recoverer/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
if(!proximity_flag)
return
var/turf/target_turf = get_turf(target)
if(istype(target, /obj/item/xenoarch/broken_item/tech))
var/spawn_item = pick_weight(GLOB.tech_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/weapon))
var/spawn_item = pick_weight(GLOB.weapon_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/illegal))
var/spawn_item = pick_weight(GLOB.illegal_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/alien))
var/spawn_item = pick_weight(GLOB.alien_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/plant))
var/spawn_item = pick_weight(GLOB.plant_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/clothing))
var/spawn_item = pick_weight(GLOB.clothing_reward)
new spawn_item(target_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
if(istype(target, /obj/item/xenoarch/broken_item/animal))
var/spawn_item
var/turf/src_turf = get_turf(src)
for(var/looptime in 1 to rand(1,4))
spawn_item = pick_weight(GLOB.animal_reward)
new spawn_item(src_turf)
user.mind.adjust_experience(/datum/skill/research, 5)
qdel(target)
return
return ..()
/obj/item/storage/belt/utility/xenoarch
@@ -222,8 +243,10 @@
. = ..()
if(listeningTo == user)
return
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(pickup_rocks))
listeningTo = user
@@ -231,6 +254,7 @@
. = ..()
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
listeningTo = null
/obj/item/storage/bag/xenoarch/proc/pickup_rocks(mob/living/user)
@@ -244,17 +268,21 @@
for(var/A in tile)
if (!is_type_in_typecache(A, atom_storage.can_hold))
continue
else if(atom_storage.attempt_insert(A, user))
show_message = TRUE
else
if(!spam_protection)
to_chat(user, span_warning("Your [name] is full and can't hold any more!"))
spam_protection = TRUE
continue
if(show_message)
playsound(user, SFX_RUSTLE, 50, TRUE)
user.visible_message(span_notice("[user] scoops up the rocks beneath [user.p_them()]."), \
span_notice("You scoop up the rocks beneath you with your [name]."))
spam_protection = FALSE
/obj/item/storage/bag/xenoarch/adv
+3
View File
@@ -8116,6 +8116,9 @@
#include "modular_skyrat\modules\SiliconQoL\code\_onclick.dm"
#include "modular_skyrat\modules\SiliconQoL\code\countdown.dm"
#include "modular_skyrat\modules\SiliconQoL\code\robotic_factory.dm"
#include "modular_skyrat\modules\simple_research\research_document.dm"
#include "modular_skyrat\modules\simple_research\research_skill.dm"
#include "modular_skyrat\modules\simple_research\simple_research.dm"
#include "modular_skyrat\modules\skyrat-uplinks\code\categories\bundles.dm"
#include "modular_skyrat\modules\skyrat-uplinks\code\categories\dangerous.dm"
#include "modular_skyrat\modules\skyrat-uplinks\code\categories\device_tools.dm"