diff --git a/baystation12.dme b/baystation12.dme index 9171a2535a..a2039af5ad 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -439,9 +439,9 @@ #include "code\game\mecha\equipment\tools\medical_tools.dm" #include "code\game\mecha\equipment\tools\tools.dm" #include "code\game\mecha\equipment\weapons\weapons.dm" -#include "code\game\mecha\hoverpod\hoverpod.dm" #include "code\game\mecha\medical\medical.dm" #include "code\game\mecha\medical\odysseus.dm" +#include "code\game\mecha\working\hoverpod.dm" #include "code\game\mecha\working\ripley.dm" #include "code\game\mecha\working\working.dm" #include "code\game\objects\empulse.dm" @@ -1017,6 +1017,7 @@ #include "code\modules\mob\living\carbon\monkey\update_icons.dm" #include "code\modules\mob\living\silicon\alarm.dm" #include "code\modules\mob\living\silicon\death.dm" +#include "code\modules\mob\living\silicon\laws.dm" #include "code\modules\mob\living\silicon\login.dm" #include "code\modules\mob\living\silicon\say.dm" #include "code\modules\mob\living\silicon\silicon.dm" diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 707e740f66..15d416fff0 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -1,4 +1,5 @@ //TODO: Put this under a common parent type with freezers to cut down on the copypasta +#define HEATER_PERF_MULT 2.5 /obj/machinery/atmospherics/unary/heater name = "gas heating system" @@ -72,7 +73,7 @@ if (network && air_contents.total_moles && air_contents.temperature < set_temperature) update_use_power(2) - air_contents.add_thermal_energy(active_power_usage) + air_contents.add_thermal_energy(active_power_usage * HEATER_PERF_MULT) heating = 1 network.update = 1 diff --git a/code/WorkInProgress/computer3/computers/crew.dm b/code/WorkInProgress/computer3/computers/crew.dm index b3ef9398ba..170bd92607 100644 --- a/code/WorkInProgress/computer3/computers/crew.dm +++ b/code/WorkInProgress/computer3/computers/crew.dm @@ -35,10 +35,7 @@ var/life_status = "[H.stat > 1 ? "Deceased" : "Living"]" var/damage_report = "([dam1]/[dam2]/[dam3]/[dam4])" - if(H.wear_id) - log += "[H.wear_id.name]" - else - log += "Unknown" + log += "[H.get_id_name()]" switch(C.sensor_mode) if(1) diff --git a/code/WorkInProgress/periodic_news.dm b/code/WorkInProgress/periodic_news.dm index 22335e4a67..f5219aa435 100644 --- a/code/WorkInProgress/periodic_news.dm +++ b/code/WorkInProgress/periodic_news.dm @@ -149,7 +149,4 @@ proc/announce_newscaster_news(datum/news_announcement/news) newMsg.body = news.message newMsg.message_type = news.message_type - sendto.messages += newMsg - - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(news.channel_name) + news_network.insert_message_in_channel(sendto, newMsg) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index be66c3648d..03fe0d53b2 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -124,8 +124,9 @@ Topic("breaker=1", list("breaker"="1"), 1) // 0 meaning window (consistency! wait...) /obj/machinery/turretid/AICtrlClick() //turns off/on Turrets - src.enabled = !src.enabled - src.updateTurrets() + if(!ailock) + src.enabled = !src.enabled + src.updateTurrets() /atom/proc/AIAltClick(var/atom/A) AltClick(A) @@ -140,8 +141,9 @@ return /obj/machinery/turretid/AIAltClick() //toggles lethal on turrets - src.lethal = !src.lethal - src.updateTurrets() + if(!ailock) + src.lethal = !src.lethal + src.updateTurrets() /atom/proc/AIMiddleClick() return diff --git a/code/controllers/communications.dm b/code/controllers/communications.dm index 7981527bea..0267aed853 100644 --- a/code/controllers/communications.dm +++ b/code/controllers/communications.dm @@ -120,7 +120,8 @@ var/list/radiochannels = list( "Response Team" = ERT_FREQ, "Special Ops" = DTH_FREQ, "Mercenary" = SYND_FREQ, - "Supply" = SUP_FREQ + "Supply" = SUP_FREQ, + "AI Private" = AI_FREQ ) // central command channels, i.e deathsquid & response teams diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index cf85a5bf05..12925ffc61 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -628,7 +628,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/hoverpod name = "Hoverpod Shipment" contains = list() - cost = 75 + cost = 80 containertype = /obj/structure/largecrate/hoverpod containername = "Hoverpod Crate" group = "Operations" diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm index d82ddd8d2e..0846502ede 100644 --- a/code/defines/procs/radio.dm +++ b/code/defines/procs/radio.dm @@ -1,3 +1,8 @@ +#define TELECOMMS_RECEPTION_NONE 0 +#define TELECOMMS_RECEPTION_SENDER 1 +#define TELECOMMS_RECEPTION_RECEIVER 2 +#define TELECOMMS_RECEPTION_BOTH 3 + /proc/get_frequency_name(var/display_freq) var/freq_text @@ -16,3 +21,62 @@ return freq_text +/datum/reception + var/obj/machinery/message_server/message_server = null + var/telecomms_reception = TELECOMMS_RECEPTION_NONE + var/message = "" + +/datum/receptions + var/obj/machinery/message_server/message_server = null + var/sender_reception = TELECOMMS_RECEPTION_NONE + var/list/receiver_reception = new + +/proc/get_message_server() + if(message_servers) + for (var/obj/machinery/message_server/MS in message_servers) + if(MS.active) + return MS + return null + +/proc/check_signal(var/datum/signal/signal) + return signal && signal.data["done"] + +/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal) + return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE + +/proc/get_receiver_reception(var/receiver, var/datum/signal/signal) + if(receiver && check_signal(signal)) + var/turf/pos = get_turf(receiver) + if(pos.z in signal.data["level"]) + return TELECOMMS_RECEPTION_RECEIVER + return TELECOMMS_RECEPTION_NONE + +/proc/get_reception(var/atom/sender, var/receiver, var/message = "") + var/datum/reception/reception = new + + // check if telecomms I/O route 1459 is stable + //var/telecomms_intact = telecomms_process(P.owner, owner, t) + reception.message_server = get_message_server() + + var/datum/signal/signal = sender.telecomms_process() // Be aware that this proc calls sleep, to simulate transmition delays + reception.telecomms_reception |= get_sender_reception(sender, signal) + reception.telecomms_reception |= get_receiver_reception(receiver, signal) + reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message + + return reception + +/proc/get_receptions(var/atom/sender, var/list/atom/receivers) + var/datum/receptions/receptions = new + receptions.message_server = get_message_server() + + var/datum/signal/signal + if(sender) + signal = sender.telecomms_process() + receptions.sender_reception = get_sender_reception(sender, signal) + + for(var/atom/receiver in receivers) + if(!signal) + signal = receiver.telecomms_process() + receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal) + + return receptions diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index e2dba90378..48b99580fd 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -530,12 +530,12 @@ ________________________________________________________________________________ display_spideros() return P.tnote += "← From [!s_control?(A):"an unknown source"]:
[t]
" - if (!P.silent) + if (!P.message_silent) playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) for (var/mob/O in hearers(3, P.loc)) O.show_message(text("\icon[P] *[P.ttone]*")) - P.overlays.Cut() - P.overlays += image('icons/obj/pda.dmi', "pda-r") + P.new_message = 1 + P.update_icon() if("Inject") if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left. diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm index 4e4170d02c..78e16e50a4 100644 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ b/code/game/gamemodes/mutiny/mutiny.dm @@ -103,7 +103,7 @@ datum/game_mode/mutiny if (!pda) return 0 - if (!pda.silent) + if (!pda.message_silent) playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1) for (var/mob/O in hearers(3, pda.loc)) O.show_message(text("\icon[pda] *[pda.ttone]*")) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 5baa918911..047012edcb 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -336,8 +336,12 @@ proc/inject_chemical(mob/living/user as mob, chemical, amount) + if (stat & (BROKEN|NOPOWER)) + return + if(src.occupant && src.occupant.reagents) if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 20) + use_power(amount * CHEM_SYNTH_ENERGY) src.occupant.reagents.add_reagent(chemical, amount) user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [available_chemicals[chemical]] in his/her bloodstream." return diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 120e274e63..9a5ad3ed3b 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -458,16 +458,7 @@ //Sender isn't faking as someone who exists if(isnull(PDARec)) src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]") - if (!customrecepient.silent) - playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, customrecepient.loc)) - O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*")) - if( customrecepient.loc && ishuman(customrecepient.loc) ) - var/mob/living/carbon/human/H = customrecepient.loc - H << "\icon[customrecepient] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)" - log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]") - customrecepient.overlays.Cut() - customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r") + customrecepient.new_message(customsender, customsender, customjob, custommessage) //Sender is faking as someone who exists else @@ -477,16 +468,7 @@ if(!customrecepient.conversations.Find("\ref[PDARec]")) customrecepient.conversations.Add("\ref[PDARec]") - if (!customrecepient.silent) - playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, customrecepient.loc)) - O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*")) - if( customrecepient.loc && ishuman(customrecepient.loc) ) - var/mob/living/carbon/human/H = customrecepient.loc - H << "\icon[customrecepient] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)" - log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]") - customrecepient.overlays.Cut() - customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r") + customrecepient.new_message(PDARec, custommessage) //Finally.. ResetMessage() diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 968d03a5e0..6d627bacbb 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -6,7 +6,7 @@ var/author ="" var/body ="" var/message_type ="Story" - //var/parent_channel + var/datum/feed_channel/parent_channel var/backup_body ="" var/backup_author ="" var/is_admin_message = 0 @@ -22,8 +22,15 @@ var/backup_author="" var/censored=0 var/is_admin_channel=0 + var/updated = 0 //var/page = null //For newspapers +/datum/feed_channel/proc/announce_news() + return "Breaking news from [channel_name]!" + +/datum/feed_channel/station/announce_news() + return "New Station Announcement Available" + /datum/feed_message/proc/clear() src.author = "" src.body = "" @@ -31,6 +38,10 @@ src.backup_author = "" src.img = null src.backup_img = null + parent_channel.update() + +/datum/feed_channel/proc/update() + updated = world.time /datum/feed_channel/proc/clear() src.channel_name = "" @@ -40,11 +51,47 @@ src.backup_author = "" src.censored = 0 src.is_admin_channel = 0 + update() /datum/feed_network var/list/datum/feed_channel/network_channels = list() var/datum/feed_message/wanted_issue +/datum/feed_network/proc/add_news(var/channel_name, var/datum/feed_message/newMsg) + for(var/datum/feed_channel/FC in news_network.network_channels) + if(FC.channel_name == channel_name) + insert_message_in_channel(FC, newMsg) + break + +/datum/feed_network/proc/insert_message_in_channel(var/datum/feed_channel/FC, var/datum/feed_message/newMsg) + FC.messages += newMsg //Adding message to the network's appropriate feed_channel + newMsg.parent_channel = FC + FC.update() + var/announcement = FC.announce_news() + alert_readers(announcement) + +/datum/feed_network/proc/alert_readers(var/annoncement) + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.newsAlert(annoncement) + NEWSCASTER.update_icon() + + var/list/receiving_pdas = new + for (var/obj/item/device/pda/P in PDAs) + if (!P.owner) + continue + if (P.toff) + continue + receiving_pdas += P + + spawn(0) // get_receptions sleeps further down the line, spawn of elsewhere + var/datum/receptions/receptions = get_receptions(null, receiving_pdas) // datums are not atoms, thus we have to assume the newscast network always has reception + + for(var/obj/item/device/pda/PDA in receiving_pdas) + if(!(receptions.receiver_reception[PDA] & TELECOMMS_RECEPTION_RECEIVER)) + continue + + PDA.new_news(annoncement) + var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list. var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence. @@ -506,13 +553,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(photo) newMsg.img = photo.img feedback_inc("newscaster_stories",1) - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == src.channel_name) - FC.messages += newMsg //Adding message to the network's appropriate feed_channel - break + news_network.add_news(src.channel_name, newMsg) src.screen=4 - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(src.channel_name) src.updateUsrDialog() @@ -581,9 +623,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(photo) WANTED.img = photo.img news_network.wanted_issue = WANTED - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert() - NEWSCASTER.update_icon() + news_network.alert_readers() src.screen = 15 else if(news_network.wanted_issue.is_admin_message) @@ -623,6 +663,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co FC.author = "\[REDACTED\]" else FC.author = FC.backup_author + FC.update() src.updateUsrDialog() else if(href_list["censor_channel_story_author"]) @@ -635,6 +676,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co MSG.author = "\[REDACTED\]" else MSG.author = MSG.backup_author + MSG.parent_channel.update() src.updateUsrDialog() else if(href_list["censor_channel_story_body"]) @@ -652,6 +694,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co MSG.body = "\[REDACTED\]" else MSG.body = MSG.backup_body + MSG.parent_channel.update() src.updateUsrDialog() else if(href_list["pick_d_notice"]) @@ -666,6 +709,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok") return FC.censored = !FC.censored + FC.update() src.updateUsrDialog() else if(href_list["view"]) @@ -698,6 +742,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co src.updateUsrDialog() + /obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob) /* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages @@ -959,11 +1004,11 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) ///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not // return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list. -/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile. +/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile. var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ - if(channel) + if(news_call) for(var/mob/O in hearers(world.view-1, T)) - O.show_message("[src.name] beeps, \"Breaking news from [channel]!\"",2) + O.show_message("[src.name] beeps, \"[news_call]\"",2) src.alert = 1 src.update_icon() spawn(300) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 42f5debc62..960f6d99c8 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -5,7 +5,7 @@ energy_drain = 10 var/dam_force = 20 var/obj/mecha/working/ripley/cargo_holder - required_type = list(/obj/mecha/working, /obj/mecha/hoverpod) //so that hoverpods are a bit more useful as space transportation + required_type = /obj/mecha/working attach(obj/mecha/M as obj) ..() @@ -70,7 +70,7 @@ equip_cooldown = 30 energy_drain = 10 force = 15 - required_type = list(/obj/mecha/working, /obj/mecha/combat) + required_type = list(/obj/mecha/working/ripley, /obj/mecha/combat) action(atom/target) if(!action_checks(target)) return diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 50cce47271..da6188263a 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -10,7 +10,7 @@ var/fire_sound //Sound played while firing. var/fire_volume = 50 //How loud it is played. var/auto_rearm = 0 //Does the weapon reload itself after each shot? - required_type = /obj/mecha/combat + required_type = list(/obj/mecha/combat, /obj/mecha/working/hoverpod/combatpod) /obj/item/mecha_parts/mecha_equipment/weapon/action_checks(atom/target) if(projectiles <= 0) diff --git a/code/game/mecha/hoverpod/hoverpod.dm b/code/game/mecha/hoverpod/hoverpod.dm deleted file mode 100644 index e44feccca6..0000000000 --- a/code/game/mecha/hoverpod/hoverpod.dm +++ /dev/null @@ -1,134 +0,0 @@ -/obj/mecha/hoverpod - desc = "Stubby and round, this space-capable craft is an ancient favorite." - name = "Hover Pod" - icon_state = "engineering_pod" - initial_icon = "engineering_pod" - internal_damage_threshold = 80 - step_in = 4 - step_energy_drain = 10 - max_temperature = 20000 - health = 150 - infra_luminosity = 6 - wreckage = /obj/effect/decal/mecha_wreckage/hoverpod - var/list/cargo = new - var/cargo_capacity = 3 - max_equip = 2 - var/datum/effect/effect/system/ion_trail_follow/ion_trail - -/obj/mecha/hoverpod/New() - ..() - var/turf/T = get_turf(src) - if(T.z != 2) - new /obj/item/mecha_parts/mecha_tracking(src) - - ion_trail = new /datum/effect/effect/system/ion_trail_follow() - ion_trail.set_up(src) - ion_trail.start() - -/obj/mecha/hoverpod/range_action(atom/target as obj|mob|turf) - return - -//No space drifting -/obj/mecha/hoverpod/check_for_support() - //does the hoverpod have enough charge left to stabilize itself? - if (has_charge(step_energy_drain)) - if (!ion_trail.on) - ion_trail.start() - return 1 - - ion_trail.stop() - return ..() - -//these three procs overriden to play different sounds -/obj/mecha/hoverpod/mechturn(direction) - dir = direction - //playsound(src,'sound/machines/hiss.ogg',40,1) - return 1 - -/obj/mecha/hoverpod/mechstep(direction) - var/result = step(src,direction) - if(result) - playsound(src,'sound/machines/hiss.ogg',40,1) - return result - - -/obj/mecha/hoverpod/mechsteprand() - var/result = step_rand(src) - if(result) - playsound(src,'sound/machines/hiss.ogg',40,1) - return result - -/obj/mecha/hoverpod/Exit(atom/movable/O) - if(O in cargo) - return 0 - return ..() - -/obj/mecha/hoverpod/Topic(href, href_list) - ..() - if(href_list["drop_from_cargo"]) - var/obj/O = locate(href_list["drop_from_cargo"]) - if(O && O in src.cargo) - src.occupant_message("\blue You unload [O].") - O.loc = get_turf(src) - src.cargo -= O - var/turf/T = get_turf(O) - if(T) - T.Entered(O) - src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]") - return - - -/obj/mecha/hoverpod/get_stats_part() - var/output = ..() - output += "Cargo Compartment Contents:
" - if(src.cargo.len) - for(var/obj/O in src.cargo) - output += "Unload : [O]
" - else - output += "Nothing" - output += "
" - return output - -/obj/mecha/hoverpod/Del() - for(var/mob/M in src) - if(M==src.occupant) - continue - M.loc = get_turf(src) - M.loc.Entered(M) - step_rand(M) - for(var/atom/movable/A in src.cargo) - A.loc = get_turf(src) - var/turf/T = get_turf(A) - if(T) - T.Entered(A) - step_rand(A) - ..() - return - -//Hoverpod variants - -/* Commented out the combatpod as they can't reattach their equipment if it ever gets dropped, - * and making a special exception for them seems lame. -/obj/mecha/hoverpod/combatpod - desc = "An ancient, run-down combat spacecraft." // Ideally would have a seperate icon. - name = "Combat Hoverpod" - health = 200 - internal_damage_threshold = 35 - -/obj/mecha/hoverpod/combatpod/New() - ..() - var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser - ME.attach(src) - ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive - ME.attach(src) -*/ - -/obj/mecha/hoverpod/shuttlepod - desc = "Who knew a tiny ball could fit three people?" - -/obj/mecha/hoverpod/shuttlepod/New() - ..() - var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger - ME.attach(src) - ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger - ME.attach(src) \ No newline at end of file diff --git a/code/game/mecha/working/hoverpod.dm b/code/game/mecha/working/hoverpod.dm new file mode 100644 index 0000000000..5f775d619b --- /dev/null +++ b/code/game/mecha/working/hoverpod.dm @@ -0,0 +1,102 @@ +/obj/mecha/working/hoverpod + desc = "Stubby and round, this space-capable craft is an ancient favorite." + name = "Hover Pod" + icon_state = "engineering_pod" + initial_icon = "engineering_pod" + internal_damage_threshold = 80 + step_in = 4 + step_energy_drain = 15 + max_temperature = 20000 + health = 150 + infra_luminosity = 6 + wreckage = /obj/effect/decal/mecha_wreckage/hoverpod + cargo_capacity = 5 + max_equip = 3 + var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/stabilization_enabled = 1 + +/obj/mecha/working/hoverpod/New() + ..() + ion_trail = new /datum/effect/effect/system/ion_trail_follow() + ion_trail.set_up(src) + ion_trail.start() + +//Modified phazon code +/obj/mecha/working/hoverpod/Topic(href, href_list) + ..() + if (href_list["toggle_stabilization"]) + stabilization_enabled = !stabilization_enabled + send_byjax(src.occupant,"exosuit.browser","stabilization_command","[stabilization_enabled?"Dis":"En"]able thruster stabilization") + src.occupant_message("\blue Thruster stabilization [stabilization_enabled? "enabled" : "disabled"].") + return + +/obj/mecha/working/hoverpod/get_commands() + var/output = {"
+
Special
+ +
+ "} + output += ..() + return output + +//No space drifting +/obj/mecha/working/hoverpod/check_for_support() + //does the hoverpod have enough charge left to stabilize itself? + if (!has_charge(step_energy_drain)) + ion_trail.stop() + else + if (!ion_trail.on) + ion_trail.start() + if (stabilization_enabled) + return 1 + + return ..() + +//these three procs overriden to play different sounds +/obj/mecha/working/hoverpod/mechturn(direction) + dir = direction + //playsound(src,'sound/machines/hiss.ogg',40,1) + return 1 + +/obj/mecha/working/hoverpod/mechstep(direction) + var/result = step(src,direction) + if(result) + playsound(src,'sound/machines/hiss.ogg',40,1) + return result + + +/obj/mecha/working/hoverpod/mechsteprand() + var/result = step_rand(src) + if(result) + playsound(src,'sound/machines/hiss.ogg',40,1) + return result + + +//Hoverpod variants +/obj/mecha/working/hoverpod/combatpod + desc = "An ancient, run-down combat spacecraft." // Ideally would have a seperate icon. + name = "Combat Hoverpod" + health = 200 + internal_damage_threshold = 35 + cargo_capacity = 2 + max_equip = 2 + +/obj/mecha/working/hoverpod/combatpod/New() + ..() + var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser + ME.attach(src) + ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive + ME.attach(src) + + +/obj/mecha/working/hoverpod/shuttlepod + desc = "Who knew a tiny ball could fit three people?" + +/obj/mecha/working/hoverpod/shuttlepod/New() + ..() + var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger + ME.attach(src) + ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger + ME.attach(src) \ No newline at end of file diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index e445e94465..5beb3c7244 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -7,14 +7,7 @@ max_temperature = 20000 health = 200 wreckage = /obj/effect/decal/mecha_wreckage/ripley - var/list/cargo = new - var/cargo_capacity = 10 - -/* -/obj/mecha/working/ripley/New() - ..() - return -*/ + cargo_capacity = 10 /obj/mecha/working/ripley/firefighter desc = "Standart APLU chassis was refitted with additional thermal protection and cistern." @@ -63,50 +56,4 @@ for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily del (B) -/obj/mecha/working/ripley/Exit(atom/movable/O) - if(O in cargo) - return 0 - return ..() -/obj/mecha/working/ripley/Topic(href, href_list) - ..() - if(href_list["drop_from_cargo"]) - var/obj/O = locate(href_list["drop_from_cargo"]) - if(O && O in src.cargo) - src.occupant_message("\blue You unload [O].") - O.loc = get_turf(src) - src.cargo -= O - var/turf/T = get_turf(O) - if(T) - T.Entered(O) - src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]") - return - - - -/obj/mecha/working/ripley/get_stats_part() - var/output = ..() - output += "Cargo Compartment Contents:
" - if(src.cargo.len) - for(var/obj/O in src.cargo) - output += "Unload : [O]
" - else - output += "Nothing" - output += "
" - return output - -/obj/mecha/working/ripley/Del() - for(var/mob/M in src) - if(M==src.occupant) - continue - M.loc = get_turf(src) - M.loc.Entered(M) - step_rand(M) - for(var/atom/movable/A in src.cargo) - A.loc = get_turf(src) - var/turf/T = get_turf(A) - if(T) - T.Entered(A) - step_rand(A) - ..() - return \ No newline at end of file diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm index ad66d31032..83df31f8c1 100644 --- a/code/game/mecha/working/working.dm +++ b/code/game/mecha/working/working.dm @@ -1,5 +1,7 @@ /obj/mecha/working internal_damage_threshold = 60 + var/list/cargo = new + var/cargo_capacity = 5 /obj/mecha/working/New() ..() @@ -8,27 +10,51 @@ new /obj/item/mecha_parts/mecha_tracking(src) return -/* -/obj/mecha/working/melee_action(atom/target as obj|mob|turf) - if(internal_damage&MECHA_INT_CONTROL_LOST) - target = pick(oview(1,src)) - if(selected_tool) - selected_tool.action(target) - return -*/ - -/obj/mecha/working/range_action(atom/target as obj|mob|turf) +/obj/mecha/working/Del() + for(var/mob/M in src) + if(M==src.occupant) + continue + M.loc = get_turf(src) + M.loc.Entered(M) + step_rand(M) + for(var/atom/movable/A in src.cargo) + A.loc = get_turf(src) + var/turf/T = get_turf(A) + if(T) + T.Entered(A) + step_rand(A) + ..() return -/* +/obj/mecha/working/Topic(href, href_list) + ..() + if(href_list["drop_from_cargo"]) + var/obj/O = locate(href_list["drop_from_cargo"]) + if(O && O in src.cargo) + src.occupant_message("\blue You unload [O].") + O.loc = get_turf(src) + src.cargo -= O + var/turf/T = get_turf(O) + if(T) + T.Entered(O) + src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]") + return + +/obj/mecha/working/Exit(atom/movable/O) + if(O in cargo) + return 0 + return ..() + /obj/mecha/working/get_stats_part() var/output = ..() - output += "[src.name] Tools:
" - if(equipment.len) - for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment) - output += "[selected==MT?"":""][MT.get_equip_info()][selected==MT?"":""]
" + output += "Cargo Compartment Contents:
" + if(src.cargo.len) + for(var/obj/O in src.cargo) + output += "Unload : [O]
" else - output += "None" + output += "Nothing" output += "
" return output -*/ \ No newline at end of file + +/obj/mecha/working/range_action(atom/target as obj|mob|turf) + return \ No newline at end of file diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index fb99ad1ff7..20c5425bc8 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -21,17 +21,20 @@ var/global/list/obj/item/device/pda/PDAs = list() var/lastmode = 0 var/ui_tick = 0 + var/nanoUI[0] //Secondary variables var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner. var/fon = 0 //Is the flashlight function on? var/f_lum = 2 //Luminosity for the flashlight function - var/silent = 0 //To beep or not to beep, that is the question + var/message_silent = 0 //To beep or not to beep, that is the question + var/news_silent = 0 //To beep or not to beep, that is the question var/toff = 0 //If 1, messenger disabled var/tnote[0] //Current Texts var/last_text //No text spamming var/last_honk //Also no honk spamming that's bad too - var/ttone = "beep" //The ringtone! + var/ttone = "beep" //The PDA ringtone! + var/newstone = "beep, beep" //The news ringtone! var/lock_code = "" // Lockcode to unlock uplink var/honkamt = 0 //How many honks left when infected with honk.exe var/mimeamt = 0 //How many silence left when infected with mime.exe @@ -42,7 +45,13 @@ var/global/list/obj/item/device/pda/PDAs = list() var/hidden = 0 // Is the PDA hidden from the PDA list? var/active_conversation = null // New variable that allows us to only view a single conversation. var/list/conversations = list() // For keeping up with who we have PDA messsages from. - var/newmessage = 0 //To remove hackish overlay check + var/new_message = 0 //To remove hackish overlay check + var/new_news = 0 + + var/active_feed // The selected feed + var/list/warrant // The warrant as we last knew it + var/list/feeds = list() // The list of feeds as we last knew them + var/list/feed_info = list() // The data and contents of each feed as we last knew them var/list/cartmodes = list(40, 42, 43, 433, 44, 441, 45, 451, 46, 48, 47, 49) // If you add more cartridge modes add them to this list as well. var/list/no_auto_update = list(1, 40, 43, 44, 441, 45, 451) // These modes we turn off autoupdate @@ -101,8 +110,10 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/mime default_cartridge = /obj/item/weapon/cartridge/mime icon_state = "pda-mime" - silent = 1 + message_silent = 1 + news_silent = 1 ttone = "silence" + newstone = "silence" /obj/item/device/pda/heads default_cartridge = /obj/item/weapon/cartridge/head @@ -172,7 +183,8 @@ var/global/list/obj/item/device/pda/PDAs = list() icon_state = "pda-libb" desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader." note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!" - silent = 1 //Quiet in the library! + message_silent = 1 //Quiet in the library! + news_silent = 1 /obj/item/device/pda/clear icon_state = "pda-transp" @@ -202,6 +214,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/ai icon_state = "NONE" ttone = "data" + newstone = "news" detonate = 0 @@ -246,8 +259,8 @@ var/global/list/obj/item/device/pda/PDAs = list() if(usr.stat == 2) usr << "You can't do that because you are dead!" return - silent=!silent - usr << "PDA ringer toggled [(silent ? "Off" : "On")]!" + message_silent=!message_silent + usr << "PDA ringer toggled [(message_silent ? "Off" : "On")]!" /obj/item/device/pda/ai/verb/cmd_show_message_log() @@ -347,7 +360,6 @@ var/global/list/obj/item/device/pda/PDAs = list() var/data[0] // This is the data that will be sent to the PDA - data["owner"] = owner // Who is your daddy... data["ownjob"] = ownjob // ...and what does he do? @@ -356,7 +368,8 @@ var/global/list/obj/item/device/pda/PDAs = list() data["fon"] = fon // Flashlight on? data["pai"] = (isnull(pai) ? 0 : 1) // pAI inserted? data["note"] = note // current pda notes - data["silent"] = silent // does the pda make noise when it receives a message? + data["message_silent"] = message_silent // does the pda make noise when it receives a message? + data["news_silent"] = news_silent // does the pda make noise when it receives news? data["toff"] = toff // is the messenger function turned off? data["active_conversation"] = active_conversation // Which conversation are we following right now? @@ -403,7 +416,8 @@ var/global/list/obj/item/device/pda/PDAs = list() data["cartridge"] = cartdata data["stationTime"] = worldtime2text() - data["newMessage"] = newmessage + data["new_Message"] = new_message + data["new_News"] = new_news if(mode==2) var/convopdas[0] @@ -464,7 +478,45 @@ var/global/list/obj/item/device/pda/PDAs = list() ) if(isnull(data["aircontents"])) data["aircontents"] = list("reading" = 0) + if(mode==6) + if(news_network.network_channels.len != feeds.len) + var/datum/reception/reception = get_reception(src) + if(reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER) + feeds.Cut() + for(var/datum/feed_channel/channel in news_network.network_channels) + feeds[++feeds.len] = list("name" = channel.channel_name, "censored" = channel.censored) + data["feedChannels"] = feeds + if(mode==61) + var/list/feed = feed_info[active_feed] + if(!feed) + feed = list() + feed["updated"] = -1 + feed_info[active_feed] = feed + var/datum/feed_channel/FC + for(FC in news_network.network_channels) + if(FC.channel_name == active_feed["name"]) + break + if(FC.updated > feed["updated"]) + var/datum/reception/reception = get_reception(src) + if(reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER) + feed["channel"] = FC.channel_name + feed["author"] = FC.author + feed["updated"] = FC.updated + feed["censored"] = FC.censored + + var/list/messages = list() + if(!FC.censored) + var/index = 0 + for(var/datum/feed_message/FM in FC.messages) + index++ + if(FM.img) + usr << browse_rsc(FM.img, "pda_news_tmp_photo_[feed["channel"]]_[index].png") + messages[++messages.len] = list("author" = FM.author, "body" = FM.body, "message_type" = FM.message_type, "has_image" = (FM.img != null), "index" = index) + feed["messages"] = messages + data["feed"] = feed + + nanoUI = data // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) @@ -623,7 +675,9 @@ var/global/list/obj/item/device/pda/PDAs = list() if("Toggle Messenger") toff = !toff if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status - silent = !silent + message_silent = !message_silent + if("Toggle News") + news_silent = !news_silent if("Clear")//Clears messages if(href_list["option"] == "All") tnote.Cut() @@ -653,6 +707,15 @@ var/global/list/obj/item/device/pda/PDAs = list() else ui.close() return 0 + if("Newstone") + var/t = input(U, "Please enter new news tone", name, newstone) as text + if (in_range(src, U) && loc == U) + if (t) + t = copytext(sanitize(t), 1, 20) + newstone = t + else + ui.close() + return 0 if("Message") var/obj/item/device/pda/P = locate(href_list["target"]) @@ -668,8 +731,14 @@ var/global/list/obj/item/device/pda/PDAs = list() if(P == n) active_conversation=P mode=21 + if("Select Feed") + var/n = href_list["name"] + for(var/f in feeds) + if(f["name"] == n) + active_feed = f + mode=61 if("Send Honk")//Honk virus - if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch. + if(cartridge && cartridge.access_clown)//Cartridge checks are kind of unnecessary since everything is done through switch. var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess. if(!isnull(P)) if (!P.toff && cartridge.charges > 0) @@ -682,14 +751,16 @@ var/global/list/obj/item/device/pda/PDAs = list() ui.close() return 0 if("Send Silence")//Silent virus - if(istype(cartridge, /obj/item/weapon/cartridge/mime)) + if(cartridge && cartridge.access_mime) var/obj/item/device/pda/P = locate(href_list["target"]) if(!isnull(P)) if (!P.toff && cartridge.charges > 0) cartridge.charges-- U.show_message("\blue Virus sent!", 1) - P.silent = 1 + P.message_silent = 1 + P.news_silent = 1 P.ttone = "silence" + P.newstone = "silence" else U << "PDA not found." else @@ -709,34 +780,15 @@ var/global/list/obj/item/device/pda/PDAs = list() M.close() if("Detonate")//Detonate PDA... maybe - // check if telecomms I/O route 1459 is stable - //var/telecomms_intact = telecomms_process(P.owner, owner, t) - var/obj/machinery/message_server/useMS = null - if(message_servers) - for (var/obj/machinery/message_server/MS in message_servers) - //PDAs are now dependant on the Message Server. - if(MS.active) - useMS = MS - break - - var/datum/signal/signal = src.telecomms_process() - - var/useTC = 0 - if(signal) - if(signal.data["done"]) - useTC = 1 - var/turf/pos = get_turf(src) - if(pos.z in signal.data["level"]) - useTC = 2 - - if(istype(cartridge, /obj/item/weapon/cartridge/syndicate)) - if(!(useMS && useTC)) + if(cartridge && cartridge.access_detonate_pda) + var/obj/item/device/pda/P = locate(href_list["target"]) + var/datum/reception/reception = get_reception(src, P, "") // get_reception calls sleep further down the line + if(!(reception.message_server && reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)) U.show_message("\red An error flashes on your [src]: Connection unavailable", 1) return - if(useTC != 2) // Does our recepient have a broadcaster on their level? + if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recepient have a broadcaster on their level? U.show_message("\red An error flashes on your [src]: Recipient unavailable", 1) return - var/obj/item/device/pda/P = locate(href_list["target"]) if(!isnull(P)) if (!P.toff && cartridge.charges > 0) cartridge.charges-- @@ -796,8 +848,12 @@ var/global/list/obj/item/device/pda/PDAs = list() //EXTRA FUNCTIONS=================================== if (mode == 2||mode == 21)//To clear message overlays. - overlays.Cut() - newmessage = 0 + new_message = 0 + update_icon() + + if (mode == 6||mode == 61)//To clear news overlays. + new_news = 0 + update_icon() if ((honkamt > 0) && (prob(60)))//For clown virus. honkamt-- @@ -805,6 +861,13 @@ var/global/list/obj/item/device/pda/PDAs = list() return 1 // return 1 tells it to refresh the UI in NanoUI +/obj/item/device/pda/update_icon() + ..() + + overlays.Cut() + if(new_message || new_news) + overlays += image('icons/obj/pda.dmi', "pda-r") + /obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P) //TODO: sometimes these attacks show up on the message server var/i = rand(1,100) @@ -900,34 +963,14 @@ var/global/list/obj/item/device/pda/PDAs = list() return last_text = world.time - // check if telecomms I/O route 1459 is stable - //var/telecomms_intact = telecomms_process(P.owner, owner, t) - var/obj/machinery/message_server/useMS = null - if(message_servers) - for (var/obj/machinery/message_server/MS in message_servers) - //PDAs are now dependent on the Message Server. - if(MS.active) - useMS = MS - break + var/datum/reception/reception = get_reception(src, P, t) + t = reception.message - var/datum/signal/signal = src.telecomms_process() - - var/useTC = 0 - if(signal) - if(signal.data["done"]) - useTC = 1 - var/turf/pos = get_turf(P) - if(pos.z in signal.data["level"]) - useTC = 2 - //Let's make this barely readable - if(signal.data["compression"] > 0) - t = Gibberish(t, signal.data["compression"] + 50) - - if(useMS && useTC) // only send the message if it's stable - if(useTC != 2) // Does our recipient have a broadcaster on their level? + if(reception.message_server && (reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)) // only send the message if it's stable + if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recipient have a broadcaster on their level? U << "ERROR: Cannot reach recipient." return - var/send_result = useMS.send_pda_message("[P.owner]","[owner]","[t]") + var/send_result = reception.message_server.send_pda_message("[P.owner]","[owner]","[t]") if (send_result) U << "ERROR: Messaging server rejected your message. Reason: contains '[send_result]'." return @@ -955,33 +998,48 @@ var/global/list/obj/item/device/pda/PDAs = list() if(ai.aiPDA != P && ai.aiPDA != src) ai.show_message("Intercepted message from [who]: [t]") - - if (!P.silent) - playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, P.loc)) - if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*")) - //Search for holder of the PDA. - var/mob/living/L = null - if(P.loc && isliving(P.loc)) - L = P.loc - //Maybe they are a pAI! - else - L = get(P, /mob/living/silicon) - - - if(L) - L << "\icon[P] Message from [src.owner] ([ownjob]), \"[t]\" (Reply)" - nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message - - nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message - - log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]") - P.overlays.Cut() - P.overlays += image('icons/obj/pda.dmi', "pda-r") - P.newmessage = 1 + P.new_message_from_pda(src, t) + nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message else U << "ERROR: Messaging server is not responding." +/obj/item/device/pda/proc/new_info(var/beep_silent, var/message_tone, var/reception_message) + if (!beep_silent) + playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) + for (var/mob/O in hearers(3, loc)) + O.show_message(text("\icon[src] *[message_tone]*")) + //Search for holder of the PDA. + var/mob/living/L = null + if(loc && isliving(loc)) + L = loc + //Maybe they are a pAI! + else + L = get(src, /mob/living/silicon) + + if(L) + if(reception_message) + L << reception_message + nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message + +/obj/item/device/pda/proc/new_news(var/message) + new_info(news_silent, newstone, news_silent ? "" : "\icon[src] [message]") + + new_news = 1 + update_icon() + +/obj/item/device/pda/ai/new_news(var/message) + // Do nothing + +/obj/item/device/pda/proc/new_message_from_pda(var/obj/item/device/pda/sending_device, var/message) + new_message(sending_device.name, sending_device.owner, sending_device.ownjob, message) + +/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message) + var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" (Reply)" + new_info(news_silent, newstone, reception_message) + + log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]") + new_message = 1 + update_icon() /obj/item/device/pda/verb/verb_remove_id() set category = "Object" diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index 47a1aa8560..e10e963b5f 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -79,7 +79,7 @@ name = "AI Integrated Encryption Key" desc = "Integrated encryption key" icon_state = "cap_cypherkey" - channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1) + channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "AI Private" = 1) /obj/item/device/encryptionkey/heads/rd name = "Research Director's Encryption Key" diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 2923ba2321..1958bac750 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -70,5 +70,11 @@ /obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/crowbar)) - new /obj/mecha/hoverpod(loc) + var/obj/item/mecha_parts/mecha_equipment/ME + var/obj/mecha/working/hoverpod/H = new (loc) + + ME = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp + ME.attach(H) + ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger + ME.attach(H) ..() \ No newline at end of file diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index c4dc3a0e56..e2fc6dba68 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2566,15 +2566,9 @@ newMsg.body = src.admincaster_feed_message.body newMsg.is_admin_message = 1 feedback_inc("newscaster_stories",1) - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == src.admincaster_feed_channel.channel_name) - FC.messages += newMsg //Adding message to the network's appropriate feed_channel - break + news_network.add_news(src.admincaster_feed_channel.channel_name, newMsg) src.admincaster_screen=4 - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name) - log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!") src.access_news_network() diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 861fd6a92a..4057632861 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -403,7 +403,7 @@ var/global/list/gear_datums = list() slot = slot_wear_suit /datum/gear/bomber - display_name = "bomberjacker" + display_name = "bomber jacket" path = /obj/item/clothing/suit/bomber cost = 4 slot = slot_wear_suit @@ -427,12 +427,24 @@ var/global/list/gear_datums = list() cost = 2 slot = slot_wear_suit +/datum/gear/gponcho + display_name = "poncho, blue" + path = /obj/item/clothing/suit/poncho/blue + cost = 4 + slot = slot_wear_suit + /datum/gear/gponcho display_name = "poncho, green" path = /obj/item/clothing/suit/poncho/green cost = 4 slot = slot_wear_suit +/datum/gear/rponcho + display_name = "poncho, purple" + path = /obj/item/clothing/suit/poncho/purple + cost = 4 + slot = slot_wear_suit + /datum/gear/rponcho display_name = "poncho, red" path = /obj/item/clothing/suit/poncho/red diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 6eca3f99a1..71eb40b2f6 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -356,16 +356,28 @@ /obj/item/clothing/suit/poncho/green name = "green poncho" - desc = "Your classic, non-racist poncho. This one is green." + desc = "A simple, comfortable cloak without sleeves. This one is green." icon_state = "greenponcho" item_state = "greenponcho" /obj/item/clothing/suit/poncho/red name = "red poncho" - desc = "Your classic, non-racist poncho. This one is red." + desc = "A simple, comfortable cloak without sleeves. This one is red." icon_state = "redponcho" item_state = "redponcho" +/obj/item/clothing/suit/poncho/purple + name = "purple poncho" + desc = "A simple, comfortable cloak without sleeves. This one is purple." + icon_state = "purpleponcho" + item_state = "purpleponcho" + +/obj/item/clothing/suit/poncho/blue + name = "blue poncho" + desc = "A simple, comfortable cloak without sleeves. This one is blue." + icon_state = "blueponcho" + item_state = "blueponcho" + /obj/item/clothing/suit/bomber name = "bomber jacker" desc = "A well-worn WW2 leather bomber jacket." @@ -374,5 +386,5 @@ flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|ARMS cold_protection = UPPER_TORSO|ARMS - min_cold_protection_temperature = T0C - siemens_coefficient = 0.7 \ No newline at end of file + min_cold_protection_temperature = T0C - 20 + siemens_coefficient = 0.7 diff --git a/code/modules/economy/Events.dm b/code/modules/economy/Events.dm index 070ba5449a..5770e95026 100644 --- a/code/modules/economy/Events.dm +++ b/code/modules/economy/Events.dm @@ -91,12 +91,7 @@ if(FESTIVAL) newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet." - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == "Nyx Daily") - FC.messages += newMsg - break - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert("Nyx Daily") + news_network.add_news("Nyx Daily", newMsg) /datum/event/economic_event/end() for(var/good_type in dearer_goods) diff --git a/code/modules/economy/Events_Mundane.dm b/code/modules/economy/Events_Mundane.dm index 0a381a7ce7..df2a92e01c 100644 --- a/code/modules/economy/Events_Mundane.dm +++ b/code/modules/economy/Events_Mundane.dm @@ -124,12 +124,7 @@ "a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \ Nyx Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage." - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == "Nyx Daily") - FC.messages += newMsg - break - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert("Nyx Daily") + news_network.add_news("Nyx Daily", newMsg) /datum/event/trivial_news endWhen = 10 @@ -225,9 +220,4 @@ "Broccoli discovered to be colonies of tiny aliens with murder on their minds"\ ) - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == "The Gibson Gazette") - FC.messages += newMsg - break - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert("The Gibson Gazette") + news_network.add_news("The Gibson Gazette", newMsg) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 02d3a4e0e2..abc2c0ca91 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -77,7 +77,7 @@ var/global/economy_init = 0 if(economy_init) return 2 - var/datum/feed_channel/newChannel = new /datum/feed_channel + var/datum/feed_channel/newChannel = new /datum/feed_channel/station newChannel.channel_name = "Public Station Announcements" newChannel.author = "Automated Announcement Listing" newChannel.locked = 1 diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index 0c923d172e..5a518eca32 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -31,10 +31,4 @@ if(!deposit_success) newMsg.body += "
Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of $500 to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month." - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == "Nyx Daily") - FC.messages += newMsg - break - - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert("Nyx Daily") + news_network.add_news("Nyx Daily", newMsg) diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm index 584da51fcc..acb6e7f00a 100644 --- a/code/modules/events/money_spam.dm +++ b/code/modules/events/money_spam.dm @@ -104,10 +104,10 @@ //Commented out because we don't send messages like this anymore. Instead it will just popup in their chat window. //P.tnote += "← From [sender] (Unknown / spam?):
[message]
" - if (!P.silent) + if (!P.message_silent) playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) for (var/mob/O in hearers(3, P.loc)) - if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*")) + if(!P.message_silent) O.show_message(text("\icon[P] *[P.ttone]*")) //Search for holder of the PDA. var/mob/living/L = null if(P.loc && isliving(P.loc)) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 71cc5ad851..ba8613dcbb 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -12,6 +12,7 @@ var/list/department_radio_keys = list( ":w" = "whisper", "#w" = "whisper", ".w" = "whisper", ":t" = "Mercenary", "#t" = "Mercenary", ".t" = "Mercenary", ":u" = "Supply", "#u" = "Supply", ".u" = "Supply", + ":o" = "AI Private", "#o" = "AI Private", ".o" = "AI Private", ":R" = "right ear", "#R" = "right ear", ".R" = "right ear", ":L" = "left ear", "#L" = "left ear", ".L" = "left ear", @@ -25,6 +26,7 @@ var/list/department_radio_keys = list( ":W" = "whisper", "#W" = "whisper", ".W" = "whisper", ":T" = "Mercenary", "#T" = "Mercenary", ".T" = "Mercenary", ":U" = "Supply", "#U" = "Supply", ".U" = "Supply", + ":O" = "AI Private", "#O" = "AI Private", ".O" = "AI Private", //kinda localization -- rastaf0 //same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding. @@ -42,6 +44,21 @@ var/list/department_radio_keys = list( ":é" = "Supply", "#é" = "Supply", ".é" = "Supply", ) + +var/list/channel_to_radio_key = new +proc/get_radio_key_from_channel(var/channel) + var/key = channel_to_radio_key[channel] + if(!key) + for(var/radio_key in department_radio_keys) + if(department_radio_keys[radio_key] == channel) + key = radio_key + break + if(!key) + key = "" + channel_to_radio_key[channel] = key + + return key + /mob/living/proc/binarycheck() if (istype(src, /mob/living/silicon/pai)) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 91a7c92f6e..ccc199d2a7 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -16,7 +16,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/proc/ai_roster, /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_store_location, - /mob/living/silicon/ai/proc/checklaws, + /mob/living/silicon/ai/proc/ai_checklaws, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/core, /mob/living/silicon/ai/proc/pick_icon, @@ -49,11 +49,7 @@ var/list/ai_verbs_default = list( var/obj/machinery/camera/camera = null var/list/connected_robots = list() var/aiRestorePowerRoutine = 0 - //var/list/laws = 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 @@ -121,7 +117,11 @@ var/list/ai_verbs_default = list( aiMulti = new(src) aiRadio = new(src) + common_radio = aiRadio aiRadio.myAi = src + additional_law_channels += "Binary" + additional_law_channels += "Holopad" + aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src) if (istype(loc, /turf)) @@ -151,6 +151,8 @@ var/list/ai_verbs_default = list( src << "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc." src << "To use something, simply click on it." src << "Use say :b to speak to your cyborgs through binary." + src << "For department channels, use the following say commands:" + src << ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :m - Medical, :n - Science." if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai))) show_laws() src << "These laws may be changed by other players, or by you being the traitor." @@ -427,7 +429,8 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/Topic(href, href_list) if(usr != src) return - ..() + if(..()) + return if (href_list["mach_close"]) if (href_list["mach_close"] == "aialerts") viewalerts = 0 @@ -455,13 +458,6 @@ var/list/ai_verbs_default = 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() - if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite var/L = text2num(href_list["lawi"]) switch(ioncheck[L]) diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index e167c42f06..23bfd22e8f 100755 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -15,22 +15,6 @@ src.laws_sanity_check() src.laws.show_laws(who) -/mob/living/silicon/ai/proc/laws_sanity_check() - if (!src.laws) - src.laws = new base_law_type - -/mob/living/silicon/ai/proc/set_zeroth_law(var/law, var/law_borg) - src.laws_sanity_check() - src.laws.set_zeroth_law(law, law_borg) - -/mob/living/silicon/ai/proc/add_inherent_law(var/law) - src.laws_sanity_check() - src.laws.add_inherent_law(law) - -/mob/living/silicon/ai/proc/clear_inherent_laws() - src.laws_sanity_check() - src.laws.clear_inherent_laws() - /mob/living/silicon/ai/proc/add_ion_law(var/law) src.laws_sanity_check() src.laws.add_ion_law(law) @@ -38,120 +22,7 @@ if(R.lawupdate && (R.connected_ai == src)) R << "\red " + law + "\red...LAWS UPDATED" -/mob/living/silicon/ai/proc/clear_ion_laws() - src.laws_sanity_check() - src.laws.clear_ion_laws() - -/mob/living/silicon/ai/proc/add_supplied_law(var/number, var/law) - src.laws_sanity_check() - src.laws.add_supplied_law(number, law) - -/mob/living/silicon/ai/proc/clear_supplied_laws() - src.laws_sanity_check() - src.laws.clear_supplied_laws() - -/mob/living/silicon/ai/proc/statelaws() // -- TLE -// set category = "AI Commands" -// set name = "State 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("[prefix]0. [src.laws.zeroth]") - sleep(10) - - for (var/index = 1, index <= src.laws.ion.len, index++) - var/law = src.laws.ion[index] - var/num = ionnum() - if (length(law) > 0) - if (src.ioncheck[index] == "Yes") - src.say("[prefix][num]. [law]") - sleep(10) - - for (var/index = 1, index <= src.laws.inherent.len, index++) - var/law = src.laws.inherent[index] - - if (length(law) > 0) - if (src.lawcheck[index+1] == "Yes") - 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("[prefix][number]. [law]") - sleep(10) - number++ - -/mob/living/silicon/ai/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite +/mob/living/silicon/ai/proc/ai_checklaws() set category = "AI Commands" set name = "State Laws" - - var/list = "Which laws do you want to include when stating them for the crew?

