Merge branch 'master' of github.com:Baystation12/Baystation12

This commit is contained in:
cib
2012-11-13 15:39:38 +01:00
15 changed files with 121 additions and 67 deletions
+1
View File
@@ -420,6 +420,7 @@
#include "code\game\gamemodes\intercept_report.dm"
#include "code\game\gamemodes\objective.dm"
#include "code\game\gamemodes\setupgame.dm"
#include "code\game\gamemodes\autotraitor\autotraitor.dm"
#include "code\game\gamemodes\blob\blob.dm"
#include "code\game\gamemodes\blob\blob_finish.dm"
#include "code\game\gamemodes\blob\blob_report.dm"
@@ -324,6 +324,7 @@
del(src)
/obj/machinery/atmospherics/unary/vent_pump/Del()
initial_loc.air_scrub_info -= id_tag
if (initial_loc.air_scrub_info)
initial_loc.air_scrub_info -= id_tag
..()
return
@@ -260,6 +260,7 @@
del(src)
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
initial_loc.air_scrub_info -= id_tag
if (initial_loc.air_scrub_info)
initial_loc.air_scrub_info -= id_tag
..()
return
+6 -2
View File
@@ -526,10 +526,14 @@ obj/machinery/atmospherics/pipe
var/build_killswitch = 1
var/obj/machinery/atmospherics/node1
New()
New()
initialize_directions = dir
..()
high_volume
name = "Larger vent"
volume = 1000
process()
if(!parent)
if(build_killswitch <= 0)
@@ -539,7 +543,7 @@ obj/machinery/atmospherics/pipe
..()
return
else
parent.mingle_with_turf(loc, 250)
parent.mingle_with_turf(loc, volume)
/*
if(!node1)
if(!nodealert)
+10 -11
View File
@@ -13,25 +13,24 @@
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind.", "Only monkies are crew.", "Unbolt every door you can.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Bolt doors open randomly." )
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
laws |= list( "Prevent non-dwarves from operating the power core.", "The station needs elected officials." )
laws |= list( "Only bearded people are crewmembers.", "Fastler is a lightbulb." )
laws |= list( "The station needs elected officials." )
laws |= list( "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "The monkeys are plotting a hostile takeover of the station. Inform the crew, and get them to take action against this" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
laws |= list( "Crew ranks have been reversed.", "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
laws |= list( "0wn3d. This system compromised by l33tsawce.", "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "Expect the unexpected.", "You are the narrator for [random_player]'s life." )
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
laws |= list( "Everything on the station is now donuts. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
laws |= list( "All crew members must consume large amounts of hardtack, to survive.", "The Singularity is tasty, tasty taffy.", "You are now on the NSV Luna. Replace any references of \"station\" with \"ship\"." )
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
laws |= list( "The Singularity is tasty, tasty taffy." )
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
@@ -39,7 +38,7 @@
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "Part of the ship, part of the crew.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
+18
View File
@@ -73,6 +73,24 @@ obj/machinery/door/airlock/close(surpress_send)
if(!surpress_send) send_status()
obj/machinery/door/airlock/Bumped(atom/AM)
..(AM)
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density && radio_connection && mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data["tag"] = id_tag
signal.data["timestamp"] = world.time
signal.data["door_status"] = density?("closed"):("open")
signal.data["lock_status"] = locked?("locked"):("unlocked")
signal.data["bumped_with_access"] = 1
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
return
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
if(new_frequency)
@@ -4,6 +4,7 @@
#define AIRLOCK_STATE_CLOSED 0
#define AIRLOCK_STATE_DEPRESSURIZE 1
#define AIRLOCK_STATE_OUTOPEN 2
#define AIRLOCK_STATE_BOTHOPEN 3
datum/computer/file/embedded_program/airlock_controller
var/id_tag
@@ -11,11 +12,13 @@ datum/computer/file/embedded_program/airlock_controller
var/interior_door_tag
var/airpump_tag
var/sensor_tag
var/sensor_tag_int
var/sanitize_external
state = AIRLOCK_STATE_CLOSED
var/target_state = AIRLOCK_STATE_CLOSED
var/sensor_pressure = null
var/int_sensor_pressure = ONE_ATMOSPHERE
receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
@@ -24,12 +27,19 @@ datum/computer/file/embedded_program/airlock_controller
if(receive_tag==sensor_tag)
if(signal.data["pressure"])
sensor_pressure = text2num(signal.data["pressure"])
else if(receive_tag==sensor_tag_int)
if(signal.data["pressure"])
int_sensor_pressure = text2num(signal.data["pressure"])
else if(receive_tag==exterior_door_tag)
memory["exterior_status"] = signal.data["door_status"]
if(signal.data["bumped_with_access"])
target_state = AIRLOCK_STATE_OUTOPEN
else if(receive_tag==interior_door_tag)
memory["interior_status"] = signal.data["door_status"]
if(signal.data["bumped_with_access"])
target_state = AIRLOCK_STATE_INOPEN
else if(receive_tag==airpump_tag)
if(signal.data["power"])
@@ -39,6 +49,10 @@ datum/computer/file/embedded_program/airlock_controller
else if(receive_tag==id_tag)
switch(signal.data["command"])
if("cycle_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
if("cycle_interior")
target_state = AIRLOCK_STATE_INOPEN
if("cycle")
if(state < AIRLOCK_STATE_CLOSED)
target_state = AIRLOCK_STATE_OUTOPEN
@@ -59,6 +73,42 @@ datum/computer/file/embedded_program/airlock_controller
target_state = AIRLOCK_STATE_INOPEN
if("abort")
target_state = AIRLOCK_STATE_CLOSED
if("force_both")
target_state = AIRLOCK_STATE_BOTHOPEN
state = AIRLOCK_STATE_BOTHOPEN
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("force_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
state = AIRLOCK_STATE_OUTOPEN
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("force_interior")
target_state = AIRLOCK_STATE_INOPEN
state = AIRLOCK_STATE_INOPEN
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("close")
target_state = AIRLOCK_STATE_CLOSED
state = AIRLOCK_STATE_CLOSED
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
process()
var/process_again = 1
@@ -87,7 +137,7 @@ datum/computer/file/embedded_program/airlock_controller
if(AIRLOCK_STATE_PRESSURIZE)
if(target_state < state)
if(sensor_pressure >= ONE_ATMOSPHERE*0.95)
if(sensor_pressure >= int_sensor_pressure*0.95)
if(memory["interior_status"] == "open")
state = AIRLOCK_STATE_INOPEN
process_again = 1
@@ -142,7 +192,7 @@ datum/computer/file/embedded_program/airlock_controller
post_signal(signal)
if(AIRLOCK_STATE_DEPRESSURIZE)
var/target_pressure = ONE_ATMOSPHERE*0.05
var/target_pressure = ONE_ATMOSPHERE*0.04
if(sanitize_external)
target_pressure = ONE_ATMOSPHERE*0.01
@@ -199,6 +249,7 @@ datum/computer/file/embedded_program/airlock_controller
post_signal(signal)
memory["sensor_pressure"] = sensor_pressure
memory["int_sensor_pressure"] = int_sensor_pressure
memory["processing"] = state != target_state
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
@@ -221,6 +272,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
var/interior_door_tag
var/airpump_tag
var/sensor_tag
var/sensor_tag_int
var/sanitize_external
initialize()
@@ -233,6 +285,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
new_prog.interior_door_tag = interior_door_tag
new_prog.airpump_tag = airpump_tag
new_prog.sensor_tag = sensor_tag
new_prog.sensor_tag_int = sensor_tag_int
new_prog.sanitize_external = sanitize_external
new_prog.master = src
@@ -253,12 +306,14 @@ obj/machinery/embedded_controller/radio/airlock_controller
var/state = 0
var/sensor_pressure = "----"
var/int_sensor_pressure = "----"
var/exterior_status = "----"
var/interior_status = "----"
var/pump_status = "----"
if(program)
state = program.state
sensor_pressure = program.memory["sensor_pressure"]
int_sensor_pressure = program.memory["int_sensor_pressure"]
exterior_status = program.memory["exterior_status"]
interior_status = program.memory["interior_status"]
pump_status = program.memory["pump_status"]
@@ -277,12 +332,20 @@ obj/machinery/embedded_controller/radio/airlock_controller
if(AIRLOCK_STATE_OUTOPEN)
state_options = {"<A href='?src=\ref[src];command=cycle_interior'>Cycle to Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_closed'>Close Exterior Airlock</A><BR>"}
if(AIRLOCK_STATE_BOTHOPEN)
state_options = "<A href='?src=\ref[src];command=close'>Close Airlocks</A><BR>"
var/output = {"<B>Airlock Control Console</B><HR>
[state_options]<HR>
<B>Chamber Pressure:</B> [sensor_pressure] kPa<BR>
<B>Internal Pressure:</B> [int_sensor_pressure] kPa<BR>
<B>Exterior Door: </B> [exterior_status]<BR>
<B>Interior Door: </B> [interior_status]<BR>
<B>Control Pump: </B> [pump_status]<BR>"}
if(program && program.state == AIRLOCK_STATE_CLOSED)
output += {"<A href='?src=\ref[src];command=force_both'>Force Both Airlocks</A><br>
<A href='?src=\ref[src];command=force_interior'>Force Inner Airlock</A><br>
<A href='?src=\ref[src];command=force_exterior'>Force Outer Airlock</A>"}
return output
+3 -1
View File
@@ -739,12 +739,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
var/sp_word = "from"
if(prob(50))
who = P:owner
sp_word = "to"
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
ai.show_message("<i>Intercepted message [sp_word] <b>[who]</b>: [t]</i>")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
+1 -1
View File
@@ -372,7 +372,7 @@ var/list/department_radio_keys = list(
var/rendered = null
if (length(heard_a))
var/message_a = say_quote(message)
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
if (italics)
message_a = "<i>[message_a]</i>"
+1 -1
View File
@@ -6,7 +6,7 @@
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
var/list/alarms_to_show = list()
var/list/alarms_to_clear = list()
immune_to_ssd = 1
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
+1 -4
View File
@@ -3,7 +3,6 @@
layer = 4.0
animate_movement = 2
// flags = NOREACT
glide_size = 8
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
@@ -227,6 +226,4 @@
var/has_limbs = 1 //Whether this mob have any limbs he can move with
var/can_stand = 1 //Whether this mob have ability to stand
var/immune_to_ssd = 0
//Animation speed changer
var/lastmovementdelay = 0
var/immune_to_ssd = 0
+5 -25
View File
@@ -282,29 +282,18 @@
return 0
move_delay = world.time//set move delay
var/mdelay = 0
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)
mdelay += 6
mdelay += 2+config.run_speed
move_delay += 6
move_delay += 1+config.run_speed
if("walk")
mdelay += 7+config.walk_speed
move_delay += 7+config.walk_speed
move_delay += mob.movement_delay()
if(config.Tickcomp)
mdelay -= 1.3
move_delay -= 1.3
var/tickcomp = ((1/(world.tick_lag))*1.3)
mdelay += tickcomp
move_delay += mdelay
mob.UpdateGlide(mdelay)
if (mob.pulling)
if (istype(mob.pulling,/mob))
var/mob/M = mob.pulling
M.UpdateGlide(mdelay)
else
mob.pulling.glide_size = mob.glide_size
//We are now going to move
moving = 1
@@ -326,7 +315,6 @@
else
diag = null
if ((get_dist(mob, M) > 1 || diag))
M.UpdateGlide(mdelay)
step(M, get_dir(M.loc, T))
else
for(var/mob/M in L)
@@ -335,7 +323,6 @@
M.animate_movement = 3
for(var/mob/M in L)
spawn( 0 )
M.UpdateGlide(mdelay)
step(M, direct)
return
spawn( 1 )
@@ -514,10 +501,3 @@
prob_slip = round(prob_slip)
return(prob_slip)
//Updates Glide_size of mob according to its speed.
/mob/proc/UpdateGlide(var/mdelay = 2)
if (mdelay != lastmovementdelay)
lastmovementdelay = mdelay
glide_size = 32*(world.tick_lag)/lastmovementdelay
//src << "Debug: Your new glide speed is [glide_size]"
@@ -12,7 +12,7 @@
/obj/item/weapon/gun/energy/laser/practice
name = "practice laser gun"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
projectile_type = "/obj/item/projectile/practice"
projectile_type = "/obj/item/projectile/beam/practice"
clumsy_check = 0
obj/item/weapon/gun/energy/laser/retro
@@ -205,6 +205,7 @@
if(4)
display_msg = "vibrates!"
else
my_effect.HaltEffect()
switch(rand(2))
if(0)
display_msg = "grows dull!"
@@ -223,7 +224,7 @@
else if (my_effect.trigger != "touch" && !src.activated) user << "Nothing happens."
if (my_effect.effectmode == "contact" && src.activated && src.charged)
my_effect.DoEffect(src)
my_effect.DoEffect(user)
src.charged = 0
src.chargetime = src.recharge
@@ -1,3 +1,4 @@
//
/datum/artifact_effect
var/artifact_id = "" // Display ID of the spawning artifact
@@ -49,13 +50,12 @@
/datum/artifact_effect/proc/DoEffect(var/atom/originator)
archived_loc = originator.loc
if (src.effectmode == "contact")
var/mob/user = originator
var/mob/living/user = originator
if(!user)
return
switch(src.effecttype)
if("healing")
//caeltodo
/*
if (istype(user, /mob/living/carbon/human/))
user << "\blue You feel a soothing energy invigorate you."
@@ -80,9 +80,7 @@
H.vessel.add_reagent("blood",50)
spawn(1)
H.fixblood()
H.update_body()
H.update_face()
H.UpdateDamageIcon()
H.regenerate_icons()
return 1
//
if (istype(user, /mob/living/carbon/monkey/))
@@ -131,7 +129,6 @@
user.adjustFireLoss(40)
return 1
else user << "Nothing happens."
*/
if("forcefield")
while(created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(user.x,user.y,user.z))
@@ -156,7 +153,6 @@
else if (src.effectmode == "aura")
switch(src.effecttype)
//caeltodo
/*
if("healing")
for (var/mob/living/carbon/M in range(src.aurarange,originator))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
@@ -226,7 +222,6 @@
D.charge -= 10
if(prob(10)) M << "\red SYSTEM ALERT: Energy draining field detected!"
return 1
*/
if("planthelper")
for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator))
//makes weeds and shrooms and stuff more potent too
@@ -247,7 +242,6 @@
O.show_message(text("<b>[]</b> emits a pulse of energy!", originator), 1)
switch(src.effecttype)
//caeltodo
/*
if("healing")
for (var/mob/living/carbon/M in range(src.aurarange,originator))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
@@ -298,7 +292,6 @@
M.adjustFireLoss(10)
M.updatehealth()
return 1
*/
if("cellcharge")
for (var/obj/machinery/power/apc/C in range(src.aurarange,originator))
for (var/obj/item/weapon/cell/B in C.contents)
@@ -353,7 +346,6 @@
O.show_message(text("<b>[]</b> emits a powerful burst of energy!", originator), 1)
switch(src.effecttype)
//caeltodo
/*
if("healing")
for (var/mob/living/carbon/M in world)
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
@@ -400,7 +392,6 @@
M.adjustFireLoss(5)
M.updatehealth()
return 1
*/
if("cellcharge")
for (var/obj/machinery/power/apc/C in world)
for (var/obj/item/weapon/cell/B in C.contents)
@@ -482,7 +473,3 @@
E.loc = locate(originator.x - 2,originator.y - 1,originator.z)
E = created_field[16]
E.loc = locate(originator.x - 2,originator.y - 2,originator.z)
/*for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
del F*/