Merge remote-tracking branch 'upstream/master' into dev-freeze

Conflicts:
	code/game/objects/items/weapons/tanks/tanks.dm
	code/modules/holodeck/HolodeckControl.dm
	code/modules/mob/living/carbon/breathe.dm
	code/modules/mob/living/carbon/human/life.dm
	code/setup.dm
This commit is contained in:
PsiOmegaDelta
2015-10-11 17:17:41 +02:00
22 changed files with 341 additions and 201 deletions
+1
View File
@@ -162,6 +162,7 @@ var/list/debug_verbs = list (
,/client/proc/testZAScolors_remove
,/client/proc/setup_supermatter_engine
,/client/proc/atmos_toggle_debug
,/client/proc/spawn_tanktransferbomb
)
+54 -26
View File
@@ -5,10 +5,13 @@
use_power = 1
active_power_usage = 8000 //8kW for the scenery + 500W per holoitem
circuit = /obj/item/weapon/circuitboard/holodeckcontrol
var/item_power_usage = 500
var/area/linkedholodeck = null
var/area/target = null
var/linkedholodeck_area
var/active = 0
var/list/holographic_objs = list()
var/list/holographic_mobs = list()
@@ -17,34 +20,39 @@
var/mob/last_to_emag = null
var/last_change = 0
var/last_gravity_change = 0
var/list/supported_programs = list( \
"Empty Court" = "emptycourt", \
"Basketball Court" = "basketball", \
"Thunderdome Court" = "thunderdomecourt", \
"Boxing Ring"="boxingcourt", \
"Beach" = "beach", \
"Desert" = "desert", \
"Space" = "space", \
"Picnic Area" = "picnicarea", \
"Snow Field" = "snowfield", \
"Theatre" = "theatre", \
"Meeting Hall" = "meetinghall", \
"Courtroom" = "courtroom" \
)
var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp")
var/list/supported_programs
var/list/restricted_programs
/obj/machinery/computer/HolodeckControl/New()
..()
linkedholodeck = locate(linkedholodeck_area)
supported_programs = list()
restricted_programs = list()
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob)
if(..())
return
return 1
user.set_machine(src)
var/dat
dat += "<B>Holodeck Control System</B><BR>"
dat += "<HR>Current Loaded Programs:<BR>"
if(!linkedholodeck)
dat += "</span class='danger'>Warning: Unable to locate holodeck.<br></span>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
if(!supported_programs.len)
dat += "</span class='danger'>Warning: No supported holo-programs loaded.<br></span>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
for(var/prog in supported_programs)
dat += "<A href='?src=\ref[src];program=[supported_programs[prog]]'>([prog])</A><BR>"
@@ -82,10 +90,8 @@
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/HolodeckControl/Topic(href, href_list)
if(..())
return 1
@@ -131,8 +137,9 @@
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
return 1
src.updateUsrDialog()
return
src.updateUsrDialog()
else
..()
/obj/machinery/computer/HolodeckControl/proc/update_projections()
if (safety_disabled)
@@ -149,10 +156,6 @@
if (last_to_emag)
C.friends = list(last_to_emag)
/obj/machinery/computer/HolodeckControl/New()
..()
linkedholodeck = locate(/area/holodeck/alphadeck)
//This could all be done better, but it works for now.
/obj/machinery/computer/HolodeckControl/Destroy()
emergencyShutdown()
@@ -335,3 +338,28 @@
active = 0
use_power = 1
/obj/machinery/computer/HolodeckControl/Exodus
linkedholodeck_area = /area/holodeck/alphadeck
/obj/machinery/computer/HolodeckControl/Exodus/New()
..()
supported_programs = list(
"Empty Court" = "emptycourt",
"Basketball Court" = "basketball",
"Thunderdome Court" = "thunderdomecourt",
"Boxing Ring" = "boxingcourt",
"Beach" = "beach",
"Desert" = "desert",
"Space" = "space",
"Picnic Area" = "picnicarea",
"Snow Field" = "snowfield",
"Theatre" = "theatre",
"Meeting Hall" = "meetinghall",
"Courtroom" = "courtroom"
)
restricted_programs = list(
"Atmospheric Burn Simulation" = "burntest",
"Wildlife Simulation" = "wildlifecarp"
)
+1 -1
View File
@@ -54,7 +54,7 @@
breath = environment.remove_volume(volume_needed)
handle_chemical_smoke(environment) //handle chemical smoke while we're at it
if(breath)
if(breath && breath.total_moles)
//handle mask filtering
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
var/obj/item/clothing/mask/M = wear_mask
@@ -980,7 +980,7 @@
if(L && !L.is_bruised())
src.custom_pain("You feel a stabbing pain in your chest!", 1)
L.damage = L.min_bruised_damage
L.bruise()
/*
/mob/living/carbon/human/verb/simulate()
+20 -4
View File
@@ -342,10 +342,26 @@
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles == 0) || suiciding)
failed_last_breath = 1
if(suiciding)
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
if(status_flags & GODMODE)
return
//exposure to extreme pressures can rupture lungs
if(breath && (breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5))
if(!is_lung_ruptured() && prob(5))
rupture_lung()
//check if we actually need to process breath
if(!breath || (breath.total_moles == 0) || suiciding)
failed_last_breath = 1
if(suiciding)
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
oxygen_alert = max(oxygen_alert, 1)
return 0
if(health > config.health_threshold_crit)
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
oxygen_alert = max(oxygen_alert, 1)
return 0
if(health > config.health_threshold_crit)
+3
View File
@@ -240,6 +240,9 @@ var/list/organ_cache = list()
if(parent && !silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
/obj/item/organ/proc/bruise()
damage = max(damage, min_bruised_damage)
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
robotic = 2
src.status &= ~ORGAN_BROKEN
@@ -110,6 +110,7 @@
/obj/item/projectile/bullet/pistol/rubber //"rubber" bullets
name = "rubber bullet"
check_armour = "melee"
damage = 10
agony = 40
embed = 0
@@ -123,6 +124,7 @@
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
name = "beanbag"
check_armour = "melee"
damage = 20
agony = 60
embed = 0
+6 -4
View File
@@ -172,10 +172,12 @@
affected.createwound(BRUISE, 20)
affected.fracture()
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
user.visible_message("\red A rib pierces the lung!")
target.rupture_lung()*/
if(affected.internal_organs && affected.internal_organs.len)
if(prob(40))
var/obj/item/organ/O = pick(affected.internal_organs) //TODO weight by organ size
user.visible_message("<span class='danger'>A wayward piece of [target]'s [affected.encased] pierces \his [O.name]!</span>")
O.bruise()
/datum/surgery_step/open_encased/mend
allowed_tools = list(