merge with tgstation's r4618, removed some broken bs12 merges (organs, pain)

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-09-06 13:09:20 +10:00
parent dc3f6f2239
commit ad75e6b352
17 changed files with 230 additions and 48 deletions

View File

@@ -400,12 +400,6 @@
#include "code\defines\procs\syndicate_name.dm" #include "code\defines\procs\syndicate_name.dm"
#include "code\defines\procs\time_stamp.dm" #include "code\defines\procs\time_stamp.dm"
#include "code\defines\tanning\leather.dm" #include "code\defines\tanning\leather.dm"
#include "code\FEA\FEA_airgroup.dm"
#include "code\FEA\FEA_fire.dm"
#include "code\FEA\FEA_gas_mixture.dm"
#include "code\FEA\FEA_group_helpers.dm"
#include "code\FEA\FEA_system.dm"
#include "code\FEA\FEA_turf_tile.dm"
#include "code\game\algorithm.dm" #include "code\game\algorithm.dm"
#include "code\game\atom_procs.dm" #include "code\game\atom_procs.dm"
#include "code\game\cellautomata.dm" #include "code\game\cellautomata.dm"
@@ -413,11 +407,14 @@
#include "code\game\communications.dm" #include "code\game\communications.dm"
#include "code\game\dna.dm" #include "code\game\dna.dm"
#include "code\game\hud.dm" #include "code\game\hud.dm"
#include "code\game\json.dm"
#include "code\game\landmarks.dm" #include "code\game\landmarks.dm"
#include "code\game\prisonshuttle.dm" #include "code\game\prisonshuttle.dm"
#include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm" #include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm" #include "code\game\skincmd.dm"
#include "code\game\smoothwall.dm" #include "code\game\smoothwall.dm"
#include "code\game\socket_talk.dm"
#include "code\game\sound.dm" #include "code\game\sound.dm"
#include "code\game\specops_shuttle.dm" #include "code\game\specops_shuttle.dm"
#include "code\game\status.dm" #include "code\game\status.dm"
@@ -551,7 +548,6 @@
#include "code\game\machinery\atmoalter\portable_atmospherics.dm" #include "code\game\machinery\atmoalter\portable_atmospherics.dm"
#include "code\game\machinery\atmoalter\pump.dm" #include "code\game\machinery\atmoalter\pump.dm"
#include "code\game\machinery\atmoalter\scrubber.dm" #include "code\game\machinery\atmoalter\scrubber.dm"
#include "code\game\machinery\atmoalter\zvent.dm"
#include "code\game\machinery\bots\bots.dm" #include "code\game\machinery\bots\bots.dm"
#include "code\game\machinery\bots\cleanbot.dm" #include "code\game\machinery\bots\cleanbot.dm"
#include "code\game\machinery\bots\ed209bot.dm" #include "code\game\machinery\bots\ed209bot.dm"
@@ -917,10 +913,13 @@
#include "code\modules\clothing\shoes\colour.dm" #include "code\modules\clothing\shoes\colour.dm"
#include "code\modules\clothing\shoes\magboots.dm" #include "code\modules\clothing\shoes\magboots.dm"
#include "code\modules\clothing\shoes\miscellaneous.dm" #include "code\modules\clothing\shoes\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\captain.dm"
#include "code\modules\clothing\spacesuits\ert.dm"
#include "code\modules\clothing\spacesuits\miscellaneous.dm" #include "code\modules\clothing\spacesuits\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\ninja.dm" #include "code\modules\clothing\spacesuits\ninja.dm"
#include "code\modules\clothing\spacesuits\rig.dm" #include "code\modules\clothing\spacesuits\rig.dm"
#include "code\modules\clothing\spacesuits\syndi.dm" #include "code\modules\clothing\spacesuits\syndi.dm"
#include "code\modules\clothing\spacesuits\void.dm"
#include "code\modules\clothing\suits\armor.dm" #include "code\modules\clothing\suits\armor.dm"
#include "code\modules\clothing\suits\bio.dm" #include "code\modules\clothing\suits\bio.dm"
#include "code\modules\clothing\suits\jobs.dm" #include "code\modules\clothing\suits\jobs.dm"
@@ -938,12 +937,17 @@
#include "code\modules\clothing\under\jobs\engineering.dm" #include "code\modules\clothing\under\jobs\engineering.dm"
#include "code\modules\clothing\under\jobs\medsci.dm" #include "code\modules\clothing\under\jobs\medsci.dm"
#include "code\modules\clothing\under\jobs\security.dm" #include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\clothing\uniforms\lawyer.dm"
#include "code\modules\critters\critter.dm" #include "code\modules\critters\critter.dm"
#include "code\modules\critters\critter_AI.dm" #include "code\modules\critters\critter_AI.dm"
#include "code\modules\critters\critter_defenses.dm" #include "code\modules\critters\critter_defenses.dm"
#include "code\modules\critters\critters.dm" #include "code\modules\critters\critters.dm"
#include "code\modules\critters\hivebots\hivebot.dm" #include "code\modules\critters\hivebots\hivebot.dm"
#include "code\modules\customitems\item_defines.dm"#include "code\modules\customitems\item_spawning.dm"#include "code\modules\DetectiveWork\detective_work.dm"#include "code\modules\DetectiveWork\evidence.dm"#include "code\modules\DetectiveWork\footprints_and_rag.dm"#include "code\modules\DetectiveWork\scanner.dm"#include "code\modules\flufftext\Dreaming.dm" #include "code\modules\DetectiveWork\detective_work.dm"
#include "code\modules\DetectiveWork\evidence.dm"
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
#include "code\modules\DetectiveWork\scanner.dm"
#include "code\modules\flufftext\Dreaming.dm"
#include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\Hallucination.dm"
#include "code\modules\flufftext\TextFilters.dm" #include "code\modules\flufftext\TextFilters.dm"
#include "code\modules\food\recipes_microwave.dm" #include "code\modules\food\recipes_microwave.dm"
@@ -992,6 +996,7 @@
#include "code\modules\mob\living\blob\blob.dm" #include "code\modules\mob\living\blob\blob.dm"
#include "code\modules\mob\living\carbon\carbon.dm" #include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\give.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm" #include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\death.dm" #include "code\modules\mob\living\carbon\alien\death.dm"
#include "code\modules\mob\living\carbon\alien\login.dm" #include "code\modules\mob\living\carbon\alien\login.dm"
@@ -1134,6 +1139,7 @@
#include "code\modules\mob\new_player\preferences.dm" #include "code\modules\mob\new_player\preferences.dm"
#include "code\modules\mob\new_player\preferences_setup.dm" #include "code\modules\mob\new_player\preferences_setup.dm"
#include "code\modules\mob\new_player\savefile.dm" #include "code\modules\mob\new_player\savefile.dm"
#include "code\modules\mob\new_player\skill.dm"
#include "code\modules\mob\new_player\sprite_accessories.dm" #include "code\modules\mob\new_player\sprite_accessories.dm"
#include "code\modules\mob\organ\organ.dm" #include "code\modules\mob\organ\organ.dm"
#include "code\modules\mob\organ\organ_external.dm" #include "code\modules\mob\organ\organ_external.dm"
@@ -1268,7 +1274,35 @@
#include "code\modules\security levels\security levels.dm" #include "code\modules\security levels\security levels.dm"
#include "code\WorkInProgress\buildmode.dm" #include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm" #include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\animusstation\atm.dm"#include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"#include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm"#include "code\WorkInProgress\Cael_Aislinn\shield_gen.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"#include "code\WorkInProgress\Mini\atmos_control.dm"#include "code\WorkInProgress\Ported\policetape.dm"#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"#include "code\WorkInProgress\Tastyfish\livestock.dm"#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"#include "code\ZAS\Airflow.dm"#include "code\ZAS\Connection.dm"#include "code\ZAS\FEA_gas_mixture.dm"#include "code\ZAS\FEA_system.dm"#include "code\ZAS\Fire.dm"#include "code\ZAS\Functions.dm"#include "code\ZAS\Plasma.dm"#include "code\ZAS\Variable Settings.dm"#include "code\ZAS\ZAS_Turfs.dm"#include "code\ZAS\ZAS_Zones.dm"#include "interface\interface.dm" #include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"
#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
#include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\shield_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
#include "code\ZAS\Airflow.dm"
#include "code\ZAS\Connection.dm"
#include "code\ZAS\FEA_gas_mixture.dm"
#include "code\ZAS\FEA_system.dm"
#include "code\ZAS\Fire.dm"
#include "code\ZAS\Functions.dm"
#include "code\ZAS\Plasma.dm"
#include "code\ZAS\Variable Settings.dm"
#include "code\ZAS\ZAS_Turfs.dm"
#include "code\ZAS\ZAS_Zones.dm"
#include "interface\skin.dmf" #include "interface\skin.dmf"
#include "maps\tgstation.2.0.9.dmm" #include "maps\tgstation.2.0.9.dmm"
// END_INCLUDE // END_INCLUDE

