diff --git a/baystation12.dme b/baystation12.dme index 1c4a43d074..b0d17f9b35 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -550,7 +550,6 @@ #include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\effects\spawners\vaultspawner.dm" #include "code\game\objects\items\apc_frame.dm" -#include "code\game\objects\items\ashtray.dm" #include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\contraband.dm" @@ -679,6 +678,7 @@ #include "code\game\objects\items\weapons\implants\implantfreedom.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\items\weapons\implants\implantuplink.dm" +#include "code\game\objects\items\weapons\material\ashtray.dm" #include "code\game\objects\items\weapons\material\bats.dm" #include "code\game\objects\items\weapons\material\kitchen.dm" #include "code\game\objects\items\weapons\material\knives.dm" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 58830cf9fa..a7ff733a2a 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -30,7 +30,7 @@ var/hasShocked = 0 //Prevents multiple shocks from happening var/secured_wires = 0 var/datum/wires/airlock/wires = null - + var/open_sound_powered = 'sound/machines/airlock.ogg' var/open_sound_unpowered = 'sound/machines/airlock_creaking.ogg' @@ -277,7 +277,7 @@ target_tile.assume_gas("phoron", 35, 400+T0C) spawn (0) target_tile.hotspot_expose(temperature, 400) for(var/turf/simulated/wall/W in range(3,src)) - W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame + W.burn((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) D.ignite(temperature/4) new/obj/structure/door_assembly( src.loc ) @@ -855,13 +855,13 @@ About the new airlock wires panel: if(!can_open(forced)) return 0 use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people - + //if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator if(arePowerSystemsOn()) playsound(src.loc, open_sound_powered, 100, 1) else playsound(src.loc, open_sound_unpowered, 100, 1) - + if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density) src.closeOther.close() return ..() diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm similarity index 95% rename from code/game/objects/items/ashtray.dm rename to code/game/objects/items/weapons/material/ashtray.dm index 63059fef8e..033042b853 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/weapons/material/ashtray.dm @@ -76,32 +76,27 @@ var/global/list/ashtray_cache = list() health = max(0,health - W.force) user << "You hit [src] with [W]." if (health < 1) - die() + shatter() return /obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom) if (health > 0) health = max(0,health - 3) - if (health < 1) - die() - return if (contents.len) src.visible_message("\The [src] slams into [hit_atom], spilling its contents!") for (var/obj/item/clothing/mask/smokable/cigarette/O in contents) O.loc = src.loc + if (health < 1) + shatter() + return update_icon() return ..() -/obj/item/weapon/material/ashtray/proc/die() - material.place_shard(get_turf(src)) - qdel(src) - return - /obj/item/weapon/material/ashtray/plastic/New(var/newloc) ..(newloc, "plastic") /obj/item/weapon/material/ashtray/bronze/New(var/newloc) - ..(newloc, "gold") //placeholder + ..(newloc, "bronze") /obj/item/weapon/material/ashtray/glass/New(var/newloc) ..(newloc, "glass") diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 8208576e16..fe33163dba 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -72,7 +72,7 @@ var/mob/living/M = loc M.drop_from_inventory(src) playsound(src, "shatter", 70, 1) - new material.shard_type(T) + material.place_shard(T) qdel(src) /obj/item/weapon/material/process() @@ -82,18 +82,12 @@ L.apply_effect(round(material.radioactivity/3),IRRADIATE,0) /obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > material.ignition_point) - TemperatureAct(exposed_temperature) + TemperatureAct(exposed_temperature) // This might need adjustment. Will work that out later. /obj/item/weapon/material/proc/TemperatureAct(temperature) - if(temperature > material.ignition_point) - for(var/turf/simulated/floor/target_tile in range(2,loc)) - var/phoronToDeduce = temperature/30 - target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C) - spawn (0) target_tile.hotspot_expose(temperature, 400) - health -= phoronToDeduce/100 - check_health() + health -= material.combustion_effect(get_turf(src), temperature, 0.1) + check_health() /obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/weldingtool)) diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index 313ba17f45..b3230095c1 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -13,17 +13,11 @@ var/oreAmount = 7 /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > material.ignition_point) - TemperatureAct(exposed_temperature) + TemperatureAct(exposed_temperature) /obj/structure/simple_door/proc/TemperatureAct(temperature) - if(temperature > material.ignition_point) - for(var/turf/simulated/floor/target_tile in range(2,loc)) - var/phoronToDeduce = temperature/10 - target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C) - spawn (0) target_tile.hotspot_expose(temperature, 400) - hardness -= phoronToDeduce/100 - CheckHardness() + hardness -= material.combustion_effect(get_turf(src),temperature, 0.3) + CheckHardness() /obj/structure/simple_door/New(var/newloc, var/material_name) ..() diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index e3037f94a9..32668e4743 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -96,7 +96,7 @@ if(W) radiate() if(is_hot(W)) - ignite(is_hot(W)) + burn(is_hot(W)) if(locate(/obj/effect/overlay/wallrot) in src) if(istype(W, /obj/item/weapon/weldingtool) ) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 8fa7c9dd2f..5185c9b81c 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -46,9 +46,9 @@ var/list/global/wall_cache = list() /turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj) if(istype(Proj,/obj/item/projectile/beam)) - ignite(2500) + burn(2500) else if(istype(Proj,/obj/item/projectile/ion)) - ignite(500) + burn(500) // Tasers and stuff? No thanks. Also no clone or tox damage crap. if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) @@ -143,10 +143,10 @@ var/list/global/wall_cache = list() return /turf/simulated/wall/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :( - ignite(exposed_temperature) + burn(exposed_temperature) /turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) - ignite(adj_temp) + burn(adj_temp) if(adj_temp > material.melting_point) take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - material.melting_point))) @@ -253,22 +253,11 @@ var/list/global/wall_cache = list() return total_radiation /turf/simulated/wall/proc/burn(temperature) - spawn(2) - new /obj/structure/girder(src) - src.ChangeTurf(/turf/simulated/floor) - for(var/turf/simulated/floor/target_tile in range(0,src)) - if(material == "phoron") //ergh - target_tile.assume_gas("phoron", 20, 400+T0C) - spawn (0) target_tile.hotspot_expose(temperature, 400) - for(var/turf/simulated/wall/W in range(3,src)) - W.ignite((temperature/4)) - for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) - D.ignite(temperature/4) - -/turf/simulated/wall/proc/ignite(var/exposed_temperature) - if(isnull(material.ignition_point)) - return - if(exposed_temperature > material.ignition_point)//If the temperature of the object is over 300, then ignite - burn(exposed_temperature) - return - ..() + if(material.combustion_effect(src, temperature, 0.7)) + spawn(2) + new /obj/structure/girder(src) + src.ChangeTurf(/turf/simulated/floor) + for(var/turf/simulated/wall/W in range(3,src)) + W.burn((temperature/4)) + for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) + D.ignite(temperature/4) diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index a3189d6e0f..77c4a60551 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -144,6 +144,9 @@ var/list/name_to_material /material/proc/is_brittle() return !!(flags & MATERIAL_BRITTLE) +/material/proc/combustion_effect(var/turf/T, var/temperature) + return + // Datum definitions follow. /material/uranium name = "uranium" @@ -177,6 +180,10 @@ var/list/name_to_material hardness = 40 stack_origin_tech = "materials=4" +/material/gold/bronze //placeholder for ashtrays + name = "bronze" + icon_colour = "#EDD12F" + /material/silver name = "silver" stack_type = /obj/item/stack/material/silver @@ -196,6 +203,20 @@ var/list/name_to_material stack_origin_tech = "phorontech=2;materials=2" door_icon_base = "stone" +/material/phoron/combustion_effect(var/turf/T, var/temperature, var/effect_multiplier) + if(isnull(ignition_point)) + return 0 + if(temperature < ignition_point) + return 0 + var/totalPhoron = 0 + for(var/turf/simulated/floor/target_tile in range(2,T)) + var/phoronToDeduce = (temperature/30) * effect_multiplier + totalPhoron += phoronToDeduce + target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C) + spawn (0) + target_tile.hotspot_expose(temperature, 400) + return round(totalPhoron/100) + /material/stone name = "sandstone" stack_type = /obj/item/stack/material/sandstone