This commit is contained in:
Zuhayr
2015-05-31 03:29:14 +09:30
parent bf1733640a
commit f9e99e1ee9
8 changed files with 51 additions and 58 deletions

View File

@@ -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 ..()

View File

@@ -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("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
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")

View File

@@ -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))

View File

@@ -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)
..()

View File

@@ -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) )

View File

@@ -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)

View File

@@ -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