diff --git a/code/datums/components/crafting/tools.dm b/code/datums/components/crafting/tools.dm index f126bdff538..b7d93f162a5 100644 --- a/code/datums/components/crafting/tools.dm +++ b/code/datums/components/crafting/tools.dm @@ -14,7 +14,7 @@ reqs = list(/obj/item/grown/log = 5) parts = list(/obj/item/grown/log = 5) blacklist = list(/obj/item/grown/log/steel) - result = /obj/structure/bonfire + result = /obj/structure/bonfire/player_made // SKYRAT EDIT - Pollution - ORIGINAL: result = /obj/structure/bonfire category = CAT_TOOLS /datum/crafting_recipe/boneshovel diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 4b5c3fe9682..035df95e783 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -326,7 +326,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \ new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 1.5 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_TOOLS), \ new/datum/stack_recipe("mortar", /obj/item/reagent_containers/cup/mortar, 3, check_density = FALSE, category = CAT_CHEMISTRY), \ new/datum/stack_recipe("firebrand", /obj/item/match/firebrand, 2, time = 10 SECONDS, check_density = FALSE, category = CAT_TOOLS), \ - new/datum/stack_recipe("bonfire", /obj/structure/bonfire, 10, time = 6 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_TOOLS), \ + new/datum/stack_recipe("bonfire", /obj/structure/bonfire/player_made, 10, time = 6 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_TOOLS), /* SKYRAT EDIT - Pollution - ORIGINAL: /obj/structure/bonfire */ \ new/datum/stack_recipe("easel", /obj/structure/easel, 5, time = 1 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_ENTERTAINMENT), \ new/datum/stack_recipe("noticeboard", /obj/item/wallframe/noticeboard, 1, time = 1 SECONDS, one_per_turf = FALSE, on_solid_ground = FALSE, check_density = FALSE, category = CAT_FURNITURE), \ new/datum/stack_recipe("test tube rack", /obj/item/storage/test_tube_rack, 1, time = 1 SECONDS, check_density = FALSE, category = CAT_CHEMISTRY), \ diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index e16e66c4436..987b9bcc37b 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -160,11 +160,6 @@ if(!check_oxygen()) extinguish() return - //SKYRAT EDIT ADDITION - var/turf/open/my_turf = get_turf(src) - if(istype(my_turf) && !my_turf.planetary_atmos && !is_centcom_level(my_turf.z)) //Pollute, but only when we're not on planetary atmos or on CentCom - my_turf.pollute_turf_list(list(/datum/pollutant/smoke = 15, /datum/pollutant/carbon_air_pollution = 5), POLLUTION_ACTIVE_EMITTER_CAP) - //SKYRAT EDIT END bonfire_burn(seconds_per_tick) /obj/structure/bonfire/extinguish() diff --git a/modular_skyrat/modules/pollution/code/bonfire.dm b/modular_skyrat/modules/pollution/code/bonfire.dm new file mode 100644 index 00000000000..5f4e8efd28c --- /dev/null +++ b/modular_skyrat/modules/pollution/code/bonfire.dm @@ -0,0 +1,19 @@ +/obj/structure/bonfire + /// Whether or not this bonfire can cause pollution. + var/produces_smoke = FALSE + +// We basically only want player-made bonfires to make smoke, so it's simpler. +/obj/structure/bonfire/player_made + produces_smoke = TRUE + + +/obj/structure/bonfire/process(seconds_per_tick) + . = ..() + + if(!burning || !produces_smoke) + return + + var/turf/open/my_turf = get_turf(src) + if(istype(my_turf) && !my_turf.planetary_atmos && !is_centcom_level(my_turf.z)) //Pollute, but only when we're not on planetary atmos or on CentCom + my_turf.pollute_turf_list(list(/datum/pollutant/smoke = 15, /datum/pollutant/carbon_air_pollution = 5), POLLUTION_ACTIVE_EMITTER_CAP) + diff --git a/modular_skyrat/modules/pollution/code/turf_open.dm b/modular_skyrat/modules/pollution/code/turf_open.dm index 65464cd0387..ec8313222ee 100644 --- a/modular_skyrat/modules/pollution/code/turf_open.dm +++ b/modular_skyrat/modules/pollution/code/turf_open.dm @@ -5,6 +5,10 @@ return /turf/open/pollute_turf(pollution_type, amount, cap) + // Don't add pollution when the subsystem is off. + if(!SSpollution.can_fire) + return + if(!pollution) pollution = new(src) if(cap && pollution.total_amount >= cap) @@ -12,6 +16,10 @@ pollution.add_pollutant(pollution_type, amount) /turf/open/pollute_turf_list(list/pollutions, cap) + // Don't add pollution when the subsystem is off. + if(!SSpollution.can_fire) + return + if(!pollution) pollution = new(src) if(cap && pollution.total_amount >= cap) diff --git a/tgstation.dme b/tgstation.dme index 6ac03dc0f29..b39bc2ef68f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7589,6 +7589,7 @@ #include "modular_skyrat\modules\polarized_windows\windows.dm" #include "modular_skyrat\modules\pollution\code\admin_spawn_pollution.dm" #include "modular_skyrat\modules\pollution\code\air_refresher.dm" +#include "modular_skyrat\modules\pollution\code\bonfire.dm" #include "modular_skyrat\modules\pollution\code\fancy_storage_items.dm" #include "modular_skyrat\modules\pollution\code\perfumes.dm" #include "modular_skyrat\modules\pollution\code\pollutant_datum.dm"