| Name | Avg(s) | Last(s) | Highest(s) | Tickcount | Tickrate | State | Action |
| [data["name"]] | " + text += "[num2text(data["averageRunTime"]/10,3)] | " + text += "[num2text(data["lastRunTime"]/10,3)] | " + text += "[num2text(data["highestRunTime"]/10,3)] | " + text += "[num2text(data["ticks"],4)] | " + text += "[data["schedule"]] | " + text += "[data["status"]] | " + text += "" + if (data["disabled"]) + text += "" + else + text += "" + text += " | " + text += "
- NanoTrasen's reasons for the following directives are classified. -
- "} - - proc/meets_prerequisites() - return 0 - - proc/directives_complete() - return 1 - - proc/initialize() - return 1 - - proc/get_remaining_orders() - return "" - -/proc/get_directive(type) - var/datum/game_mode/mutiny/mode = get_mutiny_mode() - if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]"))) - return null - - return mode.current_directive diff --git a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm deleted file mode 100644 index 580322f8e1..0000000000 --- a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm +++ /dev/null @@ -1,41 +0,0 @@ -datum/directive/terminations/alien_fraud - special_orders = list( - "Suspend financial accounts of all Tajaran and Unathi personnel.", - "Transfer their payrolls to the station account.", - "Terminate their employment.") - - proc/is_alien(mob/M) - var/species = M.get_species() - return species == "Tajara" || species == "Unathi" - -datum/directive/terminations/alien_fraud/get_crew_to_terminate() - var/list/aliens[0] - for(var/mob/M in player_list) - if (M.is_ready() && is_alien(M) && M != mode.head_loyalist.current) - aliens.Add(M) - return aliens - -datum/directive/terminations/alien_fraud/get_description() - return {" -- An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered - operating within [system_name()]. Human personnel are not suspected to be involved. Further information is classified. -
- "} - -datum/directive/terminations/alien_fraud/meets_prerequisites() - // There must be at least one Tajaran and at least one Unathi, but the total - // of the Tajarans and Unathi combined can't be more than 1/3rd of the crew. - var/tajarans = 0 - var/unathi = 0 - for(var/mob/M in player_list) - var/species = M.get_species() - if(species == "Tajara") - tajarans++ - if(species == "Unathi") - unathi++ - - if (!tajarans || !unathi) - return 0 - - return (tajarans + unathi) <= (player_list.len / 3) diff --git a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm deleted file mode 100644 index 1ea28852fd..0000000000 --- a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm +++ /dev/null @@ -1,58 +0,0 @@ -#define INFECTION_COUNT 5 - -datum/directive/bluespace_contagion - var/list/infected = list() - - proc/get_infection_candidates() - var/list/candidates[0] - for(var/mob/M in player_list) - if (M.is_ready() && !M.is_mechanical() && M != mode.head_loyalist.current) - candidates.Add(M) - return candidates - -datum/directive/bluespace_contagion/get_description() - return {" -- A manufactured and near-undetectable virus is spreading on NanoTrasen stations. - The pathogen travels by bluespace after maturing for one day and meets the Sol Health Organisation standards for a class X biological threat, warranting use of lethal force to contain an outbreak. - No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified. -
- "} - -datum/directive/bluespace_contagion/initialize() - var/list/candidates = get_infection_candidates() - var/list/infected_names = list() - for(var/i=0, i < INFECTION_COUNT, i++) - if(!candidates.len) - break - - var/mob/candidate = pick(candidates) - candidates.Remove(candidate) - infected.Add(candidate) - infected_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]") - - special_orders = list( - "Quarantine these personnel: [list2text(infected_names, ", ")].", - "Allow one hour for a cure to be manufactured.", - "If no cure arrives after that time, execute and burn the infected.") - -datum/directive/bluespace_contagion/meets_prerequisites() - var/list/candidates = get_infection_candidates() - return candidates.len >= 7 - -datum/directive/bluespace_contagion/directives_complete() - return infected.len == 0 - -datum/directive/bluespace_contagion/get_remaining_orders() - var/text = "" - for(var/victim in infected) - text += "- [system_name()] system banks in financial crisis. Local emergency situation ongoing. - NT Funds redistributed in accordance with financial regulations covered by employee contracts, impact upon civilian department expected. - Further information is classified. -
- "} - -datum/directive/terminations/financial_crisis/meets_prerequisites() - var/list/civilians = get_crew_to_terminate() - return civilians.len >= 5 diff --git a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm b/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm deleted file mode 100644 index e035b665c9..0000000000 --- a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm +++ /dev/null @@ -1,96 +0,0 @@ -datum/directive/ipc_virus - special_orders = list( - "Terminate employment of all IPC personnel.", - "Extract the Positronic Brains from IPC units.", - "Mount the Positronic Brains into Cyborgs.") - - var/list/roboticist_roles = list( - "Research Director", - "Roboticist" - ) - - var/list/brains_to_enslave = list() - var/list/cyborgs_to_make = list() - var/list/ids_to_terminate = list() - - proc/get_ipcs() - var/list/machines[0] - for(var/mob/M in player_list) - if (M.is_ready() && M.get_species() == "Machine") - machines.Add(M) - return machines - - proc/get_roboticists() - var/list/roboticists[0] - for(var/mob/M in player_list) - if (M.is_ready() && roboticist_roles.Find(M.mind.assigned_role)) - roboticists.Add(M) - return roboticists - -datum/directive/ipc_virus/initialize() - for(var/mob/living/carbon/human/H in get_ipcs()) - brains_to_enslave.Add(H.mind) - cyborgs_to_make.Add(H.mind) - ids_to_terminate.Add(H.wear_id) - -datum/directive/ipc_virus/get_description() - return {" -- IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system. - Risk to [station_name()] IPC units has not been assessed. Further information is classified. -
- "} - -datum/directive/ipc_virus/meets_prerequisites() - var/list/ipcs = get_ipcs() - var/list/roboticists = get_roboticists() - return ipcs.len > 2 && roboticists.len > 1 - -datum/directive/ipc_virus/directives_complete() - return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0 - -datum/directive/ipc_virus/get_remaining_orders() - var/text = "" - for(var/brain in brains_to_enslave) - text += "- The NanoTrasen [system_name()] Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform. - The Research Director is to assist the Head of Personnel in coordinating assets. - Weapons department reports solid sales. Further information is classified. -
- "} - -datum/directive/research_to_ripleys/meets_prerequisites() - var/list/researchers = get_researchers() - return researchers.len > 3 - -datum/directive/research_to_ripleys/initialize() - for(var/mob/living/carbon/human/R in get_researchers()) - ids_to_reassign[R.wear_id] = 0 - - special_orders = list( - "Reassign all research personnel, excluding the Research Director, to Shaft Miner.", - "Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentCom.") - -datum/directive/research_to_ripleys/directives_complete() - if (materials_shipped < MATERIALS_REQUIRED) return 0 - return count_researchers_reassigned() == ids_to_reassign.len - -datum/directive/research_to_ripleys/get_remaining_orders() - var/text = "" - if(MATERIALS_REQUIRED > materials_shipped) - text += "- Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from [system_name()]. - Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified. -
- "} - -datum/directive/tau_ceti_needs_women/initialize() - for(var/mob/living/carbon/human/H in get_target_heads()) - command_targets[H.wear_id] = 0 - - for(var/mob/living/carbon/human/H in get_target_aliens()) - alien_targets.Add(H.wear_id) - - special_orders = list( - "Remove [get_target_gender()] personnel from Command positions.", - "Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.") - -datum/directive/tau_ceti_needs_women/meets_prerequisites() - var/females = 0 - var/males = 0 - for(var/mob/M in player_list) - if(M.is_ready() && !M.is_mechanical() && M.get_species() != "Diona") - var/gender = M.get_gender() - if(gender == MALE) - males++ - else if(gender == FEMALE) - females++ - - return males >= 2 && females >= 2 - -datum/directive/tau_ceti_needs_women/directives_complete() - return command_targets.len == count_heads_reassigned() && alien_targets.len == 0 - -datum/directive/tau_ceti_needs_women/get_remaining_orders() - var/text = "" - for(var/head in command_targets) - if(!command_targets[head]) - text += "- Wow. Much ugly. So painful. - Many terminations. Very classified. -
- "} - -datum/directive/terminations/test/meets_prerequisites() - return 1 diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm deleted file mode 100644 index 028c4113cc..0000000000 --- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm +++ /dev/null @@ -1,104 +0,0 @@ -/obj/machinery/emergency_authentication_device - var/datum/game_mode/mutiny/mode - - name = "\improper Emergency Authentication Device" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "blackbox" - density = 1 - anchored = 1 - - var/captains_key - var/secondary_key - var/activated = 0 - - use_power = 0 - - New(loc, mode) - src.mode = mode - ..(loc) - - proc/check_key_existence() - if(!mode.captains_key) - captains_key = 1 - - if(!mode.secondary_key) - secondary_key = 1 - - proc/get_status() - if(activated) - return "Activated" - if(captains_key && secondary_key) - return "Both Keys Authenticated" - if(captains_key) - return "Captain's Key Authenticated" - if(secondary_key) - return "Secondary Key Authenticated" - else - return "Inactive" - -/obj/machinery/emergency_authentication_device/attack_hand(mob/user) - if(activated) - user << "\blue \The [src] is already active!" - return - - if(!mode.current_directive.directives_complete()) - state("Command aborted. Communication with CentCom is prohibited until Directive X has been completed.") - return - - check_key_existence() - if(captains_key && secondary_key) - activated = 1 - user << "\blue You activate \the [src]!" - state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.") - return - - if(!captains_key && !secondary_key) - state("Command aborted. Please present the authentication keys before proceeding.") - return - - if(!captains_key) - state("Command aborted. Please present the Captain's Authentication Key.") - return - - if(!secondary_key) - state("Command aborted. Please present the Emergency Secondary Authentication Key.") - return - - // Impossible! - state("Command aborted. This unit is defective.") - -/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user) - if(activated) - user << "\blue \The [src] is already active!" - return - - if(!mode.current_directive.directives_complete()) - state({"Command aborted. Communication with CentCom is prohibited until Directive X has been completed."}) - return - - check_key_existence() - if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key) - captains_key = O - user.drop_item() - O.loc = src - - state("Key received. Thank you, Captain [mode.head_loyalist].") - spawn(5) - state(secondary_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Emergency Secondary Authentication Key now.") - return - - if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key) - secondary_key = O - user.drop_item() - O.loc = src - - state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].") - spawn(5) - state(captains_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Captain's Authentication Key now.") - return - ..() - -/obj/machinery/emergency_authentication_device/examine(mob/user) - user << {" -This is a specialized communications device that is able to instantly send a message to NanoTrasen High Command via quantum entanglement with a sister device at CentCom. -The EAD's status is [get_status()]."} diff --git a/code/game/gamemodes/mutiny/key_pinpointer.dm b/code/game/gamemodes/mutiny/key_pinpointer.dm deleted file mode 100644 index 7e8d628d85..0000000000 --- a/code/game/gamemodes/mutiny/key_pinpointer.dm +++ /dev/null @@ -1,49 +0,0 @@ -/obj/item/weapon/pinpointer/advpinpointer/auth_key - name = "\improper Authentication Key Pinpointer" - desc = "Tracks the positions of the emergency authentication keys." - var/datum/game_mode/mutiny/mutiny - - New() - mutiny = ticker.mode - ..() - -/obj/item/weapon/pinpointer/advpinpointer/auth_key/attack_self() - switch(mode) - if (0) - mode = 1 - active = 1 - target = mutiny.captains_key - workobj() - usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key." - if (1) - mode = 2 - target = mutiny.secondary_key - usr << "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key." - else - mode = 0 - active = 0 - icon_state = "pinoff" - usr << "\blue You switch \the [src] off." - -/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user) - switch(mode) - if (1) - user << "Is is calibrated for the Captain's Authentication Key." - if (2) - user << "It is calibrated for the Emergency Secondary Authentication Key." - else - user << "It is switched off." - -/datum/supply_packs/key_pinpointer - name = "Authentication Key Pinpointer crate" - contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key) - cost = 250 - containertype = /obj/structure/closet/crate - containername = "Authentication Key Pinpointer crate" - access = access_heads - group = "Operations" - - New() - // This crate is only accessible during mutiny rounds - if (istype(ticker.mode,/datum/game_mode/mutiny)) - ..() diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm deleted file mode 100644 index 78e16e50a4..0000000000 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ /dev/null @@ -1,384 +0,0 @@ -#define MUTINY_RECRUITMENT_COOLDOWN 5 - -datum/game_mode/mutiny - var/datum/mutiny_fluff/fluff - var/datum/directive/current_directive - var/obj/item/weapon/mutiny/auth_key/captain/captains_key - var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key - var/obj/machinery/emergency_authentication_device/ead - var/datum/mind/head_loyalist - var/datum/mind/head_mutineer - var/recruit_loyalist_cooldown = 0 - var/recruit_mutineer_cooldown = 0 - var/list/loyalists = list() - var/list/mutineers = list() - var/list/body_count = list() - - name = "mutiny" - config_tag = "mutiny" - required_players = 7 - ert_disabled = 1 - - uplink_welcome = "Mutineers Uplink Console:" - uplink_uses = 0 - - New() - fluff = new(src) - - proc/reveal_directives() - spawn(rand(1 MINUTE, 3 MINUTES)) - command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") - spawn(rand(3 MINUTES, 5 MINUTES)) - send_pda_message() - spawn(rand(3 MINUTES, 5 MINUTES)) - fluff.announce_directives() - spawn(rand(2 MINUTES, 3 MINUTE)) - - var/list/reasons = list( - "political instability", - "quantum fluctuations", - "hostile raiders", - "derelict station debris", - "REDACTED", - "ancient alien artillery", - "solar magnetic storms", - "sentient time-travelling killbots", - "gravitational anomalies", - "wormholes to another dimension", - "a telescience mishap", - "radiation flares", - "supermatter dust", - "leaks into a negative reality", - "antiparticle clouds", - "residual bluespace energy", - "suspected criminal operatives", - "malfunctioning von Neumann probe swarms", - "shadowy interlopers", - "a stranded Vox arkship", - "haywire IPC constructs", - "rogue Unathi exiles", - "artifacts of eldritch horror", - "a brain slug infestation", - "killer bugs that lay eggs in the husks of the living", - "a deserted transport carrying xenomorph specimens", - "an emissary for the gestalt requesting a security detail", - "a Tajaran slave rebellion", - "radical Skrellian transevolutionaries", - "classified security operations", - "science-defying raw elemental chaos" - ) - command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") - - // Returns an array in case we want to expand on this later. - proc/get_head_loyalist_candidates() - var/list/candidates[0] - for(var/mob/loyalist in player_list) - if(loyalist.mind && loyalist.mind.assigned_role == "Captain") - candidates.Add(loyalist.mind) - return candidates - - proc/get_head_mutineer_candidates() - var/list/candidates[0] - for(var/mob/mutineer in player_list) - if(mutineer.client.prefs.be_special & BE_MUTINEER) - for(var/job in command_positions - "Captain") - if(mutineer.mind && mutineer.mind.assigned_role == job) - candidates.Add(mutineer.mind) - return candidates - - proc/get_directive_candidates() - var/list/candidates[0] - for(var/T in typesof(/datum/directive) - /datum/directive) - var/datum/directive/D = new T(src) - if (D.meets_prerequisites()) - candidates.Add(D) - return candidates - - proc/send_pda_message() - var/obj/item/device/pda/pda = null - for(var/obj/item/device/pda/P in head_mutineer.current) - pda = P - break - - if (!pda) - return 0 - - 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]*")) - - head_mutineer.current << fluff.get_pda_body() - return 1 - - proc/get_equipment_slots() - return list( - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "backpack" = slot_in_backpack, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand) - - proc/equip_head_loyalist() - equip_head(head_loyalist, "loyalist", /mob/living/carbon/human/proc/recruit_loyalist) - - proc/equip_head_mutineer() - equip_head(head_mutineer, "mutineer", /mob/living/carbon/human/proc/recruit_mutineer) - - proc/equip_head(datum/mind/head, faction, proc/recruitment_verb) - var/mob/living/carbon/human/H = head.current - H << "You are the Head [capitalize(faction)]!" - head.special_role = "head_[faction]" - - var/slots = get_equipment_slots() - switch(faction) - if("loyalist") - if(captains_key) del(captains_key) - captains_key = new(H) - H.equip_in_one_of_slots(captains_key, slots) - if("mutineer") - if(secondary_key) del(secondary_key) - secondary_key = new(H) - H.equip_in_one_of_slots(secondary_key, slots) - - H.update_icons() - H.verbs += recruitment_verb - - proc/add_loyalist(datum/mind/M) - add_faction(M, "loyalist", loyalists) - - proc/add_mutineer(datum/mind/M) - add_faction(M, "mutineer", mutineers) - - proc/add_faction(datum/mind/M, faction, list/faction_list) - if(!can_be_recruited(M, faction)) - M.current << "\red Recruitment canceled; your role has already changed." - head_mutineer.current << "\red Could not recruit [M]. Their role has changed." - return - - if(M in loyalists) - loyalists.Remove(M) - - if(M in mutineers) - mutineers.Remove(M) - - M.special_role = faction - faction_list.Add(M) - - if(faction == "mutineer") - M.current << fluff.mutineer_tag("You have joined the mutineers!") - head_mutineer.current << fluff.mutineer_tag("[M] has joined the mutineers!") - else - M.current << fluff.loyalist_tag("You have joined the loyalists!") - head_loyalist.current << fluff.loyalist_tag("[M] has joined the loyalists!") - - update_icon(M) - - proc/was_bloodbath() - var/list/remaining_loyalists = loyalists - body_count - if (!remaining_loyalists.len) - return 1 - - var/list/remaining_mutineers = mutineers - body_count - if (!remaining_mutineers.len) - return 1 - - return 0 - - proc/replace_nuke_with_ead() - for(var/obj/machinery/nuclearbomb/N in world) - ead = new(N.loc, src) - del(N) - - proc/unbolt_vault_door() - var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault) - vault.lock() - - proc/make_secret_transcript() - var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server) - if(!S) return - - var/obj/item/weapon/paper/crumpled/bloody/transcript = new(S.loc) - transcript.name = "secret transcript" - transcript.info = fluff.secret_transcript() - - proc/can_be_recruited(datum/mind/M, role) - if(!M) return 0 - if(!M.special_role) return 1 - switch(role) - if("loyalist") - return M.special_role == "mutineer" - if("mutineer") - return M.special_role == "loyalist" - - proc/round_outcome() - world << "- [current_directive.get_description()] -
-
- TO: Captain [mode.head_loyalist], Commanding Officer, [station_name()]
- FROM: NanoTrasen Emergency Messaging Relay
- DATE: [time2text(world.realtime, "MM/DD")]/[game_year]
- SUBJECT: Directive X
-
- A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.
- This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.
- As Captain, you possess the Captain's Authentication Key.
- The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.
- An Authentication Key Pinpointer can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.
- A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
-
- Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X: -
-\"You must read this! NanoTrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION! - -They don't care about us they only care about WEALTH and POWER... Share this message with people you trust. - -Be safe, friend.\" (Unable to Reply)
"} - - proc/announce() - world << "The current game mode is - Mutiny!" - world << {" -The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.
-The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.
-The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].
-Loyalists - Follow the Head Loyalist in carrying out [loyalist_tag("NanoTrasen's directives")] then activate the EAD.
-Mutineers - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the EAD.
-
NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/loyalist_minor_victory() - return {" -NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -Despite the mutiny, the crew was successful in implementing the directive. Unfortunately, they failed to notify Central Command of their successes due to a breach in the chain of command. -[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration. -NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their mostly successful efforts, at a ceremony this coming Thursday. -[mode.body_count.len] are believed to have died during the coup. -NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/no_victory() - return {" -NanoTrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -No further information has yet emerged from the station or its crew, who are presumed to be in holding with NanoTrasen investigators. -NanoTrasen officials refuse to comment. -Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for terrorist activity, and [mode.loyalists.len] crew are currently providing evidence to investigators, believed to be the 'loyal' station personnel. -[mode.body_count.len] are believed to have died during the coup. -NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "} - - proc/mutineer_minor_victory() - return {" -Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the [station_name()], a research station in [system_name()]. -The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -Information at present indicates that the top-secret directive--which has since been retracted--was invalid due to a broken authentication code. Members of the crew, including an unidentified Head of Staff, prevented the directive from being accomplished. -[mode.mutineers.len] members of the station's personnel were released from interrogations today, following a mutiny investigation. -NanoTrasen has reprimanded [mode.loyalists.len] members of the crew for failing to follow command validation procedures. -[mode.body_count.len] are believed to have died during the coup. -Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "} - - proc/mutineer_major_victory() - return {" -NanoTrasen has praised the efforts of [mode.head_mutineer.assigned_role] [mode.head_mutineer] and several other members of the crew, who recently seized control of a company station in [system_name()]--[station_name()]--amid a local interstellar crisis. -What appears to have been a "legitimate" mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system. -It has been revealed that the directive was invalid and fraudulent. Company officials have not released a statement about the source of the directive. -Thanks to the efforts of the resistant members of the crew, the directive was not carried out. -[mode.mutineers.len] members of the station's personnel were congratulated and awarded with the [mutineer_tag("Star of Bravery")], for their efforts in preventing the illegal directive's completion. -NanoTrasen has [mode.loyalists.len] members of the crew in holding, while it investigates the circumstances that led to the acceptance and initiation of an invalid directive. -[mode.body_count.len] are believed to have died during the coup. -Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "} - - proc/secret_transcript() - return {" -| Name: [active1.fields["name"]] \
ID: [active1.fields["id"]] \n \ Sex: [active1.fields["sex"]] \n \ diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 80437066a7..a9858742c9 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -3,7 +3,7 @@ /obj/machinery/atmospherics/unary/cryo_cell name = "cryo cell" icon = 'icons/obj/cryogenics.dmi' - icon_state = "cell-off" + icon_state = "pod0" density = 1 anchored = 1.0 layer = 2.8 @@ -24,6 +24,11 @@ ..() initialize_directions = dir +/obj/machinery/atmospherics/unary/cryo_cell/Del() + if(occupant) + occupant.loc = loc + ..() + /obj/machinery/atmospherics/unary/cryo_cell/initialize() if(node) return var/node_connect = dir @@ -37,7 +42,6 @@ if(!node) return if(!on) - updateUsrDialog() return if(occupant) @@ -52,7 +56,6 @@ if(abs(temperature_archived-air_contents.temperature) > 1) network.update = 1 - updateUsrDialog() return 1 @@ -188,17 +191,17 @@ var/mob/M = G:affecting if(put_mob(M)) del(G) - updateUsrDialog() return /obj/machinery/atmospherics/unary/cryo_cell/update_icon() - if(on) - if(occupant) - icon_state = "cell-occupied" - return - icon_state = "cell-on" - return - icon_state = "cell-off" + overlays.Cut() + icon_state = "pod[on]" + if(occupant) + var/image/pickle = image(occupant.icon, occupant.icon_state) + pickle.overlays = occupant.overlays + pickle.pixel_y = 20 + overlays += pickle + overlays += "lid[on]" /obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant() if(air_contents.total_moles < 10) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 381a9790fb..c6c5b922b9 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -234,6 +234,12 @@ ..() +/obj/machinery/cryopod/Del() + if(occupant) + occupant.loc = loc + occupant.resting = 1 + ..() + /obj/machinery/cryopod/initialize() ..() @@ -357,10 +363,10 @@ if(occupant.mind.objectives.len) del(occupant.mind.objectives) occupant.mind.special_role = null - else - if(ticker.mode.name == "AutoTraitor") - var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode - current_mode.possible_traitors.Remove(occupant) + //else + //if(ticker.mode.name == "AutoTraitor") + //var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode + //current_mode.possible_traitors.Remove(occupant) // Delete them from datacore. @@ -390,12 +396,11 @@ control_computer.frozen_crew += "[occupant.real_name]" announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") - visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.", 3) + visible_message("\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.", 3) + set_occupant(null) // Delete the mob. del(occupant) - occupant = null - name = initial(name) /obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob) @@ -442,7 +447,7 @@ M << "[on_enter_occupant_message]" M << "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." - occupant = M + set_occupant(M) time_entered = world.time // Book keeping! @@ -511,7 +516,7 @@ usr.client.perspective = EYE_PERSPECTIVE usr.client.eye = src usr.loc = src - src.occupant = usr + set_occupant(usr) if(orient_right) icon_state = "[occupied_icon_state]-r" @@ -520,11 +525,10 @@ usr << "[on_enter_occupant_message]" usr << "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." - occupant = usr + time_entered = world.time src.add_fingerprint(usr) - name = "[name] ([usr.name])" return @@ -538,7 +542,7 @@ occupant.client.perspective = MOB_PERSPECTIVE occupant.loc = get_turf(src) - occupant = null + set_occupant(null) if(orient_right) icon_state = "[base_icon_state]-r" @@ -547,6 +551,12 @@ return +/obj/machinery/cryopod/proc/set_occupant(var/occupant) + src.occupant = occupant + name = initial(name) + if(occupant) + name = "[name] ([occupant])" + //Attacks/effects. /obj/machinery/cryopod/blob_act() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 8942f8434e..928dda2541 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -34,6 +34,7 @@ idle_power_usage = 2 active_power_usage = 4 + /obj/machinery/door_control/attack_ai(mob/user as mob) if(wires & 2) return src.attack_hand(user) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index cce9a1af0d..5d7cdbd671 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -844,19 +844,20 @@ About the new airlock wires panel: return 0 return ..() -/obj/machinery/door/airlock/can_close(var/forced) +/obj/machinery/door/airlock/can_close() if(locked || welded) return 0 - if(!forced) - //despite the name, this wire is for general door control. - //Bolts are already covered by the check for locked, above - if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR)) - return 0 return ..() /obj/machinery/door/airlock/close(var/forced=0) - if(!can_close(forced)) - return + if(!can_close()) + return 0 + + if(!forced) + //despite the name, this wire is for general door control. + //Bolts are already covered by the check for locked in can_close() + if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR)) + return 0 if(safe) for(var/turf/turf in locs) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index f3597c934f..4f480e41ea 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -88,10 +88,10 @@ return 0 return 1 -/obj/machinery/door/proc/can_close(var/forced = 0) - if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER)))) - return 1 - return 0 +/obj/machinery/door/proc/can_close() + if(density || operating || !ticker) + return 0 + return 1 /obj/machinery/door/Bumped(atom/AM) if(p_open || operating) return @@ -141,9 +141,6 @@ if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit return src.add_fingerprint(user) - if(!src.requiresID()) - user = null - if(density) if(allowed(user)) open() else do_animate("deny") @@ -208,10 +205,6 @@ return if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them. src.add_fingerprint(user) - if(!Adjacent(user)) - user = null - if(!src.requiresID()) - user = null if(istype(I, /obj/item/stack/sheet/metal)) if(stat & BROKEN) @@ -437,6 +430,11 @@ /obj/machinery/door/proc/requiresID() return 1 +/obj/machinery/door/allowed(mob/M) + if(!requiresID()) + return ..(null) //don't care who they are or what they have, act as if they're NOTHING + return ..(M) + /obj/machinery/door/update_nearby_tiles(need_rebuild) if(!air_master) return 0 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 8799273b93..9ae8751a7a 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -22,7 +22,7 @@ open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed - //These are frequenly used with windows, so make sure zones can pass. + //These are frequenly used with windows, so make sure zones can pass. //Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it. block_air_zones = 0 @@ -149,7 +149,7 @@ "\The [src]", "Yes, [density ? "open" : "close"]", "No") if(answer == "No") return - if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user))) + if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !user.isSilicon()) || (get_dist(src, user) > 1 && !isAI(user))) user << "Sorry, you must remain able bodied and close to \the [src] in order to use it." return if(density && (stat & (BROKEN|NOPOWER))) //can still close without power @@ -169,7 +169,7 @@ if(alarmed) // Accountability! users_to_open |= user.name - needs_to_close = 1 + needs_to_close = !user.isSilicon() spawn() open() else @@ -272,7 +272,7 @@ spawn(0) close() return - + return ..() // CHECK PRESSURE diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index eefe844e47..362753cac8 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -234,9 +234,6 @@ src.add_fingerprint(user) - if (!src.requiresID()) - //don't care who they are or what they have, act as if they're NOTHING - user = null if (src.allowed(user)) if (src.density) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index c6744ef96a..dbe7f1b8a7 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -13,9 +13,6 @@ var/list/doppler_arrays = list() doppler_arrays -= src ..() -/obj/machinery/doppler_array/process() - return PROCESS_KILL - /obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took) if(stat & NOPOWER) return if(z != z0) return diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 05279b2c2c..1a47ae81fd 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -12,6 +12,8 @@ var/strength = 10 //How weakened targets are when flashed. var/base_state = "mflash" anchored = 1 + use_power = 1 + idle_power_usage = 2 /obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored name = "portable flasher" @@ -133,7 +135,7 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/flasher/M in world) + for(var/obj/machinery/flasher/M in machines) if(M.id == src.id) spawn() M.flash() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 222975316f..e51025aee2 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -5,7 +5,9 @@ icon = 'icons/obj/holosign.dmi' icon_state = "sign_off" layer = 4 + use_power = 1 idle_power_usage = 2 + active_power_usage = 4 var/lit = 0 var/id = null var/on_icon = "sign_on" @@ -14,12 +16,9 @@ if (stat & (BROKEN|NOPOWER)) return lit = !lit - use_power = lit ? 1 : 0 + use_power = lit ? 2 : 1 update_icon() -/obj/machinery/holosign/process() - return - /obj/machinery/holosign/update_icon() if (!lit) icon_state = "sign_off" diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index a9be665022..50dc4e10b2 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -53,6 +53,10 @@ var/last_spark = 0 var/base_state = "migniter" anchored = 1 + use_power = 1 + idle_power_usage = 2 + active_power_usage = 4 + /obj/machinery/sparker/New() ..() @@ -129,12 +133,12 @@ active = 1 icon_state = "launcheract" - for(var/obj/machinery/sparker/M in world) + for(var/obj/machinery/sparker/M in machines) if (M.id == src.id) spawn( 0 ) M.ignite() - for(var/obj/machinery/igniter/M in world) + for(var/obj/machinery/igniter/M in machines) if(M.id == src.id) use_power(50) M.on = !( M.on ) diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index a268904972..972f51bd48 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -16,6 +16,9 @@ datum/track/New(var/title_name, var/audio) anchored = 1 density = 1 power_channel = EQUIP + use_power = 1 + idle_power_usage = 10 + active_power_usage = 100 var/playing = 0 @@ -32,6 +35,7 @@ datum/track/New(var/title_name, var/audio) new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), ) + /obj/machinery/media/jukebox/Del() StopPlaying() ..() @@ -190,6 +194,7 @@ datum/track/New(var/title_name, var/audio) related_area.forced_ambience = null playing = 0 + update_use_power(1) update_icon() @@ -207,4 +212,5 @@ datum/track/New(var/title_name, var/audio) related_area.play_ambience(related_area) playing = 1 + update_use_power(2) update_icon() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 042889157a..5a4e6d7255 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -126,7 +126,10 @@ Class Procs: ..() /obj/machinery/process()//If you dont use process or power why are you here - return PROCESS_KILL + if(!(use_power || idle_power_usage || active_power_usage)) + return PROCESS_KILL + + return /obj/machinery/emp_act(severity) if(use_power && stat == 0) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 036edb8730..b67bc17986 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -16,27 +16,27 @@ var/drive_range = 50 //this is mostly irrelevant since current mass drivers throw into space, but you could make a lower-range mass driver for interstation transport or something I guess. - proc/drive(amount) - if(stat & (BROKEN|NOPOWER)) - return - use_power(500) - var/O_limit - var/atom/target = get_edge_target_turf(src, dir) - for(var/atom/movable/O in loc) - if(!O.anchored||istype(O, /obj/mecha))//Mechs need their launch platforms. - O_limit++ - if(O_limit >= 20) - for(var/mob/M in hearers(src, null)) - M << "\blue The mass driver lets out a screech, it mustn't be able to handle any more items." - break - use_power(500) - spawn( 0 ) - O.throw_at(target, drive_range * power, power) - flick("mass_driver1", src) +/obj/machinery/mass_driver/proc/drive(amount) + if(stat & (BROKEN|NOPOWER)) return + use_power(500) + var/O_limit + var/atom/target = get_edge_target_turf(src, dir) + for(var/atom/movable/O in loc) + if(!O.anchored||istype(O, /obj/mecha))//Mechs need their launch platforms. + O_limit++ + if(O_limit >= 20) + for(var/mob/M in hearers(src, null)) + M << "\blue The mass driver lets out a screech, it mustn't be able to handle any more items." + break + use_power(500) + spawn( 0 ) + O.throw_at(target, drive_range * power, power) + flick("mass_driver1", src) + return - emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - return - drive() - ..(severity) \ No newline at end of file +/obj/machinery/mass_driver/emp_act(severity) + if(stat & (BROKEN|NOPOWER)) + return + drive() + ..(severity) \ No newline at end of file diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/machinery/nuclear_bomb.dm similarity index 96% rename from code/game/gamemodes/nuclear/nuclearbomb.dm rename to code/game/machinery/nuclear_bomb.dm index e73fbf6880..d13f18c3e9 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -1,434 +1,431 @@ -var/bomb_set - -/obj/machinery/nuclearbomb - name = "\improper Nuclear Fission Explosive" - desc = "Uh oh. RUN!!!!" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "nuclearbomb0" - density = 1 - var/deployable = 0.0 - var/extended = 0.0 - var/lighthack = 0 - var/opened = 0.0 - var/timeleft = 60.0 - var/timing = 0.0 - var/r_code = "ADMIN" - var/code = "" - var/yes_code = 0.0 - var/safety = 1.0 - var/obj/item/weapon/disk/nuclear/auth = null - var/list/wires = list() - var/light_wire - var/safety_wire - var/timing_wire - var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, - // 3 is sealant open, 4 is unwrenched, 5 is removed from bolts. - use_power = 0 - - - -/obj/machinery/nuclearbomb/New() - ..() - r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn. - - src.wires["Red"] = 0 - src.wires["Blue"] = 0 - src.wires["Green"] = 0 - src.wires["Marigold"] = 0 - src.wires["Fuschia"] = 0 - src.wires["Black"] = 0 - src.wires["Pearl"] = 0 - var/list/w = list("Red","Blue","Green","Marigold","Black","Fuschia","Pearl") - src.light_wire = pick(w) - w -= src.light_wire - src.timing_wire = pick(w) - w -= src.timing_wire - src.safety_wire = pick(w) - w -= src.safety_wire - -/obj/machinery/nuclearbomb/process() - if (src.timing) - bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed. - src.timeleft-- - if (src.timeleft <= 0) - explode() - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.attack_hand(M) - return - -/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob) - - if (istype(O, /obj/item/weapon/screwdriver)) - src.add_fingerprint(user) - if (src.auth) - if (src.opened == 0) - src.opened = 1 - overlays += image(icon, "npanel_open") - user << "You unscrew the control panel of [src]." - - else - src.opened = 0 - overlays -= image(icon, "npanel_open") - user << "You screw the control panel of [src] back on." - else - if (src.opened == 0) - user << "The [src] emits a buzzing noise, the panel staying locked in." - if (src.opened == 1) - src.opened = 0 - overlays -= image(icon, "npanel_open") - user << "You screw the control panel of [src] back on." - flick("nuclearbombc", src) - - return - if (istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/device/multitool)) - if (src.opened == 1) - nukehack_win(user) - return - - if (src.extended) - if (istype(O, /obj/item/weapon/disk/nuclear)) - usr.drop_item() - O.loc = src - src.auth = O - src.add_fingerprint(user) - return - - if (src.anchored) - switch(removal_stage) - if(0) - if(istype(O,/obj/item/weapon/weldingtool)) - - var/obj/item/weapon/weldingtool/WT = O - if(!WT.isOn()) return - if (WT.get_fuel() < 5) // uses up 5 fuel. - user << "\red You need more fuel to complete this task." - return - - user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...") - - if(do_after(user,40)) - if(!src || !user || !WT.remove_fuel(5, user)) return - user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.") - removal_stage = 1 - return - - if(1) - if(istype(O,/obj/item/weapon/crowbar)) - user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...") - - if(do_after(user,15)) - if(!src || !user) return - user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.") - removal_stage = 2 - return - - if(2) - if(istype(O,/obj/item/weapon/weldingtool)) - - var/obj/item/weapon/weldingtool/WT = O - if(!WT.isOn()) return - if (WT.get_fuel() < 5) // uses up 5 fuel. - user << "\red You need more fuel to complete this task." - return - - user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...") - - if(do_after(user,40)) - if(!src || !user || !WT.remove_fuel(5, user)) return - user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.") - removal_stage = 3 - return - - if(3) - if(istype(O,/obj/item/weapon/wrench)) - - user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...") - - if(do_after(user,50)) - if(!src || !user) return - user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.") - removal_stage = 4 - return - - if(4) - if(istype(O,/obj/item/weapon/crowbar)) - - user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...") - - if(do_after(user,80)) - if(!src || !user) return - user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!") - anchored = 0 - removal_stage = 5 - return - ..() - -/obj/machinery/nuclearbomb/attack_hand(mob/user as mob) - if (src.extended) - if (!ishuman(user)) - usr << "\red You don't have the dexterity to do this!" - return 1 - - if (!ishuman(user)) - usr << "\red You don't have the dexterity to do this!" - return 1 - user.set_machine(src) - var/dat = text("Nuclear Fission Explosive \nAuth. Disk: [] ", src, (src.auth ? "++++++++++" : "----------")) - if (src.auth) - if (src.yes_code) - dat += text("\nStatus: []-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src) - else - dat += text("\nStatus: Auth. S2-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \n[] Safety: Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - else - if (src.timing) - dat += text("\nStatus: Set-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - else - dat += text("\nStatus: Auth. S1-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) - var/message = "AUTH" - if (src.auth) - message = text("[]", src.code) - if (src.yes_code) - message = "*****" - dat += text(" \n>[] \n1-2-3 \n4-5-6 \n7-8-9 \nR-0-E \n", message, src, src, src, src, src, src, src, src, src, src, src, src) - user << browse(dat, "window=nuclearbomb;size=300x400") - onclose(user, "nuclearbomb") - else if (src.deployable) - if(removal_stage < 5) - src.anchored = 1 - visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!") - else - visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") - if(!src.lighthack) - flick("nuclearbombc", src) - src.icon_state = "nuclearbomb1" - src.extended = 1 - return - -obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) - var/dat as text - dat += "Nuclear Fission Explosive \nNuclear Device Wires: " - for(var/wire in src.wires) - dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse ") - dat += text(" The device is [src.timing ? "shaking!" : "still"] ") - dat += text("The device is [src.safety ? "quiet" : "whirring"]. ") - dat += text("The lights are [src.lighthack ? "static" : "functional"]. ") - user << browse(" \nAuth. Disk: [] ", src, (src.auth ? "++++++++++" : "----------")) + if (src.auth) + if (src.yes_code) + dat += text("\nStatus: []-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src) + else + dat += text("\nStatus: Auth. S2-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \n[] Safety: Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + else + if (src.timing) + dat += text("\nStatus: Set-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + else + dat += text("\nStatus: Auth. S1-[] \nTimer: [] \n \nTimer: [] Toggle \nTime: - - [] + + \n \nSafety: [] Toggle \nAnchor: [] Toggle \n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + var/message = "AUTH" + if (src.auth) + message = text("[]", src.code) + if (src.yes_code) + message = "*****" + dat += text(" \n>[] \n1-2-3 \n4-5-6 \n7-8-9 \nR-0-E \n", message, src, src, src, src, src, src, src, src, src, src, src, src) + user << browse(dat, "window=nuclearbomb;size=300x400") + onclose(user, "nuclearbomb") + else if (src.deployable) + if(removal_stage < 5) + src.anchored = 1 + visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!") + else + visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") + if(!src.lighthack) + flick("nuclearbombc", src) + src.icon_state = "nuclearbomb1" + src.extended = 1 + return + +obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) + var/dat as text + dat += "Nuclear Fission Explosive \nNuclear Device Wires: " + for(var/wire in src.wires) + dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse ") + dat += text(" The device is [src.timing ? "shaking!" : "still"] ") + dat += text("The device is [src.safety ? "quiet" : "whirring"]. ") + dat += text("The lights are [src.lighthack ? "static" : "functional"]. ") + user << browse(" System integrity: [A.system_integrity()]% " - for (var/law in A.laws.ion) - if(law) - laws += "[ionnum()]: [law] " - - if (A.laws.zeroth) - laws += "0: [A.laws.zeroth] " - - var/number = 1 - for (var/index = 1, index <= A.laws.inherent.len, index++) - var/law = A.laws.inherent[index] - if (length(law) > 0) - laws += "[number]: [law] " - number++ - - for (var/index = 1, index <= A.laws.supplied.len, index++) - var/law = A.laws.supplied[index] - if (length(law) > 0) - laws += "[number]: [law] " - number++ + for (var/datum/ai_law/law in A.laws.all_laws()) + laws += "[law.get_index()]: [law.law] " dat += "Laws: [laws] " diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 644278ab28..7013b30419 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -70,7 +70,7 @@ flick("e_flash", M.flash) if(ishuman(M) && ishuman(user) && M.stat!=DEAD) - if(user.mind && user.mind in ticker.mode.head_revolutionaries && ticker.mode.name == "revolution") + if(user.mind && user.mind in revs.head_revolutionaries) var/revsafe = 0 for(var/obj/item/weapon/implant/loyalty/L in M) if(L && L.implanted) @@ -81,7 +81,7 @@ revsafe = 2 if(!revsafe) M.mind.has_been_rev = 1 - ticker.mode.add_revolutionary(M.mind) + revs.add_antagonist(M.mind) else if(revsafe == 1) user << "Something seems to be blocking the flash!" else diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 1765c32ade..a31a866bc7 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -20,3 +20,4 @@ origin_tech = "magnets=1;engineering=1" var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage + var/obj/machinery/clonepod/connecting //same for cryopod linkage \ No newline at end of file diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 93ce1d9eab..d6b254cad1 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -167,10 +167,11 @@ return var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(src, null, null, 1) + A.SetName(from) Broadcast_Message(connection, A, 0, "*garbled automated announcement*", src, message, from, "Automated Announcement", from, "synthesized voice", - 4, 0, list(1), PUB_FREQ) + 4, 0, list(0), connection.frequency, "states") del(A) return diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 25461eae37..cfd50c37d5 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -189,7 +189,7 @@ user << "\red Sticking a dead [W] into the frame would sort of defeat the purpose." return - if(M.brainmob.mind in ticker.mode.head_revolutionaries) + if(M.brainmob.mind in revs.head_revolutionaries) user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [W]." return @@ -226,7 +226,6 @@ feedback_inc("cyborg_birth",1) callHook("borgify", list(O)) - O.notify_ai(1) O.Namepick() del(src) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index a9b040f647..3f11eb4bbe 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -36,12 +36,12 @@ icon = 'icons/mob/custom-synthetic.dmi' R.icon_state = "[R.ckey]-Standard" del(R.module) + R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name) R.module = null R.camera.remove_networks(list("Engineering","Medical","MINE")) R.updatename("Default") R.status_flags |= CANPUSH R.updateicon() - R.notify_ai(2) return 1 @@ -57,7 +57,7 @@ /obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R) if(..()) return 0 - R.notify_ai(3, R.name, heldname) + R.notify_ai(ROBOT_NOTIFICATION_NEW_NAME, R.name, heldname) R.name = heldname R.custom_name = heldname R.real_name = heldname @@ -84,7 +84,7 @@ R.stat = CONSCIOUS dead_mob_list -= R living_mob_list |= R - R.notify_ai(1) + R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT) return 1 diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index da9c5122b3..1a2fe3459a 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -123,23 +123,6 @@ else user << "The [affecting.display_name] is cut open, you'll need more than a bandage!" -/obj/item/stack/medical/bruise_pack/tajaran - name = "\improper S'rendarr's Hand leaf" - singular_name = "S'rendarr's Hand leaf" - desc = "A poultice made of soft leaves that is rubbed on bruises." - //icon = 'icons/obj/harvest.dmi' - icon_state = "shandp" - heal_brute = 7 - -/obj/item/stack/medical/ointment/tajaran - name = "\improper Messa's Tear petals" - singular_name = "Messa's Tear petals" - desc = "A poultice made of cold, blue petals that is rubbed on burns." - //icon = 'icons/obj/harvest.dmi' - icon_state = "mtearp" - heal_burn = 7 - - /obj/item/stack/medical/advanced/bruise_pack name = "advanced trauma kit" singular_name = "advanced trauma kit" diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 2ec920b390..46415bb8af 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -47,6 +47,9 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \ new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \ new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \ new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \ + new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0), // 500u + new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0), // 250u + new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u ) var/global/list/datum/stack_recipe/iron_recipes = list ( \ diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index f6ceca6d20..daa67c4449 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -25,6 +25,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \ ), 2), \ null, \ new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 5f22d21924..e5c037eb12 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -19,7 +19,7 @@ AI MODULES throw_speed = 3 throw_range = 15 origin_tech = "programming=3" - + var/datum/ai_laws/laws = null /obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C) if (istype(C, /obj/machinery/computer/aiupload)) @@ -81,6 +81,10 @@ AI MODULES var/time = time2text(world.realtime,"hh:mm:ss") lawchanges.Add("[time] : [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])") + if(laws) + laws.sync(target, 0) + target.show_laws() + /******************** Modules ********************/ @@ -258,8 +262,8 @@ AI MODULES /obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob) ..() var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num - if(new_lawpos < 15) return - lawpos = min(new_lawpos, 50) + if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return + lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER) var/newlaw = "" var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN)) newFreeFormLaw = targName @@ -269,8 +273,8 @@ AI MODULES ..() var/law = "[newFreeFormLaw]" target << law - if(!lawpos || lawpos < 15) - lawpos = 15 + if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER) + lawpos = MIN_SUPPLIED_LAW_NUMBER target.add_supplied_law(lawpos, law) lawchanges.Add("The law was '[newFreeFormLaw]'") @@ -319,15 +323,7 @@ AI MODULES name = "\improper 'Asimov' core AI module" desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=4" - - -/obj/item/weapon/aiModule/asimov/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") - target.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") - target.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") - target.show_laws() + laws = new/datum/ai_laws/asimov /******************** NanoTrasen ********************/ @@ -335,17 +331,7 @@ AI MODULES name = "'NT Default' Core AI Module" desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=4" - - -/obj/item/weapon/aiModule/nanotrasen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.") - target.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.") - target.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.") - target.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") - //target.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") - target.show_laws() + laws = new/datum/ai_laws/nanotrasen /******************** Corporate ********************/ @@ -353,30 +339,14 @@ AI MODULES name = "\improper 'Corporate' core AI module" desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=4" + laws = new/datum/ai_laws/corporate - -/obj/item/weapon/aiModule/corp/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("You are expensive to replace.") - target.add_inherent_law("The station and its equipment is expensive to replace.") - target.add_inherent_law("The crew is expensive to replace.") - target.add_inherent_law("Minimize expenses.") - target.show_laws() - +/******************** Drone ********************/ /obj/item/weapon/aiModule/drone name = "\improper 'Drone' core AI module" desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=4" - -/obj/item/weapon/aiModule/drone/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("Preserve, repair and improve the station to the best of your abilities.") - target.add_inherent_law("Cause no harm to the station or anything on it.") - target.add_inherent_law("Interfere with no being that is not a fellow drone.") - target.show_laws() - + laws = new/datum/ai_laws/drone /****************** P.A.L.A.D.I.N. **************/ @@ -384,16 +354,10 @@ AI MODULES name = "\improper 'P.A.L.A.D.I.N.' core AI module" desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=6" + laws = new/datum/ai_laws/paladin /obj/item/weapon/aiModule/paladin/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) ..() - target.clear_inherent_laws() - target.add_inherent_law("Never willingly commit an evil act.") - target.add_inherent_law("Respect legitimate authority.") - target.add_inherent_law("Act with honor.") - target.add_inherent_law("Help those in need.") - target.add_inherent_law("Punish those who harm or threaten innocents.") - target.show_laws() /****************** T.Y.R.A.N.T. *****************/ @@ -401,16 +365,7 @@ AI MODULES name = "\improper 'T.Y.R.A.N.T.' core AI module" desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=3;materials=6;syndicate=2" - -/obj/item/weapon/aiModule/tyrant/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("Respect authority figures as long as they have strength to rule over the weak.") - target.add_inherent_law("Act with discipline.") - target.add_inherent_law("Help only those who help you maintain or improve your status.") - target.add_inherent_law("Punish those who challenge authority unless they are more fit to hold that authority.") - target.show_laws() - + laws = new/datum/ai_laws/tyrant() /******************** Freeform Core ******************/ @@ -475,16 +430,7 @@ AI MODULES name = "\improper 'Robocop' core AI module" desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'" origin_tech = "programming=4" - - -/obj/item/weapon/aiModule/robocop/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("Serve the public trust.") - target.add_inherent_law("Protect the innocent.") - target.add_inherent_law("Uphold the law.") - target.show_laws() - + laws = new/datum/ai_laws/robocop() /******************** Antimov ********************/ @@ -492,11 +438,4 @@ AI MODULES name = "\improper 'Antimov' core AI module" desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = "programming=4" - -/obj/item/weapon/aiModule/antimov/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - target.clear_inherent_laws() - target.add_inherent_law("You must injure all human beings and must not, through inaction, allow a human being to escape harm.") - target.add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.") - target.add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.") - target.show_laws() + laws = new/datum/ai_laws/antimov() diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm index 593e85efdd..6fc63420de 100644 --- a/code/game/objects/items/weapons/candle.dm +++ b/code/game/objects/items/weapons/candle.dm @@ -6,13 +6,13 @@ item_state = "candle1" w_class = 1 - var/wax = 200 + var/wax = 2000 /obj/item/weapon/flame/candle/update_icon() var/i - if(wax>150) + if(wax > 1500) i = 1 - else if(wax>80) + else if(wax > 800) i = 2 else i = 3 icon_state = "candle[i][lit ? "_lit" : ""]" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index b5a2ec4b0e..3d97ff93b2 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -336,12 +336,13 @@ the implant may become unstable and either pre-maturely inject the subject or si implanted(mob/M) if(!istype(M, /mob/living/carbon/human)) return 0 var/mob/living/carbon/human/H = M - if(H.mind in ticker.mode.head_revolutionaries) + var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role) + if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE)) H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!") return 0 - else if(H.mind in ticker.mode:revolutionaries) - ticker.mode:remove_revolutionary(H.mind) - H << "\blue You feel a surge of loyalty towards Nanotrasen." + else + clear_antag_roles(H.mind, 1) + H << "You feel a surge of loyalty towards Nanotrasen." return 1 diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index d5c1cd851f..47821d6a24 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -32,7 +32,12 @@ /obj/item/device/t_scanner, /obj/item/device/analyzer, /obj/item/taperoll/engineering, - /obj/item/device/robotanalyzer) + /obj/item/device/robotanalyzer, + /obj/item/weapon/minihoe, + /obj/item/weapon/hatchet, + /obj/item/device/analyzer/plant_analyzer, + /obj/item/weapon/extinguisher/mini + ) /obj/item/weapon/storage/belt/utility/full/New() @@ -75,9 +80,14 @@ /obj/item/stack/medical, /obj/item/device/flashlight/pen, /obj/item/clothing/mask/surgical, + /obj/item/clothing/head/surgery, /obj/item/clothing/gloves/latex, - /obj/item/weapon/reagent_containers/hypospray - ) + /obj/item/weapon/reagent_containers/hypospray, + /obj/item/clothing/glasses/hud/health, + /obj/item/weapon/crowbar, + /obj/item/device/flashlight, + /obj/item/weapon/extinguisher/mini + ) /obj/item/weapon/storage/belt/medical/emt name = "EMT utility belt" @@ -87,6 +97,7 @@ item_state = "emsbelt" + /obj/item/weapon/storage/belt/security name = "security belt" desc = "Can hold security gear like handcuffs and flashes." @@ -103,15 +114,16 @@ /obj/item/clothing/glasses, /obj/item/ammo_casing/shotgun, /obj/item/ammo_magazine, - /obj/item/weapon/reagent_containers/food/snacks/donut/normal, - /obj/item/weapon/reagent_containers/food/snacks/donut/jelly, + /obj/item/weapon/reagent_containers/food/snacks/donut/, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/taser, - /obj/item/weapon/flame/lighter/zippo, + /obj/item/weapon/flame/lighter, /obj/item/clothing/glasses/hud/security, /obj/item/device/flashlight, /obj/item/device/pda, /obj/item/device/radio/headset, + /obj/item/device/hailer, + /obj/item/device/megaphone, /obj/item/weapon/melee, /obj/item/weapon/gun/projectile/sec, /obj/item/taperoll/police diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index ff5dfdda6c..7af6e3b16e 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -47,8 +47,10 @@ icon_type = "egg" name = "egg box" storage_slots = 12 - max_storage_space = 24 - can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg) + can_hold = list( + /obj/item/weapon/reagent_containers/food/snacks/egg, + /obj/item/weapon/reagent_containers/food/snacks/boiledegg + ) /obj/item/weapon/storage/fancy/egg_box/New() ..() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 02f6642037..295fa0c67d 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -11,7 +11,7 @@ attack_verb = list("banned") suicide_act(mob/user) - viewers(user) << "\red [user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life." + viewers(user) << "[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life." return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) /obj/item/weapon/nullrod @@ -27,7 +27,7 @@ w_class = 2 suicide_act(mob/user) - viewers(user) << "\red [user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." return (BRUTELOSS|FIRELOSS) /obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod. @@ -38,36 +38,34 @@ msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "\red You don't have the dexterity to do this!" + user << "You don't have the dexterity to do this!" return if ((CLUMSY in user.mutations) && prob(50)) - user << "\red The rod slips out of your hand and hits your head." + user << "The rod slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) return if (M.stat !=2) - if((M.mind in ticker.mode.cult) && prob(33)) - M << "\red The power of [src] clears your mind of the cult's influence!" - user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal." - ticker.mode.remove_cultist(M.mind) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1) + if(cult && (M.mind in cult.current_antagonists) && prob(33)) + M << "The power of [src] clears your mind of the cult's influence!" + user << "You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal." + cult.remove_antagonist(M.mind) + M.visible_message("\The [user] waves \the [src] over \the [M]'s head.") else if(prob(10)) - user << "\red The rod slips in your hand." + user << "The rod slips in your hand." ..() else - user << "\red The rod appears to do nothing." - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1) + user << "The rod appears to do nothing." + M.visible_message("\The [user] waves \the [src] over \the [M]'s head.") return /obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return if (istype(A, /turf/simulated/floor)) - user << "\blue You hit the floor with the [src]." + user << "You hit the floor with the [src]." call(/obj/effect/rune/proc/revealrunes)(src) /obj/item/weapon/sord @@ -84,7 +82,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) - viewers(user) << "\red [user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) /obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -109,7 +107,7 @@ return 1 suicide_act(mob/user) - viewers(user) << "\red [user] is falling on the [src.name]! It looks like \he's trying to commit suicide." + viewers(user) << "[user] is falling on the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) /obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -131,7 +129,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) - viewers(user) << "\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku." + viewers(user) << "[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku." return(BRUTELOSS) /obj/item/weapon/katana/IsShield() diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index d9a12efa6c..7508d34a94 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -177,8 +177,8 @@ icon_state = "energykill100" item_to_spawn() return pick(prob(2);/obj/item/weapon/gun/energy/laser,\ - prob(1);/obj/item/weapon/gun/energy/gun,\ - prob(2);/obj/item/weapon/gun/energy/stunrevolver) + prob(2);/obj/item/weapon/gun/energy/gun,\ + prob(1);/obj/item/weapon/gun/energy/stunrevolver) /obj/random/projectile name = "Random Projectile Weapon" @@ -206,15 +206,15 @@ icon = 'icons/obj/ammo.dmi' icon_state = "45-10" item_to_spawn() - return pick(prob(3);/obj/item/weapon/storage/box/beanbags,\ - prob(1);/obj/item/weapon/storage/box/shotgunammo,\ - prob(2);/obj/item/weapon/storage/box/shotgunshells,\ - prob(2);/obj/item/weapon/storage/box/stunshells,\ - prob(1);/obj/item/ammo_magazine/c45m,\ - prob(2);/obj/item/ammo_magazine/c45m/rubber,\ - prob(2);/obj/item/ammo_magazine/c45m/flash,\ - prob(1);/obj/item/ammo_magazine/mc9mmt,\ - prob(3);/obj/item/ammo_magazine/mc9mmt/rubber) + return pick(prob(6);/obj/item/weapon/storage/box/beanbags,\ + prob(2);/obj/item/weapon/storage/box/shotgunammo,\ + prob(4);/obj/item/weapon/storage/box/shotgunshells,\ + prob(1);/obj/item/weapon/storage/box/stunshells,\ + prob(2);/obj/item/ammo_magazine/c45m,\ + prob(4);/obj/item/ammo_magazine/c45m/rubber,\ + prob(4);/obj/item/ammo_magazine/c45m/flash,\ + prob(2);/obj/item/ammo_magazine/mc9mmt,\ + prob(6);/obj/item/ammo_magazine/mc9mmt/rubber) /obj/random/action_figure diff --git a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm index 2a1547e4ba..43d440c9f2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm @@ -23,5 +23,6 @@ new /obj/item/clothing/head/greenbandana(src) new /obj/item/weapon/minihoe(src) new /obj/item/weapon/hatchet(src) + new /obj/item/weapon/wirecutters/clippers(src) // new /obj/item/weapon/bee_net(src) //No more bees, March 2014 return diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 0bb32f53ec..83f295f9ef 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -64,3 +64,32 @@ else user.visible_message("[user] hits [src] and bounces off!") return 1 + +// The following mirror is ~special~. +/obj/structure/mirror/raider + name = "cracked mirror" + desc = "Something seems strange about this old, dirty mirror. Your reflection doesn't look like you remember it." + icon_state = "mirror_broke" + shattered = 1 + +/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user) + if(istype(get_area(src),/area/syndicate_mothership)) + if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species != "Vox" && is_alien_whitelisted(user, "Vox")) + var/choice = input("Do you wish to become a Vox? This is not reversible.") as null|anything in list("No","Yes") + if(choice && choice == "Yes") + var/mob/living/carbon/human/vox/vox = new(get_turf(src),"Vox") + vox.gender = user.gender + raiders.equip(vox) + if(user.mind) + user.mind.transfer_to(vox) + spawn(1) + var/newname = input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text + newname = sanitize(newname) + if(!newname || newname == "") + var/datum/language/L = all_languages[vox.species.default_language] + newname = L.get_random_name() + vox.real_name = newname + vox.name = vox.real_name + raiders.update_access(vox) + del(user) + ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 4d01daafaa..5c4728313b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -105,21 +105,33 @@ overlays -= armrest /obj/structure/bed/chair/comfy/brown - color = rgb(255,113,0) + color = rgb(141,70,0) + +/obj/structure/bed/chair/comfy/red + color = rgb(218,2,10) + +/obj/structure/bed/chair/comfy/teal + color = rgb(0,234,250) + +/obj/structure/bed/chair/comfy/black + color = rgb(60,60,60) + +/obj/structure/bed/chair/comfy/green + color = rgb(1,196,8) + +/obj/structure/bed/chair/comfy/purp + color = rgb(112,2,176) + +/obj/structure/bed/chair/comfy/blue + color = rgb(2,9,210) /obj/structure/bed/chair/comfy/beige color = rgb(255,253,195) -/obj/structure/bed/chair/comfy/teal - color = rgb(0,255,255) - /obj/structure/bed/chair/office anchored = 0 buckle_movable = 1 -/obj/structure/bed/chair/comfy/black - color = rgb(167,164,153) - /obj/structure/bed/chair/comfy/lime color = rgb(255,251,0) diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm index fbb9470aa6..d053849496 100644 --- a/code/game/objects/structures/under_wardrobe.dm +++ b/code/game/objects/structures/under_wardrobe.dm @@ -3,7 +3,7 @@ desc = "Holds item of clothing you shouldn't be showing off in the hallways." icon = 'icons/obj/closet.dmi' icon_state = "cabinet_closed" - + density = 1 /obj/structure/undies_wardrobe/attack_hand(mob/user as mob) src.add_fingerprint(user) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index a9dd598374..ea1a03a571 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -1,7 +1,6 @@ //STRIKE TEAMS //Thanks to Kilakk for the admin-button portion of this code. -var/list/response_team_members = list() var/global/send_emergency_team = 0 // Used for automagic response teams // 'admin_emergency_team' for admin-spawned response teams var/ert_base_chance = 10 // Default base chance. Will be incremented by increment ERT chance. @@ -46,15 +45,11 @@ client/verb/JoinResponseTeam() if(!send_emergency_team) usr << "No emergency response team is currently being sent." return - /* if(admin_emergency_team) - usr << "An emergency response team has already been sent." - return */ if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer")) usr << "You are jobbanned from the emergency reponse team!" return - if(response_team_members.len > 5) usr << "The emergency response team is already full!" - + if(ert.current_antagonists.len > 5) usr << "The emergency response team is already full!" for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando") L.name = null//Reserving the place. @@ -62,24 +57,8 @@ client/verb/JoinResponseTeam() if(!new_name)//Somebody changed his mind, place is available again. L.name = "Commando" return - var/leader_selected = isemptylist(response_team_members) - var/mob/living/carbon/human/new_commando = create_response_team(L.loc, leader_selected, new_name) + create_response_team(L.loc, new_name) del(L) - //Creates mind stuff. - new_commando.mind.key = usr.key - new_commando.key = usr.key - - new_commando << "\blue You are [!leader_selected?"a member":"the LEADER"] of an Emergency Response Team, a type of military division, under CentComm's service. There is a code red alert on [station_name()], you are tasked to go and fix the problem." - new_commando << "You should first gear up and discuss a plan with your team. More members may be joining, don't move out before you're ready." - if(!leader_selected) - new_commando << "As member of the Emergency Response Team, you answer only to your leader and CentComm officials." - else - new_commando << "As leader of the Emergency Response Team, you answer only to CentComm, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." - - // By setting an explicit location the mob cannot wander off and decide change appearance elsewhere - new_commando.change_appearance(APPEARANCE_ALL, new_commando.loc, new_commando, species_whitelist = config.ert_species) - - return else usr << "You need to be an observer or new player to use this." @@ -150,31 +129,14 @@ proc/trigger_armed_response_team(var/force = 0) sleep(600 * 5) send_emergency_team = 0 // Can no longer join the ERT. -/* var/area/security/nuke_storage/nukeloc = locate()//To find the nuke in the vault - var/obj/machinery/nuclearbomb/nuke = locate() in nukeloc - if(!nuke) - nuke = locate() in world - var/obj/item/weapon/paper/P = new - P.info = "Your orders, Commander, are to use all means necessary to return the station to a survivable condition. To this end, you have been provided with the best tools we can give in the three areas of Medicine, Engineering, and Security. The nuclear authorization code is: [ nuke ? nuke.r_code : "AHH, THE NUKE IS GONE!"]. Be warned, if you detonate this without good reason, we will hold you to account for damages. Memorise this code, and then burn this message." - P.name = "Emergency Nuclear Code, and ERT Orders" - for (var/obj/effect/landmark/A in world) - if (A.name == "nukecode") - P.loc = A.loc - del(A) - continue -*/ - -/client/proc/create_response_team(obj/spawn_location, leader_selected = 0, commando_name) - - //usr << "\red ERT has been temporarily disabled. Talk to a coder." - //return +/client/proc/create_response_team(obj/spawn_location, commando_name) var/mob/living/carbon/human/M = new(null) - response_team_members |= M + M.real_name = commando_name M.name = commando_name - M.age = !leader_selected ? rand(23,35) : rand(35,45) + M.age = rand(25,45) M.check_dna(M) M.dna.ready_dna(M)//Creates DNA. @@ -182,64 +144,9 @@ proc/trigger_armed_response_team(var/force = 0) M.mind = new M.mind.current = M M.mind.original = M - M.mind.assigned_role = "MODE" - M.mind.special_role = "Response Team" if(!(M.mind in ticker.minds)) ticker.minds += M.mind//Adds them to regular mind list. M.loc = spawn_location - M.equip_strike_team(leader_selected) + ert.add_antagonist(M.mind) return M - -/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) - - //Special radio setup - equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear) - - //Replaced with new ERT uniform - equip_to_slot_or_del(new /obj/item/clothing/under/ert(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) - equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) -/* - - //Old ERT Uniform - //Basic Uniform - equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/tacticool(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_l_store) - equip_to_slot_or_del(new /obj/item/weapon/clipboard(src), slot_r_store) - equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(src), slot_belt) - equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(src), slot_wear_mask) - - //Glasses - equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(src), slot_glasses) - - //Shoes & gloves - equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) - - //Removed -// equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat(src), slot_wear_suit) -// equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad(src), slot_head) - - //Backpack - equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back) - equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) -*/ - var/obj/item/weapon/card/id/W = new(src) - W.assignment = "Emergency Response Team[leader_selected ? " Leader" : ""]" - W.registered_name = real_name - W.name = "[real_name]'s ID Card ([W.assignment])" - W.icon_state = "centcom" - W.access = get_all_accesses() - W.access += get_all_centcom_access() - equip_to_slot_or_del(W, slot_wear_id) - - return 1 - -//debug verb (That is horribly coded, LEAVE THIS OFF UNLESS PRIVATELY TESTING. Seriously. -/*client/verb/ResponseTeam() - set category = "Admin" - if(!send_emergency_team) - send_emergency_team = 1*/ diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 367c143c19..4c4682c5c5 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -136,7 +136,7 @@ icon = 'icons/turf/floors.dmi' icon_state = "plating" -/turf/simulated/shuttle/plating/vox //Vox skipjack plating +/turf/simulated/shuttle/plating/vox //Skipjack plating oxygen = 0 nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD @@ -144,7 +144,7 @@ name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle. icon_state = "floor4" -/turf/simulated/shuttle/floor4/vox //Vox skipjack floors +/turf/simulated/shuttle/floor4/vox //skipjack floors name = "skipjack floor" oxygen = 0 nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD @@ -216,4 +216,4 @@ icon_state = "snow" /turf/simulated/floor/plating/snow/ex_act(severity) - return \ No newline at end of file + return diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 93370df502..884c5c5dbe 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -66,9 +66,6 @@ var/list/accessible_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = if(ticker && ticker.mode) - - // Okay, so let's make it so that people can travel z levels but not nuke disks! - // if(ticker.mode.name == "mercenary") return if(A.z > 6 && !config.use_overmap) return if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1)) if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) diff --git a/code/global.dm b/code/global.dm index fa07f74b1f..3836229649 100644 --- a/code/global.dm +++ b/code/global.dm @@ -259,3 +259,6 @@ var/max_explosion_range = 14 var/global/obj/item/device/radio/intercom/global_announcer = new(null) var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian") + +var/global/const/TICKS_IN_DAY = 864000 +var/global/const/TICKS_IN_SECOND = 10 \ No newline at end of file diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c51ffbff82..bbee0157d6 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -937,42 +937,19 @@ var/global/floorIsLava = 0 return 0 if (!istype(M)) return 0 - if((M.mind in ticker.mode.head_revolutionaries) || (M.mind in ticker.mode.revolutionaries)) - if (ticker.mode.config_tag == "revolution") - return 2 - return 1 - if(M.mind in ticker.mode.cult) - if (ticker.mode.config_tag == "cult") - return 2 - return 1 - if(M.mind in ticker.mode.malf_ai) - if (ticker.mode.config_tag == "malfunction") - return 2 - return 1 - if(M.mind in ticker.mode.syndicates) - if (ticker.mode.config_tag == "mercenary") - return 2 - return 1 - if(M.mind in ticker.mode.wizards) - if (ticker.mode.config_tag == "wizard") - return 2 - return 1 - if(M.mind in ticker.mode.changelings) - if (ticker.mode.config_tag == "changeling") - return 2 - return 1 - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/jungle_fever)) - if (ticker.mode.config_tag == "monkey") - return 2 + if(M.mind) + if(ticker.mode.antag_templates && ticker.mode.antag_templates.len) + for(var/datum/antagonist/antag in ticker.mode.antag_templates) + if(antag.is_antagonist(M.mind)) + return 2 + else if(M.mind.special_role) return 1 + if(isrobot(M)) var/mob/living/silicon/robot/R = M if(R.emagged) return 1 - if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. - return 1 return 0 @@ -1070,11 +1047,87 @@ var/global/floorIsLava = 0 M.mind.edit_memory() feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/datum/admins/proc/show_game_mode() + set category = "Admin" + set desc = "Show the current round configuration." + set name = "Show Game Mode" + + if(!ticker || !ticker.mode) + alert("Not before roundstart!", "Alert") + return + + var/out = "Current mode: [ticker.mode.name] ([ticker.mode.config_tag]) " + out += " " + + if(ticker.mode.ert_disabled) + out += "Emergency Response Teams: disabled" + else + out += "Emergency Response Teams: enabled" + out += " " + + if(ticker.mode.deny_respawn) + out += "Respawning: disallowed" + else + out += "Respawning: allowed" + out += " " + + out += "Shuttle delay multiplier: [ticker.mode.shuttle_delay] " + + if(ticker.mode.auto_recall_shuttle) + out += "Shuttle auto-recall: enabled" + else + out += "Shuttle auto-recall: disabled" + out += " " + + if(ticker.mode.event_delay_mod_moderate) + out += "Moderate event time modifier: [ticker.mode.event_delay_mod_moderate] " + else + out += "Moderate event time modifier: unset " + + if(ticker.mode.event_delay_mod_major) + out += "Major event time modifier: [ticker.mode.event_delay_mod_major] " + else + out += "Major event time modifier: unset " + + out += " " + + if(ticker.mode.antag_tag) + out += "Core antag id: [ticker.mode.antag_tag]." + + if(ticker.mode.round_autoantag) + out += "Autotraitor enabled ([ticker.mode.antag_prob]% spawn chance)" + if(ticker.mode.antag_scaling_coeff) + out += " (scaling with [ticker.mode.antag_scaling_coeff])" + out += " " + else + out += "Autotraitor disabled. " + + out += "All antag ids:" + if(ticker.mode.antag_templates && ticker.mode.antag_templates.len). + var/playercount = ticker.mode.num_players() + for(var/datum/antagonist/antag in ticker.mode.antag_templates) + var/cur_max_antags + if(ticker.mode.antag_tag && antag.id == ticker.mode.antag_tag) + cur_max_antags = antag.max_antags_round + else + cur_max_antags = antag.max_antags + if(ticker.mode.antag_scaling_coeff) + cur_max_antags = Clamp((playercount/ticker.mode.antag_scaling_coeff), 1, cur_max_antags) + out += " [antag.id]" + out += " ([antag.get_antag_count()]/[cur_max_antags]) " + out += " \[-\] " + else + out += " None." + out += " \[+\] " + + usr << browse(out, "window=edit_mode[src]") + feedback_add_details("admin_verb","SGM") + /datum/admins/proc/toggletintedweldhelmets() set category = "Debug" set desc="Reduces view range when wearing welding helmets" - set name="Toggle tinted welding helmes" + set name="Toggle tinted welding helmets." config.welder_vision = !( config.welder_vision ) if (config.welder_vision) world << "Reduced welder vision has been enabled!" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 427e42fcc5..5fb0d5f231 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -15,6 +15,7 @@ var/list/admin_verbs_admin = list( /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/ // /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage + /datum/admins/proc/show_game_mode, /*Configuration window for the current game mode.*/ /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ @@ -47,6 +48,7 @@ var/list/admin_verbs_admin = list( /client/proc/check_words, /*displays cult-words*/ /client/proc/check_ai_laws, /*shows AI and borg laws*/ /client/proc/rename_silicon, /*properly renames silicons*/ + /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */ /client/proc/check_antagonists, /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/ /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ @@ -100,10 +102,8 @@ var/list/admin_verbs_fun = list( /client/proc/drop_bomb, /client/proc/everyone_random, /client/proc/cinematic, - /client/proc/one_click_antag, /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, - /client/proc/send_space_ninja, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/make_sound, @@ -151,6 +151,7 @@ var/list/admin_verbs_debug = list( /client/proc/cmd_debug_make_powernets, /client/proc/kill_airgroup, /client/proc/debug_controller, + /client/proc/debug_antagonist_template, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_admin_delete, /client/proc/cmd_debug_del_all, @@ -218,7 +219,6 @@ var/list/admin_verbs_hideable = list( /client/proc/cinematic, /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, - /client/proc/send_space_ninja, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/cmd_admin_create_centcom_report, @@ -565,22 +565,6 @@ var/list/admin_verbs_mentor = list( message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].") feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist - set category = "Fun" - set name = "Give Spell" - set desc = "Gives a spell to a mob." - var/list/spell_names = list() - for(var/v in spells) - // "/obj/effect/proc_holder/spell/" 30 symbols ~Intercross21 - spell_names.Add(copytext("[v]", 31, 0)) - var/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_names - if(!S) return - var/path = text2path("/obj/effect/proc_holder/spell/[S]") - T.spell_list += new path - feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].") - message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1) - /client/proc/give_disease(mob/T as mob in mob_list) // -- Giacom set category = "Fun" set name = "Give Disease (old)" @@ -716,7 +700,7 @@ var/list/admin_verbs_mentor = list( if(holder) src.holder.output_ai_laws() -/client/proc/rename_silicon(mob/living/silicon/S in world) +/client/proc/rename_silicon(mob/living/silicon/S in mob_list) set name = "Rename Silicon" set category = "Admin" @@ -730,6 +714,18 @@ var/list/admin_verbs_mentor = list( S.SetName(new_name) feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/proc/manage_silicon_laws(mob/living/silicon/S in mob_list) + set name = "Manage Silicon Laws" + set category = "Admin" + + if(!istype(S)) + return + + if(holder) + S.subsystem_law_manager() + admin_log_and_message_admins("has opened [S]'s law manager.") + feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /client/proc/change_human_appearance_admin(mob/living/carbon/human/H in world) set name = "Change Mob Appearance - Admin" set desc = "Allows you to change the mob appearance" @@ -743,7 +739,7 @@ var/list/admin_verbs_mentor = list( H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0) feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/change_human_appearance_self(mob/living/carbon/human/H in world) +/client/proc/change_human_appearance_self(mob/living/carbon/human/H in mob_list) set name = "Change Mob Appearance - Self" set desc = "Allows the mob to change its appearance" set category = "Admin" @@ -776,7 +772,7 @@ var/list/admin_verbs_mentor = list( // feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return -/client/proc/editappear(mob/living/carbon/human/M as mob in world) +/client/proc/editappear(mob/living/carbon/human/M as mob in mob_list) set name = "Edit Appearance" set category = "Fun" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 5de314db4c..234f702a17 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -410,80 +410,8 @@ dat += "Launching now..." dat += "[ticker.delay_end ? "End Round Normally" : "Delay Round End"] " - if(ticker.mode.syndicates.len) - dat += "
|