Files
Bubberstation/code/modules/bitrunning/virtual_domain/virtual_domain.dm
Jeremiah a6b194c51c Removes virtual-specific subtypes of drinking glass + adds a new fishing map (#79423)
## About The Pull Request
Changed how loot signals work with bitrunning entirely, which allows map
creators to attach functionality to objects without creating subtypes of
the item

As a bonus I added a fishing minigame map which uses it
## Why It's Good For The Game
It's a messy solution to need to create subtypes just for the one-off
map that needs them
## Changelog
🆑
add: Added a new fishing map to bitrunning.
add: You are no longer limited to pina coladas on the beach bar domain.
Cheers!
/🆑
2023-11-03 02:19:26 +00:00

47 lines
1.9 KiB
Plaintext

/**
* # Virtual Domains
* This loads a base level, then users can select the preset upon it.
* Create your own: Read the readme file in the '_maps/virtual_domains' folder.
*/
/datum/lazy_template/virtual_domain
map_dir = "_maps/virtual_domains"
map_name = "None"
key = "Virtual Domain"
/// Cost of this map to load
var/cost = BITRUNNER_COST_NONE
/// The description of the map
var/desc = "A map."
/// The 'difficulty' of the map, which affects the ui and ability to scan info.
var/difficulty = BITRUNNER_DIFFICULTY_NONE
/// An assoc list of typepath/amount to spawn on completion. Not weighted - the value is the amount
var/list/extra_loot
/// The map file to load
var/filename = "virtual_domain.dmm"
/// Any outfit that you wish to force on avatars. Overrides preferences
var/datum/outfit/forced_outfit
/// If this domain blocks the use of items from disks, for whatever reason
var/forbids_disk_items = FALSE
/// If this domain blocks the use of spells from disks, for whatever reason
var/forbids_disk_spells = FALSE
/// Information given to connected clients via ability
var/help_text
// Name to show in the UI
var/name = "Virtual Domain"
/// Points to reward for completion. Used to purchase new domains and calculate ore rewards.
var/reward_points = BITRUNNER_REWARD_MIN
/// The start time of the map. Used to calculate time taken
var/start_time
/// This map is specifically for unit tests. Shouldn't display in game
var/test_only = FALSE
/// The safehouse to load into the map
var/datum/map_template/safehouse/safehouse_path = /datum/map_template/safehouse/den
/// Sends a point to any loot signals on the map
/datum/lazy_template/virtual_domain/proc/add_points(points_to_add)
SEND_SIGNAL(src, COMSIG_BITRUNNER_GOAL_POINT, points_to_add)
/// Overridable proc to be called after the map is loaded.
/datum/lazy_template/virtual_domain/proc/setup_domain(list/created_atoms)
return