View File

@@ -175,7 +175,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//SPECIFIC_HEAT_TOXIN //SPECIFIC_HEAT_TOXIN
if(mega_energy > 0 && held_plasma.toxins) if(mega_energy > 0 && held_plasma.toxins)
var/heat_capacity = held_plasma.heat_capacity()//200 * number of plasma moles var/heat_capacity = held_plasma.heat_capacity()//200 * number of plasma moles
if(heat_capacity > MINIMUM_HEAT_CAPACITY) if(heat_capacity > 0.0003) //formerly MINIMUM_HEAT_CAPACITY
held_plasma.temperature = (heat_capacity + mega_energy * 35000)/heat_capacity held_plasma.temperature = (heat_capacity + mega_energy * 35000)/heat_capacity
//if there is too much plasma in the field, lose some //if there is too much plasma in the field, lose some

View File

@@ -4,6 +4,9 @@ What are the archived variables for?
This prevents race conditions that arise based on the order of tile processing. This prevents race conditions that arise based on the order of tile processing.
*/ */
#define QUANTIZE(variable) (round(variable,0.0001))
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
datum datum
gas //These are used for the "Trace Gases" stuff, but is buggy. gas //These are used for the "Trace Gases" stuff, but is buggy.
sleeping_agent sleeping_agent

