Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into blast-door-refactor

This commit is contained in:
Atlantiscze
2014-12-28 23:50:15 +01:00
30 changed files with 353 additions and 192 deletions

View File

@@ -49,7 +49,7 @@
//Set species_restricted list
switch(target_species)
if("Human", "Skrell") //humanoid bodytypes
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
else
species_restricted = list(target_species)
@@ -68,9 +68,9 @@
//Set species_restricted list
switch(target_species)
if("Skrell")
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
if("Human")
species_restricted = list("exclude","Skrell","Unathi","Tajara","Diona","Vox")
species_restricted = list("exclude","Skrell","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
else
species_restricted = list(target_species)

View File

@@ -15,7 +15,7 @@
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
var/obj/machinery/camera/camera
var/list/camera_networks
@@ -62,7 +62,7 @@
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.

View File

@@ -7,7 +7,7 @@
item_color = "syndie"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
siemens_coefficient = 0.6
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
camera_networks = list("NUKE")
light_overlay = "helmet_light_green" //todo: species-specific light overlays
@@ -21,4 +21,4 @@
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
siemens_coefficient = 0.6
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")

View File

@@ -10,7 +10,7 @@
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
//Species-specific stuff.
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
sprite_sheets_refit = list(
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
@@ -35,7 +35,7 @@
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
sprite_sheets_refit = list(
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
"Tajara" = 'icons/mob/species/tajaran/suit.dmi',

View File

@@ -79,7 +79,7 @@
if(sleeping)
adjustHalLoss(-3)
if (mind)
if((mind.active && client != null) || immune_to_ssd)
if(mind.active && client != null)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS

View File

@@ -55,4 +55,7 @@
canmove = 1
use_me = 1 //If it can move, let it emote
else canmove = 0
return canmove
return canmove
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/digital)

View File

@@ -14,6 +14,7 @@
prosthetic_name = "cyberbrain"
prosthetic_icon = "brain-prosthetic"
organ_tag = "brain"
organ_type = /datum/organ/internal/brain
var/mob/living/carbon/brain/brainmob = null

View File

@@ -2,8 +2,8 @@
/mob/living/carbon/brain/say(var/message)
if (silent)
return
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && istype(container, /obj/item/device/mmi)))
return //No MMI, can't speak, bucko./N
else
var/datum/language/speaking = parse_language(message)
@@ -24,8 +24,13 @@
return
else
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
if(speaking && speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
if(istype(container, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking)
..()
..(trim(message), speaking, verb)

View File

@@ -200,8 +200,11 @@
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
if(lying || src.sleeping)
if(player_logged)
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping)
src.sleeping = max(0,src.sleeping-5)
if(src.sleeping == 0)
src.resting = 0

View File

@@ -57,7 +57,10 @@
if(species && species.has_organ["brain"])
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
brainloss = min(sponge.damage,maxHealth*2)
if(sponge)
brainloss = min(sponge.damage,maxHealth*2)
else
brainloss = 200
else
brainloss = 0
return brainloss

View File

@@ -98,14 +98,14 @@
T.Weaken(5)
//Only official cool kids get the grab and no self-prone.
if(src.mind && src.mind.special_role)
if(src.mind && !src.mind.special_role)
src.Weaken(5)
return
var/use_hand = "left"
if(l_hand)
if(r_hand)
src << "\red You need to have one hand free to grab someone."
src << "<span class='danger'>You need to have one hand free to grab someone.</span>"
return
else
use_hand = "right"

View File

@@ -995,6 +995,10 @@
proc/handle_regular_status_updates()
if(status_flags & GODMODE) return 0
//SSD check, if a logged player is awake put them back to sleep!
if(player_logged && sleeping < 2)
sleeping = 2
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
@@ -1050,7 +1054,10 @@
handle_dreams()
adjustHalLoss(-3)
if (mind)
if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced.
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
if(player_logged)
sleeping = max(sleeping-1, 2)
else
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
@@ -1753,6 +1760,9 @@
return slurring
/mob/living/carbon/human/handle_stunned()
if(species.flags & NO_PAIN)
stunned = 0
return 0
if(..())
speech_problem_flag = 1
return stunned

View File

@@ -202,9 +202,9 @@
return
// Called when using the shredding behavior.
/datum/species/proc/can_shred(var/mob/living/carbon/human/H)
/datum/species/proc/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
if(H.a_intent != "hurt")
if(ignore_intent && H.a_intent != "hurt")
return 0
for(var/datum/unarmed_attack/attack in unarmed_attacks)

View File

@@ -686,7 +686,7 @@
can_break_cuffs = 1
else if(istype(CM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = CM
if(H.species.can_shred(H))
if(H.species.can_shred(H,1))
can_break_cuffs = 1
if(can_break_cuffs) //Don't want to do a lot of logic gating here.

View File

@@ -4,6 +4,8 @@
//Mind updates
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
mind.active = 1 //indicates that the mind is currently synced with a client
//If they're SSD, remove it so they can wake back up.
player_logged = 0
//Round specific stuff like hud updates
if(ticker && ticker.mode)

View File

@@ -1,7 +1,8 @@
/mob/living/Logout()
..()
if (mind)
if(!key) //key and mind have become seperated.
if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts.
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
if(!immune_to_ssd && sleeping < 2 && mind.active)
sleeping = 2 //This causes instant sleep, but does not prolong it. See life.dm for furthering SSD.
//This tags a player as SSD. See appropriate life.dm files for furthering SSD effects such as falling asleep.
if(mind.active)
player_logged = 1

View File

@@ -896,6 +896,12 @@ var/list/robot_verbs_default = list(
add_fingerprint(user)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(H))
attack_generic(H, rand(30,50), "slashed")
return
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
var/datum/robot_component/cell_component = components["power cell"]
if(cell)

View File

@@ -11,7 +11,6 @@
var/ioncheck[1]
var/obj/item/device/radio/common_radio
immune_to_ssd = 1
var/list/hud_list[9]
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer

View File

@@ -214,8 +214,9 @@
var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
var/immune_to_ssd = 0
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
var/player_logged = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes

View File

@@ -15,8 +15,9 @@
anchored = 1.0
circuit = /obj/item/weapon/circuitboard/powermonitor
var/list/grid_sensors = null
var/update_counter = 0 // Next icon update when this reaches 5 (ie every 5 ticks)
var/active_sensor = null
var/list/sensors_by_powernet = null
var/update_counter = 0 // Next icon update when this reaches 5 (ie every 5 ticks)
var/active_sensor = null //name_tag of the currently selected sensor
use_power = 1
idle_power_usage = 300
active_power_usage = 300
@@ -34,12 +35,19 @@
/obj/machinery/computer/power_monitor/proc/refresh_sensors()
grid_sensors = list()
sensors_by_powernet = list()
for(var/obj/machinery/power/sensor/S in machines)
if((S.loc.z == src.loc.z) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels.
if(S.name_tag == "#UNKN#") // Default name. Shouldn't happen!
error("Powernet sensor with unset ID Tag! [S.x]X [S.y]Y [S.z]Z")
else
grid_sensors += S
grid_sensors[S.name_tag] = S
var/pnet = (S.powernet)? S.powernet : "none"
if (pnet in sensors_by_powernet)
sensors_by_powernet[pnet] += S
else
sensors_by_powernet[pnet] = list(S)
/obj/machinery/computer/power_monitor/attack_ai(mob/user)
@@ -75,13 +83,10 @@
t += "<BR><A href='?src=\ref[src];close=1'>Close</A><BR><HR>"
if(!grid_sensors)
t += "Unable to connect to sensor!"
t += "No sensors available."
else
var/obj/machinery/power/sensor/OKS = null
for(var/obj/machinery/power/sensor/S in grid_sensors)
if(S.name_tag == active_sensor)
OKS = S
if(OKS)
if (active_sensor in grid_sensors)
var/obj/machinery/power/sensor/OKS = grid_sensors[active_sensor]
t += "<B>[OKS.name_tag] - Sensor Reading</B><BR>"
t += OKS.ReturnReading()
else
@@ -91,20 +96,36 @@
else
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A>"
t += "<BR><A href='?src=\ref[src];close=1'>Close</A><BR><HR>"
if((!grid_sensors) || (!grid_sensors.len))
t += "<B>ERROR - No Active Sensors Detected!</B>"
else
for(var/obj/machinery/power/sensor/S in grid_sensors) // Show all data from current Z level.
if(S.check_grid_warning()) // Display grids with active alarms in bold text
t += "<B><A href='?src=\ref[src];setsensor=[S.name_tag]'>[S.name]</A></B><BR>"
else
t += "<A href='?src=\ref[src];setsensor=[S.name_tag]'>[S.name]</A><BR>"
t += render_sensor_list()
user << browse(t, "window=powcomp;size=600x900")
onclose(user, "powcomp")
/obj/machinery/computer/power_monitor/proc/render_sensor_list()
if((!grid_sensors) || (!grid_sensors.len))
return "<B>ERROR - No Active Sensors Detected!</B>"
var/html = "<table border='0'><tr><th>Power Network</th><th>Sensors</th></tr>"
for (var/pnet in sensors_by_powernet)
if (pnet && pnet != "none")
html += "<tr><td valign='top'>[uppertext("\ref[pnet]")]</td><td>"
for(var/obj/machinery/power/sensor/S in sensors_by_powernet[pnet])
//really, if one of them has a warning, they all should - but the interface doesn't guarantee that so whatever
if(S.check_grid_warning()) // Display grids with active alarms in bold text
html += "<B><A href='?src=\ref[src];setsensor=[S.name_tag]'>[S.name]</A></B><BR>"
else
html += "<A href='?src=\ref[src];setsensor=[S.name_tag]'>[S.name]</A><BR>"
html += "</td></tr>"
if ("none" in sensors_by_powernet)
html += "<tr><td>\[N/A\]</td><td>"
for(var/obj/machinery/power/sensor/S in sensors_by_powernet["none"])
html += "<A href='?src=\ref[src];setsensor=[S.name_tag]'>[S.name]</A><BR>"
html += "</td></tr>"
html += "</table>"
return html
/obj/machinery/computer/power_monitor/Topic(href, href_list)
..()