" - - - - if (src.laws.zeroth) - if (!src.lawcheck[1]) - src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite - list += {"[src.lawcheck[1]] 0: [src.laws.zeroth]
"} - - for (var/index = 1, index <= src.laws.ion.len, index++) - var/law = src.laws.ion[index] - - if (length(law) > 0) - - - if (!src.ioncheck[index]) - src.ioncheck[index] = "Yes" - list += {"[src.ioncheck[index]] [ionnum()]: [law]
"} - src.ioncheck.len += 1 - - var/number = 1 - for (var/index = 1, index <= src.laws.inherent.len, index++) - var/law = src.laws.inherent[index] - - if (length(law) > 0) - src.lawcheck.len += 1 - - if (!src.lawcheck[number+1]) - src.lawcheck[number+1] = "Yes" - list += {"[src.lawcheck[number+1]] [number]: [law]
"} - number++ - - for (var/index = 1, index <= src.laws.supplied.len, index++) - var/law = src.laws.supplied[index] - if (length(law) > 0) - src.lawcheck.len += 1 - if (!src.lawcheck[number+1]) - src.lawcheck[number+1] = "Yes" - list += {"[src.lawcheck[number+1]] [number]: [law]
"} - number++ - - list += {"
Channel: [src.lawchannel]
"} - list += {"State Laws"} - - usr << browse(list, "window=laws") \ No newline at end of file + checklaws() diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm new file mode 100644 index 0000000000..0094d932d7 --- /dev/null +++ b/code/modules/mob/living/silicon/laws.dm @@ -0,0 +1,128 @@ +/mob/living/silicon/proc/laws_sanity_check() + if (!src.laws) + laws = new base_law_type + +/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg) + laws_sanity_check() + laws.set_zeroth_law(law, law_borg) + +/mob/living/silicon/proc/add_inherent_law(var/law) + laws_sanity_check() + laws.add_inherent_law(law) + +/mob/living/silicon/proc/clear_inherent_laws() + laws_sanity_check() + laws.clear_inherent_laws() + +/mob/living/silicon/proc/clear_ion_laws() + laws_sanity_check() + laws.clear_ion_laws() + +/mob/living/silicon/proc/add_supplied_law(var/number, var/law) + laws_sanity_check() + laws.add_supplied_law(number, law) + +/mob/living/silicon/proc/clear_supplied_laws() + laws_sanity_check() + laws.clear_supplied_laws() + +/mob/living/silicon/proc/statelaws() // -- TLE + if(stating_laws) + src << "You are currently stating laws." + return + stating_laws = 1 + + var/prefix = "" + switch(lawchannel) + if(MAIN_CHANNEL) prefix = ";" // Apparently defines are not constant expressions? + if("Binary") prefix = ":b " + else + prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " " + + 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("[prefix]0. [src.laws.zeroth]") + sleep(10) + + for (var/index = 1, index <= src.laws.ion.len, index++) + var/law = src.laws.ion[index] + var/num = ionnum() + if (length(law) > 0) + if (src.ioncheck[index] == "Yes") + src.say("[prefix][num]. [law]") + sleep(10) + + for (var/index = 1, index <= src.laws.inherent.len, index++) + var/law = src.laws.inherent[index] + + if (length(law) > 0) + if (src.lawcheck[index+1] == "Yes") + 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("[prefix][number]. [law]") + sleep(10) + number++ + + stating_laws = 0 + +/mob/living/silicon/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite + var/list = "Which laws do you want to include when stating them for the crew?