View File

@@ -344,4 +344,4 @@ datum/gas_mixture/proc/calculate_firelevel(obj/liquid_fuel/liquid)
apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire") apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire") apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire")
flash_pain() //flash_pain()

View File

@@ -108,10 +108,30 @@ datum/controller/game_controller/proc/process()
controller_iteration++ controller_iteration++
//AIR //AIR
timer = world.timeofday /*timer = world.timeofday
last_thing_processed = air_master.type last_thing_processed = air_master.type
air_master.process() air_master.process()
air_cost = (world.timeofday - timer) / 10 air_cost = (world.timeofday - timer) / 10*/
// this might make atmos slower
// 1. atmos won't process if the game is generally lagged out(no deadlocks)
// 2. if the server frequently crashes during atmos processing we will know
if(!kill_air)
//src.set_debug_state("Air Master")
air_master.current_cycle++
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
if(!success) //Runtimed.
log_adminwarn("ZASALERT: air_system/tick() failed: [air_master.tick_progress]")
air_master.failed_ticks++
if(air_master.failed_ticks > 5)
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
kill_air = 1
air_master.failed_ticks = 0
/*else if (air_master.failed_ticks > 10)
air_master.failed_ticks = 0*/
//air_master_ready = 1
sleep(breather_ticks) sleep(breather_ticks)

View File

@@ -63,6 +63,111 @@
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character(). //This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list() var/locked[] = list()
proc/get_manifest(monochrome)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest">
<tr class='head'><th>Name</th><th>Rank</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"]
//world << "[name]: [rank]"
if(real_rank in command_positions)
heads[name] = rank
if(real_rank in security_positions)
sec[name] = rank
continue
if(real_rank in engineering_positions)
eng[name] = rank
continue
if(real_rank in medical_positions)
med[name] = rank
continue
if(real_rank in science_positions)
sci[name] = rank
continue
if(real_rank in civilian_positions)
civ[name] = rank
continue
if(real_rank in nonhuman_positions)
bot[name] = rank
continue
if(!(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=2>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=2>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=2>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=2>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=2>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=2>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=2>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=2>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td></tr>"
even = !even
dat += "</table>"
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = dd_replacetext(dat, "\t", "")
return dat
/obj/item/device/infra_sensor /obj/item/device/infra_sensor
name = "Infrared Sensor" name = "Infrared Sensor"
desc = "Scans for infrared beams in the vicinity." desc = "Scans for infrared beams in the vicinity."

View File

@@ -95,8 +95,6 @@ client/proc/ChangeMap(var/X as text)
set name = "Change Map" set name = "Change Map"
set category = "Admin" set category = "Admin"
switchmap(X,X) switchmap(X,X)
proc/send2irc(msg,msg2)
shell("python nudge.py [msg] [msg2]")
proc/send2adminirc(channel,msg) proc/send2adminirc(channel,msg)
world << channel << " "<< msg world << channel << " "<< msg
shell("python nudge.py '[channel]' [msg]") shell("python nudge.py '[channel]' [msg]")

View File

@@ -990,8 +990,8 @@
new /obj/structure/girder(src) new /obj/structure/girder(src)
src.ReplaceWithFloor() src.ReplaceWithFloor()
for(var/turf/simulated/floor/target_tile in range(0,src)) for(var/turf/simulated/floor/target_tile in range(0,src))
if(target_tile.parent && target_tile.parent.group_processing) // if(target_tile.parent && target_tile.parent.group_processing) // THESE PROBABLY DO SOMETHING IMPORTANT BUT I DON'T KNOW HOW TO FIX IT - Erthilo
target_tile.parent.suspend_group_processing() // target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = 20 var/toxinsToDeduce = 20
napalm.toxins = toxinsToDeduce napalm.toxins = toxinsToDeduce
@@ -1008,7 +1008,7 @@
for(var/obj/machinery/door/airlock/plasma/D in range(3,src)) for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
D.ignite(temperature/4) D.ignite(temperature/4)
/turf/simulated/wall/mineral/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :( /turf/simulated/wall/mineral/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(mineral == "plasma") if(mineral == "plasma")
if(exposed_temperature > 300) if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature) PlasmaBurn(exposed_temperature)

View File

@@ -165,6 +165,8 @@ var/list/AAlarmWireColorToIndex
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam //Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
#define MAX_MESSAGE_LEN 1024 #define MAX_MESSAGE_LEN 1024
#define MAX_PAPER_MESSAGE_LEN 3072
#define MAX_BOOK_MESSAGE_LEN 9216
#define MAX_NAME_LEN 26 #define MAX_NAME_LEN 26
#define shuttle_time_in_station 1800 // 3 minutes in the station #define shuttle_time_in_station 1800 // 3 minutes in the station

View File

@@ -130,3 +130,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])") send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return return
proc/send2irc(msg,msg2)
if(config.useircbot)
shell("python nudge.py [msg] [msg2]")
return

