[MIRROR] Removes virtual-specific subtypes of drinking glass + adds a new fishing map [MDB IGNORE] (#24759)

* 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!
/🆑

* Removes virtual-specific subtypes of drinking glass + adds a new fishing map

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-11-03 00:09:40 -04:00
committed by GitHub
co-authored by Jeremiah
parent fc8eb0567a
commit d0ff76bed9
9 changed files with 932 additions and 64 deletions
@@ -8,15 +8,14 @@
map_name = "beach_bar"
safehouse_path = /datum/map_template/safehouse/mine
/obj/item/reagent_containers/cup/glass/drinkingglass/filled/virtual_domain
name = "pina colada"
desc = "Whose drink is this? Not yours, that's for sure. Well, it's not like they're going to miss it."
list_reagents = list(/datum/reagent/consumable/ethanol/pina_colada = 30)
/obj/item/reagent_containers/cup/glass/drinkingglass/filled/virtual_domain/Initialize(mapload, vol)
/datum/lazy_template/virtual_domain/beach_bar/setup_domain(list/created_atoms)
. = ..()
AddComponent(/datum/component/bitrunning_points, \
signal_type = COMSIG_GLASS_DRANK, \
points_per_signal = 0.5, \
)
for(var/obj/item/reagent_containers/cup/glass/drink in created_atoms)
RegisterSignal(drink, COMSIG_GLASS_DRANK, PROC_REF(on_drink_drank))
/// Eventually reveal the cache
/datum/lazy_template/virtual_domain/beach_bar/proc/on_drink_drank(datum/source)
SIGNAL_HANDLER
add_points(0.5)
@@ -0,0 +1,22 @@
/datum/lazy_template/virtual_domain/breeze_bay
name = "Breeze Bay"
desc = "A beach front town with a large forest to the north."
help_text = "It's simple! Enjoy some rays, catch some fish, and have a good time! Don't get bit by the crabs, though."
key = "breeze_bay"
map_name = "breeze_bay"
safehouse_path = /datum/map_template/safehouse/wood
/datum/lazy_template/virtual_domain/breeze_bay/setup_domain(list/created_atoms)
. = ..()
for(var/obj/item/fishing_rod/rod in created_atoms)
RegisterSignal(rod, COMSIG_FISHING_ROD_CAUGHT_FISH, PROC_REF(on_fish_caught))
/// Eventually reveal the cache
/datum/lazy_template/virtual_domain/breeze_bay/proc/on_fish_caught(datum/source, reward)
SIGNAL_HANDLER
if(isnull(reward))
return
add_points(2)
@@ -36,3 +36,11 @@
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