" + + + if (src.laws.zeroth) + if (!src.lawcheck[1]) + src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite + list += {"[src.lawcheck[1]] 0: [src.laws.zeroth]
"} + + for (var/index = 1, index <= src.laws.ion.len, index++) + var/law = src.laws.ion[index] + + if (length(law) > 0) + + + if (!src.ioncheck[index]) + src.ioncheck[index] = "Yes" + list += {"[src.ioncheck[index]] [ionnum()]: [law]
"} + src.ioncheck.len += 1 + + var/number = 1 + for (var/index = 1, index <= src.laws.inherent.len, index++) + var/law = src.laws.inherent[index] + + if (length(law) > 0) + src.lawcheck.len += 1 + + if (!src.lawcheck[number+1]) + src.lawcheck[number+1] = "Yes" + list += {"[src.lawcheck[number+1]] [number]: [law]
"} + number++ + + for (var/index = 1, index <= src.laws.supplied.len, index++) + var/law = src.laws.supplied[index] + if (length(law) > 0) + src.lawcheck.len += 1 + if (!src.lawcheck[number+1]) + src.lawcheck[number+1] = "Yes" + list += {"[src.lawcheck[number+1]] [number]: [law]
"} + number++ + + list += {"
Channel: [src.lawchannel]
"} + list += {"State Laws"} + + usr << browse(list, "window=laws") diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index e5b273c060..4366b24fe9 100755 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -223,7 +223,7 @@ if(href_list["toggler"]) pda.toff = !pda.toff else if(href_list["ringer"]) - pda.silent = !pda.silent + pda.message_silent = !pda.message_silent else if(href_list["target"]) if(silence_time) return alert("Communications circuits remain uninitialized.") @@ -668,7 +668,7 @@ dat += {"Signal/Receiver Status: [(pda.toff) ? " \[Off\]" : " \[On\]"]
Ringer Status: - [(pda.silent) ? " \[Off\]" : " \[On\]"]