View File

@@ -56,7 +56,7 @@
//////////// ////////////
var/next_allowed_topic_time = 10 var/next_allowed_topic_time = 10
// comment out the line below when debugging locally to enable the options & messages menu // comment out the line below when debugging locally to enable the options & messages menu
//control_freak = 1 control_freak = 1

View File

@@ -121,7 +121,7 @@
admin_memo_show() admin_memo_show()
//log_client_to_db() log_client_to_db()
////////////// //////////////

View File

@@ -10,3 +10,6 @@
var/silent = null //Can't talk. Value goes down every life proc. var/silent = null //Can't talk. Value goes down every life proc.
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
// life should decrease this by 1 every tick

View File

@@ -1,6 +1,5 @@
/datum/organ/external /datum/organ/external
name = "external" name = "external"
var/display_name = "limb"
var/icon_name = null var/icon_name = null
var/body_part = null var/body_part = null
var/brutestate = 0 var/brutestate = 0
@@ -14,42 +13,36 @@
/datum/organ/external/chest /datum/organ/external/chest
name = "chest" name = "chest"
display_name = "torso"
icon_name = "chest" icon_name = "chest"
max_damage = 150 max_damage = 150
body_part = UPPER_TORSO body_part = UPPER_TORSO
/datum/organ/external/head /datum/organ/external/head
name = "head" name = "head"
display_name = "head"
icon_name = "head" icon_name = "head"
max_damage = 125 max_damage = 125
body_part = HEAD body_part = HEAD
/datum/organ/external/l_arm /datum/organ/external/l_arm
name = "l_arm" name = "l_arm"
display_name = "left arm"
icon_name = "l_arm" icon_name = "l_arm"
max_damage = 75 max_damage = 75
body_part = ARM_LEFT body_part = ARM_LEFT
/datum/organ/external/l_leg /datum/organ/external/l_leg
name = "l_leg" name = "l_leg"
display_name = "left leg"
icon_name = "l_leg" icon_name = "l_leg"
max_damage = 75 max_damage = 75
body_part = LEG_LEFT body_part = LEG_LEFT
/datum/organ/external/r_arm /datum/organ/external/r_arm
name = "r_arm" name = "r_arm"
display_name = "right arm"
icon_name = "r_arm" icon_name = "r_arm"
max_damage = 75 max_damage = 75
body_part = ARM_RIGHT body_part = ARM_RIGHT
/datum/organ/external/r_leg /datum/organ/external/r_leg
name = "r_leg" name = "r_leg"
display_name = "right leg"
icon_name = "r_leg" icon_name = "r_leg"
max_damage = 75 max_damage = 75
body_part = LEG_RIGHT body_part = LEG_RIGHT

View File

@@ -1,6 +1,3 @@
/datum/organ/internal
name = "internal"
/datum/organ/internal/blood_vessels /datum/organ/internal/blood_vessels
name = "blood vessels" name = "blood vessels"
var/heart = null var/heart = null
@@ -48,4 +45,3 @@
name = "throat" name = "throat"
var/lungs = null var/lungs = null
var/stomach = null var/stomach = null

