diff --git a/.travis.yml b/.travis.yml index 87eeb862d5..5895a706b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,5 @@ install: - cd .. script: + - (! grep -q 'step_[xy]' maps/tgstation2.dmm) - DreamMaker baystation12.dme diff --git a/baystation12.int b/baystation12.int index b82874fded..0f2de8e211 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,6 +1,9 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +LAST_COMPILE_VERSION: 506.1247 +DIR: maps +LAST_COMPILE_TIME: 1405542427 AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 6f4bc65974..939dfd23ed 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -42,7 +42,6 @@ Thus, the two variables affect pump operation are set in New(): on = 1 - /obj/machinery/atmospherics/binary/pump/update_icon() if(!powered()) icon_state = "off" @@ -108,7 +107,7 @@ Thus, the two variables affect pump operation are set in New(): sink.add_thermal_energy(power_draw) handle_power_draw(power_draw) else - handle_power_draw(idle_power_usage) + handle_power_draw(idle_power_usage) if(network1) network1.update = 1 @@ -247,7 +246,7 @@ Thus, the two variables affect pump operation are set in New(): return /obj/machinery/atmospherics/binary/pump/Topic(href,href_list) - if(..()) return + if(..()) return if(href_list["power"]) on = !on @@ -291,5 +290,5 @@ Thus, the two variables affect pump operation are set in New(): "[user] unfastens \the [src].", \ "\blue You have unfastened \the [src].", \ "You hear ratchet.") - new /obj/item/pipe(loc, make_from=src) + new /obj/item/pipe(loc, make_from=src) del(src) diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 8bde349da6..b3bee0d12a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -16,4 +16,4 @@ if(!powered()) icon_state = "off" else - icon_state = "[on ? "on" : "off"]" + icon_state = "[on ? "on" : "off"]" \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index d6bb3e8aaa..7f5b13f4c8 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -83,8 +83,13 @@ air_contents.volume = 1000 /obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0) - if(!check_icon_cache()) + if(!check_icon_cache()) return + if (!node) + on = 0 + //broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0 + if(!on) + return 0 overlays.Cut() @@ -355,7 +360,7 @@ if(signal.data["checks_toggle"] != null) pressure_checks = (pressure_checks?0:3) - + if(signal.data["direction"] != null) pump_direction = text2num(signal.data["direction"]) @@ -398,7 +403,7 @@ if(signal.data["init"] != null) name = signal.data["init"] return - + if(signal.data["status"] != null) spawn(2) broadcast_status() diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 875c5a67ee..713a94c1d4 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -134,7 +134,7 @@ /obj/machinery/atmospherics/pipe/simple icon = 'icons/atmos/pipes.dmi' - icon_state = "intact" + icon_state = "" name = "pipe" desc = "A one meter section of regular pipe" @@ -305,7 +305,8 @@ return null -/obj/machinery/atmospherics/pipe/simple/visible +/obj/machinery/atmospherics/pipe/simple/visible + icon_state = "intact" level = 2 /obj/machinery/atmospherics/pipe/simple/visible/scrubbers @@ -328,7 +329,8 @@ /obj/machinery/atmospherics/pipe/simple/visible/purple color = PIPE_COLOR_PURPLE -/obj/machinery/atmospherics/pipe/simple/hidden +/obj/machinery/atmospherics/pipe/simple/hidden + icon_state = "intact" level = 1 alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game @@ -366,8 +368,8 @@ /obj/machinery/atmospherics/pipe/manifold - icon = 'icons/atmos/manifold.dmi' - icon_state = "map" + icon = 'icons/atmos/manifold.dmi' + icon_state = "" name = "pipe manifold" desc = "A manifold composed of regular pipes" @@ -527,6 +529,7 @@ update_icon() /obj/machinery/atmospherics/pipe/manifold/visible + icon_state = "map" level = 2 /obj/machinery/atmospherics/pipe/manifold/visible/scrubbers @@ -550,6 +553,7 @@ color = PIPE_COLOR_PURPLE /obj/machinery/atmospherics/pipe/manifold/hidden + icon_state = "map" level = 1 alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game @@ -574,8 +578,8 @@ color = PIPE_COLOR_PURPLE /obj/machinery/atmospherics/pipe/manifold4w - icon = 'icons/atmos/manifold.dmi' - icon_state = "map_4way" + icon = 'icons/atmos/manifold.dmi' + icon_state = "" name = "4-way pipe manifold" desc = "A manifold composed of regular pipes" @@ -721,7 +725,8 @@ hide(T.intact) update_icon() -/obj/machinery/atmospherics/pipe/manifold4w/visible +/obj/machinery/atmospherics/pipe/manifold4w/visible + icon_state = "map_4way" level = 2 /obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers @@ -744,7 +749,8 @@ /obj/machinery/atmospherics/pipe/manifold4w/visible/purple color = PIPE_COLOR_PURPLE -/obj/machinery/atmospherics/pipe/manifold4w/hidden +/obj/machinery/atmospherics/pipe/manifold4w/hidden + icon_state = "map_4way" level = 1 alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index dd662e40c0..fa97b27f2f 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -52,8 +52,10 @@ icon_state = "soapnt" /obj/item/weapon/soap/deluxe - desc = "A deluxe Waffle Co. brand bar of soap. Smells of condoms." icon_state = "soapdeluxe" + +/obj/item/weapon/soap/deluxe/New() + desc = "A deluxe Waffle Co. brand bar of soap. Smells of [pick("lavender", "vanilla", "strawberry", "chocolate" ,"space")]." /obj/item/weapon/soap/syndie desc = "An untrustworthy bar of soap. Smells of fear." diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 88b4294db5..94a1c687ff 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -35,6 +35,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/debug = 0 var/powerupdate = 10 //We give everything 10 ticks to settle out it's power usage. var/requires_power = 1 + var/unlimited_power = 0 var/always_unpowered = 0 //this gets overriden to 1 for space in area/New() var/power_equip = 1 @@ -364,6 +365,7 @@ var/list/ghostteleportlocs = list() name = "\improper Syndicate Mothership" icon_state = "syndie-ship" requires_power = 0 + unlimited_power = 1 /area/syndicate_mothership/control name = "\improper Syndicate Control Room" @@ -436,6 +438,7 @@ var/list/ghostteleportlocs = list() name = "\improper Syndicate Station" icon_state = "yellow" requires_power = 0 + unlimited_power = 1 /area/syndicate_station/start name = "\improper Syndicate Forward Operating Base" diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 80f2f3a4dd..53fbcba2f4 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -124,7 +124,7 @@ del(A) continue - var/obj/effect/landmark/uplinklocker = locate("landmark*Syndicate-Uplink") //i will be rewriting this shortly + var/obj/effect/landmark/uplinkdevice = locate("landmark*Syndicate-Uplink") //i will be rewriting this shortly var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb") var/nuke_code = "[rand(10000, 99999)]" @@ -153,8 +153,9 @@ update_all_synd_icons() - if(uplinklocker) - new /obj/structure/closet/syndicate/nuclear(uplinklocker.loc) + if(uplinkdevice) + var/obj/item/device/radio/uplink/U = new(uplinkdevice.loc) + U.hidden_uplink.uses = 40 if(nuke_spawn && synd_spawn.len > 0) var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc) the_bomb.r_code = nuke_code @@ -166,6 +167,7 @@ /datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code) + var/obj/effect/landmark/code_spawn = locate("landmark*Nuclear-Code") if (nuke_code) synd_mind.store_memory("Syndicate Nuclear Bomb Code: [nuke_code]", 0, 0) synd_mind.current << "The nuclear authorization code is: [nuke_code]" @@ -173,7 +175,7 @@ P.info = "The nuclear authorization code is: [nuke_code]" P.name = "nuclear bomb code" if (ticker.mode.config_tag=="nuclear") - P.loc = synd_mind.current.loc + P.loc = code_spawn.loc else var/mob/living/carbon/human/H = synd_mind.current P.loc = H.loc @@ -230,6 +232,7 @@ synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack) +/* Commented; nukes now have a suit cycler for changing rig-suits, they don't need to spawn with them var/obj/item/clothing/suit/space/rig/syndi/new_suit = new(synd_mob) var/obj/item/clothing/head/helmet/space/rig/syndi/new_helmet = new(synd_mob) @@ -245,8 +248,8 @@ if("Skrell") new_suit.species_restricted = list("Skrell") - synd_mob.equip_to_slot_or_del(new_suit, slot_wear_suit) - synd_mob.equip_to_slot_or_del(new_helmet, slot_head) + synd_mob.equip_to_slot_or_del(new_suit, slot_in_backpack) + synd_mob.equip_to_slot_or_del(new_helmet, slot_in_backpack)*/ // var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob) // E.imp_in = synd_mob diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index dac4bf7b00..435c8acf15 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -309,10 +309,18 @@ if(e.open) open = "Open:" switch (e.germ_level) - if (INFECTION_LEVEL_ONE + 50 to INFECTION_LEVEL_TWO) + if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200) infected = "Mild Infection:" - if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_THREE) + if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) + infected = "Mild Infection+:" + if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) + infected = "Mild Infection++:" + if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) infected = "Acute Infection:" + if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) + infected = "Acute Infection+:" + if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400) + infected = "Acute Infection++:" if (INFECTION_LEVEL_THREE to INFINITY) infected = "Septic:" @@ -341,10 +349,18 @@ var/infection = "None" switch (i.germ_level) - if (1 to INFECTION_LEVEL_TWO) + if (1 to INFECTION_LEVEL_ONE + 200) infection = "Mild Infection:" - if (INFECTION_LEVEL_TWO to INFINITY) + if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) + infection = "Mild Infection+:" + if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) + infection = "Mild Infection++:" + if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) infection = "Acute Infection:" + if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) + infection = "Acute Infection+:" + if (INFECTION_LEVEL_TWO + 300 to INFINITY) + infection = "Acute Infection++:" dat += "
Requesting AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.
Searching for personalities|
@@ -302,5 +302,4 @@
/obj/item/device/paicard/emp_act(severity)
for(var/mob/M in src)
M.emp_act(severity)
- ..()
-
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 12af48f6c8..4181ef6e20 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -32,9 +32,9 @@
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
- return
-
+
create_reagents(5)
+ return
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm
index a1a3876574..c62ea02d92 100644
--- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm
+++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm
@@ -25,6 +25,19 @@
new /obj/item/clothing/shoes/magboots(src)
+/obj/structure/closet/syndicate/suit
+ desc = "It's a storage unit for rig suits."
+
+/obj/structure/closet/syndicate/suit/New()
+ ..()
+ sleep(2)
+ new /obj/item/weapon/tank/jetpack/oxygen(src)
+ new /obj/item/clothing/shoes/magboots(src)
+ new /obj/item/clothing/suit/space/rig/syndi(src)
+ new /obj/item/clothing/mask/gas/syndicate(src)
+ new /obj/item/clothing/head/helmet/space/rig/syndi(src)
+
+
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for nuclear-operative gear."
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 167b3183aa..9c820db026 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -752,7 +752,7 @@
name = "Robotics labcoat"
desc = "A labcoat with a few markings denoting it as the labcoat of roboticist."
icon = 'icons/obj/custom_items.dmi'
- icon_state = "aeneasrinil_open"
+ icon_state = "aeneasrinil"
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
name = "pink labcoat"
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index 1d8f363953..1a8b76c11c 100644
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -34,10 +34,10 @@
speech_verb = "mrowls"
colour = "tajaran_signlang"
key = "y" //only "dfpqxyz" left.
-
+
//need to find a way to resolve possesive macros
signlang_verb = list("flicks their left ear", "flicks their right ear", "swivels their ears", "twitches their tail", "curls the end of their tail", "arches their tail", "wiggles the end of their tail", "waves their tail about", "holds up a claw", "gestures with their left hand", "gestures with their right hand", "gestures with their tail", "gestures with their ears")
-
+
flags = WHITELISTED | NONVERBAL
/datum/language/skrell
@@ -54,7 +54,7 @@
speech_verb = "shrieks"
colour = "vox"
key = "v"
- flags = RESTRICTED
+ flags = RESTRICTED | UNTRANSLATABLE
/datum/language/diona
name = "Rootspeak"
@@ -62,7 +62,7 @@
speech_verb = "creaks and rustles"
colour = "soghun"
key = "q"
- flags = RESTRICTED
+ flags = RESTRICTED | UNTRANSLATABLE
/datum/language/human
name = "Sol Common"
@@ -106,7 +106,7 @@
// Can we speak this language, as opposed to just understanding it?
/mob/proc/can_speak(datum/language/speaking)
- return (universal_speak || speaking in src.languages)
+ return ((universal_speak && !(speaking.flags & UNTRANSLATABLE)) || speaking in src.languages)
//TBD
/mob/verb/check_languages()
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index a0166e34cb..12309900b3 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -92,7 +92,7 @@ var/list/department_radio_keys = list(
if (speaking.flags & SIGNLANG)
say_signlang(message, pick(speaking.signlang_verb), speaking)
- return
+ return 1
//speaking into radios
if(used_radios.len)
@@ -115,13 +115,13 @@ var/list/department_radio_keys = list(
if(pressure < SOUND_MINIMUM_PRESSURE)
italics = 1
message_range = 1
-
+
if (speech_sound)
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
var/list/listening = list()
var/list/listening_obj = list()
-
+
if(T)
var/list/hear = hear(message_range, T)
var/list/hearturfs = list()
@@ -143,7 +143,7 @@ var/list/department_radio_keys = list(
var/obj/O = I
hearturfs += O.locs[1]
listening_obj |= O
-
+
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
@@ -164,8 +164,9 @@ var/list/department_radio_keys = list(
spawn(0)
if(O) //It's possible that it could be deleted in the meantime.
O.hear_talk(src, message, verb, speaking)
-
+
log_say("[name]/[key] : [message]")
+ return 1
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
for (var/mob/O in viewers(src, null))
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 44da5d74af..a2b375d3be 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -27,6 +27,7 @@ var/list/ai_list = list()
var/viewalerts = 0
var/lawcheck[1]
var/ioncheck[1]
+ var/lawchannel = "Common" // Default channel on which to state laws
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
@@ -103,7 +104,6 @@ var/list/ai_list = list()
add_language("Siik'maas", 0)
add_language("Siik'tajr", 0)
add_language("Skrellian", 0)
- add_language("Rootspeak", 0)
add_language("Tradeband", 1)
add_language("Gutter", 0)
@@ -390,6 +390,13 @@ var/list/ai_list = list()
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
checklaws()
+ if (href_list["lawr"]) // Selects on which channel to state laws
+ var/setchannel = input(usr, "Specify channel.", "Channel selection") in list("State","Common","Science","Command","Medical","Engineering","Security","Supply","Binary","Holopad", "Cancel")
+ if(setchannel == "Cancel")
+ return
+ lawchannel = setchannel
+ checklaws()
+
//Uncomment this line of code if you are enabling the AI Vocal (VOX) announcements.
/*
if(href_list["say_word"])
@@ -749,4 +756,4 @@ var/list/ai_list = list()
src << "Accessing Subspace Transceiver control..."
if (src.aiRadio)
- src.aiRadio.interact(src)
\ No newline at end of file
+ src.aiRadio.interact(src)
diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm
index 904451aa1d..9e104ac100 100755
--- a/code/modules/mob/living/silicon/ai/laws.dm
+++ b/code/modules/mob/living/silicon/ai/laws.dm
@@ -51,24 +51,33 @@
src.laws_sanity_check()
src.laws.clear_supplied_laws()
-
-
-
-
/mob/living/silicon/ai/proc/statelaws() // -- TLE
// set category = "AI Commands"
// set name = "State Laws"
- src.say("Current Active Laws:")
+ /var/prefix = ""
+ switch(lawchannel)
+ if("Common") prefix = ";"
+ if("Science") prefix = ":n "
+ if("Command") prefix = ":c "
+ if("Medical") prefix = ":m "
+ if("Engineering") prefix = ":e "
+ if("Security") prefix = ":s "
+ if("Supply") prefix = ":u "
+ if("Binary") prefix = ":b "
+ if("Holopad") prefix = ":h "
+ else prefix = ""
+
+ if(src.say("[prefix]Current Active Laws:") != 1)
+ return
+
//src.laws_sanity_check()
//src.laws.show_laws(world)
var/number = 1
sleep(10)
-
-
if (src.laws.zeroth)
if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite
- src.say("0. [src.laws.zeroth]")
+ src.say("[prefix]0. [src.laws.zeroth]")
sleep(10)
for (var/index = 1, index <= src.laws.ion.len, index++)
@@ -76,7 +85,7 @@
var/num = ionnum()
if (length(law) > 0)
if (src.ioncheck[index] == "Yes")
- src.say("[num]. [law]")
+ src.say("[prefix][num]. [law]")
sleep(10)
for (var/index = 1, index <= src.laws.inherent.len, index++)
@@ -84,22 +93,20 @@
if (length(law) > 0)
if (src.lawcheck[index+1] == "Yes")
- src.say("[number]. [law]")
+ src.say("[prefix][number]. [law]")
sleep(10)
number++
-
for (var/index = 1, index <= src.laws.supplied.len, index++)
var/law = src.laws.supplied[index]
if (length(law) > 0)
if(src.lawcheck.len >= number+1)
if (src.lawcheck[number+1] == "Yes")
- src.say("[number]. [law]")
+ src.say("[prefix][number]. [law]")
sleep(10)
number++
-
/mob/living/silicon/ai/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
set category = "AI Commands"
set name = "State Laws"
@@ -144,6 +151,8 @@
src.lawcheck[number+1] = "Yes"
list += {"[src.lawcheck[number+1]] [number]: [law] "} number++ - list += {" State Laws"} + + list += {" Channel: [src.lawchannel] "} + list += {"State Laws"} usr << browse(list, "window=laws") \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 65118d811c..f3f1b4e1c8 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -1,9 +1,8 @@ /mob/living/silicon/ai/say(var/message) if(parent && istype(parent) && parent.stat != 2) - parent.say(message) - return + return parent.say(message) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - ..(message) + return ..(message) // These Verbs are commented out since we've disabled the AI vocal (VOX) announcements. // If you re-enable them there is 3 lines in ai.dm Topic() that you need to uncomment as well. diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 8f65ee384e..3e99b438d1 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -1,10 +1,12 @@ /mob/living/silicon/pai name = "pAI" - icon = 'icons/mob/mob.dmi'// - icon_state = "shadow" + icon = 'icons/mob/pai.dmi' + icon_state = "repairbot" robot_talk_understand = 0 emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person) + small = 1 + pass_flags = 1 var/network = "SS13" var/obj/machinery/camera/current = null @@ -15,11 +17,22 @@ var/obj/item/device/paicard/card // The card we inhabit var/obj/item/device/radio/radio // Our primary radio - var/speakStatement = "states" - var/speakExclamation = "declares" - var/speakQuery = "queries" - + var/chassis = "repairbot" // A record of your chosen chassis. + var/global/list/possible_chassis = list( + "Drone" = "repairbot", + "Cat" = "cat", + "Mouse" = "mouse", + "Monkey" = "monkey" + ) + var/global/list/possible_say_verbs = list( + "Robotic" = list("states","declares","queries"), + "Natural" = list("says","yells","asks"), + "Beep" = list("beeps","beeps loudly","boops"), + "Chirp" = list("chirps","chirrups","cheeps"), + "Feline" = list("purrs","yowls","meows") + ) + var/obj/item/weapon/pai_cable/cable // The cable we produce and use when door or camera jacking var/master // Name of the one who commands us @@ -54,6 +67,7 @@ /mob/living/silicon/pai/New(var/obj/item/device/paicard) + canmove = 0 src.loc = paicard card = paicard @@ -67,7 +81,11 @@ add_language("Sol Common", 1) add_language("Tradeband", 1) add_language("Gutter", 1) - + + verbs += /mob/living/silicon/pai/proc/fold_out + verbs += /mob/living/silicon/pai/proc/choose_chassis + verbs += /mob/living/silicon/pai/proc/choose_verbs + //PDA pda = new(src) spawn(5) @@ -81,20 +99,20 @@ ..() usr << browse_rsc('html/paigrid.png') // Go ahead and cache the interface resources as early as possible - + // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() if(src.silence_time) var/timeleft = round((silence_time - world.timeofday)/10 ,1) stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") - - + + /mob/living/silicon/pai/Stat() ..() statpanel("Status") if (src.client.statpanel == "Status") show_silenced() - + if (proc_holder_list.len)//Generic list for proc_holder objects. for(var/obj/effect/proc_holder/P in proc_holder_list) statpanel("[P.panel]","",P) @@ -113,7 +131,9 @@ return 0 /mob/living/silicon/pai/restrained() - return 0 + if(istype(src.loc,/obj/item/device/paicard)) + return 0 + ..() /mob/living/silicon/pai/emp_act(severity) // Silence for 2 minutes @@ -231,7 +251,6 @@ src.reset_view(C) return 1 - /mob/living/silicon/pai/cancel_camera() set category = "pAI Commands" set name = "Cancel Camera View" @@ -275,3 +294,144 @@ card.setPersonality(pai) */ + +// Procs/code after this point is used to convert the stationary pai item into a +// mobile pai mob. This also includes handling some of the general shit that can occur +// to it. Really this deserves its own file, but for the moment it can sit here. ~ Z + +/mob/living/silicon/pai/proc/fold_out() + set category = "pAI Commands" + set name = "Unfold Chassis" + + if(stat || sleeping || paralysis || weakened) + return + + if(src.loc != card) + return + + if(world.time <= last_special) + return + + last_special = world.time + 100 + verbs -= /mob/living/silicon/pai/proc/fold_out + verbs += /mob/living/silicon/pai/proc/fold_up + + var/turf/T = get_turf(src) + if(istype(T)) T.visible_message("[src] folds outwards, expanding into a mobile form.") + canmove = 1 + + //I'm not sure how much of this is necessary, but I would rather avoid issues. + if(istype(card.loc,/mob)) + var/mob/M = card.loc + M.drop_item(card) + + src.client.perspective = EYE_PERSPECTIVE + src.client.eye = src + + src.forceMove(get_turf(card)) + card.forceMove(src) + +/mob/living/silicon/pai/proc/fold_up() + set category = "pAI Commands" + set name = "Collapse Chassis" + + if(stat || sleeping || paralysis || weakened) + return + + if(src.loc == card) + return + + if(world.time <= last_special) + return + + close_up() + +/mob/living/silicon/pai/proc/choose_chassis() + set category = "pAI Commands" + set name = "Choose Chassis" + + var/choice + var/finalized = "No" + while(finalized == "No" && src.client) + + choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in possible_chassis + if(!choice) return + + icon_state = possible_chassis[choice] + finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes") + + chassis = possible_chassis[choice] + verbs -= /mob/living/silicon/pai/proc/choose_chassis + +/mob/living/silicon/pai/proc/choose_verbs() + set category = "pAI Commands" + set name = "Choose Speech Verbs" + + var/choice = input(usr,"What theme would you like to use for your speech verbs? This decision can only be made once.") as null|anything in possible_say_verbs + if(!choice) return + + var/list/sayverbs = possible_say_verbs[choice] + speak_statement = sayverbs[1] + speak_exclamation = sayverbs[(sayverbs.len>1 ? 2 : sayverbs.len)] + speak_query = sayverbs[(sayverbs.len>2 ? 3 : sayverbs.len)] + + verbs -= /mob/living/silicon/pai/proc/choose_verbs + +/mob/living/silicon/pai/lay_down() + set name = "Rest" + set category = "IC" + + if(istype(src.loc,/obj/item/device/paicard)) + resting = 0 + else + resting = !resting + icon_state = resting ? "[chassis]_rest" : "[chassis]" + src << "\blue You are now [resting ? "resting" : "getting up"]" + + canmove = !resting + +//Overriding this will stop a number of headaches down the track. +/mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(W.force) + visible_message("[user.name] attacks [src] with [W]!") + src.adjustBruteLoss(W.force) + src.updatehealth() + else + visible_message("[user.name] bonks [src] harmlessly with [W].") + if(stat != 2) close_up() + return + +/mob/living/silicon/pai/attack_hand(mob/user as mob) + visible_message("[user.name] boops [src] on the head.") + close_up() + +//I'm not sure how much of this is necessary, but I would rather avoid issues. +/mob/living/silicon/pai/proc/close_up() + + last_special = world.time + 100 + + verbs -= /mob/living/silicon/pai/proc/fold_up + verbs += /mob/living/silicon/pai/proc/fold_out + + var/turf/T = get_turf(src) + if(istype(T)) T.visible_message("[src] neatly folds inwards, compacting down to a rectangular card.") + + src.stop_pulling() + src.client.perspective = EYE_PERSPECTIVE + src.client.eye = card + + //This seems redundant but not including the forced loc setting messes the behavior up. + src.loc = card + card.loc = get_turf(card) + src.forceMove(card) + card.forceMove(card.loc) + canmove = 0 + +/mob/living/silicon/pai/start_pulling(var/atom/movable/AM) + + if(istype(AM,/obj/item)) + var/obj/item/O = AM + if(O.w_class == 1) + ..() + else + src << "You are too small to pull that." diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 757b04b1ea..fde71dc454 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -438,9 +438,9 @@ for (var/ch_name in radio.channels) dat+=radio.text_sec_channel(ch_name, radio.channels[ch_name]) dat+={"[radio.text_wires()] |