mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 22:22:09 +00:00
Merge pull request #2645 from fauxki/bleeding-edge-freeze
Bleeding edge freeze - Map Edits
This commit is contained in:
133
code/ZAS/Fire.dm
133
code/ZAS/Fire.dm
@@ -41,9 +41,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
|||||||
return 1
|
return 1
|
||||||
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
|
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
|
||||||
var/obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in src
|
var/obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in src
|
||||||
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.1))
|
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5))
|
||||||
igniting = 1
|
igniting = 1
|
||||||
if(air_contents.oxygen < 0.1)
|
if(air_contents.oxygen < 0.5)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(! (locate(/obj/fire) in src))
|
if(! (locate(/obj/fire) in src))
|
||||||
@@ -63,7 +63,7 @@ obj
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
mouse_opacity = 0
|
mouse_opacity = 0
|
||||||
|
|
||||||
luminosity = 3
|
//luminosity = 3
|
||||||
|
|
||||||
icon = 'fire.dmi'
|
icon = 'fire.dmi'
|
||||||
icon_state = "1"
|
icon_state = "1"
|
||||||
@@ -79,78 +79,83 @@ obj
|
|||||||
process()
|
process()
|
||||||
. = 1
|
. = 1
|
||||||
|
|
||||||
var/turf/simulated/floor/S = loc
|
if(firelevel > vsc.IgnitionLevel)
|
||||||
if(!S.zone) del src //Cannot exist where zones are broken.
|
|
||||||
|
|
||||||
if(istype(S,/turf/simulated/floor))
|
var/turf/simulated/floor/S = loc
|
||||||
var
|
if(!S.zone) del src //Cannot exist where zones are broken.
|
||||||
datum/gas_mixture/air_contents = S.return_air()
|
|
||||||
//Get whatever trace fuels are in the area
|
|
||||||
datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases
|
|
||||||
//Also get liquid fuels on the ground.
|
|
||||||
obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S
|
|
||||||
|
|
||||||
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25)
|
if(istype(S,/turf/simulated/floor))
|
||||||
//The reason we're taking a part of the air instead of all of it is so that it doesn't jump to
|
var
|
||||||
//the fire's max temperature instantaneously.
|
datum/gas_mixture/air_contents = S.return_air()
|
||||||
|
//Get whatever trace fuels are in the area
|
||||||
|
datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases
|
||||||
|
//Also get liquid fuels on the ground.
|
||||||
|
obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S
|
||||||
|
|
||||||
firelevel = air_contents.calculate_firelevel(liquid)
|
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25)
|
||||||
|
//The reason we're taking a part of the air instead of all of it is so that it doesn't jump to
|
||||||
|
//the fire's max temperature instantaneously.
|
||||||
|
|
||||||
//Ensure that there is an appropriate amount of fuel and O2 here.
|
firelevel = air_contents.calculate_firelevel(liquid)
|
||||||
if(firelevel > 0.25 && flow.oxygen > 0.1 && (air_contents.toxins || fuel || liquid))
|
|
||||||
|
|
||||||
for(var/direction in cardinal)
|
//Ensure that there is an appropriate amount of fuel and O2 here.
|
||||||
if(S.air_check_directions&direction) //Grab all valid bordering tiles
|
if(firelevel > 0.25 && flow.oxygen > 0.3 && (air_contents.toxins || fuel || liquid))
|
||||||
|
|
||||||
var/turf/simulated/enemy_tile = get_step(S, direction)
|
for(var/direction in cardinal)
|
||||||
|
if(S.air_check_directions&direction) //Grab all valid bordering tiles
|
||||||
|
|
||||||
if(istype(enemy_tile))
|
var/turf/simulated/enemy_tile = get_step(S, direction)
|
||||||
//If extinguisher mist passed over the turf it's trying to spread to, don't spread and
|
|
||||||
//reduce firelevel.
|
|
||||||
if(enemy_tile.fire_protection > world.time-30)
|
|
||||||
firelevel -= 1.5
|
|
||||||
continue
|
|
||||||
|
|
||||||
//Spread the fire.
|
if(istype(enemy_tile))
|
||||||
if(!(locate(/obj/fire) in enemy_tile))
|
//If extinguisher mist passed over the turf it's trying to spread to, don't spread and
|
||||||
if( prob( firelevel*10 ) )
|
//reduce firelevel.
|
||||||
new/obj/fire(enemy_tile,firelevel)
|
if(enemy_tile.fire_protection > world.time-30)
|
||||||
|
firelevel -= 1.5
|
||||||
|
continue
|
||||||
|
|
||||||
if(flow)
|
//Spread the fire.
|
||||||
|
if(!(locate(/obj/fire) in enemy_tile))
|
||||||
|
if( prob( firelevel*10 ) )
|
||||||
|
new/obj/fire(enemy_tile,firelevel)
|
||||||
|
|
||||||
//Ensure adequate oxygen and fuel.
|
if(flow)
|
||||||
if(flow.oxygen > 0.1 && (flow.toxins || fuel || liquid))
|
|
||||||
|
//Ensure adequate oxygen and fuel.
|
||||||
|
if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid))
|
||||||
|
|
||||||
|
//Change icon depending on the fuel, and thus temperature.
|
||||||
|
if(firelevel > 6)
|
||||||
|
icon_state = "3"
|
||||||
|
else if(firelevel > 2.5)
|
||||||
|
icon_state = "2"
|
||||||
|
else
|
||||||
|
icon_state = "1"
|
||||||
|
|
||||||
|
//Ensure flow temperature is higher than minimum fire temperatures.
|
||||||
|
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||||
|
|
||||||
|
//Burn the gas mixture.
|
||||||
|
flow.zburn(liquid)
|
||||||
|
|
||||||
//Change icon depending on the fuel, and thus temperature.
|
|
||||||
if(firelevel > 6)
|
|
||||||
icon_state = "3"
|
|
||||||
else if(firelevel > 2.5)
|
|
||||||
icon_state = "2"
|
|
||||||
else
|
else
|
||||||
icon_state = "1"
|
|
||||||
|
|
||||||
//Ensure flow temperature is higher than minimum fire temperatures.
|
|
||||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.2,flow.temperature)
|
|
||||||
|
|
||||||
//Burn the gas mixture.
|
|
||||||
if(!flow.zburn(liquid))
|
|
||||||
del src
|
del src
|
||||||
|
|
||||||
|
|
||||||
|
S.assume_air(flow) //Then put it back where you found it.
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
del src
|
del src
|
||||||
|
|
||||||
|
|
||||||
S.assume_air(flow) //Then put it back where you found it.
|
|
||||||
|
|
||||||
else
|
else
|
||||||
del src
|
del src
|
||||||
else
|
else
|
||||||
del src
|
del src
|
||||||
|
|
||||||
|
//Should fix fire being extra damaging, temperature of the environment will now be the main source of fire damage.
|
||||||
|
/*
|
||||||
for(var/mob/living/carbon/human/M in loc)
|
for(var/mob/living/carbon/human/M in loc)
|
||||||
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
|
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
|
||||||
|
*/
|
||||||
|
|
||||||
New(newLoc,fl)
|
New(newLoc,fl)
|
||||||
..()
|
..()
|
||||||
@@ -174,6 +179,7 @@ obj
|
|||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
||||||
turf/proc/apply_fire_protection()
|
turf/proc/apply_fire_protection()
|
||||||
turf/simulated/apply_fire_protection()
|
turf/simulated/apply_fire_protection()
|
||||||
@@ -188,16 +194,16 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
|||||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||||
|
|
||||||
if(fuel)
|
if(fuel)
|
||||||
//Volatile Fuel
|
//Volatile Fuel
|
||||||
if(fuel.moles < 0.01)
|
if(fuel.moles < 0.01)
|
||||||
trace_gases.Remove(fuel)
|
trace_gases.Remove(fuel)
|
||||||
del fuel
|
fuel = null
|
||||||
else
|
else
|
||||||
total_fuel += fuel.moles
|
total_fuel += fuel.moles
|
||||||
fuel_sources++
|
fuel_sources++
|
||||||
|
|
||||||
if(liquid)
|
if(liquid)
|
||||||
//Liquid Fuel
|
//Liquid Fuel
|
||||||
if(liquid.amount <= 0)
|
if(liquid.amount <= 0)
|
||||||
del liquid
|
del liquid
|
||||||
else
|
else
|
||||||
@@ -205,16 +211,14 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
|||||||
fuel_sources++
|
fuel_sources++
|
||||||
|
|
||||||
//Toxins
|
//Toxins
|
||||||
if(toxins > 0.1) fuel_sources++
|
if(toxins > 0.3) fuel_sources++
|
||||||
|
|
||||||
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
|
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
|
||||||
|
|
||||||
if(oxygen > 0.1)
|
if(oxygen > 0.3)
|
||||||
|
|
||||||
//Calculate the firelevel.
|
//Calculate the firelevel.
|
||||||
var/firelevel = calculate_firelevel(liquid)
|
var/firelevel = calculate_firelevel(liquid)
|
||||||
if(firelevel < 0.01)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
//Reaches a maximum practical temperature of around 4500.
|
//Reaches a maximum practical temperature of around 4500.
|
||||||
|
|
||||||
@@ -222,7 +226,7 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
|||||||
temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature )
|
temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature )
|
||||||
|
|
||||||
//Consume some gas.
|
//Consume some gas.
|
||||||
var/consumed_gas = min(oxygen,firelevel * 50,total_fuel) / fuel_sources
|
var/consumed_gas = min(oxygen,0.05*firelevel,total_fuel) / fuel_sources
|
||||||
|
|
||||||
oxygen = max(0,oxygen-consumed_gas)
|
oxygen = max(0,oxygen-consumed_gas)
|
||||||
|
|
||||||
@@ -248,19 +252,14 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
|
|||||||
var
|
var
|
||||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||||
liquid_concentration = 0
|
liquid_concentration = 0
|
||||||
fuel_concentration = 0
|
|
||||||
|
|
||||||
oxy_concentration = oxygen / volume
|
oxy_concentration = oxygen / volume
|
||||||
tox_concentration = toxins / volume
|
tox_concentration = toxins / volume
|
||||||
|
fuel_concentration = 0
|
||||||
|
|
||||||
if(fuel) fuel_concentration = (fuel.moles) / volume
|
if(fuel) fuel_concentration = (fuel.moles) / volume
|
||||||
if(liquid) liquid_concentration = (liquid.amount*15) / volume
|
if(liquid) liquid_concentration = (liquid.amount*15) / volume
|
||||||
|
return (oxy_concentration + tox_concentration + liquid_concentration + fuel_concentration)*100
|
||||||
var/final = tox_concentration + liquid_concentration + fuel_concentration
|
|
||||||
if(final > oxy_concentration)
|
|
||||||
final = oxy_concentration
|
|
||||||
|
|
||||||
return final * 100
|
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/FireBurn(mx as num)
|
/mob/living/carbon/human/proc/FireBurn(mx as num)
|
||||||
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
|
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
|
||||||
@@ -273,7 +272,7 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
|
|||||||
arms_exposure = 1
|
arms_exposure = 1
|
||||||
|
|
||||||
//Get heat transfer coefficients for clothing.
|
//Get heat transfer coefficients for clothing.
|
||||||
//skytodo: different handling of temp with tg //Jesus, mate. Don't ask me. I have no diea how their crap works, and Aryn wrote this proc.
|
//skytodo: different handling of temp with tg
|
||||||
/*for(var/obj/item/clothing/C in src)
|
/*for(var/obj/item/clothing/C in src)
|
||||||
if(l_hand == C || r_hand == C) continue
|
if(l_hand == C || r_hand == C) continue
|
||||||
if(C.body_parts_covered & HEAD)
|
if(C.body_parts_covered & HEAD)
|
||||||
|
|||||||
@@ -280,7 +280,9 @@ var/list/sharing_lookup_table = list(0.06, 0.11, 0.15, 0.18, 0.20, 0.21)
|
|||||||
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
||||||
var
|
var
|
||||||
ratio = 0.50
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
ratio = 0.21
|
||||||
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
|
||||||
size = max(1,A.group_multiplier)
|
size = max(1,A.group_multiplier)
|
||||||
share_size = max(1,B.group_multiplier)
|
share_size = max(1,B.group_multiplier)
|
||||||
@@ -306,6 +308,11 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
|||||||
|
|
||||||
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
|
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
|
||||||
|
|
||||||
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
if(sharing_lookup_table.len >= connecting_tiles) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||||
|
ratio = sharing_lookup_table[connecting_tiles]
|
||||||
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
|
||||||
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
|
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
|
||||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
|
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
|
||||||
A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg )
|
A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg )
|
||||||
@@ -361,7 +368,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
|||||||
|
|
||||||
var
|
var
|
||||||
// Depressurize very, very fast(it's fine since many rooms are internally multiple zones)
|
// Depressurize very, very fast(it's fine since many rooms are internally multiple zones)
|
||||||
ratio = 0.50
|
ratio = 0.21
|
||||||
|
|
||||||
old_pressure = A.return_pressure()
|
old_pressure = A.return_pressure()
|
||||||
|
|
||||||
@@ -380,6 +387,11 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
|||||||
co2_avg = unsim_co2//(full_co2 + unsim_co2) / (size + share_size)
|
co2_avg = unsim_co2//(full_co2 + unsim_co2) / (size + share_size)
|
||||||
plasma_avg = unsim_plasma//(full_plasma + unsim_plasma) / (size + share_size)
|
plasma_avg = unsim_plasma//(full_plasma + unsim_plasma) / (size + share_size)
|
||||||
|
|
||||||
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||||
|
ratio = sharing_lookup_table[unsimulated_tiles.len]
|
||||||
|
ratio *= 2
|
||||||
|
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||||
|
|
||||||
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
|
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
|
||||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
|
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
|
||||||
|
|||||||
@@ -413,7 +413,7 @@
|
|||||||
|
|
||||||
|
|
||||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a>\n"
|
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>\n"
|
||||||
//msg += "\[Set Hostile Identification\]\n"
|
//msg += "\[Set Hostile Identification\]\n"
|
||||||
|
|
||||||
if(istype(usr, /mob/living/carbon/human))
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
|
|
||||||
|
|
||||||
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
|
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
|
||||||
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a>\n"
|
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a> <a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>\n"
|
||||||
|
|
||||||
|
|
||||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||||
|
|||||||
@@ -568,11 +568,70 @@
|
|||||||
usr << "<b>Major Crimes:</b> [R.fields["ma_crim"]]"
|
usr << "<b>Major Crimes:</b> [R.fields["ma_crim"]]"
|
||||||
usr << "<b>Details:</b> [R.fields["ma_crim_d"]]"
|
usr << "<b>Details:</b> [R.fields["ma_crim_d"]]"
|
||||||
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
||||||
|
usr << "<a href='?src=\ref[src];secrecordComment=`'>\[View Comment Log\]</a>"
|
||||||
read = 1
|
read = 1
|
||||||
|
|
||||||
if(!read)
|
if(!read)
|
||||||
usr << "\red Unable to locate a data core entry for this person."
|
usr << "\red Unable to locate a data core entry for this person."
|
||||||
|
|
||||||
|
if (href_list["secrecordComment"])
|
||||||
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||||
|
var/perpname = "wot"
|
||||||
|
var/read = 0
|
||||||
|
|
||||||
|
if(wear_id)
|
||||||
|
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||||
|
perpname = wear_id:registered_name
|
||||||
|
else if(istype(wear_id,/obj/item/device/pda))
|
||||||
|
var/obj/item/device/pda/tempPda = wear_id
|
||||||
|
perpname = tempPda.owner
|
||||||
|
else
|
||||||
|
perpname = src.name
|
||||||
|
for (var/datum/data/record/E in data_core.general)
|
||||||
|
if (E.fields["name"] == perpname)
|
||||||
|
for (var/datum/data/record/R in data_core.security)
|
||||||
|
if (R.fields["id"] == E.fields["id"])
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||||
|
read = 1
|
||||||
|
var/counter = 1
|
||||||
|
while(R.fields[text("com_[]", counter)])
|
||||||
|
usr << text("[]", R.fields[text("com_[]", counter)])
|
||||||
|
counter++
|
||||||
|
if (counter == 1)
|
||||||
|
usr << "No comment found"
|
||||||
|
usr << "<a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>"
|
||||||
|
|
||||||
|
if(!read)
|
||||||
|
usr << "\red Unable to locate a data core entry for this person."
|
||||||
|
|
||||||
|
if (href_list["secrecordadd"])
|
||||||
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||||
|
var/perpname = "wot"
|
||||||
|
if(wear_id)
|
||||||
|
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||||
|
perpname = wear_id:registered_name
|
||||||
|
else if(istype(wear_id,/obj/item/device/pda))
|
||||||
|
var/obj/item/device/pda/tempPda = wear_id
|
||||||
|
perpname = tempPda.owner
|
||||||
|
else
|
||||||
|
perpname = src.name
|
||||||
|
for (var/datum/data/record/E in data_core.general)
|
||||||
|
if (E.fields["name"] == perpname)
|
||||||
|
for (var/datum/data/record/R in data_core.security)
|
||||||
|
if (R.fields["id"] == E.fields["id"])
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||||
|
var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
|
||||||
|
if ((!( t1 ) || src.stat || src.restrained() || !(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))))
|
||||||
|
return
|
||||||
|
var/counter = 1
|
||||||
|
while(R.fields[text("com_[]", counter)])
|
||||||
|
counter++
|
||||||
|
R.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]",H.get_authentification_name(), H.get_assignment(), time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
|
||||||
|
|
||||||
if (href_list["medical"])
|
if (href_list["medical"])
|
||||||
if(istype(usr, /mob/living/carbon/human))
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = usr
|
var/mob/living/carbon/human/H = usr
|
||||||
@@ -594,7 +653,7 @@
|
|||||||
for (var/datum/data/record/R in data_core.general)
|
for (var/datum/data/record/R in data_core.general)
|
||||||
if (R.fields["id"] == E.fields["id"])
|
if (R.fields["id"] == E.fields["id"])
|
||||||
|
|
||||||
var/setmedical = input(usr, "Specify a new criminal status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*Deceased*", "*Unconscious*", "Physically Unfit", "Active", "Cancel")
|
var/setmedical = input(usr, "Specify a new medical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*Deceased*", "*Unconscious*", "Physically Unfit", "Active", "Cancel")
|
||||||
|
|
||||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||||
if(setmedical != "Cancel")
|
if(setmedical != "Cancel")
|
||||||
@@ -634,10 +693,69 @@
|
|||||||
usr << "<b>Major Disabilities:</b> [R.fields["ma_dis"]]"
|
usr << "<b>Major Disabilities:</b> [R.fields["ma_dis"]]"
|
||||||
usr << "<b>Details:</b> [R.fields["ma_dis_d"]]"
|
usr << "<b>Details:</b> [R.fields["ma_dis_d"]]"
|
||||||
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
||||||
|
usr << "<a href='?src=\ref[src];medrecordComment=`'>\[View Comment Log\]</a>"
|
||||||
read = 1
|
read = 1
|
||||||
|
|
||||||
if(!read)
|
if(!read)
|
||||||
usr << "\red Unable to locate a data core entry for this person."
|
usr << "\red Unable to locate a data core entry for this person."
|
||||||
|
|
||||||
|
if (href_list["medrecordComment"])
|
||||||
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||||
|
var/perpname = "wot"
|
||||||
|
var/read = 0
|
||||||
|
|
||||||
|
if(wear_id)
|
||||||
|
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||||
|
perpname = wear_id:registered_name
|
||||||
|
else if(istype(wear_id,/obj/item/device/pda))
|
||||||
|
var/obj/item/device/pda/tempPda = wear_id
|
||||||
|
perpname = tempPda.owner
|
||||||
|
else
|
||||||
|
perpname = src.name
|
||||||
|
for (var/datum/data/record/E in data_core.general)
|
||||||
|
if (E.fields["name"] == perpname)
|
||||||
|
for (var/datum/data/record/R in data_core.medical)
|
||||||
|
if (R.fields["id"] == E.fields["id"])
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||||
|
read = 1
|
||||||
|
var/counter = 1
|
||||||
|
while(R.fields[text("com_[]", counter)])
|
||||||
|
usr << text("[]", R.fields[text("com_[]", counter)])
|
||||||
|
counter++
|
||||||
|
if (counter == 1)
|
||||||
|
usr << "No comment found"
|
||||||
|
usr << "<a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>"
|
||||||
|
|
||||||
|
if(!read)
|
||||||
|
usr << "\red Unable to locate a data core entry for this person."
|
||||||
|
|
||||||
|
if (href_list["medrecordadd"])
|
||||||
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||||
|
var/perpname = "wot"
|
||||||
|
if(wear_id)
|
||||||
|
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||||
|
perpname = wear_id:registered_name
|
||||||
|
else if(istype(wear_id,/obj/item/device/pda))
|
||||||
|
var/obj/item/device/pda/tempPda = wear_id
|
||||||
|
perpname = tempPda.owner
|
||||||
|
else
|
||||||
|
perpname = src.name
|
||||||
|
for (var/datum/data/record/E in data_core.general)
|
||||||
|
if (E.fields["name"] == perpname)
|
||||||
|
for (var/datum/data/record/R in data_core.medical)
|
||||||
|
if (R.fields["id"] == E.fields["id"])
|
||||||
|
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||||
|
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
|
||||||
|
if ((!( t1 ) || src.stat || src.restrained() || !(istype(H.glasses, /obj/item/clothing/glasses/hud/health))))
|
||||||
|
return
|
||||||
|
var/counter = 1
|
||||||
|
while(R.fields[text("com_[]", counter)])
|
||||||
|
counter++
|
||||||
|
R.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]",H.get_authentification_name(), H.get_assignment(), time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 268 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 206 KiB |
20626
maps/RowtreeStation.dmm
20626
maps/RowtreeStation.dmm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user