Adds an area flag to prevent turf destruction (#18399)

* point verdant can no longer be vented

* exoplanet

* check if area exists & adds flag to konyang ruins

* Update code/game/turfs/simulated/floor_acts.dm

Co-authored-by: Geeves <ggrobler447@gmail.com>
Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it>

* Update code/game/turfs/simulated/floor_attackby.dm

Co-authored-by: Geeves <ggrobler447@gmail.com>
Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it>

---------

Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it>
Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
Co-authored-by: Geeves <ggrobler447@gmail.com>
This commit is contained in:
RustingWithYou
2024-02-25 20:36:51 +00:00
committed by GitHub
co-authored by Geeves Matt Atlas
parent 8474cc6d0c
commit 81ca3c4058
24 changed files with 94 additions and 38 deletions
+1
View File
@@ -137,6 +137,7 @@
#define AREA_FLAG_NO_CREW_EXPECTED BITFLAG(5) // Areas where crew is not expected to ever be. Used to tell antag bases and such from crew-accessible areas on centcom level.
#define AREA_FLAG_PRISON BITFLAG(6) // Marks prison area for purposes of checking if brigged/imprisoned
#define AREA_FLAG_NO_GHOST_TELEPORT_ACCESS BITFLAG(7) // Marks whether ghosts should not have teleport access to this area
#define AREA_FLAG_INDESTRUCTIBLE_TURFS BITFLAG(8) //Marks whether or not turfs in this area can be destroyed by explosions
// Convoluted setup so defines can be supplied by Bay12 main server compile script.
// Should still work fine for people jamming the icons into their repo.
+29 -20
View File
@@ -1,26 +1,35 @@
/turf/simulated/floor/ex_act(severity)
//set src in oview(1)
switch(severity)
if(1.0)
src.ChangeTurf(baseturf)
if(2.0)
switch(pick(40;1,40;2,3))
if (1)
if(prob(33)) new /obj/item/stack/material/steel(src)
src.ReplaceWithLattice()
if(2)
src.ChangeTurf(baseturf)
if(3)
if(prob(33)) new /obj/item/stack/material/steel(src)
if(prob(80))
src.break_tile_to_plating()
else
src.break_tile()
var/area/A = get_area(src)
if(A && (A.area_flags & AREA_FLAG_INDESTRUCTIBLE_TURFS))
switch(severity)
if(1)
ChangeTurf(get_base_turf_by_area(src))
if(2)
if(prob(40))
ChangeTurf(get_base_turf_by_area(src))
else
switch(severity)
if(1.0)
src.ChangeTurf(baseturf)
if(2.0)
switch(pick(40;1,40;2,3))
if (1)
if(prob(33)) new /obj/item/stack/material/steel(src)
src.ReplaceWithLattice()
if(2)
src.ChangeTurf(baseturf)
if(3)
if(prob(33)) new /obj/item/stack/material/steel(src)
if(prob(80))
src.break_tile_to_plating()
else
src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME)
if(3.0)
if (prob(50))
src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME)
if(3.0)
if (prob(50))
src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME)
return
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -89,6 +89,9 @@
return
// Repairs and deconstruction
else if(attacking_item.iscrowbar())
var/area/A = get_area(src)
if(A && (A.area_flags & AREA_FLAG_INDESTRUCTIBLE_TURFS))
return
if(broken || burnt)
playsound(src, 'sound/items/crowbar_tile.ogg', 80, 1)
visible_message("<span class='notice'>[user] has begun prying off the damaged plating.</span>")
@@ -2,6 +2,7 @@
name = "\improper Planetary surface"
ambience = list('sound/effects/wind/wind_2_1.ogg','sound/effects/wind/wind_2_2.ogg','sound/effects/wind/wind_3_1.ogg','sound/effects/wind/wind_4_1.ogg','sound/effects/wind/wind_4_2.ogg','sound/effects/wind/wind_5_1.ogg')
always_unpowered = 1
area_flags = AREA_FLAG_INDESTRUCTIBLE_TURFS
/area/exoplanet/adhomai
name = "Adhomian Wilderness"
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: RustingWithYou
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds an area flag to prevent explosions from destroying turfs."
@@ -2,7 +2,7 @@
name = "Point Verdant - Conglomerate Spaceport"
requires_power = 0
no_light_control = 1
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
ambience = AMBIENCE_KONYANG_TRAFFIC
sound_env = CITY
@@ -13,4 +13,4 @@
requires_power = TRUE
dynamic_lighting = TRUE
no_light_control = FALSE
area_flags = AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
@@ -9,6 +9,6 @@
/area/konyang/arms_factory
name = "Arms Production Plant"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = HANGAR
@@ -9,6 +9,6 @@
/area/konyang/refinery
name = "Planetary Material Refinery"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = HANGAR
@@ -9,6 +9,6 @@
/area/konyang/robotics_factory
name = "Robotics Assembly Plant"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = HANGAR
@@ -9,6 +9,6 @@
/area/konyang/garage
name = "Konyang Garage"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = HANGAR
@@ -9,6 +9,6 @@
/area/konyang/house_small
name = "Konyang Residence"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = LIVINGROOM
@@ -11,6 +11,7 @@
/area/konyang_landing_zone/command_center_abandoned//Need to differentiate from the normal landing zone area, otherwise this messes stuff up
name = "SCC Expedition Command Center"
requires_power = TRUE
area_flags = AREA_FLAG_INDESTRUCTIBLE_TURFS
/area/konyang_landing_zone/command_center_abandoned/reactor
name = "SCC Expedition Command Center Reactor"
@@ -9,6 +9,6 @@
/area/konyang/office
name = "Konyang Office"
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_RAD_SHIELDED | AREA_FLAG_INDESTRUCTIBLE_TURFS
base_turf = /turf/simulated/floor/exoplanet/dirt_konyang
sound_env = ROOM
@@ -16,7 +16,7 @@
ambience = list('sound/effects/wind/wind_2_1.ogg','sound/effects/wind/wind_2_2.ogg','sound/effects/wind/wind_3_1.ogg','sound/effects/wind/wind_4_1.ogg','sound/ambience/eeriejungle2.ogg','sound/ambience/eeriejungle1.ogg')
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/datum/ghostspawner/human/konyang_firewatcher
short_name = "konyang_firewatcher"
@@ -15,7 +15,7 @@
requires_power = FALSE
dynamic_lighting = TRUE
base_turf = /turf/simulated/floor/exoplanet/basalt/cave
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
sound_env = TUNNEL_ENCLOSED
ambience = AMBIENCE_FOREBODING
@@ -15,7 +15,7 @@
requires_power = TRUE
dynamic_lighting = TRUE
base_turf = /turf/simulated/floor/exoplanet/basalt/cave
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
sound_env = TUNNEL_ENCLOSED
ambience = AMBIENCE_FOREBODING
@@ -16,7 +16,7 @@
ambience = list('sound/effects/wind/wind_2_1.ogg','sound/effects/wind/wind_2_2.ogg','sound/effects/wind/wind_3_1.ogg','sound/effects/wind/wind_4_1.ogg','sound/ambience/eeriejungle2.ogg','sound/ambience/eeriejungle1.ogg')
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/datum/ghostspawner/human/konyang_homesteader
short_name = "konyang_homesteader"
@@ -14,7 +14,7 @@
dynamic_lighting = TRUE
no_light_control = FALSE
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/area/konyang_landing_zone/command_center
name = "SCC Expedition Command Center"
@@ -17,7 +17,7 @@
dynamic_lighting = TRUE
no_light_control = FALSE
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/datum/ghostspawner/human/konyang_moonshine
short_name = "konyang_moonshine"
@@ -18,7 +18,7 @@
dynamic_lighting = TRUE
no_light_control = FALSE
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/area/shuttle/konyang_pirate
name = "Repaired Shuttle"
@@ -16,4 +16,4 @@
ambience = list('sound/effects/wind/wind_2_1.ogg','sound/effects/wind/wind_2_2.ogg','sound/effects/wind/wind_3_1.ogg','sound/effects/wind/wind_4_1.ogg','sound/ambience/eeriejungle2.ogg','sound/ambience/eeriejungle1.ogg')
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
@@ -17,7 +17,7 @@
dynamic_lighting = TRUE
no_light_control = FALSE
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/datum/ghostspawner/human/konyang_telecomms
short_name = "konyang_telecomms"
@@ -17,7 +17,7 @@
dynamic_lighting = TRUE
no_light_control = FALSE
base_turf = /turf/simulated/mineral
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_INDESTRUCTIBLE_TURFS
/datum/ghostspawner/human/konyang_villager
short_name = "konyang_villager"