Fishing in a virtual domain doesn't deplete limited loot anymore (also the treasure chest is no longer anchored) (#86625)

## About The Pull Request
I've recently realized that bitrunning fishing spots can steal the
limited loot from outside the virtual reality, which sucks. Also Livrah
asked me why the treasure chest is anchored, to which I said it's
actually an oversight.

## Why It's Good For The Game
Fixing stuff.

## Changelog

🆑
fix: Bitrunning fishing spots no longer deplete limited loot from
outside the virtual reality.
fix: The treasure chest from the beach is no longer anchored to the
floor.
/🆑
This commit is contained in:
Ghom
2024-09-15 13:55:27 +02:00
committed by GitHub
parent 4c58bf51db
commit 9a3dceda26
6 changed files with 14 additions and 8 deletions

View File

@@ -140,6 +140,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define BINARY_JAMMING (1<<17) #define BINARY_JAMMING (1<<17)
/// This area prevents Bag of Holding rifts from being opened. /// This area prevents Bag of Holding rifts from being opened.
#define NO_BOH (1<<18) #define NO_BOH (1<<18)
/// This area prevents fishing from removing unique/limited loot from sources that're also used outside of it.
#define UNLIMITED_FISHING (1<<19)
/* /*
These defines are used specifically with the atom/pass_flags bitmask These defines are used specifically with the atom/pass_flags bitmask

View File

@@ -65,6 +65,7 @@ DEFINE_BITFIELD(area_flags, list(
"VALID_TERRITORY" = VALID_TERRITORY, "VALID_TERRITORY" = VALID_TERRITORY,
"XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE, "XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE,
"NO_BOH" = NO_BOH, "NO_BOH" = NO_BOH,
"UNLIMITED_FISHING" = UNLIMITED_FISHING,
)) ))
DEFINE_BITFIELD(turf_flags, list( DEFINE_BITFIELD(turf_flags, list(

View File

@@ -124,6 +124,7 @@
/area/centcom/tdome/arena /area/centcom/tdome/arena
name = "Thunderdome Arena" name = "Thunderdome Arena"
icon_state = "thunder" icon_state = "thunder"
area_flags = parent_type::area_flags | UNLIMITED_FISHING //for possible testing purposes
/area/centcom/tdome/tdome1 /area/centcom/tdome/tdome1
name = "Thunderdome (Team 1)" name = "Thunderdome (Team 1)"

View File

@@ -281,6 +281,7 @@ GLOBAL_LIST_INIT(mystery_fishing, list(
max_integrity = 100 max_integrity = 100
damage_deflection = 30 damage_deflection = 30
grant_extra_mag = FALSE grant_extra_mag = FALSE
anchored = FALSE
/obj/structure/mystery_box/handle_deconstruct(disassembled) /obj/structure/mystery_box/handle_deconstruct(disassembled)
new /obj/item/stack/sheet/mineral/wood(drop_location(), 2) new /obj/item/stack/sheet/mineral/wood(drop_location(), 2)

View File

@@ -14,7 +14,7 @@
name = "Virtual Domain Ruins" name = "Virtual Domain Ruins"
icon_state = "bit_ruin" icon_state = "bit_ruin"
icon = 'icons/area/areas_station.dmi' icon = 'icons/area/areas_station.dmi'
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING
has_gravity = STANDARD_GRAVITY has_gravity = STANDARD_GRAVITY
requires_power = FALSE requires_power = FALSE
@@ -26,7 +26,7 @@
/area/virtual_domain/safehouse /area/virtual_domain/safehouse
name = "Virtual Domain Safehouse" name = "Virtual Domain Safehouse"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA | UNLIMITED_FISHING
icon_state = "bit_safe" icon_state = "bit_safe"
requires_power = FALSE requires_power = FALSE
sound_environment = SOUND_ENVIRONMENT_ROOM sound_environment = SOUND_ENVIRONMENT_ROOM
@@ -36,30 +36,30 @@
/area/lavaland/surface/outdoors/virtual_domain /area/lavaland/surface/outdoors/virtual_domain
name = "Virtual Domain Lava Ruins" name = "Virtual Domain Lava Ruins"
icon_state = "bit_ruin" icon_state = "bit_ruin"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING
/area/icemoon/underground/explored/virtual_domain /area/icemoon/underground/explored/virtual_domain
name = "Virtual Domain Ice Ruins" name = "Virtual Domain Ice Ruins"
icon_state = "bit_ice" icon_state = "bit_ice"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING
/area/ruin/space/virtual_domain /area/ruin/space/virtual_domain
name = "Virtual Domain Unexplored Location" name = "Virtual Domain Unexplored Location"
icon = 'icons/area/areas_station.dmi' icon = 'icons/area/areas_station.dmi'
icon_state = "bit_ruin" icon_state = "bit_ruin"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING
/area/space/virtual_domain /area/space/virtual_domain
name = "Virtual Domain Space" name = "Virtual Domain Space"
icon = 'icons/area/areas_station.dmi' icon = 'icons/area/areas_station.dmi'
icon_state = "bit_space" icon_state = "bit_space"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING
///Areas that virtual entities should not be in ///Areas that virtual entities should not be in
/area/virtual_domain/protected_space /area/virtual_domain/protected_space
name = "Virtual Domain Safe Zone" name = "Virtual Domain Safe Zone"
area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA | UNLIMITED_FISHING
icon_state = "bit_safe" icon_state = "bit_safe"
/area/virtual_domain/protected_space/fullbright /area/virtual_domain/protected_space/fullbright

View File

@@ -259,7 +259,8 @@ GLOBAL_LIST_INIT(specific_fish_icons, generate_specific_fish_icons())
/datum/fish_source/proc/simple_dispense_reward(reward_path, atom/spawn_location, turf/fishing_spot) /datum/fish_source/proc/simple_dispense_reward(reward_path, atom/spawn_location, turf/fishing_spot)
if(isnull(reward_path)) if(isnull(reward_path))
return null return null
if(!isnull(fish_counts[reward_path])) // This is limited count result var/area/area = get_area(fishing_spot)
if(!(area.area_flags & UNLIMITED_FISHING) && !isnull(fish_counts[reward_path])) // This is limited count result
//Somehow, we're trying to spawn an expended reward. //Somehow, we're trying to spawn an expended reward.
if(fish_counts[reward_path] <= 0) if(fish_counts[reward_path] <= 0)
return null return null