"} + [(pda.message_silent) ? " \[Off\]" : " \[On\]"]

"} dat += "
{{:helper.link('Notekeeper', 'note', {'choice' : "1"}, null, 'fixedLeftWide')}} - {{:helper.link('Messenger', data.newMessage ? 'mail-closed' : 'mail-open', {'choice' : "2"}, null, 'fixedLeftWide')}} + {{:helper.link('Messenger', data.new_Message ? 'mail-closed' : 'mail-open', {'choice' : "2"}, null, 'fixedLeftWide')}} {{:helper.link('Crew Manifest', 'contact', {'choice' : "41"}, null, 'fixedLeftWide')}} + {{:helper.link('News', data.new_News ? 'mail-closed' : 'mail-open', {'choice' : "6"}, null, 'fixedLeftWide')}}

@@ -207,7 +208,7 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm Messenger Functions:
- {{:helper.link(data.silent==1 ? 'Ringer: Off' : 'Ringer: On', data.silent==1 ? 'volume-off' : 'volume-on', {'choice' : "Toggle Ringer"}, null, 'fixedLeftWide')}} + {{:helper.link(data.message_silent==1 ? 'Ringer: Off' : 'Ringer: On', data.message_silent==1 ? 'volume-off' : 'volume-on', {'choice' : "Toggle Ringer"}, null, 'fixedLeftWide')}} {{:helper.link(data.toff==1 ? 'Messenger: Off' : 'Messenger: On',data.toff==1 ? 'close':'check', {'choice' : "Toggle Messenger"}, null, 'fixedLeftWide')}} {{:helper.link('Set Ringtone', 'comment', {'choice' : "Ringtone"}, null, 'fixedLeftWide')}} {{:helper.link('Delete all Conversations', 'trash', {'choice' : "Clear", 'option' : "All"}, null, 'fixedLeftWider')}} @@ -946,7 +947,61 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm ({{:value.x}} / {{:value.y}}) - {{:value.dir}} - Status: {{:value.status}}
{{/if}} {{/for}} + + {{else data.mode == 6}} +

