Merge pull request #4 from Poojawa/QoL

quality of life
This commit is contained in:
LetterJay
2016-08-10 02:59:02 -04:00
committed by GitHub
13 changed files with 78 additions and 18 deletions

View File

@@ -120,6 +120,8 @@ Thus, the two variables affect pump operation are set in New():
if("power")
on = !on
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
message_admins("Pump manipulated by [key_name(usr)] at [x], [y], [z], [loc.loc]")
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
. = TRUE
if("pressure")
var/pressure = params["pressure"]
@@ -135,7 +137,9 @@ Thus, the two variables affect pump operation are set in New():
. = TRUE
if(.)
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
investigate_log("A pump was set to [target_pressure] kPa by [key_name(usr)]", [loc.loc], "atmos")
message_admins("A pump was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [loc.loc]")
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
update_icon()
/obj/machinery/atmospherics/components/binary/pump/atmosinit()

View File

@@ -1,7 +1,7 @@
/obj/machinery/atmospherics/components/unary/cryo_cell
name = "cryo cell"
icon = 'icons/obj/cryogenics.dmi'
icon_state = "cell-off"
icon_state = "pod0"
density = 1
anchored = 1
@@ -9,7 +9,7 @@
state_open = FALSE
var/autoeject = FALSE
var/volume = 100
var/running_bob_animation = 0
var/efficiency = 1
var/sleep_factor = 750
var/paralyze_factor = 1000
@@ -54,17 +54,59 @@
return ..()
/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon()
handle_update_icon()
/obj/machinery/atmospherics/components/unary/cryo_cell/proc/handle_update_icon() //making another proc to avoid spam in update_icon
overlays.Cut() //empty the overlay proc, just in case
if(panel_open)
icon_state = "cell-o"
icon_state = "pod0-o"
else if(state_open)
icon_state = "cell-open"
icon_state = "pod0"
else if(on && is_operational())
if(occupant)
icon_state = "cell-occupied"
var/image/pickle = image(occupant.icon, occupant.icon_state)
pickle.overlays = occupant.overlays
pickle.pixel_y = 22
overlays += pickle
icon_state = "pod1"
var/up = 0 //used to see if we are going up or down, 1 is down, 2 is up
spawn(0) // Without this, the icon update will block. The new thread will die once the occupant leaves.
running_bob_animation = 1
while(occupant)
overlays -= "lid1" //have to remove the overlays first, to force an update- remove cloning pod overlay
overlays -= pickle //remove mob overlay
switch(pickle.pixel_y) //this looks messy as fuck but it works, switch won't call itself twice
if(23) //inbetween state, for smoothness
switch(up) //this is set later in the switch, to keep track of where the mob is supposed to go
if(2) //2 is up
pickle.pixel_y = 24 //set to highest
if(1) //1 is down
pickle.pixel_y = 22 //set to lowest
if(22) //mob is at it's lowest
pickle.pixel_y = 23 //set to inbetween
up = 2 //have to go up
if(24) //mob is at it's highest
pickle.pixel_y = 23 //set to inbetween
up = 1 //have to go down
overlays += pickle //re-add the mob to the icon
overlays += "lid1" //re-add the overlay of the pod, they are inside it, not floating
sleep(7) //don't want to jiggle violently, just slowly bob
return
running_bob_animation = 0
else
icon_state = "cell-on"
icon_state = "pod1"
overlays += "lid0" //have to remove the overlays first, to force an update- remove cloning pod overlay
else
icon_state = "cell-off"
icon_state = "pod0"
overlays += "lid0" //if no occupant, just put the lid overlay on, and ignore the rest
/obj/machinery/atmospherics/components/unary/cryo_cell/process()
..()

View File

@@ -695,22 +695,23 @@
threatcount += 2
//Check for dresscode violations
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard))
threatcount += 2
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/syndi) || istype(head, /obj/item/clothing/head/helmet/space/syndicate) || istype(head, /obj/item/clothing/head/culthood) || istype(head, /obj/item/clothing/head/helmet/space/cult))
threatcount += 5
//Check for nonhuman scum
if(dna && dna.species.id && dna.species.id != "human")
threatcount += 1
threatcount += 0
//mindshield implants imply trustworthyness
//Loyalty implants imply trustworthyness
if(isloyal(src))
threatcount -= 1
//Agent cards lower threatlevel.
//Agent cards lower threatlevel, but only just enough to avoid dresscode violations.
if(istype(idcard, /obj/item/weapon/card/id/syndicate))
threatcount -= 5
threatcount -= 2
return threatcount
return threatcount
//Used for new human mobs created by cloning/goleming/podding

View File

@@ -31,6 +31,8 @@
minor_announce(config.alert_desc_blue_upto, "Attention! Security level elevated to blue:",1)
else
minor_announce(config.alert_desc_blue_downto, "Attention! Security level lowered to blue:")
for(var/mob/M in player_list)
M << 'sound/misc/voybluealert.ogg'
security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == ZLEVEL_STATION)
@@ -40,6 +42,8 @@
minor_announce(config.alert_desc_red_upto, "Attention! Code red!",1)
else
minor_announce(config.alert_desc_red_downto, "Attention! Code red!")
for(var/mob/M in player_list)
M << 'sound/misc/voyalert.ogg'
security_level = SEC_LEVEL_RED
/* - At the time of commit, setting status displays didn't work properly
@@ -54,6 +58,8 @@
pod.admin_controlled = 0
if(SEC_LEVEL_DELTA)
minor_announce(config.alert_desc_delta, "Attention! Delta security level reached!",1)
for(var/mob/M in player_list)
M << 'sound/misc/tas_red_alert.ogg'
security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == ZLEVEL_STATION)

View File

@@ -326,6 +326,12 @@
timer = world.time
priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
if(SHUTTLE_ESCAPE)
if(time_left <= 50 && sound_played) //4 seconds left:Hyperspace trip completed. - should sync up with the landing
sound_played = 1 //Only rev them up once.
for(var/area/shuttle/escape/E in world)
E << 'sound/effects/hyperspace_end.ogg'
if(time_left <= 0)
//move each escape pod to its corresponding escape dock
for(var/A in SSshuttle.mobile)