forked from DopplerShift13/DopplerShift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DopplerShift13#260 from She-Is-Trying-To-Form-Her-…
…First-Thought/epic-loot-episode-2 Epic Loot Episode 2
- Loading branch information
Showing
33 changed files
with
2,118 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/// The trait that determines if someone has the system shock quirk. | ||
#define TRAIT_SYSTEM_SHOCK "trait_system_shock" | ||
|
||
/// The trait that determines if someone has the system shock quirk. | ||
#define TRAIT_SYSTEM_SHOCK "trait_system_shock" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/obj/structure/maintenance_loot_structure | ||
name = "abandoned crate" | ||
icon = 'modular_doppler/epic_loot/icons/loot_structures.dmi' | ||
density = TRUE | ||
anchored = TRUE | ||
layer = BELOW_OBJ_LAYER | ||
obj_flags = CAN_BE_HIT | ||
pass_flags_self = LETPASSTHROW|LETPASSCLICKS | ||
max_integrity = 200 | ||
|
||
/// What storage datum we use | ||
var/storage_datum_to_use = /datum/storage/maintenance_loot_structure | ||
/// Weighted list of the loot that can spawn in this | ||
var/list/loot_weighted_list = list( | ||
/obj/effect/spawner/random/maintenance = 1, | ||
) | ||
/// This one is going to be weird, a string of dice to use when rolling number of contents | ||
var/loot_spawn_dice_string = "2d4+1" | ||
|
||
/obj/structure/maintenance_loot_structure/Initialize(mapload) | ||
. = ..() | ||
create_storage(storage_type = storage_datum_to_use) | ||
make_contents() | ||
|
||
/obj/structure/maintenance_loot_structure/examine(mob/user) | ||
. = ..() | ||
. += span_engradio("It might have other things you're looking for <b>if you look again later</b>?") | ||
return . | ||
|
||
// Since it doesn't want to play nice for whatever reason | ||
/obj/structure/maintenance_loot_structure/attack_hand(mob/living/user) | ||
if(!user.can_perform_action(src, NEED_HANDS)) | ||
return ..() | ||
atom_storage.open_storage(user) | ||
return TRUE | ||
|
||
/// Fills random contents into this structure's inventory, starting a loop to respawn loot if the container is empty later | ||
/obj/structure/maintenance_loot_structure/proc/make_contents() | ||
var/refill_check_time = rand(15 MINUTES, 30 MINUTES) | ||
spawn_loot() | ||
addtimer(CALLBACK(src, PROC_REF(make_contents)), refill_check_time) | ||
|
||
/// Spawns a random amount of loot into the structure, random numbers based on the amount of storage slots inside it | ||
/obj/structure/maintenance_loot_structure/proc/spawn_loot() | ||
if(length(contents)) | ||
for(var/obj/thing in contents) | ||
qdel(thing) | ||
var/random_loot_amount = roll(loot_spawn_dice_string) | ||
for(var/loot_spawn in 1 to random_loot_amount) | ||
var/obj/new_loot = pick_weight(loot_weighted_list) | ||
new new_loot(src) | ||
Shake(2, 2, 1 SECONDS) | ||
|
||
/datum/storage/maintenance_loot_structure | ||
max_slots = 9 | ||
max_specific_storage = WEIGHT_CLASS_GIGANTIC | ||
max_total_storage = WEIGHT_CLASS_BULKY * 6 | ||
numerical_stacking = FALSE | ||
rustle_sound = FALSE | ||
screen_max_columns = 3 | ||
/// What sound this makes when people open it's storage | ||
var/opening_sound = 'modular_doppler/epic_loot/sound/plastic.mp3' | ||
|
||
/datum/storage/maintenance_loot_structure/open_storage(mob/to_show) | ||
. = ..() | ||
if(!.) | ||
return | ||
playsound(parent, opening_sound, 50, TRUE) | ||
|
||
// Loot items basetype, for convenience | ||
/obj/item/epic_loot | ||
name = "epic loot!!!!!" | ||
desc = "Unknown purpose, unknown maker, unknown value. The only thing I know for real: There will be loot." | ||
icon = 'modular_doppler/epic_loot/icons/epic_loot.dmi' | ||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' | ||
righthand_file = 'icons/mob/inhands/items_righthand.dmi' | ||
inhand_icon_state = "binoculars" | ||
w_class = WEIGHT_CLASS_SMALL | ||
|
||
/obj/item/epic_loot/examine(mob/user) | ||
. = ..() | ||
. += span_engradio("You should probably <b>sell</b> or <b>recycle</b> this.") | ||
return . |
214 changes: 214 additions & 0 deletions
214
modular_doppler/epic_loot/code/loot_items/components.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
/datum/export/epic_loot_components | ||
cost = PAYCHECK_COMMAND | ||
unit_name = "low value salvage" | ||
export_types = list( | ||
/obj/item/epic_loot/grenade_fuze, | ||
/obj/item/epic_loot/nail_box, | ||
/obj/item/epic_loot/cold_weld, | ||
/obj/item/epic_loot/signal_amp, | ||
/obj/item/epic_loot/fuel_conditioner, | ||
) | ||
|
||
/datum/export/epic_loot_components_super | ||
cost = PAYCHECK_COMMAND * 2 | ||
unit_name = "salvage" | ||
export_types = list( | ||
/obj/item/epic_loot/water_filter, | ||
/obj/item/epic_loot/thermometer, | ||
/obj/item/epic_loot/current_converter, | ||
/obj/item/epic_loot/electric_motor, | ||
) | ||
|
||
/datum/export/epic_loot_components_super_super | ||
cost = PAYCHECK_COMMAND * 3 | ||
unit_name = "high value salvage" | ||
export_types = list( | ||
/obj/item/epic_loot/thermal_camera, | ||
/obj/item/epic_loot/shuttle_gyro, | ||
/obj/item/epic_loot/phased_array, | ||
/obj/item/epic_loot/shuttle_battery, | ||
) | ||
|
||
// Grenade fuze, an old design from an old time past. You can still make a pretty good grenade with it though | ||
/obj/item/epic_loot/grenade_fuze | ||
name = "grenade fuze" | ||
desc = "Just the fuze of a grenade, missing the explosive and arguably most important half of the grenade." | ||
icon_state = "fuze" | ||
inhand_icon_state = "pen" | ||
drop_sound = 'sound/items/handling/component_drop.ogg' | ||
pickup_sound = 'sound/items/handling/component_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT, | ||
/datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// The filter part of a water filter machine, though these machines are insanely rare due to modern synthesis technology | ||
/obj/item/epic_loot/water_filter | ||
name = "water filter cartridge" | ||
desc = "A blue polymer tube filled with filter medium for use in an industrial water filtration unit." | ||
icon_state = "water_filter" | ||
inhand_icon_state = "miniFE" | ||
drop_sound = 'sound/items/handling/tools/weldingtool_drop.ogg' | ||
pickup_sound = 'sound/items/handling/tools/weldingtool_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3, | ||
/datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Analog thermometer, how to tell temperature before gas analyzers were cool | ||
/obj/item/epic_loot/thermometer | ||
name = "analog thermometer" | ||
desc = "An outdated, and likely broken, analog thermometer." | ||
icon_state = "thermometer" | ||
inhand_icon_state = "razor" | ||
drop_sound = 'sound/items/handling/tools/multitool_drop.ogg' | ||
pickup_sound = 'sound/items/handling/tools/multitool_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/iron = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// A box of nails, impossible tech on a space station | ||
/obj/item/epic_loot/nail_box | ||
name = "box of nails" | ||
desc = "A pristine box of nails, a method of keeping things together that we... can't really use here, in a space station." | ||
icon_state = "nails" | ||
inhand_icon_state = "rubberducky" | ||
drop_sound = 'sound/items/handling/ammobox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/iron = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/cardboard = SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Used for joining together plastics, ideally. | ||
/obj/item/epic_loot/cold_weld | ||
name = "tube of cold weld" | ||
desc = "A tube of cold weld, used to join together plastics, usually for repair." | ||
icon_state = "cold_weld" | ||
inhand_icon_state = "razor" | ||
drop_sound = 'sound/items/handling/component_drop.ogg' | ||
pickup_sound = 'sound/items/handling/component_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// An electronic motor | ||
/obj/item/epic_loot/electric_motor | ||
name = "electric motor" | ||
desc = "An electrically driven motor for industrial applications." | ||
icon_state = "motor" | ||
inhand_icon_state = "miniFE" | ||
w_class = WEIGHT_CLASS_NORMAL | ||
drop_sound = 'sound/items/handling/cardboard_box/cardboardbox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/cardboard_box/cardboardbox_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, | ||
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Current converters, these change one rating of current into another in a mostly safe manner | ||
/obj/item/epic_loot/current_converter | ||
name = "current converter" | ||
desc = "A device for regulating electric current that passes through it." | ||
icon_state = "current_converter" | ||
inhand_icon_state = "miniFE" | ||
w_class = WEIGHT_CLASS_NORMAL | ||
drop_sound = 'sound/items/handling/tools/weldingtool_drop.ogg' | ||
pickup_sound = 'sound/items/handling/tools/weldingtool_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2, | ||
/datum/material/silver = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/gold = SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Signal amplifiers, used to take a faint signal and return it stronger than before | ||
/obj/item/epic_loot/signal_amp | ||
name = "signal amplifier" | ||
desc = "A device for taking weakened input signals and strengthening them for use or listening." | ||
icon_state = "signal_amp" | ||
drop_sound = 'sound/items/handling/component_drop.ogg' | ||
pickup_sound = 'sound/items/handling/component_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/iron = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT, | ||
/datum/material/gold = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Thermal camera modules | ||
/obj/item/epic_loot/thermal_camera | ||
name = "thermal camera module" | ||
desc = "An infrared sensing device used for the production of thermal camera systems." | ||
icon_state = "thermal" | ||
drop_sound = 'sound/items/handling/component_drop.ogg' | ||
pickup_sound = 'sound/items/handling/component_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, | ||
/datum/material/gold = HALF_SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Shuttle gyroscopes, AKA how a shuttle realizes which way it's pointing | ||
/obj/item/epic_loot/shuttle_gyro | ||
name = "shuttle gyroscope" | ||
desc = "A bulky device used by shuttles and other space faring vessels to find the direction they are facing." | ||
icon_state = "shuttle_gyro" | ||
inhand_icon_state = "miniFE" | ||
w_class = WEIGHT_CLASS_BULKY | ||
drop_sound = 'sound/items/handling/ammobox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 3, | ||
/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 5, | ||
/datum/material/silver = SHEET_MATERIAL_AMOUNT * 4, | ||
/datum/material/gold = SHEET_MATERIAL_AMOUNT * 4 | ||
) | ||
|
||
/obj/item/epic_loot/shuttle_gyro/Initialize(mapload) | ||
. = ..() | ||
AddComponent(/datum/component/two_handed, require_twohands = TRUE) | ||
|
||
// Phased array elements, combine a bunch together to get god's strongest radar, or whatever else you can think of | ||
/obj/item/epic_loot/phased_array | ||
name = "phased array element" | ||
desc = "An element of a larger phased array. These combine together to produce sensing and scanning devices used on most common space-faring vessels." | ||
icon_state = "phased_array" | ||
inhand_icon_state = "blankplaque" | ||
w_class = WEIGHT_CLASS_NORMAL | ||
drop_sound = 'sound/items/handling/ammobox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2, | ||
/datum/material/silver = SHEET_MATERIAL_AMOUNT, | ||
/datum/material/gold = SHEET_MATERIAL_AMOUNT, | ||
) | ||
|
||
// Shuttle batteries, used to power electronics while the engines are off | ||
/obj/item/epic_loot/shuttle_battery | ||
name = "shuttle battery" | ||
desc = "A massive shuttle-grade battery, used to keep the electronics of space-faring vessel powered while the main engines are de-activated." | ||
icon_state = "ship_battery" | ||
inhand_icon_state = "blankplaque" | ||
w_class = WEIGHT_CLASS_BULKY | ||
drop_sound = 'sound/items/handling/cardboard_box/cardboardbox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/cardboard_box/cardboardbox_pickup.ogg' | ||
custom_materials = list( | ||
/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 10, | ||
/datum/material/silver = SHEET_MATERIAL_AMOUNT * 4, | ||
/datum/material/gold = SHEET_MATERIAL_AMOUNT * 4, | ||
) | ||
|
||
/obj/item/epic_loot/shuttle_battery/Initialize(mapload) | ||
. = ..() | ||
AddComponent(/datum/component/two_handed, require_twohands = TRUE) | ||
|
||
// Industrial fuel conditioner, used to keep most fuel-burning machines within regulations for waste emissions | ||
/obj/item/epic_loot/fuel_conditioner | ||
name = "fuel conditioner" | ||
desc = "A plastic container of fuel conditioner for industrial size plasma generators. \ | ||
Any generator that would need this is either much too large or much too old to be seen around here." | ||
icon_state = "fuel_conditioner" | ||
w_class = WEIGHT_CLASS_NORMAL | ||
drop_sound = 'sound/items/handling/cardboard_box/cardboardbox_drop.ogg' | ||
pickup_sound = 'sound/items/handling/cardboard_box/cardboardbox_pickup.ogg' |
Oops, something went wrong.