InstaNews ED 2.0.9

+ +
+
+ Functions:
+
+ {{:helper.link(data.news_silent==1 ? 'Ringer: Off' : 'Ringer: On', data.news_silent==1 ? 'volume-off' : 'volume-on', {'choice' : "Toggle News"}, null, 'fixedLeftWide')}} + {{:helper.link('Set news tone', 'comment', {'choice' : "Newstone"}, null, 'fixedLeftWide')}} +
+
+ +
+
+ {{for data.feedChannels}} + {{if value.censored}} + {{:helper.link(value.name, 'circle-arrow-s', {'choice' : "Select Feed", 'feed' : value.feed, 'name' : value.name } , null, 'fixedLeftWiderRed')}} + {{else}} + {{:helper.link(value.name, 'circle-arrow-s', {'choice' : "Select Feed", 'feed' : value.feed, 'name' : value.name } , null, 'fixedLeftWider')}} + {{/if}} + {{empty}} + No active channels found... + {{/for}} +
+
+ + {{else data.mode == 61}} +

{{:data.feed.channel}}

+ Created by: {{:data.feed.author}} +
+
+
+ {{if data.feed.censored}} +

Attention

+ This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
+ No further feed story additions are allowed while the D-Notice is in effect.
+ {{else}} + {{for data.feed.messages}} + -{{:value.body}}
+ {{if value.has_image}} + pda_news_tmp_photo_{{:data.feed.channel}}_{{:value.index}}.png
+
+ {{/if}} + [{{:value.message_type}} by {{:value.author}}]
+
+ {{empty}} + No feed messages found in channel... + {{/for}} + {{/if}} +
+
+
+ {{/if}} {{else}}