View File

@@ -1,6 +1,5 @@
mob/proc/flash_pain() mob/proc/flash_pain()
// flick("pain",pain) flick("pain",pain)
return
mob/var/list/pain_stored = list() mob/var/list/pain_stored = list()
mob/var/last_pain_message = "" mob/var/last_pain_message = ""
@@ -8,7 +7,7 @@ mob/var/next_pain_time = 0
// partname is the name of a body part // partname is the name of a body part
// amount is a num from 1 to 100 // amount is a num from 1 to 100
mob/proc/pain(var/partname, var/amount, var/force) mob/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
if(stat >= 2) return if(stat >= 2) return
if(world.time < next_pain_time && !force) if(world.time < next_pain_time && !force)
return return
@@ -17,22 +16,30 @@ mob/proc/pain(var/partname, var/amount, var/force)
src:paralysis = max(0, src:paralysis-round(amount/10)) src:paralysis = max(0, src:paralysis-round(amount/10))
if(amount > 50 && prob(amount / 5)) if(amount > 50 && prob(amount / 5))
src:drop_item() src:drop_item()
/* var/msg
switch(amount) if(burning)
if(1 to 10) switch(amount)
msg = "<b>Your [partname] hurts a bit.</b>" if(1 to 10)
if(11 to 90) msg = "\red <b>Your [partname] burns.</b>"
// flash_weak_pain() if(11 to 90)
msg = "<b><font size=1>Ouch! Your [partname] hurts.</font></b>" flash_weak_pain()
if(91 to 10000) msg = "\red <b><font size=2>Your [partname] burns badly!</font></b>"
flash_pain() if(91 to 10000)
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>" flash_pain()
msg = "\red <b><font size=3>OH GOD! Your [partname] is on fire!</font></b>"
else
switch(amount)
if(1 to 10)
msg = "<b>Your [partname] hurts.</b>"
if(11 to 90)
flash_weak_pain()
msg = "<b><font size=2>Your [partname] hurts badly.</font></b>"
if(91 to 10000)
flash_pain()
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>"
if(msg && (msg != last_pain_message || prob(10))) if(msg && (msg != last_pain_message || prob(10)))
last_pain_message = msg last_pain_message = msg
src << msg src << msg
*/
next_pain_time = world.time + (100 - amount) next_pain_time = world.time + (100 - amount)
mob/living/carbon/human/proc/handle_pain() mob/living/carbon/human/proc/handle_pain()
@@ -42,10 +49,15 @@ mob/living/carbon/human/proc/handle_pain()
return return
if(reagents.has_reagent("oxycodone")) if(reagents.has_reagent("oxycodone"))
return return
if(analgesic)
return
var/maxdam = 0 var/maxdam = 0
var/datum/organ/external/damaged_organ = null var/datum/organ/external/damaged_organ = null
for(var/name in organs) for(var/name in organs)
var/datum/organ/external/E = organs[name] var/datum/organ/external/E = organs[name]
// amputated limbs don't cause pain
if(E.amputated) continue
var/dam = E.get_damage() var/dam = E.get_damage()
// make the choice of the organ depend on damage, // make the choice of the organ depend on damage,
// but also sometimes use one of the less damaged ones // but also sometimes use one of the less damaged ones

View File

@@ -464,7 +464,8 @@ var/list/liftable_structures = list(\
//The number of deciseconds which someone needs to be inactive to be classified as AFK: //The number of deciseconds which someone needs to be inactive to be classified as AFK:
#define AFK_THRESHOLD 3000 #define AFK_THRESHOLD 3000
#define MIN_PLAYER_AGE 19
#define MAX_PLAYER_AGE 54
#define SEE_INVISIBLE_MINIMUM 5 #define SEE_INVISIBLE_MINIMUM 5
@@ -498,3 +499,13 @@ var/list/liftable_structures = list(\
//some arbitrary defines to be used by self-pruning global lists. (see master_controller) //some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define PROCESS_KILL 26 //Used to trigger removal from a processing list #define PROCESS_KILL 26 //Used to trigger removal from a processing list
#define SPECIFIC_HEAT_TOXIN 200
#define SPECIFIC_HEAT_AIR 20
#define SPECIFIC_HEAT_CDO 30
#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
(carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
#define MINIMUM_HEAT_CAPACITY 0.0003
#define QUANTIZE(variable) (round(variable,0.0001))
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer