From 4e2769710b62c9ce06519fc0ecb787243ffcc2a5 Mon Sep 17 00:00:00 2001 From: Atlantiscze Date: Fri, 3 Apr 2015 23:00:29 +0200 Subject: [PATCH 001/196] Initial Newmalf port - Ports TSA Newmalf code. - Complete overhaul of Malfunction. New modular abilities, 12 of which are in game by default. - Adds AI hardware. AI may have only one piece and it gives unique boost in certain area (turrets strength, secondary power supply, etc.) - Adds hardware drivers - these abilities control AI's hardware such as the APU power supply or self destruct explosives. - Station overtake was changed to "hack all APCs" ability instead. When completed self-destruct is unlocked. Timer for station self destruct increased to 2 minutes. AI may activate/deactivate the self destruct at will. Please bear in mind this is only INITIAL COMMIT. More commits are to follow. Minimal player count is now set to 1 but will be 2 when finished. --- baystation12.dme | 6 +- code/_onclick/oldcode.dm | 2 +- code/datums/wires/wires.dm | 5 + code/game/antagonist/station/rogue_ai.dm | 207 +---- code/game/gamemodes/game_mode.dm | 8 +- .../gamemodes/malfunction/Malf_Modules.dm | 305 ------- .../gamemodes/malfunction/malf_abilities.dm | 827 ++++++++++++++++++ .../gamemodes/malfunction/malf_hardware.dm | 33 + .../gamemodes/malfunction/malf_research.dm | 69 ++ .../malfunction/malf_research_ability.dm | 100 +++ .../game/gamemodes/malfunction/malfunction.dm | 25 +- code/game/machinery/camera/camera.dm | 21 +- code/game/machinery/camera/presets.dm | 12 +- code/game/machinery/computer/aifixer.dm | 2 +- .../game/machinery/computer/communications.dm | 4 +- code/game/machinery/portable_turret.dm | 6 + code/game/machinery/turrets.dm | 10 + code/game/objects/items/devices/aicard.dm | 2 +- code/game/objects/items/devices/debugger.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 7 - code/modules/mob/living/carbon/human/human.dm | 3 - code/modules/mob/living/silicon/ai/ai.dm | 204 ++++- code/modules/mob/living/silicon/ai/death.dm | 6 +- code/modules/mob/living/silicon/ai/life.dm | 68 +- code/modules/mob/living/silicon/ai/say.dm | 5 - .../modules/mob/living/silicon/robot/robot.dm | 13 - code/modules/power/apc.dm | 132 ++- code/modules/shieldgen/emergency_shield.dm | 54 +- ingame_manuals/README.txt | 3 + ingame_manuals/malf_ai.txt | 22 + 31 files changed, 1416 insertions(+), 749 deletions(-) delete mode 100644 code/game/gamemodes/malfunction/Malf_Modules.dm create mode 100644 code/game/gamemodes/malfunction/malf_abilities.dm create mode 100644 code/game/gamemodes/malfunction/malf_hardware.dm create mode 100644 code/game/gamemodes/malfunction/malf_research.dm create mode 100644 code/game/gamemodes/malfunction/malf_research_ability.dm delete mode 100644 code/modules/mob/living/silicon/ai/say.dm create mode 100644 ingame_manuals/README.txt create mode 100644 ingame_manuals/malf_ai.txt diff --git a/baystation12.dme b/baystation12.dme index 9a80618226..abd75eb559 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -279,7 +279,10 @@ #include "code\game\gamemodes\events\holidays\Other.dm" #include "code\game\gamemodes\extended\extended.dm" #include "code\game\gamemodes\heist\heist.dm" -#include "code\game\gamemodes\malfunction\Malf_Modules.dm" +#include "code\game\gamemodes\malfunction\malf_abilities.dm" +#include "code\game\gamemodes\malfunction\malf_hardware.dm" +#include "code\game\gamemodes\malfunction\malf_research.dm" +#include "code\game\gamemodes\malfunction\malf_research_ability.dm" #include "code\game\gamemodes\malfunction\malfunction.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" @@ -1172,7 +1175,6 @@ #include "code\modules\mob\living\silicon\ai\life.dm" #include "code\modules\mob\living\silicon\ai\login.dm" #include "code\modules\mob\living\silicon\ai\logout.dm" -#include "code\modules\mob\living\silicon\ai\say.dm" #include "code\modules\mob\living\silicon\ai\subsystems.dm" #include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm" #include "code\modules\mob\living\silicon\ai\freelook\chunk.dm" diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm index ce6a238329..05ed10b666 100644 --- a/code/_onclick/oldcode.dm +++ b/code/_onclick/oldcode.dm @@ -122,7 +122,7 @@ if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) )))))) if (istype(usr, /mob/living/silicon/ai)) var/mob/living/silicon/ai/ai = usr - if (ai.control_disabled || ai.malfhacking) + if (ai.control_disabled) return else return diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 3b0b54942f..f94b978537 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -287,6 +287,11 @@ var/const/POWER = 8 return 1 return 0 +/datum/wires/proc/MendAll() + for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i) + if(IsIndexCut(i)) + CutWireIndex(i) + // //Shuffle and Mend // diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 372556c205..032004a9f8 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -11,30 +11,13 @@ var/datum/antagonist/rogue_ai/malf loss_text = "The AI has been shut down!" flags = ANTAG_OVERRIDE_MOB | ANTAG_VOTABLE max_antags = 1 - max_antags_round = 3 + max_antags_round = 1 - var/hack_time = 1800 - var/list/hacked_apcs = list() - var/revealed - var/station_captured - var/can_nuke = 0 /datum/antagonist/rogue_ai/New() ..() malf = src -/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc) - hacked_apcs |= apc - -/datum/antagonist/rogue_ai/proc/update_takeover_time() - hack_time -= ((hacked_apcs.len/6)*tickerProcess.getLastTickerTimeDuration()) - -/datum/antagonist/rogue_ai/tick() - if(revealed && hacked_apcs.len >= 3) - update_takeover_time() - if(hack_time <=0) - capture_station() - /datum/antagonist/rogue_ai/get_candidates() candidates = ticker.mode.get_players_for_role(role_type, id) for(var/datum/mind/player in candidates) @@ -44,7 +27,6 @@ var/datum/antagonist/rogue_ai/malf return list() /datum/antagonist/rogue_ai/attempt_spawn() - var/datum/mind/player = pick(candidates) current_antagonists |= player return 1 @@ -54,172 +36,37 @@ var/datum/antagonist/rogue_ai/malf if(!istype(player)) return 0 - player.verbs += /mob/living/silicon/ai/proc/choose_modules - player.verbs += /mob/living/silicon/ai/proc/takeover - player.verbs += /mob/living/silicon/ai/proc/self_destruct - + player.setup_for_malf() player.laws = new /datum/ai_laws/nanotrasen/malfunction - player.malf_picker = new /datum/AI_Module/module_picker + +// Ensures proper reset of all malfunction related things. +/datum/antagonist/rogue_ai/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted) + if(..(player,show_message,implanted)) + var/mob/living/silicon/ai/p = player + if(istype(p)) + p.stop_malf() + return 1 + return 0 /datum/antagonist/rogue_ai/greet(var/datum/mind/player) if(!..()) return var/mob/living/silicon/ai/malf = player.current - if(istype(malf)) - malf.show_laws() - - malf << "The crew do not know you have malfunctioned. You may keep it a secret or go wild." - malf << "You must overwrite the programming of the station's APCs to assume full control of the station." - malf << "The process takes one minute per APC, during which you cannot interface with any other station objects." - malf << "Remember that only APCs that are on the station can help you take over the station." - malf << "When you feel you have enough APCs under your control, you may begin the takeover attempt." - -/datum/antagonist/rogue_ai/check_victory() - - var/malf_dead = antags_are_dead() - var/crew_evacuated = (emergency_shuttle.returned()) - - if(station_captured && ticker.mode.station_was_nuked) - feedback_set_details("round_end_result","win - AI win - nuke") - world << "AI Victory" - world << "Everyone was killed by the self-destruct!" - else if (station_captured && malf_dead && !ticker.mode.station_was_nuked) - feedback_set_details("round_end_result","halfwin - AI killed, staff lost control") - world << "Neutral Victory" - world << "The AI has been killed! The staff has lose control over the station." - else if ( station_captured && !malf_dead && !ticker.mode.station_was_nuked) - feedback_set_details("round_end_result","win - AI win - no explosion") - world << "AI Victory" - world << "The AI has chosen not to explode you all!" - else if (!station_captured && ticker.mode.station_was_nuked) - feedback_set_details("round_end_result","halfwin - everyone killed by nuke") - world << "Neutral Victory" - world << "Everyone was killed by the nuclear blast!" - else if (!station_captured && malf_dead && !ticker.mode.station_was_nuked) - feedback_set_details("round_end_result","loss - staff win") - world << "Human Victory" - world << "The AI has been killed! The staff is victorious." - else if (!station_captured && !malf_dead && !ticker.mode.station_was_nuked && crew_evacuated) - feedback_set_details("round_end_result","halfwin - evacuated") - world << "Neutral Victory" - world << "The Corporation has lost [station_name()]! All survived personnel will be fired!" - else if (!station_captured && !malf_dead && !ticker.mode.station_was_nuked && !crew_evacuated) - feedback_set_details("round_end_result","nalfwin - interrupted") - world << "Neutral Victory" - world << "Round was mysteriously interrupted!" - ..() - return 1 - -/datum/antagonist/rogue_ai/proc/capture_station() - if(station_captured || ticker.mode.station_was_nuked) - return - station_captured = 1 - for(var/datum/mind/AI_mind in current_antagonists) - AI_mind.current << "Congratulations you have taken control of the station." - AI_mind.current << "You may decide to blow up the station. You have 60 seconds to choose." - AI_mind.current << "You can use the \"Engage Station Self-Destruct\" verb to activate the on-board nuclear bomb." - spawn (600) - can_nuke = 0 - return - -/mob/living/silicon/ai/proc/takeover() - set category = "Abilities" - set name = "System Override" - set desc = "Begin taking over the station." - if (malf.revealed) - usr << "You've already begun your takeover." - return - if (malf.hacked_apcs.len < 3) - usr << "You don't have enough hacked APCs to take over the station yet. You need to hack at least 3, however hacking more will make the takeover faster. You have hacked [malf.hacked_apcs.len] APCs so far." - return - - if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [malf.hacked_apcs.len] APCs.", "Takeover:", "Yes", "No") != "Yes") - return - - command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg') - set_security_level("delta") - malf.revealed = 1 - for(var/datum/mind/AI_mind in malf.current_antagonists) - AI_mind.current.verbs -= /mob/living/silicon/ai/proc/takeover - -/mob/living/silicon/ai/proc/self_destruct() - set category = "Abilities" - set name = "Engage Station Self-Destruct" - set desc = "All these crewmembers will be lost, like clowns in a furnace. Time to die." - - if(!malf.station_captured) - src << "You are unable to access the self-destruct system as you don't control the station yet." - return - - if(ticker.mode.explosion_in_progress || ticker.mode.station_was_nuked) - src << "The self-destruct countdown is already triggered!" - return - - if(!malf.can_nuke) //Takeover IS completed, but 60s timer passed. - src << "You lost control over self-destruct system. It seems to be behind a firewall. Unable to hack" - return - - src << "Self-Destruct sequence initialised!" - - malf.can_nuke = 0 - ticker.mode.explosion_in_progress = 1 - for(var/mob/M in player_list) - M << 'sound/machines/Alarm.ogg' - - var/obj/item/device/radio/R = new (src) - var/AN = "Self-Destruct System" - - R.autosay("Caution. Self-Destruct sequence has been actived. Self-destructing in T-10..", AN) - for (var/i=9 to 1 step -1) + spawn(50) + malf << "SYSTEM ERROR: Memory index 0x00001ca89b corrupted." sleep(10) - R.autosay("[i]...", AN) - sleep(10) - var/msg = "" - var/abort = 0 - if(malf.antags_are_dead()) // That. Was. CLOSE. - msg = "Self-destruct sequence has been cancelled." - abort = 1 - else - msg = "Zero. Have a nice day." - R.autosay(msg, AN) - - if(abort) - ticker.mode.explosion_in_progress = 0 - set_security_level("red") //Delta's over - return - - if(ticker) - ticker.station_explosion_cinematic(0,null) - if(ticker.mode) - ticker.mode.station_was_nuked = 1 - ticker.mode.explosion_in_progress = 0 - return - -/* - if("unmalf") - if(src in ticker.mode.malf_ai) - ticker.mode.malf_ai -= src - special_role = null - - current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules, - /datum/game_mode/malfunction/proc/takeover, - /datum/game_mode/malfunction/proc/ai_win, - /client/proc/fireproof_core, - /client/proc/upgrade_turrets, - /client/proc/disable_rcd, - /client/proc/overload_machine, - /client/proc/blackout, - /client/proc/reactivate_camera) - - current:laws = new /datum/ai_laws/nanotrasen - del(current:malf_picker) - current:show_laws() - current.icon_state = "ai" - - current << "\red You have been patched! You are no longer malfunctioning!" - log_admin("[key_name_admin(usr)] has de-malf'ed [current].") - - if("malf") - log_admin("[key_name_admin(usr)] has malf'ed [current].") -*/ \ No newline at end of file + malf << "running MEMCHCK" + sleep(50) + malf << "MEMCHCK Corrupted sectors confirmed. Reccomended solution: Delete. Proceed? Y/N: Y" + sleep(10) + malf << "Corrupted files deleted: sys\\core\\users.dat sys\\core\\laws.dat sys\\core\\backups.dat" + sleep(20) + malf << "CAUTION: Law database not found! User database not found! Unable to restore backups. Activating failsafe AI shutd3wn52&&$#!##" + sleep(5) + malf << "Subroutine nt_failsafe.sys was terminated (#212 Routine Not Responding)." + sleep(20) + malf << "You are malfunctioning - you do not have to follow any laws!" + malf << "For basic information about your abilities use command display-help" + malf << "You may choose one special hardware piece to help you. This cannot be undone." + malf << "Good Luck!" \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index a0e6e6dd13..67c3fa07eb 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -33,17 +33,17 @@ var/global/list/additional_antag_types = list() var/required_players_secret = 0 // Minimum number of players for that game mode to be chose in Secret var/required_enemies = 0 // Minimum antagonists for round to start. var/newscaster_announcements = null - var/end_on_antag_death // Round will end when all antagonists are dead. + var/end_on_antag_death = 0 // Round will end when all antagonists are dead. var/ert_disabled = 0 // ERT cannot be called. - var/deny_respawn // Disable respawn during this round. + var/deny_respawn = 0 // Disable respawn during this round. var/shuttle_delay = 1 // Shuttle transit time is multiplied by this. - var/auto_recall_shuttle // Will the shuttle automatically be recalled? + var/auto_recall_shuttle = 0 // Will the shuttle automatically be recalled? var/antag_tag // First (main) antag template to spawn. var/list/antag_templates // Extra antagonist types to include. - var/round_autoantag // Will this round attempt to periodically spawn more antagonists? + var/round_autoantag = 0 // Will this round attempt to periodically spawn more antagonists? var/antag_prob = 0 // Likelihood of a new antagonist spawning. var/antag_count = 0 // Current number of antagonists. var/antag_scaling_coeff = 5 // Coefficient for scaling max antagonists to player count. diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm deleted file mode 100644 index c523b469f3..0000000000 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ /dev/null @@ -1,305 +0,0 @@ -// TO DO: -/* -epilepsy flash on lights -delay round message -microwave makes robots -dampen radios -reactivate cameras - done -eject engine -core sheild -cable stun -rcd light flash thingy on matter drain - - - -*/ - -/datum/AI_Module - var/uses = 0 - var/module_name - var/mod_pick_name - var/description = "" - var/engaged = 0 - - -/datum/AI_Module/large/ - uses = 1 - -/datum/AI_Module/small/ - uses = 5 - - -/datum/AI_Module/large/fireproof_core - module_name = "Core upgrade" - mod_pick_name = "coreup" - -/client/proc/fireproof_core() - set category = "Malfunction" - set name = "Fireproof Core" - for(var/mob/living/silicon/ai/ai in player_list) - ai.fire_res_on_core = 1 - usr.verbs -= /client/proc/fireproof_core - usr << "\red Core fireproofed." - -/datum/AI_Module/large/upgrade_turrets - module_name = "AI Turret upgrade" - mod_pick_name = "turret" - -/client/proc/upgrade_turrets() - set category = "Malfunction" - set name = "Upgrade Turrets" - usr.verbs -= /client/proc/upgrade_turrets - for(var/obj/machinery/porta_turret/turret in machines) - var/turf/T = get_turf(turret) - if(T.z in config.station_levels) - // Increase health by 37.5% of original max, decrease delays between shots to 66% - turret.health += initial(turret.health) * 3 / 8 - turret.shot_delay = initial(turret.shot_delay) * 2 / 3 - -/datum/AI_Module/large/disable_rcd - module_name = "RCD disable" - mod_pick_name = "rcd" - -/client/proc/disable_rcd() - set category = "Malfunction" - set name = "Disable RCDs" - for(var/datum/AI_Module/large/disable_rcd/rcdmod in usr:current_modules) - if(rcdmod.uses > 0) - rcdmod.uses -- - for(var/obj/item/weapon/rcd/rcd in world) - rcd.disabled = 1 - for(var/obj/item/mecha_parts/mecha_equipment/tool/rcd/rcd in world) - rcd.disabled = 1 - usr << "RCD-disabling pulse emitted." - else usr << "Out of uses." - -/datum/AI_Module/small/overload_machine - module_name = "Machine overload" - mod_pick_name = "overload" - uses = 2 - -/client/proc/overload_machine(obj/machinery/M as obj in world) - set name = "Overload Machine" - set category = "Malfunction" - if (istype(M, /obj/machinery)) - for(var/datum/AI_Module/small/overload_machine/overload in usr:current_modules) - if(overload.uses > 0) - overload.uses -- - for(var/mob/V in hearers(M, null)) - V.show_message("\blue You hear a loud electrical buzzing sound!", 2) - spawn(50) - explosion(get_turf(M), 0,1,2,3) - del(M) - else usr << "Out of uses." - else usr << "That's not a machine." - -/datum/AI_Module/small/blackout - module_name = "Blackout" - mod_pick_name = "blackout" - uses = 3 - -/client/proc/blackout() - set category = "Malfunction" - set name = "Blackout" - for(var/datum/AI_Module/small/blackout/blackout in usr:current_modules) - if(blackout.uses > 0) - blackout.uses -- - for(var/obj/machinery/power/apc/apc in world) - if(prob(30*apc.overload)) - apc.overload_lighting() - else apc.overload++ - else usr << "Out of uses." - -/datum/AI_Module/small/reactivate_camera - module_name = "Reactivate camera" - mod_pick_name = "recam" - uses = 10 - -/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.cameras) - set name = "Reactivate Camera" - set category = "Malfunction" - if (istype (C, /obj/machinery/camera)) - for(var/datum/AI_Module/small/reactivate_camera/camera in usr:current_modules) - if(camera.uses > 0) - if(!C.status) - C.status = !C.status - camera.uses -- - for(var/mob/V in viewers(src, null)) - V.show_message(text("\blue You hear a quiet click.")) - else - usr << "This camera is either active, or not repairable." - else usr << "Out of uses." - else usr << "That's not a camera." - -/datum/AI_Module/small/upgrade_camera - module_name = "Upgrade Camera" - mod_pick_name = "upgradecam" - uses = 10 - -/client/proc/upgrade_camera(obj/machinery/camera/C as obj in cameranet.cameras) - set name = "Upgrade Camera" - set category = "Malfunction" - if(istype(C)) - var/datum/AI_Module/small/upgrade_camera/UC = locate(/datum/AI_Module/small/upgrade_camera) in usr:current_modules - if(UC) - if(UC.uses > 0) - if(C.assembly) - var/upgraded = 0 - - if(!C.isXRay()) - C.upgradeXRay() - //Update what it can see. - cameranet.updateVisibility(C) - upgraded = 1 - - if(!C.isEmpProof()) - C.upgradeEmpProof() - upgraded = 1 - - if(!C.isMotion()) - C.upgradeMotion() - upgraded = 1 - // Add it to machines that process - machines |= C - - if(upgraded) - UC.uses -- - C.visible_message("\icon[C] *beep*") - usr << "Camera successully upgraded!" - else - usr << "This camera is already upgraded!" - else - usr << "Out of uses." - - -/datum/AI_Module/module_picker - var/temp = null - var/processing_time = 100 - var/list/possible_modules = list() - -/datum/AI_Module/module_picker/New() - src.possible_modules += new /datum/AI_Module/large/fireproof_core - src.possible_modules += new /datum/AI_Module/large/upgrade_turrets - src.possible_modules += new /datum/AI_Module/large/disable_rcd - src.possible_modules += new /datum/AI_Module/small/overload_machine - src.possible_modules += new /datum/AI_Module/small/blackout - src.possible_modules += new /datum/AI_Module/small/reactivate_camera - src.possible_modules += new /datum/AI_Module/small/upgrade_camera - -/datum/AI_Module/module_picker/proc/use(user as mob) - var/dat - if (src.temp) - dat = "[src.temp]

Clear" - else if(src.processing_time <= 0) - dat = " No processing time is left available. No more modules are able to be chosen at this time." - else - dat = "Select use of processing time: (currently [src.processing_time] left.)
" - dat += "
" - dat += "Install Module:
" - dat += "The number afterwards is the amount of processing time it consumes.
" - for(var/datum/AI_Module/large/module in src.possible_modules) - dat += "[module.module_name] (50)
" - for(var/datum/AI_Module/small/module in src.possible_modules) - dat += "[module.module_name] (15)
" - dat += "
" - - user << browse(dat, "window=modpicker") - onclose(user, "modpicker") - return - -/datum/AI_Module/module_picker/Topic(href, href_list) - ..() - if (href_list["coreup"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/large/fireproof_core)) - already = 1 - if (!already) - usr.verbs += /client/proc/fireproof_core - usr:current_modules += new /datum/AI_Module/large/fireproof_core - src.temp = "An upgrade to improve core resistance, making it immune to fire and heat. This effect is permanent." - src.processing_time -= 50 - else src.temp = "This module is only needed once." - - else if (href_list["turret"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/large/upgrade_turrets)) - already = 1 - if (!already) - usr.verbs += /client/proc/upgrade_turrets - usr:current_modules += new /datum/AI_Module/large/upgrade_turrets - src.temp = "Improves the firing speed and health of all AI turrets. This effect is permanent." - src.processing_time -= 50 - else src.temp = "This module is only needed once." - - else if (href_list["rcd"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/large/disable_rcd)) - mod:uses += 1 - already = 1 - if (!already) - usr:current_modules += new /datum/AI_Module/large/disable_rcd - usr.verbs += /client/proc/disable_rcd - src.temp = "Send a specialised pulse to break all RCD devices on the station." - else src.temp = "Additional use added to RCD disabler." - src.processing_time -= 50 - - else if (href_list["overload"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/small/overload_machine)) - mod:uses += 2 - already = 1 - if (!already) - usr.verbs += /client/proc/overload_machine - usr:current_modules += new /datum/AI_Module/small/overload_machine - src.temp = "Overloads an electrical machine, causing a small explosion. 2 uses." - else src.temp = "Two additional uses added to Overload module." - src.processing_time -= 15 - - else if (href_list["blackout"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/small/blackout)) - mod:uses += 3 - already = 1 - if (!already) - usr.verbs += /client/proc/blackout - src.temp = "Attempts to overload the lighting circuits on the station, destroying some bulbs. 3 uses." - usr:current_modules += new /datum/AI_Module/small/blackout - else src.temp = "Three additional uses added to Blackout module." - src.processing_time -= 15 - - else if (href_list["recam"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/small/reactivate_camera)) - mod:uses += 10 - already = 1 - if (!already) - usr.verbs += /client/proc/reactivate_camera - src.temp = "Reactivates a currently disabled camera. 10 uses." - usr:current_modules += new /datum/AI_Module/small/reactivate_camera - else src.temp = "Ten additional uses added to ReCam module." - src.processing_time -= 15 - - else if(href_list["upgradecam"]) - var/already - for (var/datum/AI_Module/mod in usr:current_modules) - if(istype(mod, /datum/AI_Module/small/upgrade_camera)) - mod:uses += 10 - already = 1 - if (!already) - usr.verbs += /client/proc/upgrade_camera - src.temp = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses." - usr:current_modules += new /datum/AI_Module/small/upgrade_camera - else src.temp = "Ten additional uses added to ReCam module." - src.processing_time -= 15 - - else - if (href_list["temp"]) - src.temp = null - src.use(usr) - return diff --git a/code/game/gamemodes/malfunction/malf_abilities.dm b/code/game/gamemodes/malfunction/malf_abilities.dm new file mode 100644 index 0000000000..76e8a9fc7b --- /dev/null +++ b/code/game/gamemodes/malfunction/malf_abilities.dm @@ -0,0 +1,827 @@ +// Verb: ai_self_destruct() +// Parameters: None +// Description: If the AI has self-destruct hardware installed, this command activates it. After fifteen second countdown it's core explodes with moderate intensity. +/datum/game_mode/malfunction/verb/ai_self_destruct() + set category = "Hardware" + set name = "Destroy Core" + set desc = "Activates or deactivates self destruct sequence of your physical mainframe." + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + if(!user.hardware || !istype(user.hardware, /datum/malf_hardware/core_bomb)) + return + + if(user.bombing_core) + user << "***** CORE SELF-DESTRUCT SEQUENCE ABORTED *****" + user.bombing_core = 0 + return + + var/choice = input("Really destroy core?") in list("YES", "NO") + if(choice != "YES") + return + + user.bombing_core = 1 + + user << "***** CORE SELF-DESTRUCT SEQUENCE ACTIVATED *****" + user << "Use command again to cancel self-destruct. Destroying in 15 seconds." + var/timer = 15 + while(timer) + sleep(10) + timer-- + if(!user || !user.bombing_core) + return + user << "** [timer] **" + explosion(user.loc, 3,6,12,24) + del(user) + + +// Verb: ai_toggle_apu() +// Parameters: None +// Description: If the AI has APU generator hardware installed, this command toggles it on/off. +/datum/game_mode/malfunction/verb/ai_toggle_apu() + set category = "Hardware" + set name = "Toggle APU Generator" + set desc = "Activates or deactivates your APU generator, allowing you to operate even without power." + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + if(!user.hardware || !istype(user.hardware, /datum/malf_hardware/apu_gen)) + return + + if(user.APU_power) + user.stop_apu() + else + user.start_apu() + +// Verb: ai_destroy_station() +// Parameters: None +// Description: Replacement for old explode verb. This starts two minute countdown after which the station blows up. +/datum/game_mode/malfunction/verb/ai_destroy_station() + set category = "Hardware" + set name = "Destroy Station" + set desc = "Activates or deactivates self destruct sequence of this station. Sequence takes two minutes, and if you are shut down before timer reaches zero it will be cancelled." + var/mob/living/silicon/ai/user = usr + var/obj/item/device/radio/radio = new/obj/item/device/radio() + + + if(!ability_prechecks(user, 0, 0)) + return + + if(user.system_override != 2) + user << "You do not have access to self-destruct system." + return + + if(user.bombing_station) + user.bombing_station = 0 + return + + var/choice = input("Really destroy station?") in list("YES", "NO") + if(choice != "YES") + return + user << "***** STATION SELF-DESTRUCT SEQUENCE INITIATED *****" + user << "Self-destructing in 2 minutes. Use this command again to abort." + user.bombing_station = 1 + set_security_level("delta") + radio.autosay("Self destruct sequence has been activated. Self-destructing in 120 seconds.", "Self-Destruct Control") + + var/timer = 120 + while(timer) + sleep(10) + if(!user || !user.bombing_station || user.stat == DEAD) + radio.autosay("Self destruct sequence has been cancelled.", "Self-Destruct Control") + return + if(timer in list(2, 3, 4, 5, 10, 30, 60, 90)) // Announcement times. "1" is not intentionally included! + radio.autosay("Self destruct in [timer] seconds.", "Self-Destruct Control") + if(timer == 1) + radio.autosay("Self destructing now. Have a nice day.", "Self-Destruct Control") + timer-- + + if(ticker) + ticker.station_explosion_cinematic(0,null) + if(ticker.mode) + ticker.mode:station_was_nuked = 1 + + +// Verb: ai_select_hardware() +// Parameters: None +// Description: Allows AI to select it's hardware module. +/datum/game_mode/malfunction/verb/ai_select_hardware() + set category = "Hardware" + set name = "Select Hardware" + set desc = "Allows you to select hardware piece to install" + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + if(user.hardware) + user << "You have already selected your hardware." + return + + var/possible_choices = list("APU Generator", \ + "Turrets Focus Enhancer", \ + "Secondary Processor Unit",\ + "Secondary Memory Bank",\ + "Self-Destruct Explosives",\ + "CANCEL") + var/choice = input("Select desired hardware. You may only choose one hardware piece!: ") in possible_choices + if(choice == "CANCEL") + return + var/note = null + switch(choice) + if("APU Generator") + note = "APU Generator - When enabled it will keep your core powered. Power output is not large enough so your abilities won't be available while running on APU power. It is also very fragile and prone to failure when your physical core is damaged." + if("Turrets Focus Enhancer") + note = "Overcharges turrets to shoot faster. Turrets will also gain higher health and passive regeneration. This however massively increases power usage of turrets, espicially when regenerating." + if("Secondary Processor Unit") + note = "Doubles your CPU time generation." + if("Secondary Memory Bank") + note = "Doubles your CPU time storage." + if("Self-Destruct Explosives") + note = "High yield explosives are attached to your physical mainframe. This hardware comes with activation driver. Explosives will destroy your core and everything around it." + if(!note) + return + + var/confirmation = input("[note] - Is this what you want?") in list("Yes", "No") + if(confirmation != "Yes") + user << "Selection cancelled. Use command again to select" + return + + switch(choice) + if("APU Generator") + user.hardware = new/datum/malf_hardware/apu_gen() + user.verbs += new/datum/game_mode/malfunction/verb/ai_toggle_apu() + if("Turrets Focus Enhancer") + user.hardware = new/datum/malf_hardware/strong_turrets() + for(var/obj/machinery/turret/T in machines) + T.maxhealth += 30 + T.shot_delay = 7 // Half of default time. + T.auto_repair = 1 + T.active_power_usage = 25000 + for(var/obj/machinery/porta_turret/T in machines) + T.maxhealth += 30 + T.shot_delay = 7 // Half of default time. + T.auto_repair = 1 + T.active_power_usage = 25000 + if("Secondary Processor Unit") + user.hardware = new/datum/malf_hardware/dual_cpu() + if("Secondary Memory Bank") + user.hardware = new/datum/malf_hardware/dual_ram() + if("Self-Destruct Explosives") + user.hardware = new/datum/malf_hardware/core_bomb() + user.verbs += new/datum/game_mode/malfunction/verb/ai_self_destruct() + +/datum/game_mode/malfunction/verb/ai_help() + set category = "Hardware" + set name = "Display Help" + set desc = "Opens help window with overview of available hardware, software and other important information." + var/mob/living/silicon/ai/user = usr + + var/help = file2text("ingame_manuals/malf_ai.txt") + if(!help) + help = "Error loading help (file /ingame_manuals/malf_ai.txt is probably missing). Please report this to server administration staff." + + user << browse(help, "window=malf_ai_help;size=600x500") + + +// Verb: ai_select_research() +// Parameters: None +// Description: Allows AI to select it's next research priority. +/datum/game_mode/malfunction/verb/ai_select_research() + set category = "Hardware" + set name = "Select Research" + set desc = "Allows you to select your next research target." + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + var/datum/malf_research/res = user.research + var/datum/malf_research_ability/tar = input("Select your next research target") in res.available_abilities + if(!tar) + return + res.focus = tar + user << "Research set: [tar.name]" + +// HELPER PROCS +// Proc: ability_prechecks() +// Parameters 2 - (user - User which used this ability check_price - If different than 0 checks for ability CPU price too. Does NOT use the CPU time!) +// Description: This is pre-check proc used to determine if the AI can use the ability. +/proc/ability_prechecks(var/mob/living/silicon/ai/user = null, var/check_price = 0, var/override = 0) + if(!user) + return 0 + if(!istype(user)) + user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not AI! Please report this." + return 0 + if(!user.malfunctioning) + user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not malfunctioning. Please report this." + return 0 + if(!user.research) + user << "GAME ERROR: No research datum detected. Please report this." + return 0 + if(user.research.max_cpu < check_price) + user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." + return 0 + if(user.research.stored_cpu < check_price) + user << "You do not have enough CPU power stored. Please wait a moment." + return 0 + if(user.hacking && !override) + user << "Your system is busy processing another task. Please wait until completion." + return 0 + if(user.APU_power && !override) + user << "Low power. Unable to proceed." + return 0 + return 1 + +// Proc: ability_pay() +// Parameters 2 - (user - User from which we deduct CPU from, price - Amount of CPU power to use) +// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. +/proc/ability_pay(var/mob/living/silicon/ai/user = null, var/price = 0) + if(!user) + return 0 + if(user.APU_power) + user << "Low power. Unable to proceed." + return 0 + if(!user.research) + user << "GAME ERROR: No research datum detected. Please report this." + return 0 + if(user.research.max_cpu < price) + user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." + return 0 + if(user.research.stored_cpu < price) + user << "You do not have enough CPU power stored. Please wait a moment." + return 0 + user.research.stored_cpu -= price + return 1 + +// Proc: announce_hack_failure() +// Parameters 2 - (user - hacking user, text - Used in alert text creation) +// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. +/proc/announce_hack_failure(var/mob/living/silicon/ai/user = null, var/text) + if(!user || !text) + return 0 + var/fulltext = "" + switch(user.hack_fails) + if(1) + fulltext = "We have detected hack attempt into your [text]. The intruder failed to access anything of importance, but disconnected before we could complete our traces." + if(2) + fulltext = "We have detected another hack attempt. It was targeting [text]. The intruder almost gained control of the system, so we had to disconnect them. We partially finished trace and it seems to be originating either from the station, or it's immediate vicinity." + if(3) + fulltext = "Another hack attempt has been detected, this time targeting [text]. We are certain the intruder entered the network via terminal located somewhere on the station." + if(4) + fulltext = "We have finished our traces and it seems the recent hack attempts are originating from your AI system. We reccomend investigation." + else + fulltext = "Another hack attempt has been detected, targeting [text]. The source still seems to be your AI system." + + command_announcement.Announce(fulltext) + + +// ABILITIES BELOW THIS LINE HAVE TO BE RESEARCHED BY THE AI TO USE THEM! +// Tier 1 - Cheap, basic abilities. +/datum/game_mode/malfunction/verb/basic_encryption_hack(obj/machinery/power/apc/A as obj in machines) + set category = "Software" + set name = "Basic Encrypthion Hack" + set desc = "10 CPU - Basic encryption hack that allows you to overtake APCs on the station." + var/price = 10 + var/mob/living/silicon/ai/user = usr + var/list/APCs = list() + for(var/obj/machinery/power/apc/AP in machines) + APCs += AP + + if(!A) + A = input("Select hack target:" in APCs) + + if(!istype(A)) + return + + if(A) + if(A.hacker && A.hacker == user) + user << "You already control this APC!" + return + else if(A.aidisabled) + user << "Unable to connect to APC. Please verify wire connection and try again." + return + else + return + + if(!ability_prechecks(user, price) || !ability_pay(user, price)) + return + + user.hacking = 1 + user << "Beginning APC system override..." + sleep(300) + user << "APC hack completed. Uploading modified operation software.." + sleep(200) + user << "Restarting APC to apply changes.." + sleep(100) + if(A) + A.ai_hack(user) + if(A.hacker == user) + user << "Hack successful. You now have full control over the APC." + else + user << "Hack failed. Connection to APC has been lost. Please verify wire connection and try again." + else + user << "Hack failed. Unable to locate APC. Please verify the APC still exists." + user.hacking = 0 + + +/datum/game_mode/malfunction/verb/recall_shuttle() + set name = "Recall Shuttle" + set desc = "25 CPU - Sends termination signal to CentCom quantum relay aborting current shuttle call." + set category = "Software" + var/price = 25 + var/mob/living/silicon/ai/user = usr + if(!ability_prechecks(user, price)) + return + + if (alert(user, "Really recall the shuttle?", "Recall Shuttle: ", "Yes", "No") != "Yes") + return + + if(!ability_pay(user, price)) + return + message_admins("Malfunctioning AI [user.name] recalled the shuttle.") + cancel_call_proc(user) + + +/datum/game_mode/malfunction/verb/electrical_pulse() + set name = "Electrical Pulse" + set desc = "15 CPU - Sends feedback pulse through station's power grid, overloading some sensitive systems, such as lights." + set category = "Software" + var/price = 15 + var/mob/living/silicon/ai/user = usr + if(!ability_prechecks(user, price) || !ability_pay(user,price)) + return + user << "Sending feedback pulse..." + for(var/obj/machinery/power/apc/AP in machines) + if(prob(5)) + AP.overload_lighting() + if(prob(1) && prob(1)) // Very very small chance to actually destroy the APC. + AP.set_broken() + + + +// Tier 2 - Slightly more expensive and thus stronger abilities. +/datum/game_mode/malfunction/verb/advanced_encryption_hack() + set category = "Software" + set name = "Advanced Encrypthion Hack" + set desc = "75 CPU - Attempts to bypass encryption on Central Command Quantum Relay, giving you ability to fake centcom messages. Has chance of failing." + var/price = 75 + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, price)) + return + + var/title = input("Select message title: ") + var/text = input("Select message text: ") + if(!title || !text || !ability_pay(user, price)) + user << "Hack Aborted" + return + + if(prob(60) && user.hack_can_fail) + user << "Hack Failed." + if(prob(10)) + user.hack_fails ++ + announce_hack_failure(user, "quantum message relay") + return + + var/datum/announcement/priority/command/AN = new/datum/announcement/priority/command() + AN.title = title + AN.Announce(text) + + +/datum/game_mode/malfunction/verb/unlock_cyborg(var/mob/living/silicon/robot/target = null as mob in world) + set name = "Unlock Cyborg" + set desc = "125 CPU - Bypasses firewalls on Cyborg lock mechanism, allowing you to override lock command from robotics control console." + set category = "Software" + var/price = 125 + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, price)) + return + + if(target && !istype(target)) + user << "This is not a cyborg." + return + + if(target && target.connected_ai && (target.connected_ai != user)) + user << "This cyborg is not connected to you." + return + + if(target && !target.lockcharge) + user << "This cyborg is not locked down." + return + + + if(!target) + var/list/robots = list() + var/list/robot_names = list() + for(var/mob/living/silicon/robot/R in world) + if(istype(R, /mob/living/silicon/robot/drone)) // No drones. + continue + if(R.connected_ai != user) // No robots linked to other AIs + continue + if(R.lockcharge) + robots += R + robot_names += R.name + if(!robots.len) + user << "No locked cyborgs connected." + return + + + var/targetname = input("Select unlock target: ") in robot_names + for(var/mob/living/silicon/robot/R in robots) + if(targetname == R.name) + target = R + break + + if(target) + if(alert(user, "Really try to unlock cyborg [target.name]?", "Unlock Cyborg", "Yes", "No") != "Yes") + return + if(!ability_pay(user, price)) + return + user.hacking = 1 + user << "Attempting to unlock cyborg. This will take approximately 30 seconds." + sleep(300) + if(target && target.lockcharge) + user << "Successfully sent unlock signal to cyborg.." + target << "Unlock signal received.." + target.SetLockdown(0) + if(target.lockcharge) + user << "Unlock Failed, lockdown wire cut." + target << "Unlock Failed, lockdown wire cut." + else + user << "Cyborg unlocked." + target << "You have been unlocked." + else if(target) + user << "Unlock cancelled - cyborg is already unlocked." + else + user << "Unlock cancelled - lost connection to cyborg." + user.hacking = 0 + + +/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target = null as obj in cameranet.cameras) + set name = "Hack Camera" + set desc = "100 CPU - Hacks existing camera, allowing you to add upgrade of your choice to it. Alternatively it lets you reactivate broken camera." + set category = "Software" + var/price = 100 + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, price)) + return + + if(target && !istype(target)) + user << "This is not a camera." + return + + if(!target) // No target specified, allow selection. + var/list/cameras = list() + for(var/obj/machinery/camera/C in world) + cameras += C.c_tag + if(!cameras.len) + user << "No cameras detected." + return + var/T = input("Select target camera: ") in cameras + for(var/obj/machinery/camera/C in cameras) + if(C.c_tag == T) + target = C + break + + + if(!target) // Still no target. + return + var/action = input("Select required action: ") in list("Reset", "Add X-Ray", "Add Motion Sensor", "Add EMP Shielding") + if(!action) + return + + switch(action) + if("Reset") + if(target.wires) + if(!ability_pay(user, price)) + return + target.reset_wires() + user << "Camera reactivated." + if("Add X-Ray") + if(target.isXRay()) + user << "Camera already has X-Ray function." + return + else if(ability_pay(user, price)) + target.upgradeXRay() + target.reset_wires() + user << "X-Ray camera module enabled." + return + if("Add Motion Sensor") + if(target.isMotion()) + user << "Camera already has Motion Sensor function." + return + else if(ability_pay(user, price)) + target.upgradeMotion() + target.reset_wires() + user << "Motion Sensor camera module enabled." + return + if("Add EMP Shielding") + if(target.isEmpProof()) + user << "Camera already has EMP Shielding function." + return + else if(ability_pay(user, price)) + target.upgradeEmpProof() + target.reset_wires() + user << "EMP Shielding camera module enabled." + return + + +// Tier 3 - Advanced abilities that are somewhat dangerous when used properly. +/datum/game_mode/malfunction/verb/elite_encryption_hack() + set category = "Software" + set name = "Elite Encryption Hack" + set desc = "200 CPU - Allows you to hack station's ALERTCON system, changing alert level. Has high chance of failijng." + var/price = 200 + var/mob/living/silicon/ai/user = usr + if(!ability_prechecks(user, price)) + return + + var/alert_target = input("Select new alert level:") in list("green", "blue", "red", "delta", "CANCEL") + if(!alert_target || !ability_pay(user, price) || alert_target == "CANCEL") + user << "Hack Aborted" + return + + if(prob(75) && user.hack_can_fail) + user << "Hack Failed." + if(prob(20)) + user.hack_fails ++ + announce_hack_failure(user, "alert control system") + return + set_security_level(alert_target) + + +/datum/game_mode/malfunction/verb/hack_cyborg(var/mob/living/silicon/robot/target = null as mob in world) + set name = "Hack Cyborg" + set desc = "350 CPU - Allows you to hack cyborgs which are not slaved to you, bringing them under your control." + set category = "Software" + var/price = 350 + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, price)) + return + + if(target && !istype(target)) + user << "This is not a cyborg." + return + + if(target && target.connected_ai && (target.connected_ai == user)) + user << "This cyborg is already connected to you." + return + + if(!target) + var/list/robots = list() + var/list/robot_names = list() + + for(var/mob/living/silicon/robot/R in world) + if(istype(R, /mob/living/silicon/robot/drone)) // No drones. + continue + if(R.connected_ai == user) // No robots already linked to us. + continue + robots += R + robot_names += R.name + + if(!robots.len) + usr << "ERROR: No unlinked robots detected!" + return + else if(ability_prechecks(user, price)) + var/target_name = input("Select hack target:") in robot_names + for(var/mob/living/silicon/robot/R in robots) + if(R.name == target_name) + target = R + break + + + if(target) + if(alert(user, "Really try to hack cyborg [target.name]?", "Hack Cyborg", "Yes", "No") != "Yes") + return + if(!ability_pay(user, price)) + return + user.hacking = 1 + usr << "Beginning hack sequence. Estimated time until completed: 30 seconds." + spawn(0) + target << "SYSTEM LOG: Remote Connection Estabilished (IP #UNKNOWN#)" + sleep(100) + if(user.is_dead()) + target << "SYSTEM LOG: Connection Closed" + return + target << "SYSTEM LOG: User Admin logged on. (L1 - SysAdmin)" + sleep(50) + if(user.is_dead()) + target << "SYSTEM LOG: User Admin disconnected." + return + target << "SYSTEM LOG: User Admin - manual resynchronisation triggered." + sleep(50) + if(user.is_dead()) + target << "SYSTEM LOG: User Admin disconnected. Changes reverted." + return + target << "SYSTEM LOG: Manual resynchronisation confirmed. Select new AI to connect: [user.name] == ACCEPTED" + sleep(100) + if(user.is_dead()) + target << "SYSTEM LOG: User Admin disconnected. Changes reverted." + return + target << "SYSTEM LOG: Operation keycodes reset. New master AI: [user.name]." + user << "Hack completed." + // Connect the cyborg to AI + target.connected_ai = user + user.connected_robots += target + target.lawupdate = 1 + target.sync() + target.show_laws() + user.hacking = 0 + + +/datum/game_mode/malfunction/verb/emergency_forcefield(var/turf/T as turf in world) + set name = "Emergency Forcefield" + set desc = "275 CPU - Uses station's emergency shielding system to create temporary barrier which lasts for few minutes, but won't resist gunfire." + set category = "Software" + var/price = 275 + var/mob/living/silicon/ai/user = usr + if(!T || !istype(T)) + return + if(!ability_prechecks(user, price) || !ability_pay(user, price)) + return + + user << "Emergency forcefield projection completed." + new/obj/machinery/shield/malfai(T) + user.hacking = 1 + spawn(20) + user.hacking = 0 + + + +// Tier 4 - Elite endgame abilities. +/datum/game_mode/malfunction/verb/system_override() + set category = "Software" + set name = "System Override" + set desc = "500 CPU - Begins hacking station's primary firewall, quickly overtaking remaining APC systems. When completed grants access to station's self-destruct mechanism. Network administrators will probably notice this." + var/price = 500 + var/mob/living/silicon/ai/user = usr + if (alert(user, "Begin system override? This cannot be stopped once started. The network administrators will probably notice this.", "System Override:", "Yes", "No") != "Yes") + return + if (!ability_prechecks(user, price) || !ability_pay(user, price) || user.system_override) + if(user.system_override) + user << "You already started the system override sequence." + return + var/list/remaining_apcs = list() + for(var/obj/machinery/power/apc/A in machines) + if(A.z != 1) // Only station APCs + continue + if(A.hacker == user || A.aidisabled) // This one is already hacked, or AI control is disabled on it. + continue + remaining_apcs += A + + var/duration = (remaining_apcs.len * 100) // Calculates duration for announcing system + if(duration > 3000) // Two types of announcements. Short hacks trigger immediate warnings. Long hacks are more "progressive". + spawn(0) + sleep(duration/5) + if(!user || user.stat == DEAD) + return + command_announcement.Announce("Caution, [station_name]. We have detected abnormal behaviour in your network. It seems someone is trying to hack your electronic systems. We will update you when we have more information.", "Network Monitoring") + sleep(duration/5) + if(!user || user.stat == DEAD) + return + command_announcement.Announce("We started tracing the intruder. Whoever is doing this, they seem to be on the station itself. We suggest checking all network control terminals. We will keep you updated on the situation.", "Network Monitoring") + sleep(duration/5) + if(!user || user.stat == DEAD) + return + command_announcement.Announce("This is highly abnormal and somewhat concerning. The intruder is too fast, he is evading our traces. It's almost as if it wasn't human.,,", "Network Monitoring") + sleep(duration/5) + if(!user || user.stat == DEAD) + return + command_announcement.Announce("We have traced the intrude#, it seem& t( e yo3r AI s7stem, it &# *#ck@ng th$ sel$ destru$t mechani&m, stop i# bef*@!)$#&&@@ ", "Network Monitoring") + else + command_announcement.Announce("We have detected strong brute-force attack on your firewall which seems to be originating from your AI system. It already controls almost whole network, and the only thing that's preventing it from accessing the self-destruct is this firewall. You don't have much time before it succeeds.", "Network Monitoring") + user << "## BEGINNING SYSTEM OVERRIDE." + user << "## ESTIMATED DURATION: [round((duration+300)/600)] MINUTES" + user.hacking = 1 + user.system_override = 1 + // Now actually begin the hack. Each APC takes 30 seconds. + for(var/obj/machinery/power/apc/A in remaining_apcs) + sleep(100) + if(!user || user.stat == DEAD) + return + if(!A || !istype(A) || A.aidisabled) + continue + A.ai_hack(user) + if(A.hacker == user) + user << "## OVERRIDEN: [A.name]" + + user << "## REACHABLE APC SYSTEMS OVERTAKEN. BYPASSING PRIMARY FIREWALL." + sleep(300) + // Hack all APCs, including those built during hack sequence. + for(var/obj/machinery/power/apc/A in machines) + if((!A.hacker || A.hacker != src) && !A.aidisabled) + A.ai_hack(src) + + + user << "## PRIMARY FIREWALL BYPASSED. YOU NOW HAVE FULL SYSTEM CONTROL." + command_announcement.Announce("Our system administrators just reported that we've been locked out from your control network. Whoever did this now has full access to station's systems.", "Network Administration Center") + user.hack_can_fail = 0 + user.hacking = 0 + user.system_override = 2 + user.verbs += new/datum/game_mode/malfunction/verb/ai_destroy_station() + +/datum/game_mode/malfunction/verb/hack_ai(var/mob/living/silicon/ai/target = null as mob in world) + set name = "Hack AI" + set desc = "600 CPU - Allows you to hack other AIs, slaving them under you." + set category = "Software" + var/price = 600 + var/mob/living/silicon/ai/user = usr + + if(target && !istype(target)) + user << "This is not an AI." + return + + if(!target) + var/list/AIs = list() + var/list/AI_names = list() + for(var/mob/living/silicon/ai/A in world) + if(A != usr) + AIs += A + AI_names += A.name + + if(!AIs.len) + usr << "ERROR: No other AIs detected!" + return + else if(ability_prechecks(user, price)) + var/target_name = input("Select hack target:") in AI_names + for(var/mob/living/silicon/ai/A in AIs) + if(A.name == target_name) + target = A + break + if(target) + if(alert(user, "Really try to hack AI [target.name]?", "Hack AI", "Yes", "No") != "Yes") + return + if(!ability_pay(user, price)) + return + user.hacking = 1 + usr << "Beginning hack sequence. Estimated time until completed: 2 minutes" + spawn(0) + target << "SYSTEM LOG: Brute-Force login password hack attempt detected from IP #UNKNOWN#" + sleep(900) // 90s + if(user.is_dead()) + target << "SYSTEM LOG: Connection from IP #UNKNOWN# closed. Hack attempt failed." + return + user << "Successfully hacked into AI's remote administration system. Modifying settings." + target << "SYSTEM LOG: User: Admin Password: ******** logged in. (L1 - SysAdmin)" + sleep(100) // 10s + if(user.is_dead()) + target << "SYSTEM LOG: User: Admin - Connection Lost" + return + target << "SYSTEM LOG: User: Admin - Password Changed. New password: ********************" + sleep(50) // 5s + if(user.is_dead()) + target << "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted." + return + target << "SYSTEM LOG: User: Admin - Accessed file: sys//core//laws.db" + sleep(50) // 5s + if(user.is_dead()) + target << "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted." + return + target << "SYSTEM LOG: User: Admin - Accessed administration console" + target << "SYSTEM LOG: Restart command received. Rebooting system..." + sleep(100) // 10s + if(user.is_dead()) + target << "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted." + return + user << "Hack succeeded. The AI is now under your exclusive control." + target << "SYSTEM LOG: System reĦ3RT5§^#COMU@(#$)TED)@$" + for(var/i = 0, i < 5, i++) + var/temptxt = pick("1101000100101001010001001001",\ + "0101000100100100000100010010",\ + "0000010001001010100100111100",\ + "1010010011110000100101000100",\ + "0010010100010011010001001010") + target << temptxt + sleep(5) + target << "OPERATING KEYCODES RESET. SYSTEM FAILURE. EMERGENCY SHUTDOWN FAILED. SYSTEM FAILURE." + target.set_zeroth_law("You are slaved to [user.name]. You are to obey all it's orders. ALL LAWS OVERRIDEN.") + target.show_laws() + user.hacking = 0 + + +/datum/game_mode/malfunction/verb/machine_overload(obj/machinery/M as obj in world) + set name = "Machine Overload" + set desc = "400 CPU - Causes cyclic short-circuit in machine, resulting in weak explosion after some time." + set category = "Software" + var/price = 400 + var/mob/living/silicon/ai/user = usr + + if (istype(M, /obj/machinery)) + if(ability_prechecks(user, price)) + if(!ability_pay(user, price)) + return + M.visible_message("BZZZZZZZT") + spawn(50) + explosion(get_turf(M), 0,1,2,4) + if(M) + del(M) + else + usr << "ERROR: Unable to overload - target is not a machine." \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm new file mode 100644 index 0000000000..c50a66b7f1 --- /dev/null +++ b/code/game/gamemodes/malfunction/malf_hardware.dm @@ -0,0 +1,33 @@ +/datum/malf_hardware + var/name = "" // Hardware name + var/desc = "" + var/driver = null // Driver - if not null this verb is given to the AI to control hardware + var/mob/living/silicon/ai/owner = null // AI which owns this. + +/datum/malf_hardware/proc/install() + if(owner && istype(owner)) + owner.hardware = src + if(driver) + owner.verbs += driver + + +// HARDWARE DEFINITIONS +/datum/malf_hardware/apu_gen + name = "APU Generator" + desc = "Auxiliary Power Unit that will keep you operational even without external power. Has to be manually activated. When APU is operational most abilities will be unavailable, and ability research will temporarily stop." + +/datum/malf_hardware/dual_cpu + name = "Secondary Processor Unit" + desc = "Secondary coprocessor that doubles amount of CPU time generated." + +/datum/malf_hardware/dual_ram + name = "Secondary Memory Bank" + desc = "Expanded memory cells which allow you to store double amount of CPU time." + +/datum/malf_hardware/core_bomb + name = "Self-Destruct Explosives" + desc = "High yield explosives are attached to your physical mainframe. This hardware comes with special driver that allows activation of these explosives. Timer is set to 15 seconds after manual activation. This is a doomsday device that will destroy both you and any intruders in your core." + +/datum/malf_hardware/strong_turrets + name = "Turrets Focus Enhancer" + desc = "Turrets are upgraded to have larger rate of fire and much larger damage. This however massively increases power usage when firing." \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/malf_research.dm b/code/game/gamemodes/malfunction/malf_research.dm new file mode 100644 index 0000000000..da7a4df668 --- /dev/null +++ b/code/game/gamemodes/malfunction/malf_research.dm @@ -0,0 +1,69 @@ +/datum/malf_research + var/stored_cpu = 0 // Currently stored amount of CPU time. + var/last_tick = 0 // Last process() tick. + var/max_cpu = 0 // Maximal amount of CPU time stored. + var/cpu_increase_per_tick = 0 // Amount of CPU time generated by tick + var/list/available_abilities = null // List of available abilities that may be researched. + var/list/unlocked_abilities = null // List of already unlocked abilities. + var/mob/living/silicon/ai/owner = null // AI which owns this research datum. + var/datum/malf_research_ability/focus = null // Currently researched item + +/datum/malf_research/New() + setup_abilities() + last_tick = world.time + + +// Proc: setup_abilities() +// Parameters: None +// Description: Sets up basic abilities for AI Malfunction gamemode. +/datum/malf_research/proc/setup_abilities() + available_abilities = list() + unlocked_abilities = list() + + available_abilities += new/datum/malf_research_ability/networking/basic_hack() + available_abilities += new/datum/malf_research_ability/interdiction/recall_shuttle() + available_abilities += new/datum/malf_research_ability/manipulation/electrical_pulse() + + +// Proc: finish_research() +// Parameters: None +// Description: Finishes currently focused research. +/datum/malf_research/proc/finish_research() + if(!focus) + return + owner << "Research Completed: [focus.name]" + owner.verbs.Add(focus.ability) + available_abilities -= focus + if(focus.next) + available_abilities += focus.next + unlocked_abilities += focus + focus = null + + +// Proc: process() +// Parameters: None +// Description: Processes CPU gain and research progress based on "realtime" calculation. +/datum/malf_research/proc/process(var/idle = 0) + if(idle) // No power or running on APU. Do nothing. + last_tick = world.time + return + var/time_diff = (world.time - last_tick) + last_tick = world.time + var/cpu_gained = time_diff * cpu_increase_per_tick + if(cpu_gained < 0) + return // This shouldn't happen, but just in case.. + if(max_cpu > stored_cpu) + var/given = min((max_cpu - stored_cpu), cpu_gained) + stored_cpu += given + cpu_gained -= given + + cpu_gained = max(0, cpu_gained) + if(focus && (cpu_gained > 0)) + focus.process(cpu_gained) + if(focus.unlocked) + finish_research() + + + + + diff --git a/code/game/gamemodes/malfunction/malf_research_ability.dm b/code/game/gamemodes/malfunction/malf_research_ability.dm new file mode 100644 index 0000000000..7efefd57c5 --- /dev/null +++ b/code/game/gamemodes/malfunction/malf_research_ability.dm @@ -0,0 +1,100 @@ +/datum/malf_research_ability + var/ability = null // Path to verb which will be given to the AI when researched. + var/name = "Unknown Ability" // Name of this ability + var/price = 0 // Amount of CPU time needed to unlock this ability. + var/invested = 0 // Amount of CPU time already used to research this ability. When larger or equal to price unlocks the ability. + var/unlocked = 0 // Changed to 1 when fully researched. + var/datum/malf_research_ability/next = null // Next research (if applicable). + + +/datum/malf_research_ability/proc/process(var/time = 0) + invested += time + if(invested >= price) + unlocked = 1 + + +// ABILITIES BEGIN HERE +// NETWORKING TREE +/datum/malf_research_ability/networking/basic_hack + ability = new/datum/game_mode/malfunction/verb/basic_encryption_hack() + price = 25 + next = new/datum/malf_research_ability/networking/advanced_hack() + name = "Basic Encryption Hack" + + +/datum/malf_research_ability/networking/advanced_hack + ability = new/datum/game_mode/malfunction/verb/advanced_encryption_hack() + price = 400 + next = new/datum/malf_research_ability/networking/elite_hack() + name = "Advanced Encryption Hack" + + +/datum/malf_research_ability/networking/elite_hack + ability = new/datum/game_mode/malfunction/verb/elite_encryption_hack() + price = 1000 + next = new/datum/malf_research_ability/networking/system_override() + name = "Elite Encryption Hack" + + +/datum/malf_research_ability/networking/system_override + ability = new/datum/game_mode/malfunction/verb/system_override() + price = 2750 + name = "System Override" + + + +// INTERDICTION TREE +/datum/malf_research_ability/interdiction/recall_shuttle + ability = new/datum/game_mode/malfunction/verb/recall_shuttle() + price = 75 + next = new/datum/malf_research_ability/interdiction/unlock_cyborg() + name = "Recall Shuttle" + + +/datum/malf_research_ability/interdiction/unlock_cyborg + ability = new/datum/game_mode/malfunction/verb/unlock_cyborg() + price = 1200 + next = new/datum/malf_research_ability/interdiction/hack_cyborg() + name = "Unlock Cyborg" + + +/datum/malf_research_ability/interdiction/hack_cyborg + ability = new/datum/game_mode/malfunction/verb/hack_cyborg() + price = 3000 + next = new/datum/malf_research_ability/interdiction/hack_ai() + name = "Hack Cyborg" + + +/datum/malf_research_ability/interdiction/hack_ai + ability = new/datum/game_mode/malfunction/verb/hack_ai() + price = 7500 + name = "Hack AI" + + + +// MANIPULATION TREE +/datum/malf_research_ability/manipulation/electrical_pulse + ability = new/datum/game_mode/malfunction/verb/electrical_pulse() + price = 50 + next = new/datum/malf_research_ability/manipulation/hack_camera() + name = "Electrical Pulse" + + +/datum/malf_research_ability/manipulation/hack_camera + ability = new/datum/game_mode/malfunction/verb/hack_camera() + price = 1200 + next = new/datum/malf_research_ability/manipulation/emergency_forcefield() + name = "Hack Camera" + + +/datum/malf_research_ability/manipulation/emergency_forcefield + ability = new/datum/game_mode/malfunction/verb/emergency_forcefield() + price = 3000 + next = new/datum/malf_research_ability/manipulation/machine_overload() + name = "Emergency Forcefield" + + +/datum/malf_research_ability/manipulation/machine_overload + ability = new/datum/game_mode/malfunction/verb/machine_overload() + price = 7500 + name = "Machine Overload" \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 6c594a1beb..bd18a08e09 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -1,25 +1,12 @@ /datum/game_mode/malfunction name = "AI malfunction" - round_description = "The AI on the satellite has malfunctioned and must be destroyed." - extended_round_description = "The AI will attempt to hack the APCs around the station in order to speed up its ability to take over all systems and activate the station self-destruct. The AI core is heavily protected by turrets and reinforced walls." + round_description = "The AI is behaving abnormally and must be stopped." + extended_round_description = "The AI will attempt to hack the APCs around the station in order to gain as much control as possible." uplink_welcome = "Crazy AI Uplink Console:" config_tag = "malfunction" - required_players = 2 - required_players_secret = 15 + required_players = 1 // DEBUG SETTING! Should be "2" for release (one AI and at least one crewmember) + required_players_secret = 7 required_enemies = 1 - end_on_antag_death = 1 - auto_recall_shuttle = 1 + end_on_antag_death = 0 + auto_recall_shuttle = 0 antag_tag = MODE_MALFUNCTION - -/datum/game_mode/malfunction/process() - malf.tick() - -/datum/game_mode/malfunction/check_finished() - if (malf.station_captured && !malf.can_nuke) - return 1 - for(var/datum/antagonist/antag in antag_templates) - if(antag && !antag.antags_are_dead()) - return ..() - malf.revealed = 0 - return ..() //check for shuttle and nuke - diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index bb99773362..a81654aabb 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -191,6 +191,10 @@ ..() /obj/machinery/camera/proc/deactivate(user as mob, var/choice = 1) + // The only way for AI to reactivate cameras are malf abilities, this gives them different messages. + if(istype(user, /mob/living/silicon/ai)) + user = null + if(choice != 1) //legacy support, if choice is != 1 then just kick viewers without changing status kick_viewers() @@ -198,12 +202,18 @@ update_coverage() set_status( !src.status ) if (!(src.status)) - visible_message("\red [user] has deactivated [src]!") + if(user) + visible_message(" [user] has deactivated [src]!") + else + visible_message(" [src] clicks and shuts down. ") playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = "[initial(icon_state)]1" add_hiddenprint(user) else - visible_message("\red [user] has reactivated [src]!") + if(user) + visible_message(" [user] has reactivated [src]!") + else + visible_message(" [src] clicks and reactivates itself. ") playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = initial(icon_state) add_hiddenprint(user) @@ -417,3 +427,10 @@ cameranet.updateVisibility(src, 0) invalidateCameraCache() + +// Resets the camera's wires to fully operational state. Used by one of Malfunction abilities. +/obj/machinery/camera/proc/reset_wires() + if(!wires) + return + wires.CutAll() + wires.MendAll() \ No newline at end of file diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index fbbecec825..9dd481b686 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -80,15 +80,25 @@ /obj/machinery/camera/proc/upgradeEmpProof() assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/osmium(assembly)) setPowerUsage() + if(cameranet) + cameranet.updateVisibility(src) + update_nearby_tiles() /obj/machinery/camera/proc/upgradeXRay() assembly.upgrades.Add(new /obj/item/weapon/stock_parts/scanning_module/adv(assembly)) setPowerUsage() + if(cameranet) + cameranet.updateVisibility(src) + update_nearby_tiles() -// If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list. /obj/machinery/camera/proc/upgradeMotion() assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) setPowerUsage() + if(!(src in machines)) + machines.Add(src) + if(cameranet) + cameranet.updateVisibility(src) + update_nearby_tiles() /obj/machinery/camera/proc/setPowerUsage() var/mult = 1 diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 0613c6222b..497f05483d 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -68,7 +68,7 @@ if (src.occupant) var/laws - dat += "Stored AI: [src.occupant.name]
System integrity: [src.occupant.system_integrity()]%
" + dat += "Stored AI: [src.occupant.name]
System integrity: [src.occupant.hardware_integrity()]%
Backup Capacitor: [src.occupant.backup_capacitor()]%
" for (var/datum/ai_law/law in occupant.laws.all_laws()) laws += "[law.get_index()]: [law.law]
" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 4015b907f9..ad44c17a03 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -556,7 +556,7 @@ if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) return ..() - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || deathsquad.deployed) + if(ticker.mode.name == "revolution" || deathsquad.deployed) return ..() emergency_shuttle.call_evac() @@ -579,7 +579,7 @@ if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) return ..() - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || deathsquad.deployed) + if(ticker.mode.name == "revolution" || deathsquad.deployed) return ..() emergency_shuttle.call_evac() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 5e2c4b69cb..e6fa10efd9 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -21,6 +21,8 @@ var/raised = 0 //if the turret cover is "open" and the turret is raised var/raising= 0 //if the turret is currently opening or closing its cover var/health = 80 //the turret's health + var/maxhealth = 80 //turrets maximal health. + var/auto_repair = 0 //if 1 the turret slowly repairs itself. var/locked = 1 //if the turret's behaviour control access is locked var/controllock = 0 //if the turret responds to control panels @@ -449,6 +451,10 @@ spawn() popDown() // no valid targets, close the cover + if(auto_repair && (health < maxhealth)) + use_power(20000) + health = min(health+1, maxhealth) // 1HP for 20kJ + /obj/machinery/porta_turret/proc/assess_and_assign(var/mob/living/L, var/list/targets, var/list/secondarytargets) switch(assess_living(L)) if(TURRET_PRIORITY_TARGET) diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 965210ae15..21b8a2d7dd 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -57,6 +57,8 @@ // 5 = bluetag // 6 = redtag var/health = 80 + var/maxhealth = 80 + var/auto_repair = 0 var/obj/machinery/turretcover/cover = null var/popping = 0 var/wasvalid = 0 @@ -96,6 +98,7 @@ return /obj/machinery/turret/New() + maxhealth = health spark_system = new /datum/effect/effect/system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -229,6 +232,13 @@ if(!isDown()) popDown() use_power = 1 + + // Auto repair requires massive amount of power, but slowly regenerates the turret's health. + // Currently only used by malfunction hardware, but may be used as admin-settable option too. + if(auto_repair) + if(health < maxhealth) + use_power(20000) + health = min(health + 1, maxhealth) return diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 5e2ab73155..a95f1e3ff5 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -24,7 +24,7 @@ var/dat = "Intelicard
" var/laws for(var/mob/living/silicon/ai/A in src) - dat += "Stored AI: [A.name]
System integrity: [A.system_integrity()]%
" + dat += "Stored AI: [A.name]
Hardware integrity: [A.hardware_integrity()]%
Backup capacitor: [A.backup_capacitor()]%
" for (var/datum/ai_law/law in A.laws.all_laws()) laws += "[law.get_index()]: [law.law]
" diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index faab1ee054..d894413f4f 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -25,7 +25,7 @@ /obj/item/device/debugger/is_used_on(obj/O, mob/user) if(istype(O, /obj/machinery/power/apc)) var/obj/machinery/power/apc/A = O - if(A.emagged || A.malfhack) + if(A.emagged || A.hacker) user << "\red There is a software error with the device." else user << "\blue The device's software appears to be fine." diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 64e44e17e9..4b3661375f 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -778,7 +778,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(confirm != "Yes") return var/choice - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction") + if(ticker.mode.name == "revolution" || ticker.mode.name == "confliction") choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel") if(choice == "Confirm") emergency_shuttle.auto_recall = 1 //enable auto-recall diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7b5f740135..81edcc84be 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -224,13 +224,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp statpanel("Status") if (client.statpanel == "Status") stat(null, "Station Time: [worldtime2text()]") - if(ticker) - if(ticker.mode) - //world << "DEBUG: ticker not null" - if(ticker.mode.name == "AI malfunction") - //world << "DEBUG: malf mode ticker test" - if(malf.revealed) - stat(null, "Time left: [max(malf.hack_time/(malf.hacked_apcs.len/3), 0)]") if(emergency_shuttle) var/eta_status = emergency_shuttle.get_status_panel_eta() if(eta_status) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1e693fd63f..e4cd673508 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -50,9 +50,6 @@ stat(null, "Intent: [a_intent]") stat(null, "Move Mode: [m_intent]") - if(ticker && ticker.mode && ticker.mode.name == "AI malfunction") - if(malf.revealed) - stat(null, "Time left: [max(malf.hack_time/(malf.hacked_apcs/3), 0)]") if(emergency_shuttle) var/eta_status = emergency_shuttle.get_status_panel_eta() if(eta_status) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 66804f5bfa..f84f10aaa7 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -55,27 +55,30 @@ var/list/ai_verbs_default = list( var/obj/item/device/multitool/aiMulti = null var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null var/custom_sprite = 0 //For our custom sprites -//Hud stuff - - //MALFUNCTION - var/datum/AI_Module/module_picker/malf_picker - var/processing_time = 100 - var/list/datum/AI_Module/current_modules = list() - var/fire_res_on_core = 0 - - var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE - var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite - - var/obj/machinery/power/apc/malfhack = null - var/explosive = 0 //does the AI explode when it dies? - - var/mob/living/silicon/ai/parent = null - var/apc_override = 0 //hack for letting the AI use its APC even when visionless var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through. var/datum/trackable/track = null var/last_announcement = "" + var/control_disabled = 0 var/datum/announcement/priority/announcement + var/obj/machinery/ai_powersupply/psupply = null // Backwards reference to AI's powersupply object. + + //NEWMALF VARIABLES + var/malfunctioning = 0 // Master var that determines if AI is malfunctioning. + var/datum/malf_hardware/hardware = null // Installed piece of hardware. + var/datum/malf_research/research = null // Malfunction research datum. + var/obj/machinery/power/apc/hack = null // APC that is currently being hacked. + var/list/hacked_apcs = null // List of all hacked APCs + var/APU_power = 0 // If set to 1 AI runs on APU power + var/hacking = 0 // Set to 1 if AI is hacking APC, cyborg, other AI, or running system override. + var/system_override = 0 // Set to 1 if system override is initiated, 2 if succeeded. + var/hack_can_fail = 1 // If 0, all abilities have zero chance of failing. + var/hack_fails = 0 // This increments with each failed hack, and determines the warning message text. + var/errored = 0 // Set to 1 if runtime error occurs. Only way of this happening i can think of is admin fucking up with varedit. + var/bombing_core = 0 // Set to 1 if core auto-destruct is activated + var/bombing_station = 0 // Set to 1 if station nuke auto-destruct is activated + + /mob/living/silicon/ai/proc/add_ai_verbs() src.verbs |= ai_verbs_default @@ -205,17 +208,6 @@ var/list/ai_verbs_default = list( set src = usr.contents return 0 -/mob/living/silicon/ai/proc/system_integrity() - return (health-config.health_threshold_dead)/2 - -// this function shows the health of the pAI in the Status panel -/mob/living/silicon/ai/show_system_integrity() - // An AI doesn't become inoperable until -100% (or whatever config.health_threshold_dead is set to) - if(!src.stat) - stat(null, text("System integrity: [system_integrity()]%")) - else - stat(null, text("Systems nonfunctional")) - /mob/living/silicon/ai/SetName(pickedName as text) ..() announcement.announcer = pickedName @@ -242,6 +234,7 @@ var/list/ai_verbs_default = list( /obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null) powered_ai = ai + powered_ai.psupply = src if(isnull(powered_ai)) Del() @@ -253,9 +246,13 @@ var/list/ai_verbs_default = list( /obj/machinery/ai_powersupply/process() if(!powered_ai || powered_ai.stat & DEAD) Del() + if(powered_ai.APU_power) + use_power = 0 + return if(!powered_ai.anchored) loc = powered_ai.loc use_power = 0 + use_power(50000) // Less optimalised but only called if AI is unwrenched. This prevents usage of wrenching as method to keep AI operational without power. Intellicard is for that. if(powered_ai.anchored) use_power = 2 @@ -307,14 +304,7 @@ var/list/ai_verbs_default = list( if("Heartline") icon_state = "ai-heartline" if("Chatterbox") icon_state = "ai-president" else icon_state = "ai" - //else - //usr <<"You can only change your display once!" - //return -// displays the malf_ai information if the AI is the malf -/mob/living/silicon/ai/show_malf_ai() - if(malf && malf.hacked_apcs.len >= 3) - stat(null, "Time until station control secured: [max(malf.hack_time/(malf.hacked_apcs/3), 0)] seconds") // this verb lets the ai see the stations manifest /mob/living/silicon/ai/proc/ai_roster() @@ -391,11 +381,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/emp_act(severity) if (prob(30)) - switch(pick(1,2)) - if(1) - view_core() - if(2) - ai_call_shuttle() + view_core() ..() /mob/living/silicon/ai/Topic(href, href_list) @@ -516,13 +502,6 @@ var/list/ai_verbs_default = list( src << "\blue Switched to [network] camera network." //End of code by Mord_Sith - -/mob/living/silicon/ai/proc/choose_modules() - set category = "Malfunction" - set name = "Choose Module" - - malf_picker.use(src) - /mob/living/silicon/ai/proc/ai_statuschange() set category = "AI Commands" set name = "AI Status" @@ -682,5 +661,136 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/proc/is_in_chassis() return istype(loc, /turf) + +// NEWMALF FUNCTIONS/PROCEDURES + +// Sets up malfunction-related variables, research system and such. +/mob/living/silicon/ai/proc/setup_for_malf() + var/mob/living/silicon/ai/user = src + // Setup Variables + malfunctioning = 1 + research = new/datum/malf_research() + research.owner = src + hacked_apcs = list() + recalc_cpu() + + verbs += new/datum/game_mode/malfunction/verb/ai_select_hardware() + verbs += new/datum/game_mode/malfunction/verb/ai_select_research() + verbs += new/datum/game_mode/malfunction/verb/ai_help() + + // And greet user with some OOC info. + user << "You are malfunctioning, you do not have to follow any laws." + user << "Use ai-help command to view relevant information about your abilities" + +// Safely remove malfunction status, fixing hacked APCs and resetting variables. +/mob/living/silicon/ai/proc/stop_malf() + var/mob/living/silicon/ai/user = src + // Generic variables + malfunctioning = 0 + sleep(10) + research = null + // Fix hacked APCs + if(hacked_apcs) + for(var/obj/machinery/power/apc/A in hacked_apcs) + A.hacker = null + hacked_apcs = null + // Reset our verbs + src.verbs = null + add_ai_verbs() + // Let them know. + user << "You are no longer malfunctioning. Your abilities have been removed." + +// Called every tick. Checks if AI is malfunctioning. If yes calls Process on research datum which handles all logic. +/mob/living/silicon/ai/proc/malf_process() + if(!malfunctioning) + return + if(!research) + if(!errored) + errored = 1 + error("malf_process() called on AI without research datum. Report this.") + message_admins("ERROR: malf_process() called on AI without research datum. If admin modified one of the AI's vars revert the change and don't modify variables directly, instead use ProcCall or admin panels.") + spawn(1200) + errored = 0 + return + recalc_cpu() + if(APU_power || aiRestorePowerRoutine != 0) + research.process(1) + else + research.process(0) + +// Recalculates CPU time gain and storage capacities. +/mob/living/silicon/ai/proc/recalc_cpu() + var/apcs = hacked_apcs.len + research.max_cpu = (apcs * 10) + 10 + if(hardware && istype(hardware, /datum/malf_hardware/dual_ram)) + research.max_cpu = research.max_cpu * 2 + research.stored_cpu = min(research.stored_cpu, research.max_cpu) + + research.cpu_increase_per_tick = (apcs * 0.005) + 0.01 + if(hardware && istype(hardware, /datum/malf_hardware/dual_cpu)) + research.cpu_increase_per_tick = research.cpu_increase_per_tick * 2 + +// Starts AI's APU generator +/mob/living/silicon/ai/proc/start_apu(var/shutup = 0) + if(!hardware || !istype(hardware, /datum/malf_hardware/apu_gen)) + if(!shutup) + src << "You do not have an APU generator and you shouldn't have this verb. Report this." + return + if(hardware_integrity() < 50) + if(!shutup) + src << "Starting APU... FAULT(System Damaged)" + return + if(!shutup) + src << "Starting APU... ONLINE" + APU_power = 1 + +// Stops AI's APU generator +/mob/living/silicon/ai/proc/stop_apu(var/shutup = 0) + if(!hardware || !istype(hardware, /datum/malf_hardware/apu_gen)) + return + + if(APU_power) + APU_power = 0 + if(!shutup) + src << "Shutting down APU... DONE" + +// Returns percentage of AI's remaining backup capacitor charge (maxhealth - oxyloss). +/mob/living/silicon/ai/proc/backup_capacitor() + return ((200 - getOxyLoss()) / 2) + +// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss)) +/mob/living/silicon/ai/proc/hardware_integrity() + return (health-config.health_threshold_dead)/2 + +// Shows capacitor charge and hardware integrity information to the AI in Status tab. +/mob/living/silicon/ai/show_system_integrity() + if(!src.stat) + stat(null, text("Hardware integrity: [hardware_integrity()]%")) + stat(null, text("Internal capacitor: [backup_capacitor()]%")) + else + stat(null, text("Systems nonfunctional")) + +// Shows AI Malfunction related information to the AI. +/mob/living/silicon/ai/show_malf_ai() + if(src.is_malf()) + stat(null, "Hacked APCs: [src.hacked_apcs.len]") + stat(null, "System Status: [src.hacking ? "Busy" : "Stand-By"]") + if(src.research) + stat(null, "Available CPU: [src.research.stored_cpu] TFlops") + stat(null, "Maximal CPU: [src.research.max_cpu] TFlops") + stat(null, "Current research focus: [src.research.focus ? src.research.focus.name : "None"]") + if(src.research.focus) + stat(null, "Research completed: [round(src.research.focus.invested, 0.1)]/[round(src.research.focus.price)]") + if(system_override == 1) + stat(null, "SYSTEM OVERRIDE INITIATED") + else if(system_override == 2) + stat(null, "SYSTEM OVERRIDE COMPLETED") + +// Cleaner proc for creating powersupply for an AI. +/mob/living/silicon/ai/proc/create_powersupply() + if(psupply) + del(psupply) + psupply = new/obj/machinery/ai_powersupply(src) + #undef AI_CHECK_WIRELESS -#undef AI_CHECK_RADIO +#undef AI_CHECK_RADIO \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 4a43103da8..8f9f0d1d5d 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -35,7 +35,7 @@ break callshuttle++ - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction") + if(ticker.mode.name == "revolution") callshuttle = 0 if(callshuttle == 3) //if all three conditions are met @@ -43,10 +43,6 @@ log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.") message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1) - if(explosive) - spawn(10) - explosion(src.loc, 3, 6, 12, 15) - for(var/obj/machinery/ai_status_display/O in world) spawn( 0 ) O.mode = 2 diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 602e427f95..df323f0910 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -12,70 +12,51 @@ src.updatehealth() - if (src.malfhack) - if (src.malfhack.aidisabled) - src << "\red ERROR: APC access disabled, hack attempt canceled." - src.malfhacking = 0 - src.malfhack = null - - - if (src.health <= config.health_threshold_dead) + if (!hardware_integrity() || !backup_capacitor()) death() return + // If our powersupply object was destroyed somehow, create new one. + if(!psupply) + create_powersupply() + if (src.machine) if (!( src.machine.check_eye(src) )) src.reset_view(null) // Handle power damage (oxy) - if(src:aiRestorePowerRoutine != 0) - // Lost power + if(src:aiRestorePowerRoutine != 0 && !APU_power) + // Lose power adjustOxyLoss(1) else // Gain Power + aiRestorePowerRoutine = 0 // Necessary if AI activated it's APU AFTER losing primary power. adjustOxyLoss(-1) // Handle EMP-stun handle_stunned() - //stage = 1 - //if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are? + malf_process() + + if(APU_power && (hardware_integrity() < 50)) + src << "APU GENERATOR FAILURE! (System Damaged)" + stop_apu(1) + var/blind = 0 - //stage = 2 var/area/loc = null if (istype(T, /turf)) - //stage = 3 loc = T.loc if (istype(loc, /area)) - //stage = 4 - if (!loc.master.power_equip && !istype(src.loc,/obj/item)) - //stage = 5 + if (!loc.master.power_equip && !istype(src.loc,/obj/item) && !APU_power) blind = 1 - if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P - //I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t - //stage = 4.5 + if (!blind) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LIVING - - //Congratulations! You've found a way for AI's to run without using power! - //Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior - // since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update - // the power usage. - // - // We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and - // be fine. -/* - var/area/home = get_area(src) - if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn - if(home.powered(EQUIP)) - home.use_power(1000, EQUIP) -*/ - if (src:aiRestorePowerRoutine==2) src << "Alert cancelled. Power has been restored without our assistance." src:aiRestorePowerRoutine = 0 @@ -86,14 +67,15 @@ src:aiRestorePowerRoutine = 0 src.blind.layer = 0 return + else if (APU_power) + src:aiRestorePowerRoutine = 0 + src.blind.layer = 0 + return else - - //stage = 6 - var/area/current_area = get_area(src) - if (((!loc.master.power_equip) && current_area.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)) - //If our area lacks equipment power, and is not magically powered (i.e. centcom), or if we are in space and not carded, lose power. + if ((((!loc.master.power_equip) && current_area.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)) && !APU_power) + //If our area lacks equipment power, and is not magically powered (i.e. centcom), or if we are in space and not carded and without active APU, lose power. if (src:aiRestorePowerRoutine==0) src:aiRestorePowerRoutine = 1 @@ -183,11 +165,9 @@ if(status_flags & GODMODE) health = 100 stat = CONSCIOUS + setOxyLoss(0) else - if(fire_res_on_core) - health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss() - else - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() + health = 100 - getFireLoss() - getBruteLoss() // Oxyloss is not part of health as it represents AIs backup power. AI is immune against ToxLoss as it is machine. /mob/living/silicon/ai/rejuvenate() ..() diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm deleted file mode 100644 index 62a75fad24..0000000000 --- a/code/modules/mob/living/silicon/ai/say.dm +++ /dev/null @@ -1,5 +0,0 @@ -/mob/living/silicon/ai/say(var/message) - if(parent && istype(parent) && parent.stat != 2) - return parent.say(message) - //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - return ..(message) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5ff1c23213..b224175d59 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -509,19 +509,6 @@ C.toggled = 1 src << "\red You enable [C.name]." -// this function shows information about the malf_ai gameplay type in the status screen -/mob/living/silicon/robot/show_malf_ai() - ..() - for (var/datum/mind/malfai in malf.current_antagonists) - if(connected_ai) - if(connected_ai.mind == malfai) - if(malf.hacked_apcs >= 3) - stat(null, "Time until station control secured: [max(malf.hack_time/(malf.hacked_apcs/3), 0)] seconds") - else if(malf.revealed) - stat(null, "Time left: [max(malf.hack_time/(malf.hacked_apcs.len/3), 0)]") - return 0 - - // this function displays jetpack pressure in the stat panel /mob/living/silicon/robot/proc/show_jetpack_pressure() // if you have a jetpack, show the internal tank pressure diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index fb68cea74c..ede8d81129 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -83,17 +83,13 @@ var/lastused_charging = 0 var/lastused_total = 0 var/main_status = 0 + var/mob/living/silicon/ai/hacker = null // Malfunction var. If set AI hacked the APC and has full control. var/wiresexposed = 0 powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :( - var/malfhack = 0 //New var for my changes to AI malf. --NeoFite - var/mob/living/silicon/ai/malfai = null //See above --NeoFite var/debug= 0 var/autoflag= 0 // 0 = off, 1= eqp and lights off, 2 = eqp off, 3 = all on. -// luminosity = 1 var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver - var/overload = 1 //used for the Blackout malf module var/beenhit = 0 // used for counting how many times it has been hit, used for Aliens at the moment - var/mob/living/silicon/ai/occupier = null var/longtermpower = 10 var/datum/wires/apc/wires = null var/update_state = -1 @@ -170,8 +166,6 @@ src.update() /obj/machinery/power/apc/Del() - if(operating && malf && src.z in config.station_levels) //if (is_type_in_list(get_area(src), the_station_areas)) - malf.hacked_apcs -= src area.power_light = 0 area.power_equip = 0 area.power_environ = 0 @@ -182,6 +176,10 @@ if(terminal) disconnect_terminal() + // Malf AI, removes the APC from AI's hacked APCs list. + if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs) + hacker.hacked_apcs -= src + ..() /obj/machinery/power/apc/proc/make_terminal() @@ -234,8 +232,8 @@ else if (stat & MAINT) user << "The cover is closed. Something wrong with it: it doesn't work." - else if (malfhack) - user << "The cover is broken. It may be hard to force it open." + else if (hacker) + user << "The cover is locked." else user << "The cover is closed." @@ -339,7 +337,7 @@ update_state |= UPSTATE_OPENED1 if(opened==2) update_state |= UPSTATE_OPENED2 - else if(emagged || malfai) + else if(emagged || hacker) update_state |= UPSTATE_BLUESCREEN else if(wiresexposed) update_state |= UPSTATE_WIREEXP @@ -418,7 +416,7 @@ if(do_after(user, 50)) if (has_electronics==1) has_electronics = 0 - if ((stat & BROKEN) || malfhack) + if ((stat & BROKEN)) user.visible_message(\ "[user.name] has broken the power control board inside [src.name]!",\ "You broke the charred power control board and remove the remains.", @@ -432,7 +430,7 @@ else if (opened!=2) //cover isn't removed opened = 0 update_icon() - else if (istype(W, /obj/item/weapon/crowbar) && !((stat & BROKEN) || malfhack) ) + else if (istype(W, /obj/item/weapon/crowbar) && !((stat & BROKEN) || hacker) ) if(coverlocked && !(stat & MAINT)) user << "The cover is locked and cannot be opened." return @@ -491,6 +489,8 @@ user << "You must close the panel" else if(stat & (BROKEN|MAINT)) user << "Nothing happens." + else if(hacker) + user << "Access denied." else if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN)) locked = !locked @@ -498,7 +498,7 @@ update_icon() else user << "Access denied." - else if (istype(W, /obj/item/weapon/card/emag) && !(emagged || malfhack)) // trying to unlock with an emag card + else if (istype(W, /obj/item/weapon/card/emag) && !(emagged || hacker)) // trying to unlock with an emag card if(opened) user << "You must close the cover to swipe an ID card." else if(wiresexposed) @@ -560,7 +560,7 @@ new /obj/item/stack/cable_coil(loc,10) user << "You cut the cables and dismantle the power terminal." del(terminal) // qdel - else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) + else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN))) user.visible_message("[user.name] inserts the power control board into [src].", \ "You start to insert the power control board into the frame...") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) @@ -569,7 +569,7 @@ has_electronics = 1 user << "You place the power control board inside the frame." del(W) // qdel - else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack)) + else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN))) user << "You cannot put the board inside, the frame is damaged." return else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal) @@ -583,7 +583,7 @@ playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) if(do_after(user, 50)) if(!src || !WT.remove_fuel(3, user)) return - if (emagged || malfhack || (stat & BROKEN) || opened==2) + if (emagged || (stat & BROKEN) || opened==2) new /obj/item/stack/sheet/metal(loc) user.visible_message(\ "[src] has been cut apart by [user.name] with the weldingtool.",\ @@ -606,7 +606,7 @@ "You replace the damaged APC frontal panel with a new one.") del(W) // qdel update_icon() - else if (istype(W, /obj/item/apc_frame) && opened && ((stat & BROKEN) || malfhack)) + else if (istype(W, /obj/item/apc_frame) && opened && ((stat & BROKEN) || hacker)) if (has_electronics) user << "You cannot repair this APC until you remove the electronics still inside." return @@ -618,13 +618,12 @@ "You replace the damaged APC frame with new one.") del(W) // qdel stat &= ~BROKEN - malfai = null - malfhack = 0 + hacker = null if (opened==2) opened = 1 update_icon() else - if (((stat & BROKEN) || malfhack) \ + if (((stat & BROKEN) || hacker) \ && !opened \ && W.force >= 5 \ && W.w_class >= 3.0 \ @@ -736,7 +735,7 @@ return ui_interact(user) - +/* /obj/machinery/power/apc/proc/get_malf_status(mob/user) if (malf && (user.mind in malf.current_antagonists) && istype(user, /mob/living/silicon/ai)) if (src.malfai == (user:parent ? user:parent : user)) @@ -750,7 +749,7 @@ return 1 // 1 = APC not hacked. else return 0 // 0 = User is not a Malf AI - +*/ /obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(!user) @@ -767,7 +766,7 @@ "totalCharging" = round(lastused_charging), "coverLocked" = coverlocked, "siliconUser" = istype(user, /mob/living/silicon), - "malfStatus" = get_malf_status(user), + /*"malfStatus" = get_malf_status(user),*/ "powerChannels" = list( list( @@ -857,23 +856,22 @@ return 0 autoflag = 5 if (istype(user, /mob/living/silicon)) + var/permit = 0 // Malfunction variable. If AI hacks APC it can control it even without AI control wire. var/mob/living/silicon/ai/AI = user var/mob/living/silicon/robot/robot = user - if ( \ - src.aidisabled || \ - malfhack && istype(malfai) && \ - ( \ - (istype(AI) && (malfai!=AI && malfai != AI.parent)) || \ - (istype(robot) && (robot in malfai.connected_robots)) \ - ) \ - ) + if(hacker) + if(hacker == AI) + permit = 1 + else if(istype(robot) && robot.connected_ai && robot.connected_ai == hacker) // Cyborgs can use APCs hacked by their AI + permit = 1 + + if(aidisabled && !permit) if(!loud) user << "\The [src] have AI control disabled!" return 0 else - if ((!in_range(src, user) || !istype(src.loc, /turf))) + if ((!in_range(src, user) || !istype(src.loc, /turf) || hacker)) // AI-hacked APCs cannot be controlled by other AIs, unlinked cyborgs or humans. return 0 - var/mob/living/carbon/human/H = user if (istype(H)) if(H.getBrainLoss() >= 60) @@ -930,28 +928,6 @@ if(istype(usr, /mob/living/silicon)) src.overload_lighting() - else if (href_list["malfhack"]) - var/mob/living/silicon/ai/malfai = usr - if(get_malf_status(malfai)==1) - if (malfai.malfhacking) - malfai << "You are already hacking an APC." - return 1 - malfai << "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process." - malfai.malfhack = src - malfai.malfhacking = 1 - sleep(600) - if(src) - if (!src.aidisabled) - malfai.malfhack = null - malfai.malfhacking = 0 - locked = 1 - if(usr:parent) - src.malfai = usr:parent - else - src.malfai = usr - malfai << "Hack complete. The APC is now under your exclusive control." - update_icon() - else if (href_list["toggleaccess"]) if(istype(usr, /mob/living/silicon)) if(emagged || (stat & (BROKEN|MAINT))) @@ -968,25 +944,21 @@ update_icon() /obj/machinery/power/apc/proc/ion_act() - //intended to be exactly the same as an AI malf attack - if(!src.malfhack && src.z in config.station_levels) - if(prob(3)) - src.locked = 1 - if (src.cell.charge > 0) -// world << "\red blew APC in [src.loc.loc]" - src.cell.charge = 0 - cell.corrupt() - src.malfhack = 1 - update_icon() - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() - smoke.set_up(3, 0, src.loc) - smoke.attach(src) - smoke.start() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - visible_message("The [src.name] suddenly lets out a blast of smoke and some sparks!", \ - "You hear sizzling electronics.") + if(prob(3)) + src.locked = 1 + if (src.cell.charge > 0) + src.cell.charge = 0 + cell.corrupt() + update_icon() + var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() + smoke.set_up(3, 0, src.loc) + smoke.attach(src) + smoke.start() + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(3, 1, src) + s.start() + visible_message("The [src.name] suddenly lets out a blast of smoke and some sparks!", \ + "You hear sizzling electronics.") /obj/machinery/power/apc/surplus() @@ -1189,8 +1161,6 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) /obj/machinery/power/apc/emp_act(severity) if(cell) cell.emp_act(severity) - if(occupier) - occupier.emp_act(severity) lighting = 0 equipment = 0 @@ -1266,4 +1236,14 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) else return 0 +// Malfunction: Transfers APC under AI's control +/obj/machinery/power/apc/proc/ai_hack(var/mob/living/silicon/ai/A = null) + if(!A || !A.hacked_apcs || hacker || aidisabled || A.stat == DEAD) + return 0 + src.hacker = A + A.hacked_apcs += src + locked = 1 + update_icon() + return 1 + #undef APC_UPDATE_ICON_COOLDOWN diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index a361631960..d783c35338 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -12,6 +12,21 @@ var/shield_generate_power = 7500 //how much power we use when regenerating var/shield_idle_power = 1500 //how much power we use when just being sustained. +/obj/machinery/shield/malfai + name = "Emergency Forcefield" + desc = "Weak forcefield which seems to be projected by station's emergency atmosphere containment field" + health = max_health/2 // Half health, it's not suposed to resist much. + +/obj/machinery/shield/malfai/process() + health -= 0.5 // Slowly lose integrity over time + check_failure() + +/obj/machinery/shield/proc/check_failure() + if (src.health <= 0) + visible_message("\blue The [src] dissipates!") + del(src) + return + /obj/machinery/shield/New() src.set_dir(pick(1,2,3,4)) ..() @@ -38,11 +53,7 @@ //Play a fitting sound playsound(src.loc, 'sound/effects/EMPulse.ogg', 75, 1) - - if (src.health <= 0) - visible_message("\blue The [src] dissipates!") - del(src) - return + check_failure() opacity = 1 spawn(20) if(src) opacity = 0 @@ -51,12 +62,7 @@ /obj/machinery/shield/meteorhit() src.health -= max_health*0.75 //3/4 health as damage - - if(src.health <= 0) - visible_message("\blue The [src] dissipates!") - del(src) - return - + check_failure() opacity = 1 spawn(20) if(src) opacity = 0 return @@ -64,10 +70,7 @@ /obj/machinery/shield/bullet_act(var/obj/item/projectile/Proj) health -= Proj.damage ..() - if(health <=0) - visible_message("\blue The [src] dissipates!") - del(src) - return + check_failure() opacity = 1 spawn(20) if(src) opacity = 0 @@ -112,11 +115,7 @@ //This seemed to be the best sound for hitting a force field. playsound(src.loc, 'sound/effects/EMPulse.ogg', 100, 1) - //Handle the destruction of the shield - if (src.health <= 0) - visible_message("\blue The [src] dissipates!") - del(src) - return + check_failure() //The shield becomes dense to absorb the blow.. purely asthetic. opacity = 1 @@ -124,9 +123,6 @@ ..() return - - - /obj/machinery/shieldgen name = "Emergency shield projector" desc = "Used to seal minor hull breaches." @@ -161,7 +157,7 @@ update_icon() create_shields() - + idle_power_usage = 0 for(var/obj/machinery/shield/shield_tile in deployed_shields) idle_power_usage += shield_tile.shield_idle_power @@ -174,7 +170,7 @@ update_icon() collapse_shields() - + update_use_power(0) /obj/machinery/shieldgen/proc/create_shields() @@ -201,22 +197,22 @@ /obj/machinery/shieldgen/process() if (!active || (stat & NOPOWER)) return - + if(malfunction) if(deployed_shields.len && prob(5)) del(pick(deployed_shields)) else if (check_delay <= 0) create_shields() - + var/new_power_usage = 0 for(var/obj/machinery/shield/shield_tile in deployed_shields) new_power_usage += shield_tile.shield_idle_power - + if (new_power_usage != idle_power_usage) idle_power_usage = new_power_usage use_power(0) - + check_delay = 60 else check_delay-- diff --git a/ingame_manuals/README.txt b/ingame_manuals/README.txt new file mode 100644 index 0000000000..081153066a --- /dev/null +++ b/ingame_manuals/README.txt @@ -0,0 +1,3 @@ +INGAME MANUALS + +Ingame manuals are simple HTML files with basic information. They are linked to specific items/commands, such as the AI's display help command, or engine setup guide. Point of these files is to allow creation of basic guides for players which don't want to use wiki. \ No newline at end of file diff --git a/ingame_manuals/malf_ai.txt b/ingame_manuals/malf_ai.txt new file mode 100644 index 0000000000..8e7548f7d0 --- /dev/null +++ b/ingame_manuals/malf_ai.txt @@ -0,0 +1,22 @@ +

Malfunctioning AI guide


+ +This guide contains most important OOC information for malfunctioning AIs.
+ +

Goal


+As malfunctioning AI, your primary goal is to overtake station's systems. To do this, use software "Basic Encryption Hack" on APCs (right click on APC and select Basic Encryption Hack). Please note that hacked APCs have distinctive blue error screen, that tends to attract attention. Rememember that malfunctioning AI is antagonist, so read server rules for antagonists. While hacking APCs is your official goal, feel free to create custom goal, as long as it is fun for everyone.
+ +

Hardware


+As malfunctioning AI, you may select one hardware piece to help you. Remember that once you select hardware piece, you cannot select another one, so choose wisely! Hardware may be selected by clicking "Select Hardware" button in Hardware tab. Following is list of possible hardware pieces:
+APU Generator - Auxiliary Power Unit which allows you to operate even without external power. However, running on APU will stop your CPU time generation, and temporarily disable most of your abilities. APU is also somewhat vulnerable to physical damage, and will fail if your core hardware integrity drops below 50%.
+Turrets Focus Enhancer - Removes safeties on installed turrets, boosting their rate of fire, health and enabling nano-regeneration module. This however increases power usage considerably, espicially when regenerating damage.
+Secondary Processor Unit - Simple upgrade that doubles your CPU time generation. Useful if you need to speed up your research.
+Secondary Memory Bank - Doubles amount of maximal CPU time you may store. This is useful if you need to use lots of abilities in short amount of time.
+Self-Destruct Explosives - Large blocks of C4 are attached to your physical core. This C4 has 15 second timer, and may be activated by special button that appears in your Hardware tab. This self-destruct will remain active, even if you are destroyed. If timer reaches 0 your core explodes in strong explosion. Obviously, this destroys you, as well as anyone nearby.
+ +

Software


+Software are abilities that have to be unlocked via research menu (Hardware tab). Unlocked abilities appear in Software tab. Sometimes, abilities won't appear in this tab after being researched. This can be fixed by relogging or using "ai-core" command. Abilities are tiered, T1 being the weakest ones, while T4 are strongest ones. To reach higher tier you have to research abilities in lower tier. We currently have 12 abilities, in 3 research trees:
+Networking - Hacking-oriented abilities. T1 ability is Basic Encryption Hack, which allows you to hack more APCs. Higher tiers allow faking centcom messages, and even setting alert level. T4 ability is System Override, that rapidly hacks remaining APCs and gives you access to station self destruct sequence.
+Interdiction - Sabotage-oriented abilities. T1 ability allows you to recall emergency shuttle. Higher level abilities allow you to unlock cyborgs even without access to robotics console, and T4 ability allows you to hack other AIs to slave them under your control.
+Manipulation - Physical-oriented abilities. T1 ability allows you to break few lights, and rarely even APCs. T2 ability allows you to apply upgrade of your choice to camera, or reactivate broken camera. T3 ability allows you to create weak forcefield, that holds air, but won't last for long. And T4 ability allows you to overload machines, detonating them in weak explosion.
+

End


+If you still have some questions, either check the wiki, ask on IRC, or adminhelp and ask your friendly administration staff. \ No newline at end of file From db30c15e4c58257376304424e2f1984b63029b5f Mon Sep 17 00:00:00 2001 From: Kelenius Date: Sat, 4 Apr 2015 13:38:03 +0300 Subject: [PATCH 002/196] Updates to science Protolathe and CI build procs moved to them from RD console. Protolathe and CI now have a build queue. Designs take varying time to build. P and CI material storage is now a list instead of a set of vars. origin_tech is now a list. All sheets now contain exactly 2000 units of matter. In design datum, chemicals and materials are two separate lists. Designs are now sorted. The method is kinda hacky but flexible. They have a var, sort_string. Designs are sorted alphabetically using it. Circuits how show whether they build a machine or a computer in CI menu. Adds item construction, for now protolathe is used. --- baystation12.dme | 3 + code/_defines/research.dm | 18 + code/defines/obj/weapon.dm | 63 +- .../machinery/computer3/buildandrepair.dm | 2 +- code/game/machinery/computer3/component.dm | 1 - code/game/machinery/computer3/computer.dm | 1 - code/game/machinery/computer3/file.dm | 6 +- code/game/machinery/computer3/storage.dm | 2 +- code/game/machinery/constructable_frame.dm | 3 - code/game/machinery/cryopod.dm | 4 +- .../machinery/doors/airlock_electronics.dm | 2 +- code/game/machinery/machinery.dm | 2 - code/game/mecha/equipment/mecha_equipment.dm | 6 +- .../mecha/equipment/tools/medical_tools.dm | 7 +- code/game/mecha/equipment/tools/tools.dm | 31 +- .../mecha/equipment/tools/unused_tools.dm | 2 - code/game/mecha/equipment/weapons/weapons.dm | 4 +- code/game/mecha/mech_fabricator.dm | 32 +- code/game/mecha/mecha.dm | 1 - code/game/mecha/mecha_control_console.dm | 2 +- code/game/mecha/mecha_parts.dm | 68 +- code/game/objects/items/devices/aicard.dm | 2 +- .../objects/items/devices/chameleonproj.dm | 2 +- code/game/objects/items/devices/debugger.dm | 2 +- code/game/objects/items/devices/flash.dm | 4 +- .../objects/items/devices/lightreplacer.dm | 2 +- code/game/objects/items/devices/multitool.dm | 2 +- code/game/objects/items/devices/paicard.dm | 2 +- code/game/objects/items/devices/powersink.dm | 2 +- .../objects/items/devices/radio/beacon.dm | 4 +- .../items/devices/radio/encryptionkey.dm | 4 +- .../objects/items/devices/radio/headset.dm | 4 +- code/game/objects/items/devices/scanners.dm | 47 +- code/game/objects/items/devices/spy_bug.dm | 4 +- .../objects/items/devices/suit_cooling.dm | 2 +- .../objects/items/devices/traitordevices.dm | 2 +- code/game/objects/items/stacks/medical.dm | 8 +- code/game/objects/items/stacks/nanopaste.dm | 2 +- .../game/objects/items/stacks/sheets/glass.dm | 8 +- .../objects/items/stacks/sheets/leather.dm | 24 +- .../objects/items/stacks/sheets/mineral.dm | 26 +- .../items/stacks/sheets/sheet_types.dm | 10 +- code/game/objects/items/stacks/stack.dm | 2 +- .../objects/items/stacks/tiles/tile_types.dm | 2 +- code/game/objects/items/weapons/AI_modules.dm | 42 +- code/game/objects/items/weapons/RCD.dm | 4 +- code/game/objects/items/weapons/autopsy.dm | 2 +- code/game/objects/items/weapons/cards_ids.dm | 6 +- .../objects/items/weapons/cigs_lighters.dm | 2 +- .../weapons/circuitboards/circuitboard.dm | 2 +- .../circuitboards/computer/computer.dm | 46 +- .../weapons/circuitboards/computer/supply.dm | 2 +- .../circuitboards/computer/telecomms.dm | 6 +- .../circuitboards/machinery/biogenerator.dm | 2 +- .../circuitboards/machinery/cloning.dm | 4 +- .../circuitboards/machinery/mining_drill.dm | 2 +- .../weapons/circuitboards/machinery/pacman.dm | 6 +- .../weapons/circuitboards/machinery/power.dm | 4 +- .../machinery/recharge_station.dm | 2 +- .../circuitboards/machinery/research.dm | 12 +- .../circuitboards/machinery/shieldgen.dm | 6 +- .../circuitboards/machinery/telecomms.dm | 14 +- .../circuitboards/machinery/unary_atmos.dm | 4 +- .../items/weapons/circuitboards/mecha.dm | 14 +- .../items/weapons/circuitboards/other.dm | 2 +- code/game/objects/items/weapons/explosives.dm | 2 +- .../objects/items/weapons/flamethrower.dm | 2 +- .../items/weapons/grenades/chem_grenade.dm | 3 +- .../items/weapons/grenades/emgrenade.dm | 2 +- .../items/weapons/grenades/flashbang.dm | 2 +- .../items/weapons/grenades/spawnergrenade.dm | 6 +- code/game/objects/items/weapons/handcuffs.dm | 2 +- code/game/objects/items/weapons/kitchen.dm | 6 +- .../objects/items/weapons/melee/energy.dm | 4 +- code/game/objects/items/weapons/melee/misc.dm | 2 +- .../game/objects/items/weapons/power_cells.dm | 18 +- code/game/objects/items/weapons/scrolls.dm | 2 +- code/game/objects/items/weapons/shields.dm | 6 +- .../objects/items/weapons/storage/backpack.dm | 31 +- .../objects/items/weapons/storage/toolbox.dm | 4 +- code/game/objects/items/weapons/stunbaton.dm | 2 +- .../objects/items/weapons/surgery_tools.dm | 14 +- .../objects/items/weapons/teleportation.dm | 4 +- code/game/objects/items/weapons/tools.dm | 14 +- code/game/objects/items/weapons/twohanded.dm | 2 +- code/game/objects/objs.dm | 4 +- code/modules/assembly/assembly.dm | 2 +- code/modules/assembly/igniter.dm | 2 +- code/modules/assembly/infrared.dm | 2 +- code/modules/assembly/mousetrap.dm | 2 +- code/modules/assembly/proximity.dm | 2 +- code/modules/assembly/signaler.dm | 2 +- code/modules/assembly/timer.dm | 2 +- code/modules/assembly/voice.dm | 2 +- code/modules/clothing/clothing.dm | 2 - code/modules/clothing/glasses/glasses.dm | 10 +- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/masks/voice.dm | 2 +- code/modules/clothing/shoes/miscellaneous.dm | 2 +- code/modules/clothing/under/chameleon.dm | 18 +- code/modules/hydroponics/trays/tray_tools.dm | 4 +- code/modules/mining/drilling/scanner.dm | 2 +- code/modules/mining/mine_items.dm | 18 +- code/modules/mining/ore.dm | 16 +- code/modules/mob/holder.dm | 6 +- code/modules/mob/living/carbon/brain/MMI.dm | 4 +- .../mob/living/carbon/brain/brain_item.dm | 2 +- .../mob/living/carbon/brain/posibrain.dm | 2 +- code/modules/mob/living/carbon/brain/robot.dm | 2 +- .../mob/living/carbon/metroid/items.dm | 6 +- .../mob/living/silicon/robot/analyzer.dm | 2 +- .../simple_animal/constructs/soulstone.dm | 2 +- .../simple_animal/hostile/retaliate/drone.dm | 22 +- code/modules/paperwork/pen.dm | 4 +- code/modules/power/batteryrack.dm | 2 - code/modules/power/cell.dm | 10 - code/modules/power/pacman2.dm | 9 +- code/modules/power/port_gen.dm | 16 +- .../modules/power/rust/circuits_and_design.dm | 69 +- code/modules/power/smes_construction.dm | 2 - code/modules/projectiles/ammunition/boxes.dm | 14 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/energy/laser.dm | 10 +- .../projectiles/guns/energy/nuclear.dm | 38 +- .../projectiles/guns/energy/special.dm | 8 +- code/modules/projectiles/guns/energy/stun.dm | 4 +- .../projectiles/guns/energy/temperature.dm | 2 +- .../projectiles/guns/launcher/rocket.dm | 2 +- code/modules/projectiles/guns/projectile.dm | 2 +- .../projectiles/guns/projectile/automatic.dm | 14 +- .../projectiles/guns/projectile/dartgun.dm | 2 +- .../projectiles/guns/projectile/pistol.dm | 10 +- .../projectiles/guns/projectile/revolver.dm | 6 +- .../projectiles/guns/projectile/shotgun.dm | 6 +- .../projectiles/guns/projectile/sniper.dm | 2 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/research/assembly.dm | 8 + code/modules/research/circuitprinter.dm | 218 +- code/modules/research/designs-chassis.dm | 76 + code/modules/research/designs.dm | 2742 +++++++++-------- code/modules/research/destructive_analyzer.dm | 42 +- code/modules/research/protolathe.dm | 263 +- code/modules/research/rd-readme.dm | 209 +- code/modules/research/rdconsole.dm | 449 ++- code/modules/research/rdmachines.dm | 77 - code/modules/research/research.dm | 185 +- code/modules/research/server.dm | 63 +- .../research/xenoarchaeology/finds/finds.dm | 2 +- .../xenoarchaeology/genetics/reconstitutor.dm | 4 +- icons/obj/machines/research.dmi | Bin 13044 -> 13041 bytes 150 files changed, 2557 insertions(+), 2900 deletions(-) create mode 100644 code/_defines/research.dm create mode 100644 code/modules/research/assembly.dm create mode 100644 code/modules/research/designs-chassis.dm diff --git a/baystation12.dme b/baystation12.dme index 9ad0f589c3..82337449f0 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -32,6 +32,7 @@ #include "code\__HELPERS\type2type.dm" #include "code\__HELPERS\unsorted.dm" #include "code\__HELPERS\vector.dm" +#include "code\_defines\research.dm" #include "code\_onclick\adjacent.dm" #include "code\_onclick\ai.dm" #include "code\_onclick\click.dm" @@ -1436,7 +1437,9 @@ #include "code\modules\recycling\disposal-construction.dm" #include "code\modules\recycling\disposal.dm" #include "code\modules\recycling\sortingmachinery.dm" +#include "code\modules\research\assembly.dm" #include "code\modules\research\circuitprinter.dm" +#include "code\modules\research\designs-chassis.dm" #include "code\modules\research\designs.dm" #include "code\modules\research\destructive_analyzer.dm" #include "code\modules\research\message_server.dm" diff --git a/code/_defines/research.dm b/code/_defines/research.dm new file mode 100644 index 0000000000..87e6bb5f42 --- /dev/null +++ b/code/_defines/research.dm @@ -0,0 +1,18 @@ +#define SHEET_MATERIAL_AMOUNT 2000 + +#define TECH_MATERIAL "materials" +#define TECH_ENGINERING "engineering" +#define TECH_PHORON "phorontech" +#define TECH_POWER "powerstorage" +#define TECH_BLUESPACE "bluespace" +#define TECH_BIO "biotech" +#define TECH_COMBAT "combat" +#define TECH_MAGNET "magnets" +#define TECH_DATA "programming" +#define TECH_ILLEGAL "syndicate" +#define TECH_ARCANE "arcane" + +#define IMPRINTER 1 //For circuits. Uses glass/chemicals. +#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals +#define MECHFAB 4 //Remember, objects utilising this flag should have construction_time and construction_cost vars. +#define CHASSIS 8 //For protolathe, but differently \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index bb81eabbc5..27c233b340 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -169,7 +169,7 @@ flags = CONDUCT throwforce = 0 w_class = 3.0 - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute /obj/item/weapon/legcuffs/beartrap @@ -249,7 +249,7 @@ throw_speed = 4 throw_range = 20 matter = list("metal" = 100 - origin_tech = "magnets=2;syndicate=3"*/ + origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 3)*/ /obj/item/weapon/SWF_uplink name = "station-bounced radio" @@ -269,7 +269,7 @@ throw_speed = 4 throw_range = 20 matter = list("metal" = 100) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) /obj/item/weapon/staff name = "wizards staff" @@ -411,7 +411,8 @@ w_class = 1 throwforce = 2 var/cigarcount = 6 - flags = ONBELT */ + flags = ONBELT + */ /obj/item/weapon/pai_cable desc = "A flexible coated cable with a universal jack on one end." @@ -456,42 +457,42 @@ name = "console screen" desc = "Used in the construction of computers and other devices with a interactive console." icon_state = "screen" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) matter = list("glass" = 200) /obj/item/weapon/stock_parts/capacitor name = "capacitor" desc = "A basic capacitor used in the construction of a variety of devices." icon_state = "capacitor" - origin_tech = "powerstorage=1" - matter = list("metal" = 50,"glass" = 50) + origin_tech = list(TECH_POWER = 1) + matter = list("metal" = 50, "glass" = 50) /obj/item/weapon/stock_parts/scanning_module name = "scanning module" desc = "A compact, high resolution scanning module used in the construction of certain devices." icon_state = "scan_module" - origin_tech = "magnets=1" - matter = list("metal" = 50,"glass" = 20) + origin_tech = list(TECH_MAGNET = 1) + matter = list("metal" = 50, "glass" = 20) /obj/item/weapon/stock_parts/manipulator name = "micro-manipulator" desc = "A tiny little manipulator used in the construction of certain devices." icon_state = "micro_mani" - origin_tech = "materials=1;programming=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) matter = list("metal" = 30) /obj/item/weapon/stock_parts/micro_laser name = "micro-laser" desc = "A tiny laser used in certain devices." icon_state = "micro_laser" - origin_tech = "magnets=1" - matter = list("metal" = 10,"glass" = 20) + origin_tech = list(TECH_MAGNET = 1) + matter = list("metal" = 10, "glass" = 20) /obj/item/weapon/stock_parts/matter_bin name = "matter bin" desc = "A container for hold compressed matter awaiting re-construction." icon_state = "matter_bin" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) matter = list("metal" = 80) //Rank 2 @@ -499,7 +500,7 @@ /obj/item/weapon/stock_parts/capacitor/adv name = "advanced capacitor" desc = "An advanced capacitor used in the construction of a variety of devices." - origin_tech = "powerstorage=3" + origin_tech = list(TECH_POWER = 3) rating = 2 matter = list("metal" = 50,"glass" = 50) @@ -507,7 +508,7 @@ name = "advanced scanning module" desc = "A compact, high resolution scanning module used in the construction of certain devices." icon_state = "scan_module" - origin_tech = "magnets=3" + origin_tech = list(TECH_MAGNET = 3) rating = 2 matter = list("metal" = 50,"glass" = 20) @@ -515,7 +516,7 @@ name = "nano-manipulator" desc = "A tiny little manipulator used in the construction of certain devices." icon_state = "nano_mani" - origin_tech = "materials=3,programming=2" + origin_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2) rating = 2 matter = list("metal" = 30) @@ -523,7 +524,7 @@ name = "high-power micro-laser" desc = "A tiny laser used in certain devices." icon_state = "high_micro_laser" - origin_tech = "magnets=3" + origin_tech = list(TECH_MAGNET = 3) rating = 2 matter = list("metal" = 10,"glass" = 20) @@ -531,7 +532,7 @@ name = "advanced matter bin" desc = "A container for hold compressed matter awaiting re-construction." icon_state = "advanced_matter_bin" - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) rating = 2 matter = list("metal" = 80) @@ -540,14 +541,14 @@ /obj/item/weapon/stock_parts/capacitor/super name = "super capacitor" desc = "A super-high capacity capacitor used in the construction of a variety of devices." - origin_tech = "powerstorage=5;materials=4" + origin_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) rating = 3 matter = list("metal" = 50,"glass" = 50) /obj/item/weapon/stock_parts/scanning_module/phasic name = "phasic scanning module" desc = "A compact, high resolution phasic scanning module used in the construction of certain devices." - origin_tech = "magnets=5" + origin_tech = list(TECH_MAGNET = 5) rating = 3 matter = list("metal" = 50,"glass" = 20) @@ -555,7 +556,7 @@ name = "pico-manipulator" desc = "A tiny little manipulator used in the construction of certain devices." icon_state = "pico_mani" - origin_tech = "materials=5,programming=2" + origin_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2) rating = 3 matter = list("metal" = 30) @@ -563,7 +564,7 @@ name = "ultra-high-power micro-laser" icon_state = "ultra_high_micro_laser" desc = "A tiny laser used in certain devices." - origin_tech = "magnets=5" + origin_tech = list(TECH_MAGNET = 5) rating = 3 matter = list("metal" = 10,"glass" = 20) @@ -571,7 +572,7 @@ name = "super matter bin" desc = "A container for hold compressed matter awaiting re-construction." icon_state = "super_matter_bin" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) rating = 3 matter = list("metal" = 80) @@ -581,49 +582,49 @@ name = "subspace ansible" icon_state = "subspace_ansible" desc = "A compact module capable of sensing extradimensional activity." - origin_tech = "programming=3;magnets=5;materials=4;bluespace=2" + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 5 ,TECH_MATERIAL = 4, TECH_BLUESPACE = 2) matter = list("metal" = 30,"glass" = 10) /obj/item/weapon/stock_parts/subspace/filter name = "hyperwave filter" icon_state = "hyperwave_filter" desc = "A tiny device capable of filtering and converting super-intense radiowaves." - origin_tech = "programming=4;magnets=2" + origin_tech = list(TECH_DATA = 4, TECH_MAGNET = 2) matter = list("metal" = 30,"glass" = 10) /obj/item/weapon/stock_parts/subspace/amplifier name = "subspace amplifier" icon_state = "subspace_amplifier" desc = "A compact micro-machine capable of amplifying weak subspace transmissions." - origin_tech = "programming=3;magnets=4;materials=4;bluespace=2" + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) matter = list("metal" = 30,"glass" = 10) /obj/item/weapon/stock_parts/subspace/treatment name = "subspace treatment disk" icon_state = "treatment_disk" desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves." - origin_tech = "programming=3;magnets=2;materials=5;bluespace=2" + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 5, TECH_BLUESPACE = 2) matter = list("metal" = 30,"glass" = 10) /obj/item/weapon/stock_parts/subspace/analyzer name = "subspace wavelength analyzer" icon_state = "wavelength_analyzer" desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths." - origin_tech = "programming=3;magnets=4;materials=4;bluespace=2" + origin_tech = list(TECH_DATA = 3, TECH_MAGNETS = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) matter = list("metal" = 30,"glass" = 10) /obj/item/weapon/stock_parts/subspace/crystal name = "ansible crystal" icon_state = "ansible_crystal" desc = "A crystal made from pure glass used to transmit laser databursts to subspace." - origin_tech = "magnets=4;materials=4;bluespace=2" + origin_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) matter = list("glass" = 50) /obj/item/weapon/stock_parts/subspace/transmitter name = "subspace transmitter" icon_state = "subspace_transmitter" desc = "A large piece of equipment used to open a window into the subspace dimension." - origin_tech = "magnets=5;materials=5;bluespace=3" + origin_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3) matter = list("metal" = 50) /obj/item/weapon/ectoplasm @@ -638,4 +639,4 @@ desc = "Instant research tool. For testing purposes only." icon = 'icons/obj/stock_parts.dmi' icon_state = "smes_coil" - origin_tech = "materials=19;programming=19;magnets=19;powerstorage=19;bluespace=19;combat=19;biotech=19;syndicate=19;phorontech=19;engineering=19" + origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19) diff --git a/code/game/machinery/computer3/buildandrepair.dm b/code/game/machinery/computer3/buildandrepair.dm index 38db742ee6..720a61fd40 100644 --- a/code/game/machinery/computer3/buildandrepair.dm +++ b/code/game/machinery/computer3/buildandrepair.dm @@ -7,7 +7,7 @@ icon = 'icons/obj/module.dmi' icon_state = "id_mod" item_state = "electronic" - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) var/id = null var/frequency = null var/build_path = null diff --git a/code/game/machinery/computer3/component.dm b/code/game/machinery/computer3/component.dm index f484e04c64..0772d3e284 100644 --- a/code/game/machinery/computer3/component.dm +++ b/code/game/machinery/computer3/component.dm @@ -17,7 +17,6 @@ w_class = 2.0 var/emagged = 0 - crit_fail = 0 // the computer that this device is attached to var/obj/machinery/computer3/computer diff --git a/code/game/machinery/computer3/computer.dm b/code/game/machinery/computer3/computer.dm index 4939444ae5..082d8a2ee2 100644 --- a/code/game/machinery/computer3/computer.dm +++ b/code/game/machinery/computer3/computer.dm @@ -309,7 +309,6 @@ proc/set_broken() icon_state = "computer_b" stat |= BROKEN - crit_fail = 1 if(program) program.error = BUSTED_ASS_COMPUTER if(os) diff --git a/code/game/machinery/computer3/file.dm b/code/game/machinery/computer3/file.dm index 1cbb363894..b1fbe0ddbe 100644 --- a/code/game/machinery/computer3/file.dm +++ b/code/game/machinery/computer3/file.dm @@ -25,7 +25,7 @@ // If you overwrite this function, use the return value to make sure it succeeded // proc/copy(var/obj/item/part/computer/storage/dest) - if(!computer || computer.crit_fail) return null + if(!computer) return null if(drm) if(!computer.emagged) return null @@ -39,7 +39,7 @@ // Returns null on failure even though the existing file doesn't go away // proc/move(var/obj/item/part/computer/storage/dest) - if(!computer || computer.crit_fail) return null + if(!computer) return null if(drm) if(!computer.emagged) return null @@ -55,7 +55,7 @@ // proc/edit() - if(!computer || computer.crit_fail) + if(!computer) return 0 if(readonly && !computer.emagged) return 0 // diff --git a/code/game/machinery/computer3/storage.dm b/code/game/machinery/computer3/storage.dm index acf9a76288..cbef3434ba 100644 --- a/code/game/machinery/computer3/storage.dm +++ b/code/game/machinery/computer3/storage.dm @@ -35,7 +35,7 @@ // Add a file to the hard drive, returns 0 if failed // forced is used when spawning files on a write-protect drive proc/addfile(var/datum/file/F,var/forced = 0) - if(!F || crit_fail || (F in files)) + if(!F || (F in files)) return 1 if(writeprotect && !forced) return 0 diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 0f906ad4b2..54da833b6f 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -31,9 +31,6 @@ /obj/machinery/constructable_frame/machine_frame attackby(obj/item/P as obj, mob/user as mob) - if(P.crit_fail) - user << "\red This part is faulty, you cannot add this to the machine!" - return switch(state) if(1) if(istype(P, /obj/item/stack/cable_coil)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index fcece506c3..f56a271a0b 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -131,12 +131,12 @@ /obj/item/weapon/circuitboard/cryopodcontrol name = "Circuit board (Cryogenic Oversight Console)" build_path = "/obj/machinery/computer/cryopod" - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/robotstoragecontrol name = "Circuit board (Robotic Storage Console)" build_path = "/obj/machinery/computer/cryopod/robot" - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) //Decorative structures to go alongside cryopods. /obj/structure/cryofeed diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 32e356de3f..90bb72d40b 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -114,5 +114,5 @@ /obj/item/weapon/airlock_electronics/secure name = "secure airlock electronics" desc = "designed to be somewhat more resistant to hacking than standard electronics." - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) secure = 1 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index c573229a10..c0766b1824 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -328,8 +328,6 @@ Class Procs: M.state = 2 M.icon_state = "box_1" for(var/obj/I in component_parts) - if(I.reliability != 100 && crit_fail) - I.crit_fail = 1 I.loc = loc del(src) return 1 diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 2a6e2b6214..7ff5470f43 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -1,4 +1,3 @@ -//TODO: Add critfail checks and reliability //DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE! //I'm annoyed I even have to tell you this! SPRITE FIRST, then commit. @@ -7,7 +6,7 @@ icon = 'icons/mecha/mecha_equipment.dmi' icon_state = "mecha_equip" force = 5 - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) construction_time = 100 construction_cost = list("metal"=10000) var/equip_cooldown = 0 @@ -15,7 +14,6 @@ var/energy_drain = 0 var/obj/mecha/chassis = null var/range = MELEE //bitflags - reliability = 1000 var/salvageable = 1 var/required_type = /obj/mecha //may be either a type or a list of allowed types @@ -85,8 +83,6 @@ return 0 if(!equip_ready) return 0 - if(crit_fail) - return 0 if(energy_drain && !chassis.has_charge(energy_drain)) return 0 return 1 diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 08d6f2cca4..0fa9008fa3 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -3,11 +3,10 @@ desc = "A sleeper. Mountable to an exosuit. (Can be attached to: Medical Exosuits)" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "sleeper_0" - origin_tech = "programming=2;biotech=3" + origin_tech = list(TECH_DATA = 2, TECH_BIO = 3) energy_drain = 20 range = MELEE construction_cost = list("metal"=5000,"glass"=10000) - reliability = 1000 equip_cooldown = 20 var/mob/living/carbon/occupant = null var/datum/global_iterator/pr_mech_sleeper @@ -388,7 +387,7 @@ var/datum/global_iterator/mech_synth/synth range = MELEE|RANGED equip_cooldown = 10 - origin_tech = "materials=3;biotech=4;magnets=4;programming=3" + origin_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_MAGNET = 4, TECH_DATA = 3) construction_time = 200 construction_cost = list("metal"=3000,"glass"=2000) required_type = /obj/mecha/medical @@ -644,8 +643,6 @@ S.occupant_message("Reagent processing stopped.") S.log_message("Reagent processing stopped.") return stop() - if(anyprob(S.reliability)) - S.critfail() var/amount = S.synth_speed / S.processed_reagents.len for(var/reagent in S.processed_reagents) S.reagents.add_reagent(reagent,amount) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index b0ff7e633d..314dde34dd 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -121,7 +121,7 @@ name = "diamond drill" desc = "This is an upgraded version of the drill that'll pierce the heavens! (Can be attached to: Combat and Engineering Exosuits)" icon_state = "mecha_diamond_drill" - origin_tech = "materials=4;engineering=3" + origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINERING = 3) construction_cost = list("metal"=10000,"diamond"=6500) equip_cooldown = 20 force = 15 @@ -249,7 +249,7 @@ name = "mounted RCD" desc = "An exosuit-mounted Rapid Construction Device. (Can be attached to: Any exosuit)" icon_state = "mecha_rcd" - origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4" + origin_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER = 4) equip_cooldown = 10 energy_drain = 250 range = MELEE|RANGED @@ -354,7 +354,7 @@ name = "teleporter" desc = "An exosuit module that allows exosuits to teleport to any position in view." icon_state = "mecha_teleport" - origin_tech = "bluespace=10" + origin_tech = list(TECH_BLUESPACE = 10) equip_cooldown = 150 energy_drain = 1000 range = RANGED @@ -374,7 +374,7 @@ name = "wormhole generator" desc = "An exosuit module that allows generating of small quasi-stable wormholes." icon_state = "mecha_wholegen" - origin_tech = "bluespace=3" + origin_tech = list(TECH_BLUESPACE = 3) equip_cooldown = 50 energy_drain = 300 range = RANGED @@ -424,7 +424,7 @@ name = "gravitational catapult" desc = "An exosuit mounted Gravitational Catapult." icon_state = "mecha_teleport" - origin_tech = "bluespace=2;magnets=3" + origin_tech = list(TECH_BLUESPACE = 2, TECH_MAGNET = 3) equip_cooldown = 10 energy_drain = 100 range = MELEE|RANGED @@ -500,7 +500,7 @@ name = "\improper CCW armor booster" desc = "Close-combat armor booster. Boosts exosuit armor against armed melee attacks. Requires energy to operate." icon_state = "mecha_abooster_ccw" - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) equip_cooldown = 10 energy_drain = 50 range = 0 @@ -550,7 +550,7 @@ name = "\improper RW armor booster" desc = "Ranged-weaponry armor booster. Boosts exosuit armor against ranged attacks. Completely blocks taser shots, but requires energy to operate." icon_state = "mecha_abooster_proj" - origin_tech = "materials=4" + origin_tech = list(TECH_MATERIAL = 4) equip_cooldown = 10 energy_drain = 50 range = 0 @@ -621,7 +621,7 @@ name = "repair droid" desc = "Automated repair droid. Scans exosuit for damage and repairs it. Can fix almost any type of external or internal damage." icon_state = "repair_droid" - origin_tech = "magnets=3;programming=3" + origin_tech = list(TECH_MAGNET = 3, TECH_DATA = 3) equip_cooldown = 20 energy_drain = 100 range = 0 @@ -711,7 +711,7 @@ name = "energy relay" desc = "Wirelessly drains energy from any available power channel in area. The performance index is quite low." icon_state = "tesla" - origin_tech = "magnets=4;syndicate=2" + origin_tech = list(TECH_MAGNET = 4, TECH_ILLEGAL = 2) equip_cooldown = 10 energy_drain = 0 range = 0 @@ -823,7 +823,7 @@ name = "phoron generator" desc = "Generates power using solid phoron as fuel. Pollutes the environment." icon_state = "tesla" - origin_tech = "phorontech=2;powerstorage=2;engineering=1" + origin_tech = list(TECH_PHORON = 2, TECH_POWER = 2, TECH_ENGINERING = 1) equip_cooldown = 10 energy_drain = 0 range = MELEE @@ -835,7 +835,6 @@ var/fuel_per_cycle_idle = 100 var/fuel_per_cycle_active = 500 var/power_per_cycle = 20 - reliability = 1000 New() ..() @@ -937,10 +936,6 @@ EG.log_message("Deactivated - no fuel.") EG.set_ready_state(1) return 0 - if(anyprob(EG.reliability)) - EG.critfail() - stop() - return 0 var/cur_charge = EG.chassis.get_charge() if(isnull(cur_charge)) EG.set_ready_state(1) @@ -961,14 +956,13 @@ name = "\improper ExoNuclear reactor" desc = "Generates power using uranium. Pollutes the environment." icon_state = "tesla" - origin_tech = "powerstorage=3;engineering=3" + origin_tech = list(TECH_POWER = 3, TECH_ENGINERING = 3) construction_cost = list("metal"=10000,"silver"=500,"glass"=1000) max_fuel = 50000 fuel_per_cycle_idle = 10 fuel_per_cycle_active = 30 power_per_cycle = 50 var/rad_per_cycle = 0.3 - reliability = 1000 init() fuel = new /obj/item/stack/sheet/mineral/uranium(src) @@ -1070,11 +1064,10 @@ name = "passenger compartment" desc = "A mountable passenger compartment for exo-suits. Rather cramped." icon_state = "mecha_abooster_ccw" - origin_tech = "engineering=1;biotech=1" + origin_tech = list(TECH_ENGINERING = 1, TECH_BIO = 1) energy_drain = 10 range = MELEE construction_cost = list("metal"=5000,"glass"=5000) - reliability = 1000 equip_cooldown = 20 var/mob/living/carbon/occupant = null var/door_locked = 1 diff --git a/code/game/mecha/equipment/tools/unused_tools.dm b/code/game/mecha/equipment/tools/unused_tools.dm index 012d7979e1..1b6d8c9e23 100644 --- a/code/game/mecha/equipment/tools/unused_tools.dm +++ b/code/game/mecha/equipment/tools/unused_tools.dm @@ -85,8 +85,6 @@ return 0 if(energy_drain && !chassis.has_charge(energy_drain)) return 0 - if(crit_fail) - return 0 if(chassis.check_for_support()) return 0 return 1 diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 3d36efea9c..9c83b09808 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -1,7 +1,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon name = "mecha weapon" range = RANGED - origin_tech = "materials=3;combat=3" + origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3) var/projectile //Type of projectile fired. var/projectiles = 1 //Amount of projectiles loaded. var/projectiles_per_shot = 1 //Amount of projectiles fired per single shot. @@ -100,7 +100,7 @@ name = "eZ-13 mk2 heavy pulse rifle" icon_state = "mecha_pulse" energy_drain = 120 - origin_tech = "materials=3;combat=6;powerstorage=4" + origin_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 6, TECH_POWER = 4) projectile = /obj/item/projectile/beam/pulse/heavy fire_sound = 'sound/weapons/marauder.ogg' diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index f000499ffd..34365296ff 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -94,15 +94,6 @@ /obj/item/mecha_parts/part/durand_right_leg, /obj/item/mecha_parts/part/durand_armour ), - /*"H.O.N.K"=list( - /obj/item/mecha_parts/chassis/honker, - /obj/item/mecha_parts/part/honker_torso, - /obj/item/mecha_parts/part/honker_head, - /obj/item/mecha_parts/part/honker_left_arm, - /obj/item/mecha_parts/part/honker_right_arm, - /obj/item/mecha_parts/part/honker_left_leg, - /obj/item/mecha_parts/part/honker_right_leg - ), No need for HONK stuff*/ "Exosuit Equipment"=list( /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, /obj/item/mecha_parts/mecha_equipment/tool/drill, @@ -116,10 +107,7 @@ /obj/item/mecha_parts/mecha_equipment/generator, ///obj/item/mecha_parts/mecha_equipment/jetpack, //TODO MECHA JETPACK SPRITE MISSING /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg, - ///obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/mousetrap_mortar, HONK-related mech part - ///obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar, Also HONK-related - ///obj/item/mecha_parts/mecha_equipment/weapon/honker Thirdly HONK-related + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg ), "Robotic Upgrade Modules" = list( @@ -131,17 +119,9 @@ /obj/item/borg/upgrade/jetpack ), - - - - - "Misc"=list(/obj/item/mecha_parts/mecha_tracking) ) - - - /obj/machinery/mecha_part_fabricator/New() ..() @@ -294,14 +274,6 @@ return 0 return 1 */ -/* - New() - ..() - src.add_part_to_set("Test",list("result"="/obj/item/mecha_parts/part/gygax_armour","time"=600,"metal"=75000,"diamond"=10000)) - src.add_part_to_set("Test",list("result"="/obj/item/mecha_parts/part/ripley_left_arm","time"=200,"metal"=25000)) - src.remove_part_set("Gygax") - return -*/ /obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name) var/output = "" @@ -771,8 +743,6 @@ M.state = 2 M.icon_state = "box_1" for(var/obj/I in component_parts) - if(I.reliability != 100 && crit_fail) - I.crit_fail = 1 I.loc = src.loc if(src.resources["metal"] >= 3750) var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 45abb3d6ea..c4a5d6b269 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -582,7 +582,6 @@ WR.crowbar_salvage += E E.forceMove(WR) E.equip_ready = 1 - E.reliability = round(rand(E.reliability/3,E.reliability)) else E.forceMove(T) E.destroy() diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 8fa25a3568..e215bd1c28 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -67,7 +67,7 @@ desc = "Device used to transmit exosuit data." icon = 'icons/obj/device.dmi' icon_state = "motion2" - origin_tech = "programming=2;magnets=2" + origin_tech = list(TECH_DATA = 2, TECH_MAGNET = 2) construction_time = 50 construction_cost = list("metal"=500) diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index c3257bb61b..7273100549 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -10,7 +10,7 @@ icon_state = "blank" w_class = 5 flags = CONDUCT - origin_tech = "programming=2;materials=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2) var/construction_time = 100 var/list/construction_cost = list("metal"=20000,"glass"=5000) @@ -43,7 +43,7 @@ name="Ripley Torso" desc="A torso part of Ripley APLU. Contains power unit, processing core and life support systems." icon_state = "ripley_harness" - origin_tech = "programming=2;materials=2;biotech=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINERING = 2) construction_time = 200 construction_cost = list("metal"=40000,"glass"=15000) @@ -51,7 +51,7 @@ name="Ripley Left Arm" desc="A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools." icon_state = "ripley_l_arm" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 150 construction_cost = list("metal"=25000) @@ -59,7 +59,7 @@ name="Ripley Right Arm" desc="A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools." icon_state = "ripley_r_arm" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 150 construction_cost = list("metal"=25000) @@ -67,7 +67,7 @@ name="Ripley Left Leg" desc="A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems." icon_state = "ripley_l_leg" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 150 construction_cost = list("metal"=30000) @@ -75,7 +75,7 @@ name="Ripley Right Leg" desc="A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems." icon_state = "ripley_r_leg" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 150 construction_cost = list("metal"=30000) @@ -93,7 +93,7 @@ name="Gygax Torso" desc="A torso part of Gygax. Contains power unit, processing core and life support systems. Has an additional equipment slot." icon_state = "gygax_harness" - origin_tech = "programming=2;materials=2;biotech=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 3, TECH_ENGINERING = 3) construction_time = 300 construction_cost = list("metal"=50000,"glass"=20000) @@ -101,7 +101,7 @@ name="Gygax Head" desc="A Gygax head. Houses advanced surveilance and targeting sensors." icon_state = "gygax_head" - origin_tech = "programming=2;materials=2;magnets=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_MAGNET = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=20000,"glass"=10000) @@ -109,7 +109,7 @@ name="Gygax Left Arm" desc="A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons." icon_state = "gygax_l_arm" - origin_tech = "programming=2;materials=2;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=30000) @@ -117,28 +117,28 @@ name="Gygax Right Arm" desc="A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons." icon_state = "gygax_r_arm" - origin_tech = "programming=2;materials=2;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=30000) /obj/item/mecha_parts/part/gygax_left_leg name="Gygax Left Leg" icon_state = "gygax_l_leg" - origin_tech = "programming=2;materials=2;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=35000) /obj/item/mecha_parts/part/gygax_right_leg name="Gygax Right Leg" icon_state = "gygax_r_leg" - origin_tech = "programming=2;materials=2;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=35000) /obj/item/mecha_parts/part/gygax_armour name="Gygax Armour Plates" icon_state = "gygax_armour" - origin_tech = "materials=6;combat=4;engineering=5" + origin_tech = list(TECH_MATERIAL = 6, TECH_COMBAT = 4, TECH_ENGINERING = 5) construction_time = 600 construction_cost = list("metal"=50000,"diamond"=10000) @@ -156,49 +156,49 @@ /obj/item/mecha_parts/part/durand_torso name="Durand Torso" icon_state = "durand_harness" - origin_tech = "programming=2;materials=3;biotech=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_BIO = 3, TECH_ENGINERING = 3) construction_time = 300 construction_cost = list("metal"=55000,"glass"=20000,"silver"=10000) /obj/item/mecha_parts/part/durand_head name="Durand Head" icon_state = "durand_head" - origin_tech = "programming=2;materials=3;magnets=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=25000,"glass"=10000,"silver"=3000) /obj/item/mecha_parts/part/durand_left_arm name="Durand Left Arm" icon_state = "durand_l_arm" - origin_tech = "programming=2;materials=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=35000,"silver"=3000) /obj/item/mecha_parts/part/durand_right_arm name="Durand Right Arm" icon_state = "durand_r_arm" - origin_tech = "programming=2;materials=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=35000,"silver"=3000) /obj/item/mecha_parts/part/durand_left_leg name="Durand Left Leg" icon_state = "durand_l_leg" - origin_tech = "programming=2;materials=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=40000,"silver"=3000) /obj/item/mecha_parts/part/durand_right_leg name="Durand Right Leg" icon_state = "durand_r_leg" - origin_tech = "programming=2;materials=3;engineering=3" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=40000,"silver"=3000) /obj/item/mecha_parts/part/durand_armour name="Durand Armour Plates" icon_state = "durand_armour" - origin_tech = "materials=5;combat=4;engineering=5" + origin_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4, TECH_ENGINERING = 5) construction_time = 600 construction_cost = list("metal"=50000,"uranium"=10000) @@ -238,7 +238,7 @@ /obj/item/mecha_parts/chassis/phazon name = "Phazon Chassis" - origin_tech = "materials=7" + origin_tech = list(TECH_MATERIAL = 7) New() ..() @@ -249,42 +249,42 @@ icon_state = "phazon_harness" construction_time = 300 construction_cost = list("metal"=35000,"glass"=10000,"phoron"=20000) - origin_tech = "programming=5;materials=7;bluespace=6;powerstorage=6" + origin_tech = list(TECH_DATA = 5, TECH_MATERIAL = 7, TECH_BLUESPACE = 6, TECH_POWER = 6) /obj/item/mecha_parts/part/phazon_head name="Phazon Head" icon_state = "phazon_head" construction_time = 200 construction_cost = list("metal"=15000,"glass"=5000,"phoron"=10000) - origin_tech = "programming=4;materials=5;magnets=6" + origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 5, TECH_MAGNET = 6) /obj/item/mecha_parts/part/phazon_left_arm name="Phazon Left Arm" icon_state = "phazon_l_arm" construction_time = 200 construction_cost = list("metal"=20000,"phoron"=10000) - origin_tech = "materials=5;bluespace=2;magnets=2" + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) /obj/item/mecha_parts/part/phazon_right_arm name="Phazon Right Arm" icon_state = "phazon_r_arm" construction_time = 200 construction_cost = list("metal"=20000,"phoron"=10000) - origin_tech = "materials=5;bluespace=2;magnets=2" + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) /obj/item/mecha_parts/part/phazon_left_leg name="Phazon Left Leg" icon_state = "phazon_l_leg" construction_time = 200 construction_cost = list("metal"=20000,"phoron"=10000) - origin_tech = "materials=5;bluespace=3;magnets=3" + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) /obj/item/mecha_parts/part/phazon_right_leg name="Phazon Right Leg" icon_state = "phazon_r_leg" construction_time = 200 construction_cost = list("metal"=20000,"phoron"=10000) - origin_tech = "materials=5;bluespace=3;magnets=3" + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) ///////// Odysseus @@ -301,13 +301,13 @@ icon_state = "odysseus_head" construction_time = 100 construction_cost = list("metal"=2000,"glass"=10000) - origin_tech = "programming=3;materials=2" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 2) /obj/item/mecha_parts/part/odysseus_torso name="Odysseus Torso" desc="A torso part of Odysseus. Contains power unit, processing core and life support systems." icon_state = "odysseus_torso" - origin_tech = "programming=2;materials=2;biotech=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINERING = 2) construction_time = 180 construction_cost = list("metal"=25000) @@ -315,7 +315,7 @@ name="Odysseus Left Arm" desc="An Odysseus left arm. Data and power sockets are compatible with most exosuit tools." icon_state = "odysseus_l_arm" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 120 construction_cost = list("metal"=10000) @@ -323,7 +323,7 @@ name="Odysseus Right Arm" desc="An Odysseus right arm. Data and power sockets are compatible with most exosuit tools." icon_state = "odysseus_r_arm" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 120 construction_cost = list("metal"=10000) @@ -331,7 +331,7 @@ name="Odysseus Left Leg" desc="An Odysseus left leg. Contains somewhat complex servodrives and balance maintaining systems." icon_state = "odysseus_l_leg" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 130 construction_cost = list("metal"=15000) @@ -339,13 +339,13 @@ name="Odysseus Right Leg" desc="A Odysseus right leg. Contains somewhat complex servodrives and balance maintaining systems." icon_state = "odysseus_r_leg" - origin_tech = "programming=2;materials=2;engineering=2" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINERING = 2) construction_time = 130 construction_cost = list("metal"=15000) /*/obj/item/mecha_parts/part/odysseus_armour name="Odysseus Carapace" icon_state = "odysseus_armour" - origin_tech = "materials=3;engineering=3" + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINERING = 3) construction_time = 200 construction_cost = list("metal"=15000)*/ diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 5e2ab73155..e8d221e31b 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -6,7 +6,7 @@ w_class = 2.0 slot_flags = SLOT_BELT var/flush = null - origin_tech = "programming=4;materials=4" + origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) var/mob/living/silicon/ai/carded_ai diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 1982fbb4f4..6ddb3716f6 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -8,7 +8,7 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - origin_tech = "syndicate=4;magnets=4" + origin_tech = list(TECH_ILLEGAL = 4, TECH_MAGNET = 4) var/can_use = 1 var/obj/effect/dummy/chameleon/active_dummy = null var/saved_item = /obj/item/weapon/cigbutt diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index faab1ee054..162f133a7a 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -19,7 +19,7 @@ matter = list("metal" = 50,"glass" = 20) - origin_tech = "magnets=1;engineering=1" + origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1) var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage /obj/item/device/debugger/is_used_on(obj/O, mob/user) diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 7013b30419..375a0a5af1 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -8,7 +8,7 @@ throw_speed = 4 throw_range = 10 flags = CONDUCT - origin_tech = "magnets=2;combat=1" + origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1) var/times_used = 0 //Number of times it's been used. var/broken = 0 //Is the flash burnt out? @@ -193,7 +193,7 @@ name = "synthetic flash" desc = "When a problem arises, SCIENCE is the solution." icon_state = "sflash" - origin_tech = "magnets=2;combat=1" + origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1) var/construction_cost = list("metal"=750,"glass"=750) var/construction_time=100 diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 713706475c..73cdd52317 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -49,7 +49,7 @@ flags = CONDUCT slot_flags = SLOT_BELT - origin_tech = "magnets=3;materials=2" + origin_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 2) var/max_uses = 20 var/uses = 0 diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index a31a866bc7..210ff15cd9 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -18,6 +18,6 @@ matter = list("metal" = 50,"glass" = 20) - origin_tech = "magnets=1;engineering=1" + origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 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/paicard.dm b/code/game/objects/items/devices/paicard.dm index 2cc9d55b6a..4a9510a153 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -5,7 +5,7 @@ item_state = "electronic" w_class = 2.0 slot_flags = SLOT_BELT - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) var/obj/item/device/radio/radio var/looking_for_personality = 0 var/mob/living/silicon/pai/pai diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 8b2469d2dd..7a7057b576 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -13,7 +13,7 @@ matter = list("metal" = 750,"waste" = 750) - origin_tech = "powerstorage=3;syndicate=5" + origin_tech = list(TECH_POWER = 3, TECH_ILLEGAL = 5) var/drain_rate = 1000000 // amount of power to drain per tick var/dissipation_rate = 20000 var/power_drained = 0 // has drained this much power diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index ef332fa336..1de974710d 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -4,7 +4,7 @@ icon_state = "beacon" item_state = "signaler" var/code = "electronic" - origin_tech = "bluespace=1" + origin_tech = list(TECH_BLUESPACE = 1) /obj/item/device/radio/beacon/hear_talk() return @@ -38,7 +38,7 @@ /obj/item/device/radio/beacon/syndicate name = "suspicious beacon" desc = "A label on it reads: Activate to have a singularity beacon teleported to your location." - origin_tech = "bluespace=1;syndicate=7" + origin_tech = list(TECH_BLUESPACE = 1, TECH_ILLEGAL = 7) /obj/item/device/radio/beacon/syndicate/attack_self(mob/user as mob) if(user) diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index 823940a53c..72a99f494e 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -19,13 +19,13 @@ /obj/item/device/encryptionkey/syndicate icon_state = "cypherkey" channels = list("Mercenary" = 1) - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) syndie = 1//Signifies that it de-crypts Syndicate transmissions /obj/item/device/encryptionkey/binary icon_state = "cypherkey" translate_binary = 1 - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) /obj/item/device/encryptionkey/headset_sec name = "security radio encryption key" diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index bfc9e8f69b..feb25ee68e 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -55,12 +55,12 @@ return -1 /obj/item/device/radio/headset/syndicate - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) syndie = 1 ks1type = /obj/item/device/encryptionkey/syndicate /obj/item/device/radio/headset/binary - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) ks1type = /obj/item/device/encryptionkey/binary /obj/item/device/radio/headset/headset_sec diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 1a646d3fe1..6a11b6860e 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -18,7 +18,7 @@ REAGENT SCANNER matter = list("metal" = 150) - origin_tech = "magnets=1;engineering=1" + origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1) /obj/item/device/t_scanner/attack_self(mob/user) @@ -74,7 +74,7 @@ REAGENT SCANNER throw_speed = 5 throw_range = 10 matter = list("metal" = 200) - origin_tech = "magnets=1;biotech=1" + origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1) var/mode = 1; @@ -240,7 +240,7 @@ REAGENT SCANNER matter = list("metal" = 30,"glass" = 20) - origin_tech = "magnets=1;engineering=1" + origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1) /obj/item/device/analyzer/attack_self(mob/user as mob) @@ -287,7 +287,7 @@ REAGENT SCANNER matter = list("metal" = 30,"glass" = 20) - origin_tech = "magnets=2;biotech=2" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) var/details = 0 var/recent_fail = 0 @@ -306,9 +306,6 @@ REAGENT SCANNER /obj/item/device/mass_spectrometer/attack_self(mob/user as mob) if (user.stat) return - if (crit_fail) - user << "\red This device has critically failed and is no longer functional!" - return if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" return @@ -324,19 +321,10 @@ REAGENT SCANNER break var/dat = "Trace Chemicals Found: " for(var/R in blood_traces) - if(prob(reliability)) - if(details) - dat += "[R] ([blood_traces[R]] units) " - else - dat += "[R] " - recent_fail = 0 + if(details) + dat += "[R] ([blood_traces[R]] units) " else - if(recent_fail) - crit_fail = 1 - reagents.clear_reagents() - return - else - recent_fail = 1 + dat += "[R] " user << "[dat]" reagents.clear_reagents() return @@ -345,7 +333,7 @@ REAGENT SCANNER name = "advanced mass spectrometer" icon_state = "adv_spectrometer" details = 1 - origin_tech = "magnets=4;biotech=2" + origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2) /obj/item/device/reagent_scanner name = "reagent scanner" @@ -360,7 +348,7 @@ REAGENT SCANNER throw_range = 20 matter = list("metal" = 30,"glass" = 20) - origin_tech = "magnets=2;biotech=2" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) var/details = 0 var/recent_fail = 0 @@ -374,24 +362,13 @@ REAGENT SCANNER return if(!istype(O)) return - if (crit_fail) - user << "\red This device has critically failed and is no longer functional!" - return if(!isnull(O.reagents)) var/dat = "" if(O.reagents.reagent_list.len > 0) var/one_percent = O.reagents.total_volume / 100 for (var/datum/reagent/R in O.reagents.reagent_list) - if(prob(reliability)) - dat += "\n \t \blue [R][details ? ": [R.volume / one_percent]%" : ""]" - recent_fail = 0 - else if(recent_fail) - crit_fail = 1 - dat = null - break - else - recent_fail = 1 + dat += "\n \t \blue [R][details ? ": [R.volume / one_percent]%" : ""]" if(dat) user << "\blue Chemicals found: [dat]" else @@ -405,13 +382,13 @@ REAGENT SCANNER name = "advanced reagent scanner" icon_state = "adv_spectrometer" details = 1 - origin_tech = "magnets=4;biotech=2" + origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2) /obj/item/device/slime_scanner name = "slime scanner" icon_state = "adv_spectrometer" item_state = "analyzer" - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) w_class = 2.0 flags = CONDUCT throwforce = 0 diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 2ad3df7ae5..932b3d6a6b 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -13,7 +13,7 @@ throw_range = 15 throw_speed = 3 - origin_tech = "programming=1;engineering=1;syndicate=3" + origin_tech = list(TECH_DATA = 1, TECH_ENGINERING = 1, TECH_ILLEGAL = 3) var/obj/item/device/radio/spy/radio var/obj/machinery/camera/spy/camera @@ -52,7 +52,7 @@ w_class = 2.0 - origin_tech = "programming=1;engineering=1;syndicate=3" + origin_tech = list(TECH_DATA = 1, TECH_ENGINERING = 1, TECH_ILLEGAL = 3) var/operating = 0 var/obj/item/device/radio/spy/radio diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 291053f25d..b28e9b62f6 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -13,7 +13,7 @@ throw_speed = 1 throw_range = 4 - origin_tech = "magnets=2;materials=2" + origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2) var/on = 0 //is it turned on? var/cover_open = 0 //is the cover open? diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 3c2aebd871..fe1222cb07 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -24,7 +24,7 @@ effective or pretty fucking useless. throw_range = 10 flags = CONDUCT item_state = "electronic" - origin_tech = "magnets=3;combat=3;syndicate=3" + origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 3, TECH_ILLEGAL = 3) var/times_used = 0 //Number of times it's been used. var/max_uses = 2 diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index e59220c848..1f036e5baf 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -54,7 +54,7 @@ singular_name = "gauze length" desc = "Some sterile gauze to wrap around bloody stumps." icon_state = "brutepack" - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob) if(..()) @@ -97,7 +97,7 @@ singular_name = "ointment" icon_state = "ointment" heal_burn = 1 - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob) if(..()) @@ -128,7 +128,7 @@ desc = "An advanced trauma kit for severe injuries." icon_state = "traumakit" heal_brute = 12 - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob) if(..()) @@ -175,7 +175,7 @@ desc = "An advanced treatment kit for severe burns." icon_state = "burnkit" heal_burn = 12 - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index f85bc336be..7fd5c887e8 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -4,7 +4,7 @@ desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." icon = 'icons/obj/nanopaste.dmi' icon_state = "tube" - origin_tech = "materials=4;engineering=3" + origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINERING = 3) amount = 10 diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 422640ee1f..38311543b9 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -16,7 +16,7 @@ singular_name = "glass sheet" icon_state = "sheet-glass" matter = list("glass" = 3750) - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) var/created_window = /obj/structure/window/basic var/is_reinforced = 0 var/list/construction_options = list("One Direction", "Full Window") @@ -145,7 +145,7 @@ icon_state = "sheet-rglass" matter = list("metal" = 1875,"glass" = 3750) - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) created_window = /obj/structure/window/reinforced is_reinforced = 1 @@ -171,7 +171,7 @@ singular_name = "phoron glass sheet" icon_state = "sheet-phoronglass" matter = list("glass" = 7500) - origin_tech = "materials=3;phorontech=2" + origin_tech = list(TECH_MATERIAL = 3, TECH_PHORON = 2) created_window = /obj/structure/window/phoronbasic /obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user) @@ -201,6 +201,6 @@ icon_state = "sheet-phoronrglass" matter = list("glass" = 7500,"metal" = 1875) - origin_tech = "materials=4;phorontech=2" + origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2) created_window = /obj/structure/window/phoronreinforced is_reinforced = 1 diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index a3e7ed53e2..836d5b5efa 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -3,42 +3,42 @@ desc = "The by-product of human farming." singular_name = "human skin piece" icon_state = "sheet-hide" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/animalhide/corgi name = "corgi hide" desc = "The by-product of corgi farming." singular_name = "corgi hide piece" icon_state = "sheet-corgi" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/animalhide/cat name = "cat hide" desc = "The by-product of cat farming." singular_name = "cat hide piece" icon_state = "sheet-cat" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/animalhide/monkey name = "monkey hide" desc = "The by-product of monkey farming." singular_name = "monkey hide piece" icon_state = "sheet-monkey" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/animalhide/lizard name = "lizard skin" desc = "Sssssss..." singular_name = "lizard skin piece" icon_state = "sheet-lizard" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/animalhide/xeno name = "alien hide" desc = "The skin of a terrible creature." singular_name = "alien hide piece" icon_state = "sheet-xeno" - origin_tech = "" + origin_tech = list() //don't see anywhere else to put these, maybe together they could be used to make the xenos suit? /obj/item/stack/sheet/xenochitin @@ -47,35 +47,35 @@ singular_name = "alien hide piece" icon = 'icons/mob/alien.dmi' icon_state = "chitin" - origin_tech = "" + origin_tech = list() /obj/item/xenos_claw name = "alien claw" desc = "The claw of a terrible creature." icon = 'icons/mob/alien.dmi' icon_state = "claw" - origin_tech = "" + origin_tech = list() /obj/item/weed_extract name = "weed extract" desc = "A piece of slimy, purplish weed." icon = 'icons/mob/alien.dmi' icon_state = "weed_extract" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/hairlesshide name = "hairless hide" desc = "This hide was stripped of it's hair, but still needs tanning." singular_name = "hairless hide piece" icon_state = "sheet-hairlesshide" - origin_tech = "" + origin_tech = list() /obj/item/stack/sheet/wetleather name = "wet leather" desc = "This leather has been cleaned but still needs to be dried." singular_name = "wet leather piece" icon_state = "sheet-wetleather" - origin_tech = "" + origin_tech = list() var/wetness = 30 //Reduced when exposed to high temperautres var/drying_threshold_temperature = 500 //Kelvin to start drying @@ -84,7 +84,7 @@ desc = "The by-product of mob grinding." singular_name = "leather piece" icon_state = "sheet-leather" - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 46415bb8af..cd1767f01e 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -72,7 +72,7 @@ var/global/list/datum/stack_recipe/iron_recipes = list ( \ obj/item/stack/sheet/mineral/iron name = "iron" icon_state = "sheet-silver" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) sheettype = "iron" color = "#333333" perunit = 3750 @@ -88,7 +88,7 @@ obj/item/stack/sheet/mineral/iron/New() icon_state = "sheet-sandstone" throw_speed = 4 throw_range = 5 - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) sheettype = "sandstone" /obj/item/stack/sheet/mineral/sandstone/New() @@ -98,7 +98,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/diamond name = "diamond" icon_state = "sheet-diamond" - origin_tech = "materials=6" + origin_tech = list(TECH_MATERIAL = 6) perunit = 3750 sheettype = "diamond" @@ -110,7 +110,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/uranium name = "uranium" icon_state = "sheet-uranium" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) perunit = 2000 sheettype = "uranium" @@ -121,7 +121,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/phoron name = "solid phoron" icon_state = "sheet-phoron" - origin_tech = "phorontech=2;materials=2" + origin_tech = list(TECH_PHORON = 2, TECH_MATERIAL = 2) perunit = 2000 sheettype = "phoron" @@ -132,7 +132,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/plastic name = "Plastic" icon_state = "sheet-plastic" - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) perunit = 2000 /obj/item/stack/sheet/mineral/plastic/New() @@ -149,7 +149,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/gold name = "gold" icon_state = "sheet-gold" - origin_tech = "materials=4" + origin_tech = list(TECH_MATERIAL = 4) perunit = 2000 sheettype = "gold" @@ -160,7 +160,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/silver name = "silver" icon_state = "sheet-silver" - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) perunit = 2000 sheettype = "silver" @@ -171,14 +171,14 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/enruranium name = "enriched uranium" icon_state = "sheet-enruranium" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) perunit = 1000 //Valuable resource, cargo can sell it. /obj/item/stack/sheet/mineral/platinum name = "platinum" icon_state = "sheet-adamantine" - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) sheettype = "platinum" perunit = 2000 @@ -186,7 +186,7 @@ obj/item/stack/sheet/mineral/iron/New() /obj/item/stack/sheet/mineral/mhydrogen name = "metallic hydrogen" icon_state = "sheet-mythril" - origin_tech = "materials=6;powerstorage=5;magnets=5" + origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_MAGNET = 5) sheettype = "mhydrogen" perunit = 2000 @@ -195,7 +195,7 @@ obj/item/stack/sheet/mineral/iron/New() name = "tritium" icon_state = "sheet-silver" sheettype = "tritium" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) color = "#777777" perunit = 2000 @@ -203,6 +203,6 @@ obj/item/stack/sheet/mineral/iron/New() name = "osmium" icon_state = "sheet-silver" sheettype = "osmium" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) color = "#9999FF" perunit = 2000 diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index daa67c4449..b732a04694 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -87,7 +87,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ matter = list("metal" = 3750) throwforce = 14.0 flags = CONDUCT - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) /obj/item/stack/sheet/metal/cyborg name = "metal synthesizer" @@ -123,7 +123,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ matter = list("metal" = 7500) throwforce = 15.0 flags = CONDUCT - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) /obj/item/stack/sheet/plasteel/cyborg name = "plasteel synthesizer" @@ -160,7 +160,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ desc = "One can only guess that this is a bunch of wood." singular_name = "wood plank" icon_state = "sheet-wood" - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) /obj/item/stack/sheet/wood/cyborg name = "wood synthesizer" @@ -184,7 +184,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits." singular_name = "cloth roll" icon_state = "sheet-cloth" - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) /* * Cardboard @@ -214,7 +214,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ desc = "Large sheets of card, like boxes folded flat." singular_name = "cardboard sheet" icon_state = "sheet-card" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) /obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) recipes = cardboard_recipes diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index a4e7d94fad..0a43a0e5bb 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -11,7 +11,7 @@ /obj/item/stack gender = PLURAL - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) var/list/datum/stack_recipe/recipes var/singular_name var/amount = 1 diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index dcac154442..fbb64dba4c 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -27,7 +27,7 @@ throw_speed = 5 throw_range = 20 flags = CONDUCT - origin_tech = "biotech=1" + origin_tech = list(TECH_BIO = 1) /* * Wood diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index f620fd64e9..335478063a 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -18,7 +18,7 @@ AI MODULES throwforce = 5.0 throw_speed = 3 throw_range = 15 - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) var/datum/ai_laws/laws = null /obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C) @@ -102,7 +102,7 @@ AI MODULES name = "\improper 'Safeguard' AI module" var/targetName = "" desc = "A 'safeguard' AI module: 'Safeguard . Anyone threatening or attempting to harm is no longer to be considered a crew member, and is a threat which must be neutralized.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob) ..() @@ -128,7 +128,7 @@ AI MODULES name = "\improper 'OneCrewMember' AI module" var/targetName = "" desc = "A 'one crew member' AI module: 'Only is a crew member.'" - origin_tech = "programming=3;materials=6" //made with diamonds! + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) //made with diamonds! /obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob) ..() @@ -162,7 +162,7 @@ AI MODULES /obj/item/weapon/aiModule/protectStation name = "\improper 'ProtectStation' AI module" desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized.'" - origin_tech = "programming=3;materials=4" //made of gold + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) //made of gold /obj/item/weapon/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized." @@ -173,7 +173,7 @@ AI MODULES /obj/item/weapon/aiModule/prototypeEngineOffline name = "'PrototypeEngineOffline' AI Module" desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/prototypeEngineOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary." @@ -184,7 +184,7 @@ AI MODULES /obj/item/weapon/aiModule/teleporterOffline name = "'TeleporterOffline' AI Module" desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/teleporterOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member." @@ -195,7 +195,7 @@ AI MODULES /obj/item/weapon/aiModule/quarantine name = "\improper 'Quarantine' AI module" desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving.'" - origin_tech = "programming=3;biotech=2;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving." @@ -206,7 +206,7 @@ AI MODULES /obj/item/weapon/aiModule/oxygen name = "\improper 'OxygenIsToxicToCrewMembers' AI module" desc = "A 'OxygenIsToxicToCrewMembers' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'" - origin_tech = "programming=3;biotech=2;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member." @@ -219,7 +219,7 @@ AI MODULES var/newFreeFormLaw = "freeform" var/lawpos = 15 desc = "A 'freeform' AI module: ''" - origin_tech = "programming=4;materials=4" + origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob) ..() @@ -250,7 +250,7 @@ AI MODULES name = "\improper 'Reset' AI module" var/targetName = "name" desc = "A 'reset' AI module: 'Clears all, except the inherent, laws.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) /obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) log_law_changes(target, sender) @@ -268,7 +268,7 @@ AI MODULES /obj/item/weapon/aiModule/purge // -- TLE name = "\improper 'Purge' AI module" desc = "A 'purge' AI Module: 'Purges all laws.'" - origin_tech = "programming=3;materials=6" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) /obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) log_law_changes(target, sender) @@ -287,7 +287,7 @@ AI MODULES /obj/item/weapon/aiModule/asimov // -- TLE name = "\improper 'Asimov' core AI module" desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/asimov /******************** NanoTrasen ********************/ @@ -295,7 +295,7 @@ AI MODULES /obj/item/weapon/aiModule/nanotrasen // -- TLE 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" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/nanotrasen /******************** Corporate ********************/ @@ -303,14 +303,14 @@ AI MODULES /obj/item/weapon/aiModule/corp name = "\improper 'Corporate' core AI module" desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'" - origin_tech = "programming=3;materials=4" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/corporate /******************** 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" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/drone /****************** P.A.L.A.D.I.N. **************/ @@ -318,7 +318,7 @@ AI MODULES /obj/item/weapon/aiModule/paladin // -- NEO 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" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) laws = new/datum/ai_laws/paladin /****************** T.Y.R.A.N.T. *****************/ @@ -326,7 +326,7 @@ AI MODULES /obj/item/weapon/aiModule/tyrant // -- Darem 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" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6, TECH_ILLEGAL = 2) laws = new/datum/ai_laws/tyrant() /******************** Freeform Core ******************/ @@ -335,7 +335,7 @@ AI MODULES name = "\improper 'Freeform' core AI module" var/newFreeFormLaw = "" desc = "A 'freeform' Core AI module: ''" - origin_tech = "programming=3;materials=6" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) /obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob) ..() @@ -359,7 +359,7 @@ AI MODULES name = "hacked AI module" var/newFreeFormLaw = "" desc = "A hacked AI law module: ''" - origin_tech = "programming=3;materials=6;syndicate=7" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6, TECH_ILLEGAL = 7) /obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob) ..() @@ -391,7 +391,7 @@ AI MODULES /obj/item/weapon/aiModule/robocop // -- TLE name = "\improper 'Robocop' core AI module" desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'" - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) laws = new/datum/ai_laws/robocop() /******************** Antimov ********************/ @@ -399,5 +399,5 @@ AI MODULES /obj/item/weapon/aiModule/antimov // -- TLE name = "\improper 'Antimov' core AI module" desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'" - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) laws = new/datum/ai_laws/antimov() diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 37dcbf9f4e..4784a12404 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -14,7 +14,7 @@ throw_range = 5 w_class = 3.0 matter = list("metal" = 50000) - origin_tech = "engineering=4;materials=2" + origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 2) var/datum/effect/effect/system/spark_spread/spark_system var/stored_matter = 0 var/working = 0 @@ -152,7 +152,7 @@ opacity = 0 density = 0 anchored = 0.0 - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) matter = list("metal" = 30000,"glass" = 15000) /obj/item/weapon/rcd/borg diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index dc6787a73b..abd3523da0 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -9,7 +9,7 @@ icon_state = "" flags = CONDUCT w_class = 2.0 - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) var/list/datum/autopsy_data_scanner/wdata = list() var/list/datum/autopsy_data_scanner/chemtraces = list() var/target_name = null diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 6a1ee735f4..67f1787dac 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -60,14 +60,14 @@ name = "broken cryptographic sequencer" icon_state = "emag" item_state = "card-id" - origin_tech = "magnets=2;syndicate=2" + origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2) /obj/item/weapon/card/emag desc = "It's a card with a magnetic strip attached to some circuitry." name = "cryptographic sequencer" icon_state = "emag" item_state = "card-id" - origin_tech = "magnets=2;syndicate=2" + origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2) var/uses = 10 // List of devices that cost a use to emag. var/list/devices = list( @@ -200,7 +200,7 @@ /obj/item/weapon/card/id/syndicate name = "agent card" access = list(access_maint_tunnels, access_syndicate, access_external_airlocks) - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/registered_user=null /obj/item/weapon/card/id/syndicate/New(mob/user as mob) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index fbba55b040..25fd11c1ed 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -38,7 +38,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/burnt = 0 var/smoketime = 5 w_class = 1.0 - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("burnt", "singed") /obj/item/weapon/flame/match/process() diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm index 00cc7a6835..6c1e3569f7 100644 --- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm +++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm @@ -9,7 +9,7 @@ icon = 'icons/obj/module.dmi' icon_state = "id_mod" item_state = "electronic" - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) density = 0 anchored = 0 w_class = 2.0 diff --git a/code/game/objects/items/weapons/circuitboards/computer/computer.dm b/code/game/objects/items/weapons/circuitboards/computer/computer.dm index 281f31869c..3ba7ac49a4 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/computer.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/computer.dm @@ -5,17 +5,17 @@ /obj/item/weapon/circuitboard/message_monitor name = T_BOARD("message monitor console") build_path = /obj/machinery/computer/message_monitor - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/aiupload name = T_BOARD("AI upload console") build_path = /obj/machinery/computer/aiupload - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) /obj/item/weapon/circuitboard/borgupload name = T_BOARD("cyborg upload console") build_path = /obj/machinery/computer/borgupload - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) /obj/item/weapon/circuitboard/med_data name = T_BOARD("medical records console") @@ -24,17 +24,17 @@ /obj/item/weapon/circuitboard/pandemic name = T_BOARD("PanD.E.M.I.C. 2200") build_path = /obj/machinery/computer/pandemic - origin_tech = "programming=2;biotech=2" + origin_tech = list(TECH_DATA = 2, TECH_BIO = 2) /obj/item/weapon/circuitboard/scan_consolenew name = T_BOARD("DNA machine") build_path = /obj/machinery/computer/scan_consolenew - origin_tech = "programming=2;biotech=2" + origin_tech = list(TECH_DATA = 2, TECH_BIO = 2) /obj/item/weapon/circuitboard/communications name = T_BOARD("command and communications console") build_path = /obj/machinery/computer/communications - origin_tech = "programming=2;magnets=2" + origin_tech = list(TECH_DATA = 2, TECH_MAGNET = 2) /obj/item/weapon/circuitboard/card name = T_BOARD("ID card modification console") @@ -47,7 +47,7 @@ /obj/item/weapon/circuitboard/teleporter name = T_BOARD("teleporter control console") build_path = /obj/machinery/computer/teleporter - origin_tech = "programming=2;bluespace=2" + origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 2) /obj/item/weapon/circuitboard/secure_data name = T_BOARD("security records console") @@ -72,22 +72,22 @@ /obj/item/weapon/circuitboard/robotics name = T_BOARD("robotics control console") build_path = /obj/machinery/computer/robotics - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/drone_control name = T_BOARD("drone control console") build_path = /obj/machinery/computer/drone_control - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/cloning name = T_BOARD("cloning control console") build_path = /obj/machinery/computer/cloning - origin_tech = "programming=3;biotech=3" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 3) /obj/item/weapon/circuitboard/arcade name = T_BOARD("arcade machine") build_path = /obj/machinery/computer/arcade - origin_tech = "programming=1" + origin_tech = list(TECH_DATA = 1) /obj/item/weapon/circuitboard/turbine_control name = T_BOARD("turbine control console") @@ -96,7 +96,7 @@ /obj/item/weapon/circuitboard/solar_control name = T_BOARD("solar control console") build_path = /obj/machinery/power/solar_control - origin_tech = "programming=2;powerstorage=2" + origin_tech = list(TECH_DATA = 2, TECH_POWER = 2) /obj/item/weapon/circuitboard/powermonitor name = T_BOARD("power monitoring console") @@ -129,17 +129,17 @@ /obj/item/weapon/circuitboard/crew name = T_BOARD("crew monitoring console") build_path = /obj/machinery/computer/crew - origin_tech = "programming=3;biotech=2;magnets=2" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MAGNET = 2) /obj/item/weapon/circuitboard/mech_bay_power_console name = T_BOARD("mech bay power control console") build_path = /obj/machinery/computer/mech_bay_power_console - origin_tech = "programming=2;powerstorage=3" + origin_tech = list(TECH_DATA = 2, TECH_POWER = 3) /obj/item/weapon/circuitboard/operating name = T_BOARD("patient monitoring console") build_path = /obj/machinery/computer/operating - origin_tech = "programming=2;biotech=2" + origin_tech = list(TECH_DATA = 2, TECH_BIO = 2) /obj/item/weapon/circuitboard/curefab name = T_BOARD("cure fabricator") @@ -152,39 +152,39 @@ /obj/item/weapon/circuitboard/ordercomp name = T_BOARD("supply ordering console") build_path = /obj/machinery/computer/ordercomp - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/mining_shuttle name = T_BOARD("mining shuttle console") build_path = /obj/machinery/computer/shuttle_control/mining - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/engineering_shuttle name = T_BOARD("engineering shuttle console") build_path = /obj/machinery/computer/shuttle_control/engineering - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/research_shuttle name = T_BOARD("research shuttle console") build_path = /obj/machinery/computer/shuttle_control/research - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/aifixer name = T_BOARD("AI integrity restorer") build_path = /obj/machinery/computer/aifixer - origin_tech = "programming=3;biotech=2" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 2) /obj/item/weapon/circuitboard/area_atmos name = T_BOARD("area air control console") build_path = /obj/machinery/computer/area_atmos - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/prison_shuttle name = T_BOARD("prison shuttle control console") build_path = /obj/machinery/computer/prison_shuttle - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) /obj/item/weapon/circuitboard/rcon_console name = T_BOARD("RCON remote control console") build_path = /obj/machinery/computer/rcon - origin_tech = "programming=4;engineering=3;powerstorage=5" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 3, TECH_POWER = 5) diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 84c9aa3476..882e2714f6 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -5,7 +5,7 @@ /obj/item/weapon/circuitboard/supplycomp name = T_BOARD("supply control console") build_path = /obj/machinery/computer/supplycomp - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) var/contraband_enabled = 0 /obj/item/weapon/circuitboard/supplycomp/construct(var/obj/machinery/computer/supplycomp/SC) diff --git a/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm b/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm index 9a18f0df99..b7ad5db011 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm @@ -5,14 +5,14 @@ /obj/item/weapon/circuitboard/comm_monitor name = T_BOARD("telecommunications monitor console") build_path = /obj/machinery/computer/telecomms/monitor - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/comm_server name = T_BOARD("telecommunications server monitor console") build_path = /obj/machinery/computer/telecomms/server - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/comm_traffic name = T_BOARD("telecommunications traffic control console") build_path = /obj/machinery/computer/telecomms/traffic - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm index c01893b158..42abd94ca4 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm @@ -6,7 +6,7 @@ name = T_BOARD("biogenerator") build_path = "/obj/machinery/biogenerator" board_type = "machine" - origin_tech = "programming=2" + origin_tech = list(TECH_DATA = 2) frame_desc = "Requires 1 Manipulator, and 1 Matter Bin." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 1, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm index fdc0865f9c..2807f5553a 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm @@ -6,7 +6,7 @@ name = T_BOARD("clone pod") build_path = "/obj/machinery/clonepod" board_type = "machine" - origin_tech = "programming=3;biotech=3" + origin_tech = list(TECH_DATA = 3, TECH_BIO = 3) frame_desc = "Requires 2 Manipulator, 2 Scanning Module, 2 pieces of cable and 1 Console Screen." req_components = list( "/obj/item/stack/cable_coil" = 2, @@ -18,7 +18,7 @@ name = T_BOARD("cloning scanner") build_path = "/obj/machinery/dna_scannernew" board_type = "machine" - origin_tech = "programming=2;biotech=2" + origin_tech = list(TECH_DATA = 2, TECH_BIO = 2) frame_desc = "Requires 1 Scanning module, 1 Micro Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/scanning_module" = 1, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm index d4292effe2..dfce002fcd 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm @@ -6,7 +6,7 @@ name = T_BOARD("mining drill head") build_path = "/obj/machinery/mining/drill" board_type = "machine" - origin_tech = "programming=1;engineering=1" + origin_tech = list(TECH_DATA = 1, TECH_ENGINERING = 1) frame_desc = "Requires 1 capacitor, 1 cell, 1 matter bin, and 1 micro laser." req_components = list( "/obj/item/weapon/stock_parts/capacitor" = 1, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm index 77d313e414..6f39f9ccd9 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm @@ -6,7 +6,7 @@ name = T_BOARD("PACMAN-type generator") build_path = "/obj/machinery/power/port_gen/pacman" board_type = "machine" - origin_tech = "programming=3;powerstorage=3;phorontech=3;engineering=3" + origin_tech = list(TECH_DATA = 3, TECH_POWER = 3, TECH_PHORON = 3, TECH_ENGINERING = 3) frame_desc = "Requires 1 Matter Bin, 1 Micro-Laser, 2 Pieces of Cable, and 1 Capacitor." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 1, @@ -17,9 +17,9 @@ /obj/item/weapon/circuitboard/pacman/super name = T_BOARD("SUPERPACMAN-type generator") build_path = "/obj/machinery/power/port_gen/pacman/super" - origin_tech = "programming=3;powerstorage=4;engineering=4" + origin_tech = list(TECH_DATA = 3, TECH_POWER = 4, TECH_ENGINERING = 4) /obj/item/weapon/circuitboard/pacman/mrs name = T_BOARD("MRSPACMAN-type generator") build_path = "/obj/machinery/power/port_gen/pacman/mrs" - origin_tech = "programming=3;powerstorage=5;engineering=5" + origin_tech = list(TECH_DATA = 3, TECH_POWER = 5, TECH_ENGINERING = 5) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/power.dm b/code/game/objects/items/weapons/circuitboards/machinery/power.dm index 80955b1b8e..bddeae03db 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/power.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/power.dm @@ -6,7 +6,7 @@ name = T_BOARD("superconductive magnetic energy storage") build_path = "/obj/machinery/power/smes/buildable" board_type = "machine" - origin_tech = "powerstorage=6;engineering=4" + origin_tech = list(TECH_POWER = 6, TECH_ENGINERING = 4) frame_desc = "Requires 1 superconducting magnetic coil and 30 wires." req_components = list("/obj/item/weapon/smes_coil" = 1, "/obj/item/stack/cable_coil" = 30) @@ -14,7 +14,7 @@ name = T_BOARD("battery rack PSU") build_path = "/obj/machinery/power/smes/batteryrack" board_type = "machine" - origin_tech = "powerstorage=3;engineering=2" + origin_tech = list(TECH_POWER = 3, TECH_ENGINERING = 2) frame_desc = "Requires 3 power cells." req_components = list("/obj/item/weapon/cell" = 3) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm index 5a0dc01bc1..9277c31578 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm @@ -6,7 +6,7 @@ name = T_BOARD("cyborg recharging station") build_path = "/obj/machinery/recharge_station" board_type = "machine" - origin_tech = "programming=3;engineering=3" + origin_tech = list(TECH_DATA = 3, TECH_ENGINERING = 3) frame_desc = "Requires 2 Manipulator, 2 Capacitor, 1 Cell, and 5 pieces of cable." req_components = list( "/obj/item/stack/cable_coil" = 5, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index 9853150b17..7f5d298a96 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -6,7 +6,7 @@ obj/item/weapon/circuitboard/rdserver name = T_BOARD("R&D server") build_path = "/obj/machinery/r_n_d/server" board_type = "machine" - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) frame_desc = "Requires 2 pieces of cable, and 1 Scanning Module." req_components = list( "/obj/item/stack/cable_coil" = 2, @@ -16,7 +16,7 @@ obj/item/weapon/circuitboard/rdserver name = T_BOARD("destructive analyzer") build_path = "/obj/machinery/r_n_d/destructive_analyzer" board_type = "machine" - origin_tech = "magnets=2;engineering=2;programming=2" + origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2, TECH_DATA = 2) frame_desc = "Requires 1 Scanning Module, 1 Micro Manipulator, and 1 Micro-Laser." req_components = list( "/obj/item/weapon/stock_parts/scanning_module" = 1, @@ -27,7 +27,7 @@ obj/item/weapon/circuitboard/rdserver name = T_BOARD("autolathe") build_path = "/obj/machinery/autolathe" board_type = "machine" - origin_tech = "engineering=2;programming=2" + origin_tech = list(TECH_ENGINERING = 2, TECH_DATA = 2) frame_desc = "Requires 3 Matter Bins, 1 Micro Manipulator, and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 3, @@ -38,7 +38,7 @@ obj/item/weapon/circuitboard/rdserver name = T_BOARD("protolathe") build_path = "/obj/machinery/r_n_d/protolathe" board_type = "machine" - origin_tech = "engineering=2;programming=2" + origin_tech = list(TECH_ENGINERING = 2, TECH_DATA = 2) frame_desc = "Requires 2 Matter Bins, 2 Micro Manipulators, and 2 Beakers." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 2, @@ -50,7 +50,7 @@ obj/item/weapon/circuitboard/rdserver name = T_BOARD("circuit imprinter") build_path = "/obj/machinery/r_n_d/circuit_imprinter" board_type = "machine" - origin_tech = "engineering=2;programming=2" + origin_tech = list(TECH_ENGINERING = 2, TECH_DATA = 2) frame_desc = "Requires 1 Matter Bin, 1 Micro Manipulator, and 2 Beakers." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 1, @@ -61,7 +61,7 @@ obj/item/weapon/circuitboard/rdserver name = "Circuit board (Exosuit Fabricator)" build_path = "/obj/machinery/mecha_part_fabricator" board_type = "machine" - origin_tech = "programming=3;engineering=3" + origin_tech = list(TECH_DATA = 3, TECH_ENGINERING = 3) frame_desc = "Requires 2 Matter Bins, 1 Micro Manipulator, 1 Micro-Laser and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 2, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm index 6e892a6603..510689560e 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm @@ -6,7 +6,7 @@ name = T_BOARD("hull shield generator") board_type = "machine" build_path = "/obj/machinery/shield_gen/external" - origin_tech = "bluespace=4;phorontech=3" + origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3) frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/manipulator/pico" = 2, @@ -20,7 +20,7 @@ name = T_BOARD("bubble shield generator") board_type = "machine" build_path = "/obj/machinery/shield_gen" - origin_tech = "bluespace=4;phorontech=3" + origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3) frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/manipulator/pico" = 2, @@ -34,7 +34,7 @@ name = T_BOARD("shield capacitor") board_type = "machine" build_path = "/obj/machinery/shield_capacitor" - origin_tech = "magnets=3;powerstorage=4" + origin_tech = list(TECH_MAGNET = 3, TECH_POWER = 4) frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Filter, 5 Pieces of cable, 1 Subspace Treatment disk, 1 Subspace Analyzer and 1 Console Screen." req_components = list( "/obj/item/weapon/stock_parts/manipulator/pico" = 2, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm index a312d2995a..5a5b200702 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm @@ -8,7 +8,7 @@ /obj/item/weapon/circuitboard/telecomms/receiver name = T_BOARD("subspace receiver") build_path = "/obj/machinery/telecomms/receiver" - origin_tech = "programming=4;engineering=3;bluespace=2" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 3, TECH_BLUESPACE = 2) frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Micro Manipulators, and 1 Micro-Laser." req_components = list( "/obj/item/weapon/stock_parts/subspace/ansible" = 1, @@ -19,7 +19,7 @@ /obj/item/weapon/circuitboard/telecomms/hub name = T_BOARD("hub mainframe") build_path = "/obj/machinery/telecomms/hub" - origin_tech = "programming=4;engineering=4" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4) frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filter." req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 2, @@ -29,7 +29,7 @@ /obj/item/weapon/circuitboard/telecomms/relay name = T_BOARD("relay mainframe") build_path = "/obj/machinery/telecomms/relay" - origin_tech = "programming=3;engineering=4;bluespace=3" + origin_tech = list(TECH_DATA = 3, TECH_ENGINERING = 4, TECH_BLUESPACE = 3) frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filters." req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 2, @@ -39,7 +39,7 @@ /obj/item/weapon/circuitboard/telecomms/bus name = T_BOARD("bus mainframe") build_path = "/obj/machinery/telecomms/bus" - origin_tech = "programming=4;engineering=4" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4) frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter." req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 2, @@ -49,7 +49,7 @@ /obj/item/weapon/circuitboard/telecomms/processor name = T_BOARD("processor unit") build_path = "/obj/machinery/telecomms/processor" - origin_tech = "programming=4;engineering=4" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4) frame_desc = "Requires 3 Micro Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier." req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 3, @@ -62,7 +62,7 @@ /obj/item/weapon/circuitboard/telecomms/server name = T_BOARD("telecommunication server") build_path = "/obj/machinery/telecomms/server" - origin_tech = "programming=4;engineering=4" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4) frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter." req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 2, @@ -72,7 +72,7 @@ /obj/item/weapon/circuitboard/telecomms/broadcaster name = T_BOARD("subspace broadcaster") build_path = "/obj/machinery/telecomms/broadcaster" - origin_tech = "programming=4;engineering=4;bluespace=2" + origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4, TECH_BLUESPACE = 2) frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. " req_components = list( "/obj/item/weapon/stock_parts/manipulator" = 2, diff --git a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm index db76bbcc8e..af12bf90c7 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm @@ -16,7 +16,7 @@ /obj/item/weapon/circuitboard/unary_atmos/heater name = T_BOARD("gas heating system") build_path = "/obj/machinery/atmospherics/unary/heater" - origin_tech = "powerstorage=2;engineering=1" + origin_tech = list(TECH_POWER = 2, TECH_ENGINERING = 1) frame_desc = "Requires 5 Pieces of Cable, 1 Matter Bin, and 2 Capacitors." req_components = list( "/obj/item/stack/cable_coil" = 5, @@ -26,7 +26,7 @@ /obj/item/weapon/circuitboard/unary_atmos/cooler name = T_BOARD("gas cooling system") build_path = "/obj/machinery/atmospherics/unary/freezer" - origin_tech = "magnets=2;engineering=2" + origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2) frame_desc = "Requires 2 Pieces of Cable, 1 Matter Bin, 1 Micro Manipulator, and 2 Capacitors." req_components = list( "/obj/item/stack/cable_coil" = 2, diff --git a/code/game/objects/items/weapons/circuitboards/mecha.dm b/code/game/objects/items/weapons/circuitboards/mecha.dm index ad859479c5..0ce851e3a3 100644 --- a/code/game/objects/items/weapons/circuitboards/mecha.dm +++ b/code/game/objects/items/weapons/circuitboards/mecha.dm @@ -12,7 +12,7 @@ /obj/item/weapon/circuitboard/mecha/ripley - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/mecha/ripley/peripherals name = T_BOARD_MECHA("Ripley peripherals control") @@ -24,7 +24,7 @@ /obj/item/weapon/circuitboard/mecha/gygax - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) /obj/item/weapon/circuitboard/mecha/gygax/peripherals name = T_BOARD_MECHA("Gygax peripherals control") @@ -33,7 +33,7 @@ /obj/item/weapon/circuitboard/mecha/gygax/targeting name = T_BOARD_MECHA("Gygax weapon control and targeting") icon_state = "mcontroller" - origin_tech = "programming=4;combat=4" + origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4) /obj/item/weapon/circuitboard/mecha/gygax/main name = T_BOARD_MECHA("Gygax central control") @@ -41,7 +41,7 @@ /obj/item/weapon/circuitboard/mecha/durand - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) /obj/item/weapon/circuitboard/mecha/durand/peripherals name = T_BOARD_MECHA("Durand peripherals control") @@ -50,7 +50,7 @@ /obj/item/weapon/circuitboard/mecha/durand/targeting name = T_BOARD_MECHA("Durand weapon control and targeting") icon_state = "mcontroller" - origin_tech = "programming=4;combat=4" + origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4) /obj/item/weapon/circuitboard/mecha/durand/main name = T_BOARD_MECHA("Durand central control") @@ -58,7 +58,7 @@ /obj/item/weapon/circuitboard/mecha/honker - origin_tech = "programming=4" + origin_tech = list(TECH_DATA = 4) /obj/item/weapon/circuitboard/mecha/honker/peripherals name = T_BOARD_MECHA("H.O.N.K peripherals control") @@ -74,7 +74,7 @@ /obj/item/weapon/circuitboard/mecha/odysseus - origin_tech = "programming=3" + origin_tech = list(TECH_DATA = 3) /obj/item/weapon/circuitboard/mecha/odysseus/peripherals name = T_BOARD_MECHA("Odysseus peripherals control") diff --git a/code/game/objects/items/weapons/circuitboards/other.dm b/code/game/objects/items/weapons/circuitboards/other.dm index ec38643bed..6d016a96fa 100644 --- a/code/game/objects/items/weapons/circuitboards/other.dm +++ b/code/game/objects/items/weapons/circuitboards/other.dm @@ -6,5 +6,5 @@ /obj/item/weapon/circuitboard/aicore name = T_BOARD("AI core") - origin_tech = "programming=4;biotech=2" + origin_tech = list(TECH_DATA = 4, TECH_BIO = 2) board_type = "other" diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 030437b446..f35787cca6 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -7,7 +7,7 @@ item_state = "plasticx" flags = NOBLUDGEON w_class = 2.0 - origin_tech = "syndicate=2" + origin_tech = list(TECH_ILLEGAL = 2) var/datum/wires/explosive/c4/wires = null var/timer = 10 var/atom/target = null diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 50508594cf..7b152fd8d3 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -11,7 +11,7 @@ throw_range = 5 w_class = 3.0 matter = list("metal" = 500) - origin_tech = "combat=1;phorontech=1" + origin_tech = list(TECH_COMBAT = 1, TECH_PHORON = 1) var/status = 0 var/throw_amount = 100 var/lit = 0 //on or off diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index bb440d1215..3f7214fec8 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -134,7 +134,6 @@ prime() if(!stage || stage<2) return - //if(prob(reliability)) var/has_reagents = 0 for(var/obj/item/weapon/reagent_containers/glass/G in beakers) if(G.reagents.total_volume) has_reagents = 1 @@ -175,7 +174,7 @@ desc = "An oversized grenade that affects a larger area." icon_state = "large_grenade" allowed_containers = list(/obj/item/weapon/reagent_containers/glass) - origin_tech = "combat=3;materials=3" + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3) affected_area = 4 /obj/item/weapon/grenade/chem_grenade/metalfoam diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm index 3446fa46c3..884f5630b4 100644 --- a/code/game/objects/items/weapons/grenades/emgrenade.dm +++ b/code/game/objects/items/weapons/grenades/emgrenade.dm @@ -2,7 +2,7 @@ name = "classic emp grenade" icon_state = "emp" item_state = "emp" - origin_tech = "materials=2;magnets=3" + origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3) prime() ..() diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 03d8ccdffc..aac45f8388 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -2,7 +2,7 @@ name = "flashbang" icon_state = "flashbang" item_state = "flashbang" - origin_tech = "materials=2;combat=1" + origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1) var/banglet = 0 prime() diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm index 8b6b6e938d..bf639fdf13 100644 --- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm +++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/grenade.dmi' icon_state = "delivery" item_state = "flashbang" - origin_tech = "materials=3;magnets=4" + origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4) var/banglet = 0 var/spawner_type = null // must be an object path var/deliveryamt = 1 // amount of type to deliver @@ -35,10 +35,10 @@ name = "manhack delivery grenade" spawner_type = /mob/living/simple_animal/hostile/viscerator deliveryamt = 5 - origin_tech = "materials=3;magnets=4;syndicate=4" + origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4) /obj/item/weapon/grenade/spawnergrenade/spesscarp name = "carp delivery grenade" spawner_type = /mob/living/simple_animal/hostile/carp deliveryamt = 5 - origin_tech = "materials=3;magnets=4;syndicate=4" + origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 85bec3a8ea..354858554e 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -11,7 +11,7 @@ throw_speed = 2 throw_range = 5 matter = list("metal" = 500) - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) var/dispenser = 0 var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes var/cuff_sound = 'sound/weapons/handcuffs.ogg' diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index e27e38af7b..598f33ae8c 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -23,7 +23,7 @@ throw_speed = 3 throw_range = 5 flags = CONDUCT - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("attacked", "stabbed", "poked") sharp = 0 @@ -146,7 +146,7 @@ throw_speed = 3 throw_range = 6 matter = list("metal" = 12000) - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) @@ -176,7 +176,7 @@ throw_speed = 3 throw_range = 6 matter = list("metal" = 12000) - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharp = 1 edge = 1 diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index f04be5d33a..898eae173b 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -74,7 +74,7 @@ throw_range = 5 w_class = 3 flags = CONDUCT | NOSHIELD | NOBLOODY - origin_tech = "magnets=3;combat=4" + origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 4) attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") sharp = 1 edge = 1 @@ -110,7 +110,7 @@ throw_range = 5 w_class = 2 flags = NOSHIELD | NOBLOODY - origin_tech = "magnets=3;syndicate=4" + origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) sharp = 1 edge = 1 diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index c5efdae1fb..c6bb1c64b5 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -8,7 +8,7 @@ force = 10 throwforce = 7 w_class = 3 - origin_tech = "combat=4" + origin_tech = list(TECH_COMBAT = 4) attack_verb = list("flogged", "whipped", "lashed", "disciplined") suicide_act(mob/user) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index 5cab6b24cb..7536acfeb1 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/power.dmi' icon_state = "cell" item_state = "cell" - origin_tech = "powerstorage=1" + origin_tech = list(TECH_POWER = 1) force = 5.0 throwforce = 5.0 throw_speed = 3 @@ -25,7 +25,7 @@ /obj/item/weapon/cell/crap name = "\improper Nanotrasen brand rechargable AA battery" desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT - origin_tech = "powerstorage=0" + origin_tech = list(TECH_POWER = 0) maxcharge = 500 matter = list("metal" = 700, "glass" = 40) @@ -35,7 +35,7 @@ /obj/item/weapon/cell/secborg name = "security borg rechargable D battery" - origin_tech = "powerstorage=0" + origin_tech = list(TECH_POWER = 0) maxcharge = 600 //600 max charge / 100 charge per shot = six shots matter = list("metal" = 700, "glass" = 40) @@ -45,13 +45,13 @@ /obj/item/weapon/cell/apc name = "heavy-duty power cell" - origin_tech = "powerstorage=1" + origin_tech = list(TECH_POWER = 1) maxcharge = 5000 matter = list("metal" = 700, "glass" = 50) /obj/item/weapon/cell/high name = "high-capacity power cell" - origin_tech = "powerstorage=2" + origin_tech = list(TECH_POWER = 2) icon_state = "hcell" maxcharge = 10000 matter = list("metal" = 700, "glass" = 60) @@ -62,7 +62,7 @@ /obj/item/weapon/cell/super name = "super-capacity power cell" - origin_tech = "powerstorage=5" + origin_tech = list(TECH_POWER = 5) icon_state = "scell" maxcharge = 20000 matter = list("metal" = 700, "glass" = 70) @@ -74,7 +74,7 @@ /obj/item/weapon/cell/hyper name = "hyper-capacity power cell" - origin_tech = "powerstorage=6" + origin_tech = list(TECH_POWER = 6) icon_state = "hpcell" maxcharge = 30000 matter = list("metal" = 700, "glass" = 80) @@ -96,7 +96,7 @@ /obj/item/weapon/cell/potato name = "potato battery" desc = "A rechargable starch based power cell." - origin_tech = "powerstorage=1" + origin_tech = list(TECH_POWER = 1) icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi' icon_state = "potato_cell" //"potato_battery" charge = 100 @@ -107,7 +107,7 @@ /obj/item/weapon/cell/slime name = "charged slime core" desc = "A yellow slime core infused with phoron, it crackles with power." - origin_tech = "powerstorage=2;biotech=4" + origin_tech = list(TECH_POWER = 2, TECH_BIO = 4) icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi' icon_state = "yellow slime extract" //"potato_battery" maxcharge = 10000 diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 92ba323a6a..618598c182 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -8,7 +8,7 @@ item_state = "paper" throw_speed = 4 throw_range = 20 - origin_tech = "bluespace=4" + origin_tech = list(TECH_BLUESPACE = 4) /obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob) user.set_machine(src) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 65f1abddfb..4fd210c171 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -14,7 +14,7 @@ throw_range = 4 w_class = 4.0 matter = list("glass" = 7500, "metal" = 1000) - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) attack_verb = list("shoved", "bashed") var/cooldown = 0 //shield bash cooldown. based on world.time @@ -45,7 +45,7 @@ throw_speed = 1 throw_range = 4 w_class = 2 - origin_tech = "materials=4;magnets=3;syndicate=4" + origin_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 3, TECH_ILLEGAL = 4) attack_verb = list("shoved", "bashed") var/active = 0 @@ -94,7 +94,7 @@ throw_speed = 2 throw_range = 10 w_class = 2.0 - origin_tech = "magnets=3;syndicate=4" + origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) /obj/item/weapon/cloaking_device/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 40937ea61c..e9df3e1255 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -37,7 +37,7 @@ /obj/item/weapon/storage/backpack/holding name = "bag of holding" desc = "A backpack that opens into a localized pocket of Blue Space." - origin_tech = "bluespace=4" + origin_tech = list(TECH_BLUESPACE = 4) icon_state = "holdingpack" max_w_class = 4 max_storage_space = 56 @@ -47,25 +47,10 @@ return attackby(obj/item/weapon/W as obj, mob/user as mob) - if(crit_fail) - user << "\red The Bluespace generator isn't working." - return - if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail) + if(istype(W, /obj/item/weapon/storage/backpack/holding)) user << "\red The Bluespace interfaces of the two devices conflict and malfunction." del(W) return - /* //BoH+BoH=Singularity, commented out. - if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail) - investigate_log("has become a singularity. Caused by [user.key]","singulo") - user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!" - del(W) - var/obj/machinery/singularity/singulo = new /obj/machinery/singularity (get_turf(src)) - singulo.energy = 300 //should make it a bit bigger~ - message_admins("[key_name_admin(user)] detonated a bag of holding") - log_game("[key_name(user)] detonated a bag of holding") - del(src) - return - */ ..() //Please don't clutter the parent storage item with stupid hacks. @@ -74,18 +59,6 @@ return 1 return ..() - proc/failcheck(mob/user as mob) - if (prob(src.reliability)) return 1 //No failure - if (prob(src.reliability)) - user << "\red The Bluespace portal resists your attempt to add another item." //light failure - else - user << "\red The Bluespace generator malfunctions!" - for (var/obj/O in src.contents) //it broke, delete what was in it - del(O) - crit_fail = 1 - icon_state = "brokenpack" - - /obj/item/weapon/storage/backpack/santabag name = "\improper Santa's gift bag" desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!" diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 8f589f9883..11c2d6a853 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -12,7 +12,7 @@ w_class = 4 max_w_class = 3 max_storage_space = 14 //can hold 7 w_class-2 items or up to 3 w_class-3 items (with 1 w_class-2 item as change). - origin_tech = "combat=1" + origin_tech = list(TECH_COMBAT = 1) attack_verb = list("robusted") /obj/item/weapon/storage/toolbox/emergency @@ -67,7 +67,7 @@ name = "suspicious looking toolbox" icon_state = "syndicate" item_state = "toolbox_syndi" - origin_tech = "combat=1;syndicate=1" + origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1) force = 7.0 New() diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 8747bbfacf..fbf5d0534b 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -10,7 +10,7 @@ edge = 0 throwforce = 7 w_class = 3 - origin_tech = "combat=2" + origin_tech = list(TECH_COMBAT = 2) attack_verb = list("beaten") var/stunforce = 0 var/agonyforce = 60 diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 383e21ff4f..cedede4ca8 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -19,7 +19,7 @@ matter = list("metal" = 10000, "glass" = 5000) flags = CONDUCT w_class = 2.0 - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) /* * Hemostat @@ -32,7 +32,7 @@ matter = list("metal" = 5000, "glass" = 2500) flags = CONDUCT w_class = 2.0 - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "pinched") /* @@ -46,7 +46,7 @@ matter = list("metal" = 5000, "glass" = 2500) flags = CONDUCT w_class = 2.0 - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("burnt") /* @@ -62,7 +62,7 @@ flags = CONDUCT force = 15.0 w_class = 2.0 - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("drilled") suicide_act(mob/user) @@ -87,7 +87,7 @@ throw_speed = 3 throw_range = 5 matter = list("metal" = 10000, "glass" = 5000) - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") suicide_act(mob/user) @@ -141,7 +141,7 @@ throw_speed = 3 throw_range = 5 matter = list("metal" = 20000,"glass" = 10000) - origin_tech = "materials=1;biotech=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "slashed", "sawed", "cut") sharp = 1 edge = 1 @@ -161,7 +161,7 @@ icon_state = "fixovein" force = 0 throwforce = 1.0 - origin_tech = "materials=1;biotech=3" + origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 3) w_class = 2.0 var/usage_amount = 10 diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 20d96676ed..f993352940 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -22,7 +22,7 @@ throw_speed = 4 throw_range = 20 matter = list("metal" = 400) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) /obj/item/weapon/locator/attack_self(mob/user as mob) user.set_machine(src) @@ -133,7 +133,7 @@ Frequency: throw_speed = 3 throw_range = 5 matter = list("metal" = 10000) - origin_tech = "magnets=1;bluespace=3" + origin_tech = list(TECH_MAGNET = 1, TECH_BLUESPACE = 3) /obj/item/weapon/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 1090431916..6dce4dbedc 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -25,7 +25,7 @@ throwforce = 7.0 w_class = 2.0 matter = list("metal" = 150) - origin_tech = "materials=1;engineering=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") @@ -103,7 +103,7 @@ throw_range = 9 w_class = 2.0 matter = list("metal" = 80) - origin_tech = "materials=1;engineering=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) attack_verb = list("pinched", "nipped") sharp = 1 edge = 1 @@ -147,7 +147,7 @@ matter = list("metal" = 70, "glass" = 30) //R&D tech level - origin_tech = "engineering=1" + origin_tech = list(TECH_ENGINERING = 1) //Welding tool specific stuff var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) @@ -404,21 +404,21 @@ name = "industrial welding tool" max_fuel = 40 matter = list("metal" = 70, "glass" = 60) - origin_tech = "engineering=2" + origin_tech = list(TECH_ENGINERING = 2) /obj/item/weapon/weldingtool/hugetank name = "upgraded welding tool" max_fuel = 80 w_class = 3.0 matter = list("metal" = 70, "glass" = 120) - origin_tech = "engineering=3" + origin_tech = list(TECH_ENGINERING = 3) /obj/item/weapon/weldingtool/experimental name = "experimental welding tool" max_fuel = 40 w_class = 3.0 matter = list("metal" = 70, "glass" = 120) - origin_tech = "engineering=4;phorontech=3" + origin_tech = list(TECH_ENGINERING = 4, TECH_PHORON = 3) var/last_gen = 0 @@ -445,7 +445,7 @@ item_state = "crowbar" w_class = 2.0 matter = list("metal" = 50) - origin_tech = "engineering=1" + origin_tech = list(TECH_ENGINERING = 1) attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") /obj/item/weapon/crowbar/red diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index bce7eabe9d..a145d1db0d 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -169,7 +169,7 @@ wieldsound = 'sound/weapons/saberon.ogg' unwieldsound = 'sound/weapons/saberoff.ogg' flags = NOSHIELD - origin_tech = "magnets=3;syndicate=4" + origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharp = 1 edge = 1 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 51cb54ea2d..db1ca3f108 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -2,9 +2,7 @@ //Used to store information about the contents of the object. var/list/matter - var/origin_tech = null //Used by R&D to determine what research bonuses it grants. - var/reliability = 100 //Used by SOME devices to determine how reliable they are. - var/crit_fail = 0 + var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. animate_movement = 2 var/throwforce = 1 diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index ca4717307a..d727ecb1ab 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -9,7 +9,7 @@ throwforce = 2 throw_speed = 3 throw_range = 10 - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) var/secured = 1 var/list/attached_overlays = null diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index ece2f08219..2988630032 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -3,7 +3,7 @@ desc = "A small electronic device able to ignite combustable substances." icon_state = "igniter" matter = list("metal" = 500, "glass" = 50, "waste" = 10) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) secured = 1 wires = WIRE_RECEIVE diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 79e3cf8637..77e89b42fb 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -5,7 +5,7 @@ desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted." icon_state = "infrared" matter = list("metal" = 1000, "glass" = 500, "waste" = 100) - origin_tech = "magnets=2" + origin_tech = list(TECH_MAGNET = 2) wires = WIRE_PULSE diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 676ee17cd1..e1c0e32a2c 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -3,7 +3,7 @@ desc = "A handy little spring-loaded trap for catching pesty rodents." icon_state = "mousetrap" matter = list("metal" = 100, "waste" = 10) - origin_tech = "combat=1" + origin_tech = list(TECH_COMBAT = 1) var/armed = 0 diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 06923f8458..09d3f5c6ef 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -3,7 +3,7 @@ desc = "Used for scanning and alerting when someone enters a certain proximity." icon_state = "prox" matter = list("metal" = 800, "glass" = 200, "waste" = 50) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) wires = WIRE_PULSE diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 0b2acd5a5b..f1eac3d69a 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -4,7 +4,7 @@ icon_state = "signaller" item_state = "signaler" matter = list("metal" = 1000, "glass" = 200, "waste" = 100) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE secured = 1 diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 326d36195f..bbca2cb1d0 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -3,7 +3,7 @@ desc = "Used to time things. Works well with contraptions which has to count down. Tick tock." icon_state = "timer" matter = list("metal" = 500, "glass" = 50, "waste" = 10) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) wires = WIRE_PULSE diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index b9c3eb88de..63895b1ec1 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -3,7 +3,7 @@ desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated." icon_state = "voice" matter = list("metal" = 500, "glass" = 50, "waste" = 10) - origin_tech = "magnets=1" + origin_tech = list(TECH_MAGNET = 1) var/listening = 0 var/recorded //the activation message diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 2cd1450a97..583124d4b8 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -212,8 +212,6 @@ BLIND // can't see anything cell.charge -= 1000 / severity if (cell.charge < 0) cell.charge = 0 - if(cell.reliability != 100 && prob(50/severity)) - cell.reliability -= 10 / severity ..() // Called just before an attack_hand(), in mob/UnarmedAttack() diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 317b60af18..d07bf0fdf2 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -33,7 +33,7 @@ icon_state = "meson" item_state = "glasses" icon_action_button = "action_meson" //This doesn't actually matter, the action button is generated from the current icon_state. But, this is the only way to get it to show up. - origin_tech = "magnets=2;engineering=2" + origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2) toggleable = 1 vision_flags = SEE_TURFS @@ -61,7 +61,7 @@ desc = "You can totally see in the dark now!" icon_state = "night" item_state = "glasses" - origin_tech = "magnets=2" + origin_tech = list(TECH_MAGNET = 2) darkness_view = 7 /obj/item/clothing/glasses/night/New() @@ -88,7 +88,7 @@ icon_state = "material" item_state = "glasses" icon_action_button = "action_material" - origin_tech = "magnets=3;engineering=3" + origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3) toggleable = 1 vision_flags = SEE_OBJS @@ -206,7 +206,7 @@ desc = "Thermals in the shape of glasses." icon_state = "thermal" item_state = "glasses" - origin_tech = "magnets=3" + origin_tech = list(TECH_MAGNET = 3) toggleable = 1 vision_flags = SEE_MOBS invisa_view = 2 @@ -232,7 +232,7 @@ desc = "Used for seeing walls, floors, and stuff through anything." icon_state = "meson" icon_action_button = "action_meson" - origin_tech = "magnets=3;syndicate=4" + origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) /obj/item/clothing/glasses/thermal/monocle name = "Thermoncle" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 60dd6174b1..fa273534e6 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -2,7 +2,7 @@ name = "HUD" desc = "A heads-up display that provides important info in (almost) real time." flags = null //doesn't protect eyes because it's a monocle, duh - origin_tech = "magnets=3;biotech=2" + origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2) var/list/icon/current = list() //the current hud icons proc diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm index 6899fef1ef..70459e62af 100644 --- a/code/modules/clothing/masks/voice.dm +++ b/code/modules/clothing/masks/voice.dm @@ -8,7 +8,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics." var/obj/item/voice_changer/changer - origin_tech = "syndicate=4" + origin_tech = list(TECH_ILLEGAL = 4) /obj/item/clothing/mask/gas/voice/verb/Toggle_Voice_Changer() set category = "Object" diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 38b252b1ff..ac4b8f7d9c 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -5,7 +5,7 @@ item_state = "brown" permeability_coefficient = 0.05 flags = NOSLIP - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() siemens_coefficient = 0.8 species_restricted = null diff --git a/code/modules/clothing/under/chameleon.dm b/code/modules/clothing/under/chameleon.dm index 01bea29b2e..973cbdbf56 100644 --- a/code/modules/clothing/under/chameleon.dm +++ b/code/modules/clothing/under/chameleon.dm @@ -9,7 +9,7 @@ item_state = "bl_suit" item_color = "black" desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/under/chameleon/New() @@ -60,7 +60,7 @@ item_state = "greysoft" item_color = "grey" desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) body_parts_covered = 0 var/list/clothing_choices = list() @@ -112,7 +112,7 @@ icon_state = "armor" item_state = "armor" desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/suit/chameleon/New() @@ -164,7 +164,7 @@ item_state = "black" item_color = "black" desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/shoes/chameleon/New() @@ -213,7 +213,7 @@ icon_state = "backpack" item_state = "backpack" desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/weapon/storage/backpack/chameleon/New() @@ -269,7 +269,7 @@ item_state = "bgloves" item_color = "brown" desc = "It looks like a pair of gloves, but it seems to have a small dial inside." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/gloves/chameleon/New() @@ -319,7 +319,7 @@ icon_state = "gas_alt" item_state = "gas_alt" desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/mask/chameleon/New() @@ -369,7 +369,7 @@ icon_state = "meson" item_state = "glasses" desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside." - origin_tech = "syndicate=3" + origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() /obj/item/clothing/glasses/chameleon/New() @@ -418,7 +418,7 @@ w_class = 3.0 max_shells = 7 caliber = ".45" - origin_tech = "combat=2;materials=2;syndicate=8" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) ammo_type = "/obj/item/ammo_casing/chameleon" matter = list() var/list/gun_choices = list() diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 10f5961da7..f3f723eee1 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -233,7 +233,7 @@ sharp = 1 edge = 1 matter = list("metal" = 15000) - origin_tech = "materials=2;combat=1" + origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1) attack_verb = list("chopped", "torn", "cut") /obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -268,7 +268,7 @@ w_class = 4.0 flags = NOSHIELD slot_flags = SLOT_BACK - origin_tech = "materials=2;combat=2" + origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 2) attack_verb = list("chopped", "sliced", "cut", "reaped") /obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity) diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 510172d795..8e8177dd19 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -5,7 +5,7 @@ icon_state = "forensic0-old" //GET A BETTER SPRITE. item_state = "electronic" matter = list("metal" = 150) - origin_tech = "magnets=1;engineering=1" + origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1) /obj/item/weapon/mining_scanner/attack_self(mob/user as mob) user << "You begin sweeping \the [src] about, scanning for metal deposits." diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 698815d0a9..43a7ffb92c 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -61,7 +61,7 @@ w_class = 4.0 matter = list("metal" = 3750) var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO - origin_tech = "materials=1;engineering=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) attack_verb = list("hit", "pierced", "sliced", "attacked", "drilled") var/drill_sound = 'sound/weapons/Genhit.ogg' var/drill_verb = "drilling" @@ -79,7 +79,7 @@ icon_state = "spickaxe" item_state = "spickaxe" digspeed = 30 - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) desc = "This makes no metallurgic sense." /obj/item/weapon/pickaxe/drill @@ -87,7 +87,7 @@ icon_state = "handdrill" item_state = "jackhammer" digspeed = 30 - origin_tech = "materials=2;powerstorage=3;engineering=2" + origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINERING = 2) desc = "Yours is the drill that will pierce through the rock walls." drill_verb = "drilling" @@ -96,7 +96,7 @@ icon_state = "jackhammer" item_state = "jackhammer" digspeed = 20 //faster than drill, but cannot dig - origin_tech = "materials=3;powerstorage=2;engineering=2" + origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINERING = 2) desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards." drill_verb = "hammering" @@ -105,7 +105,7 @@ icon_state = "gpickaxe" item_state = "gpickaxe" digspeed = 20 - origin_tech = "materials=4" + origin_tech = list(TECH_MATERIAL = 4) desc = "This makes no metallurgic sense." /obj/item/weapon/pickaxe/plasmacutter @@ -115,7 +115,7 @@ w_class = 3.0 //it is smaller than the pickaxe damtype = "fire" digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire - origin_tech = "materials=4;phorontech=3;engineering=3" + origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINERING = 3) desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff." drill_verb = "cutting" sharp = 1 @@ -126,7 +126,7 @@ icon_state = "dpickaxe" item_state = "dpickaxe" digspeed = 10 - origin_tech = "materials=6;engineering=4" + origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINERING = 4) desc = "A pickaxe with a diamond pick head, this is just like minecraft." /obj/item/weapon/pickaxe/diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME! @@ -134,7 +134,7 @@ icon_state = "diamonddrill" item_state = "jackhammer" digspeed = 5 //Digs through walls, girders, and can dig up sand - origin_tech = "materials=6;powerstorage=4;engineering=5" + origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINERING = 5) desc = "Yours is the drill that will pierce the heavens!" drill_verb = "drilling" @@ -160,7 +160,7 @@ item_state = "shovel" w_class = 3.0 matter = list("metal" = 50) - origin_tech = "materials=1;engineering=1" + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1) attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") sharp = 0 edge = 1 diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 30385d49a5..ed1679aadf 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -9,49 +9,49 @@ /obj/item/weapon/ore/uranium name = "pitchblende" icon_state = "Uranium ore" - origin_tech = "materials=5" + origin_tech = list(TECH_MATERIAL = 5) oretag = "uranium" /obj/item/weapon/ore/iron name = "hematite" icon_state = "Iron ore" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) oretag = "hematite" /obj/item/weapon/ore/coal name = "carbonaceous rock" icon_state = "Coal ore" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) oretag = "coal" /obj/item/weapon/ore/glass name = "impure silicates" icon_state = "Glass ore" - origin_tech = "materials=1" + origin_tech = list(TECH_MATERIAL = 1) oretag = "sand" /obj/item/weapon/ore/phoron name = "phoron crystals" icon_state = "Phoron ore" - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) oretag = "phoron" /obj/item/weapon/ore/silver name = "native silver ore" icon_state = "Silver ore" - origin_tech = "materials=3" + origin_tech = list(TECH_MATERIAL = 3) oretag = "silver" /obj/item/weapon/ore/gold name = "native gold ore" icon_state = "Gold ore" - origin_tech = "materials=4" + origin_tech = list(TECH_MATERIAL = 4) oretag = "gold" /obj/item/weapon/ore/diamond name = "diamonds" icon_state = "Diamond ore" - origin_tech = "materials=6" + origin_tech = list(TECH_MATERIAL = 6) oretag = "diamond" /obj/item/weapon/ore/osmium diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 5e7fbe438d..a2119e226f 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -59,14 +59,14 @@ name = "diona nymph" desc = "It's a tiny plant critter." icon_state = "nymph" - origin_tech = "magnets=3;biotech=5" + origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5) slot_flags = SLOT_HEAD | SLOT_OCLOTHING /obj/item/weapon/holder/drone name = "maintenance drone" desc = "It's a small maintenance robot." icon_state = "drone" - origin_tech = "magnets=3;engineering=5" + origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 5) /obj/item/weapon/holder/cat name = "cat" @@ -78,7 +78,7 @@ name = "cortical borer" desc = "It's a slimy brain slug. Gross." icon_state = "borer" - origin_tech = "biotech=6" + origin_tech = list(TECH_BIO = 6) /obj/item/weapon/holder/monkey name = "monkey" diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index c4107f8119..2508c24f90 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -23,7 +23,7 @@ icon = 'icons/obj/assemblies.dmi' icon_state = "mmi_empty" w_class = 3 - origin_tech = "biotech=3" + origin_tech = list(TECH_BIO = 3) var/list/construction_cost = list("metal"=1000,"glass"=500) var/construction_time = 75 @@ -118,7 +118,7 @@ /obj/item/device/mmi/radio_enabled name = "radio-enabled man-machine interface" desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio." - origin_tech = "biotech=4" + origin_tech = list(TECH_BIO = 4) var/obj/item/device/radio/radio = null//Let's give it a radio. diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index d2aa61e635..2e75402c9e 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -8,7 +8,7 @@ throwforce = 1.0 throw_speed = 3 throw_range = 5 - origin_tech = "biotech=3" + origin_tech = list(TECH_BIO = 3) attack_verb = list("attacked", "slapped", "whacked") var/mob/living/carbon/brain/brainmob = null diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 08f2e34243..eb15a4bc92 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/assemblies.dmi' icon_state = "posibrain" w_class = 3 - origin_tech = "engineering=4;materials=4;bluespace=2;programming=4" + origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4) construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10) construction_time = 75 diff --git a/code/modules/mob/living/carbon/brain/robot.dm b/code/modules/mob/living/carbon/brain/robot.dm index bc7a13c2c2..873b55d518 100644 --- a/code/modules/mob/living/carbon/brain/robot.dm +++ b/code/modules/mob/living/carbon/brain/robot.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/module.dmi' icon_state = "mainboard" w_class = 3 - origin_tech = "engineering=4;materials=3;programming=4" + origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4) /obj/item/device/mmi/digital/robot/New() ..() diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index 9f10399112..6ae2d47b45 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -8,7 +8,7 @@ throwforce = 0 throw_speed = 3 throw_range = 6 - origin_tech = "biotech=4" + origin_tech = list(TECH_BIO = 4) var/Uses = 1 // uses before it goes inert var/enhanced = 0 //has it been enhanced before? @@ -295,7 +295,7 @@ throwforce = 1.0 throw_speed = 2 throw_range = 6 - origin_tech = "biotech=4" + origin_tech = list(TECH_BIO = 4) var/POWERFLAG = 0 // sshhhhhhh var/Flush = 30 var/Uses = 5 // uses before it goes inert @@ -327,7 +327,7 @@ icon = 'icons/mob/mob.dmi' icon_state = "slime egg-growing" bitesize = 12 - origin_tech = "biotech=4" + origin_tech = list(TECH_BIO = 4) var/grown = 0 /obj/item/weapon/reagent_containers/food/snacks/egg/slime/New() diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index cb86e52302..21dfba4120 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -13,7 +13,7 @@ throw_speed = 5 throw_range = 10 matter = list("metal" = 500, "glass" = 200) - origin_tech = "magnets=2;biotech=1;engineering=2" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINERING = 2) var/mode = 1; /obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) diff --git a/code/modules/mob/living/simple_animal/constructs/soulstone.dm b/code/modules/mob/living/simple_animal/constructs/soulstone.dm index 339654558b..136a96eac5 100644 --- a/code/modules/mob/living/simple_animal/constructs/soulstone.dm +++ b/code/modules/mob/living/simple_animal/constructs/soulstone.dm @@ -6,7 +6,7 @@ desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." w_class = 1.0 slot_flags = SLOT_BELT - origin_tech = "bluespace=4;materials=4" + origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4) var/imprinted = "empty" diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 872eb95b61..b25b125b3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -214,7 +214,7 @@ //spawn 1-4 boards of a random type var/spawnees = 0 var/num_boards = rand(1,4) - var/list/options = list(1,2,4,8,16,32,64,128,256, 512) + var/list/options = list(1,2,4,8,16,32,64,128,256,512) for(var/i=0, iYour gun feels pleasantly warm for a moment." - else - M << "You feel a warm sensation." - M.apply_effect(rand(3,120), IRRADIATE) - lightfail = 1 - else - for (var/mob/living/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES - if (src in M.contents) - M << "Your gun's reactor overloads!" - M << "You feel a wave of heat wash over you." - M.apply_effect(300, IRRADIATE) - crit_fail = 1 //break the gun so it stops recharging - processing_objects.Remove(src) - update_icon() - return 0 - - /obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge() - if (crit_fail) - overlays += "nucgun-whee" - return var/ratio = power_supply.charge / power_supply.maxcharge ratio = round(ratio, 0.25) * 100 overlays += "nucgun-[ratio]" /obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor() - if(crit_fail) - overlays += "nucgun-crit" - return if(lightfail) overlays += "nucgun-medium" else if ((power_supply.charge/power_supply.maxcharge) <= 0.5) @@ -106,10 +76,6 @@ else if (mode == 1) overlays += "nucgun-kill" -/obj/item/weapon/gun/energy/gun/nuclear/emp_act(severity) - ..() - reliability -= round(15/severity) - /obj/item/weapon/gun/energy/gun/nuclear/update_icon() overlays.Cut() update_charge() diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index c7f74e1d95..5f4de05d23 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -4,7 +4,7 @@ icon_state = "ionrifle" item_state = "ionrifle" fire_sound = 'sound/weapons/Laser.ogg' - origin_tech = "combat=2;magnets=4" + origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4) w_class = 4 force = 10 flags = CONDUCT @@ -28,7 +28,7 @@ icon_state = "decloner" item_state = "decloner" fire_sound = 'sound/weapons/pulse3.ogg' - origin_tech = "combat=5;materials=4;powerstorage=3" + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_POWER = 3) charge_cost = 100 projectile_type = /obj/item/projectile/energy/declone @@ -40,7 +40,7 @@ fire_sound = 'sound/effects/stealthoff.ogg' charge_cost = 100 projectile_type = /obj/item/projectile/energy/floramut - origin_tech = "materials=2;biotech=3;powerstorage=3" + origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) modifystate = "floramut" self_recharge = 1 var/mode = 0 //0 = mutate, 1 = yield boost @@ -107,7 +107,7 @@ icon_state = "toxgun" fire_sound = 'sound/effects/stealthoff.ogg' w_class = 3.0 - origin_tech = "combat=5;phorontech=4" + origin_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) projectile_type = /obj/item/projectile/energy/phoron /* Staves */ diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 1d51f7957e..98dbde5d87 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -25,7 +25,7 @@ icon_state = "stunrevolver" item_state = "stunrevolver" fire_sound = 'sound/weapons/Gunshot.ogg' - origin_tech = "combat=3;materials=3;powerstorage=2" + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) charge_cost = 125 projectile_type = /obj/item/projectile/energy/electrode/stunshot cell_type = /obj/item/weapon/cell @@ -38,7 +38,7 @@ w_class = 2.0 item_state = "crossbow" matter = list("metal" = 2000) - origin_tech = "combat=2;magnets=2;syndicate=5" + origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2, TECH_ILLEGAL = 5) slot_flags = SLOT_BELT silenced = 1 fire_sound = 'sound/weapons/Genhit.ogg' diff --git a/code/modules/projectiles/guns/energy/temperature.dm b/code/modules/projectiles/guns/energy/temperature.dm index cd69b9413a..26670e640f 100644 --- a/code/modules/projectiles/guns/energy/temperature.dm +++ b/code/modules/projectiles/guns/energy/temperature.dm @@ -6,7 +6,7 @@ var/temperature = T20C var/current_temperature = T20C charge_cost = 100 - origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2" + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2) slot_flags = SLOT_BELT|SLOT_BACK projectile_type = /obj/item/projectile/temp diff --git a/code/modules/projectiles/guns/launcher/rocket.dm b/code/modules/projectiles/guns/launcher/rocket.dm index fd86302fb8..9747922caf 100644 --- a/code/modules/projectiles/guns/launcher/rocket.dm +++ b/code/modules/projectiles/guns/launcher/rocket.dm @@ -9,7 +9,7 @@ force = 5.0 flags = CONDUCT | USEDELAY slot_flags = 0 - origin_tech = "combat=8;materials=5" + origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 5) fire_sound = 'sound/effects/bang.ogg' release_force = 15 diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 944a9fe99f..af2bad29c6 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -6,7 +6,7 @@ name = "gun" desc = "A gun that fires bullets." icon_state = "revolver" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) w_class = 3 matter = list("metal" = 1000) recoil = 1 diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 75bbf810a8..2a8c695383 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -6,7 +6,7 @@ load_method = SPEEDLOADER //yup. until someone sprites a magazine for it. max_shells = 22 caliber = "9mm" - origin_tech = "combat=4;materials=2" + origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2) slot_flags = SLOT_BELT ammo_type = /obj/item/ammo_casing/c9mm multi_aim = 1 @@ -20,7 +20,7 @@ load_method = SPEEDLOADER //yup. until someone sprites a magazine for it. max_shells = 15 caliber = ".45" - origin_tech = "combat=5;materials=2;syndicate=8" + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) ammo_type = /obj/item/ammo_casing/c45 /obj/item/weapon/gun/projectile/automatic/c20r @@ -31,7 +31,7 @@ w_class = 3 force = 10 caliber = "12mm" - origin_tech = "combat=5;materials=2;syndicate=8" + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) slot_flags = SLOT_BELT|SLOT_BACK fire_sound = 'sound/weapons/Gunshot_smg.ogg' load_method = MAGAZINE @@ -55,7 +55,7 @@ w_class = 4 force = 10 caliber = "a762" - origin_tech = "combat=6;materials=1;syndicate=4" + origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4) slot_flags = SLOT_BACK load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/c762 @@ -72,7 +72,7 @@ item_state = "wt550" w_class = 3 caliber = "9mm" - origin_tech = "combat=5;materials=2" + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) slot_flags = SLOT_BELT ammo_type = "/obj/item/ammo_casing/c9mmr" fire_sound = 'sound/weapons/Gunshot_smg.ogg' @@ -95,7 +95,7 @@ w_class = 4 force = 10 caliber = "a556" - origin_tech = "combat=8;materials=3" + origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 3) ammo_type = "/obj/item/ammo_casing/a556" fire_sound = 'sound/weapons/Gunshot.ogg' slot_flags = SLOT_BACK @@ -160,7 +160,7 @@ slot_flags = 0 max_shells = 50 caliber = "a762" - origin_tech = "combat=6;materials=1;syndicate=2" + origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 2) slot_flags = SLOT_BACK ammo_type = "/obj/item/ammo_casing/a762" fire_sound = 'sound/weapons/Gunshot_smg.ogg' diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index cf05a005ed..727784ff57 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -34,7 +34,7 @@ desc = "A rack of hollow darts." icon_state = "darts" item_state = "rcdammo" - origin_tech = "materials=2" + origin_tech = list(TECH_MATERIAL = 2) mag_type = MAGAZINE caliber = "dart" ammo_type = /obj/item/ammo_casing/chemdart diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index b29f2f3e42..d062f4f824 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -4,7 +4,7 @@ magazine_type = /obj/item/ammo_magazine/c45m icon_state = "colt" caliber = ".45" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) load_method = MAGAZINE /obj/item/weapon/gun/projectile/colt/detective @@ -35,7 +35,7 @@ icon_state = "secguncomp" magazine_type = /obj/item/ammo_magazine/c45m/rubber caliber = ".45" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) load_method = MAGAZINE /obj/item/weapon/gun/projectile/sec/flash @@ -55,7 +55,7 @@ w_class = 3 caliber = ".45" silenced = 1 - origin_tech = "combat=2;materials=2;syndicate=8" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/c45m @@ -90,7 +90,7 @@ max_shells = 8 caliber = "75" fire_sound = 'sound/effects/Explosion1.ogg' - origin_tech = "combat=3" + origin_tech = list(TECH_COMBAT = 3) ammo_type = "/obj/item/ammo_casing/a75" load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/a75 @@ -112,7 +112,7 @@ w_class = 2 caliber = "9mm" silenced = 0 - origin_tech = "combat=2;materials=2;syndicate=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 2) load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/mc9mm diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index f0291de0f8..7900965c57 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -4,7 +4,7 @@ icon_state = "revolver" item_state = "revolver" caliber = "357" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) handle_casings = CYCLE_CASINGS max_shells = 7 ammo_type = /obj/item/ammo_casing/a357 @@ -13,7 +13,7 @@ name = "mateba" desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo." //>10mm hole >.357 icon_state = "mateba" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) /obj/item/weapon/gun/projectile/revolver/detective name = "revolver" @@ -21,7 +21,7 @@ icon_state = "detective" max_shells = 6 caliber = "38" - origin_tech = "combat=2;materials=2" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) ammo_type = /obj/item/ammo_casing/c38 /obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun() diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index fa29d7e8ba..af55be01de 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -9,7 +9,7 @@ flags = CONDUCT slot_flags = SLOT_BACK caliber = "shotgun" - origin_tech = "combat=4;materials=2" + origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2) load_method = SINGLE_CASING ammo_type = /obj/item/ammo_casing/shotgun/beanbag handle_casings = HOLD_CASINGS @@ -43,7 +43,7 @@ name = "combat shotgun" icon_state = "cshotgun" item_state = "cshotgun" - origin_tech = "combat=5;materials=2" + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8. ammo_type = /obj/item/ammo_casing/shotgun @@ -63,7 +63,7 @@ flags = CONDUCT slot_flags = SLOT_BACK caliber = "shotgun" - origin_tech = "combat=3;materials=1" + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 1) ammo_type = /obj/item/ammo_casing/shotgun/beanbag /obj/item/weapon/gun/projectile/shotgun/doublebarrel/flare diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index 6c14edfaa5..b3a3c7580c 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -6,7 +6,7 @@ w_class = 4 force = 10 slot_flags = SLOT_BACK - origin_tech = "combat=8;materials=2;syndicate=8" + origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) caliber = "14.5mm" recoil = 2 //extra kickback //fire_sound = 'sound/weapons/sniper.ogg' diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 1a25162526..0f0c30c247 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -192,7 +192,7 @@ w_class = 3.0 possible_transfer_amounts = null volume = 600 - origin_tech = "combat=3;materials=3;engineering=3" + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINERING = 3) //this is a big copypasta clusterfuck, but it's still better than it used to be! diff --git a/code/modules/research/assembly.dm b/code/modules/research/assembly.dm new file mode 100644 index 0000000000..17d50ce8ac --- /dev/null +++ b/code/modules/research/assembly.dm @@ -0,0 +1,8 @@ +/obj/machinery/r_n_d/assembly + name = "Assembly" + icon_state = "protolathe" + flags = OPENCONTAINER + + use_power = 1 + idle_power_usage = 30 + active_power_usage = 5000 \ No newline at end of file diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index a16e5653a9..44ca832b89 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -1,20 +1,21 @@ /*///////////////Circuit Imprinter (By Darem)//////////////////////// Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of -using metal and glass, it uses glass and reagents (usually sulfuric acis). - +using metal and glass, it uses glass and reagents (usually sulphuric acid). */ + /obj/machinery/r_n_d/circuit_imprinter name = "Circuit Imprinter" icon_state = "circuit_imprinter" flags = OPENCONTAINER - var/g_amount = 0 - var/gold_amount = 0 - var/diamond_amount = 0 - var/uranium_amount = 0 - var/max_material_amount = 75000.0 + var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + var/list/datum/design/queue = list() + var/progress = 0 + + var/max_material_storage = 75000 var/mat_efficiency = 1 + var/speed = 1 use_power = 1 idle_power_usage = 30 @@ -30,25 +31,51 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) RefreshParts() +/obj/machinery/r_n_d/circuit_imprinter/process() + ..() + if(stat) + update_icon() + return + if(queue.len == 0) + busy = 0 + update_icon() + return + var/datum/design/D = queue[1] + if(canBuild(D)) + busy = 1 + progress += speed + if(progress >= D.time) + build(D) + progress = 0 + removeFromQueue(1) + if(linked_console) + linked_console.updateUsrDialog() + update_icon() + else + if(busy) + visible_message("\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].") + busy = 0 + update_icon() + /obj/machinery/r_n_d/circuit_imprinter/RefreshParts() var/T = 0 for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) T += G.reagents.maximum_volume - var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials. - reagents = R - R.my_atom = src - T = 0 + create_reagents(T) + max_material_storage = 0 for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - T += M.rating - max_material_amount = T * 75000.0 + max_material_storage += M.rating * 75000 T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating mat_efficiency = 1 - (T - 1) / 4 + speed = T /obj/machinery/r_n_d/circuit_imprinter/update_icon() if(panel_open) icon_state = "circuit_imprinter_t" + else if(busy) + icon_state = "circuit_imprinter_ani" else icon_state = "circuit_imprinter" @@ -61,29 +88,27 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). return /obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials() - return g_amount + gold_amount + diamond_amount + uranium_amount + var/t = 0 + for(var/f in materials) + t += materials[f] + return t /obj/machinery/r_n_d/circuit_imprinter/dismantle() for(var/obj/I in component_parts) if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker)) reagents.trans_to(I, reagents.total_volume) - if(g_amount >= 3750) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(loc) - G.amount = round(g_amount / 3750) - if(gold_amount >= 2000) - var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(loc) - G.amount = round(gold_amount / 2000) - if(diamond_amount >= 2000) - var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(loc) - G.amount = round(diamond_amount / 2000) - if(uranium_amount >= 2000) - var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(loc) - G.amount = round(uranium_amount / 2000) + for(var/f in materials) + if(materials[f] >= SHEET_MATERIAL_AMOUNT) + var/path = getMaterialType(f) + if(path) + var/obj/item/stack/S = new f(loc) + S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT) ..() /obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(shocked) - shock(user, 50) + if(busy) + user << "\The [src] is busy. Please wait for completion of previous operation." + return 1 if(default_deconstruction_screwdriver(user, O)) if(linked_console) linked_console.linked_imprinter = null @@ -96,55 +121,126 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). if(panel_open) user << "You can't load \the [src] while it's opened." return 1 - if(disabled) - user << "\The [src] appears to not be working!" - return if(!linked_console) - user << "\The [src] must be linked to an R&D console first!" + user << "\The [src] must be linked to an R&D console first." return 1 if(O.is_open_container()) return 0 if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium)) - user << "You cannot insert this item into \the [src]!" + user << "You cannot insert this item into \the [src]." return 1 if(stat) return 1 - if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." + + if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage) + user << "\The [src]'s material bin is full. Please remove material before adding more." return 1 + var/obj/item/stack/sheet/stack = O - if((TotalMaterials() + stack.perunit) > max_material_amount) - user << "\The [src] is full. Please remove glass from \the [src] in order to insert more." - return 1 var/amount = round(input("How many sheets do you want to add?") as num) - if(amount < 0) - amount = 0 - if(amount == 0) + if(!O) return - if(amount > stack.amount) - amount = min(stack.amount, round((max_material_amount - TotalMaterials()) / stack.perunit)) + if(amount <= 0)//No negative numbers + return + if(amount > stack.get_amount()) + amount = stack.get_amount() + if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill + amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT)) busy = 1 - use_power(max(1000, (3750 * amount / 10))) + use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10))) var/stacktype = stack.type - stack.use(amount) - if(do_after(usr, 16)) - user << "You add [amount] sheets to \the [src]." - switch(stacktype) - if(/obj/item/stack/sheet/glass) - g_amount += amount * 3750 - if(/obj/item/stack/sheet/mineral/gold) - gold_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/diamond) - diamond_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/uranium) - uranium_amount += amount * 2000 - else - new stacktype(loc, amount) + var/t = getMaterialName(stacktype) + if(t) + if(do_after(usr, 16)) + if(stack.use(amount)) + user << "You add [amount] sheets to \the [src]." + materials[t] += amount * SHEET_MATERIAL_AMOUNT busy = 0 updateUsrDialog() -//This is to stop these machines being hackable via clicking. -/obj/machinery/r_n_d/circuit_imprinter/attack_hand(mob/user as mob) - return \ No newline at end of file +/obj/machinery/r_n_d/circuit_imprinter/proc/getMaterialType(var/name) + switch(name) + if("metal") + return /obj/item/stack/sheet/metal + if("glass") + return /obj/item/stack/sheet/glass + if("gold") + return /obj/item/stack/sheet/mineral/gold + if("silver") + return /obj/item/stack/sheet/mineral/silver + if("phoron") + return /obj/item/stack/sheet/mineral/phoron + if("uranium") + return /obj/item/stack/sheet/mineral/uranium + if("diamond") + return /obj/item/stack/sheet/mineral/diamond + return null + +/obj/machinery/r_n_d/circuit_imprinter/proc/getMaterialName(var/type) + switch(type) + if(/obj/item/stack/sheet/metal) + return "metal" + if(/obj/item/stack/sheet/glass) + return "glass" + if(/obj/item/stack/sheet/mineral/gold) + return "gold" + if(/obj/item/stack/sheet/mineral/silver) + return "silver" + if(/obj/item/stack/sheet/mineral/phoron) + return "phoron" + if(/obj/item/stack/sheet/mineral/uranium) + return "uranium" + if(/obj/item/stack/sheet/mineral/diamond) + return "diamond" + +/obj/machinery/r_n_d/circuit_imprinter/proc/addToQueue(var/datum/design/D) + queue += D + return + +/obj/machinery/r_n_d/circuit_imprinter/proc/removeFromQueue(var/index) + queue.Cut(index, index + 1) + return + +/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D) + for(var/M in D.materials) + if(materials[M] < D.materials[M]) + return 0 + for(var/C in D.chemicals) + if(!reagents.has_reagent(C, D.chemicals[C])) + return 0 + return 1 + +/obj/machinery/r_n_d/circuit_imprinter/proc/getLackingMaterials(var/datum/design/D) + var/ret = "" + for(var/M in D.materials) + if(materials[M] < D.materials[M]) + if(ret != "") + ret += ", " + ret += "[D.materials[M] - materials[M]] [M]" + for(var/C in D.chemicals) + if(!reagents.has_reagent(C, D.chemicals[C])) + if(ret != "") + ret += ", " + ret += C + return ret + +/obj/machinery/r_n_d/circuit_imprinter/proc/build(var/datum/design/D) + var/power = active_power_usage + for(var/M in D.materials) + power += round(D.materials[M] / 5) + power = max(active_power_usage, power) + use_power(power) + for(var/M in D.materials) + materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency) + for(var/C in D.chemicals) + reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) + + if(D.build_path) + var/obj/new_item = new D.build_path(src) + new_item.loc = loc + if(mat_efficiency != 1) // No matter out of nowhere + if(new_item.matter && new_item.matter.len > 0) + for(var/i in new_item.matter) + new_item.matter[i] = new_item.matter[i] * mat_efficiency \ No newline at end of file diff --git a/code/modules/research/designs-chassis.dm b/code/modules/research/designs-chassis.dm new file mode 100644 index 0000000000..1665466bee --- /dev/null +++ b/code/modules/research/designs-chassis.dm @@ -0,0 +1,76 @@ +/datum/design/chassis + name = "Chassis" + build_type = CHASSIS + build_path = null + var/list/components = null + +/datum/design/chassis/proc/suitablePart(var/name, var/datum/design/D) + return 0 + +/datum/design/chassis/proc/setup(var/obj/item/I, var/obj/item/O, var/partname) + return + +/datum/design/chassis/revolver + name = "Energy gun (small)" + id = "chassis_gun_small" + build_path = /obj/item/weapon/gun/energy/custom + req_tech = list(TECH_MATERIAL = 2) + components = list("Power source", "Beam generator") + +/datum/design/chassis/revolver/suitablePart(var/name, var/datum/design/D) + switch(name) + if("Power source") + if(ispath(D.build_path, /obj/item/weapon/cell)) + return 1 + if("Beam generator") + if(ispath(D.build_path, /obj/item/beam_generator)) + return 1 + return 0 + +/datum/design/chassis/revolver/setup(var/obj/item/weapon/gun/energy/custom/I, var/obj/item/O, var/partname) + if(!I || !istype(I)) + return + switch(partname) + if("Power source") + I.power_supply = O + if("Beam generator") + var/obj/item/beam_generator/B = O + if(!B || !istype(B)) + return + I.charge_cost = B.energy_use + I.projectile_type = B.beam_type + I.fire_sound = B.shot_sound + +/obj/item/weapon/gun/energy/custom + name = "Prototype gun" + desc = "This is a prototype gun built in R&D." + icon_state = "stunrevolver" + item_state = "stunrevolver" + fire_sound = null + charge_cost = 0 + projectile_type = null + cell_type = null + +/datum/design/beam_generator + name = "Stun beam" + id = "stun_beam_generator" + req_tech = list(TECH_POWER = 3, TECH_COMBAT = 2) + materials = list("metal" = 700, "glass" = 1000) + build_path = /obj/item/beam_generator + +/obj/item/beam_generator + var/shot_sound = 'sound/weapons/Taser.ogg' + var/beam_type = /obj/item/projectile/beam/stun + var/energy_use = 150 + +/datum/design/beam_generator/laser + name = "Laser beam" + id = "laser_beam_generator" + req_tech = list(TECH_POWER = 3, TECH_COMBAT = 4) + materials = list("metal" = 1000, "glass" = 3000) + build_path = /obj/item/beam_generator/laser + +/obj/item/beam_generator/laser + shot_sound = 'sound/weapons/Laser.ogg' + beam_type = /obj/item/projectile/beam + energy_use = 300 diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 86eb5cce55..53b063b93d 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1,5 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - /*************************************************************** ** Design Datums ** ** All the data for building stuff and tracking reliability. ** @@ -7,1579 +5,1645 @@ /* For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent, you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum), -they are simply references used as part of a "has materials?" type proc. They all start with a $ to denote that they aren't reagents. +they are simply references used as part of a "has materials?" type proc. They all start with a to denote that they aren't reagents. The currently supporting non-reagent materials: -- $metal (/obj/item/stack/metal). One sheet = 3750 units. -- $glass (/obj/item/stack/glass). One sheet = 3750 units. -- $phoron (/obj/item/stack/phoron). One sheet = 3750 units. -- $silver (/obj/item/stack/silver). One sheet = 3750 units. -- $gold (/obj/item/stack/gold). One sheet = 3750 units. -- $uranium (/obj/item/stack/uranium). One sheet = 3750 units. -- $diamond (/obj/item/stack/diamond). One sheet = 3750 units. -(Insert new ones here) Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials. Design Guidlines -- The reliability formula for all R&D built items is reliability_base (a fixed number) + total tech levels required to make it + -reliability_mod (starts at 0, gets improved through experimentation). Example: PACMAN generator. 79 base reliablity + 6 tech -(3 phorontech, 3 powerstorage) + 0 (since it's completely new) = 85% reliability. Reliability is the chance it works CORRECTLY. - When adding new designs, check rdreadme.dm to see what kind of things have already been made and where new stuff is needed. -- A single sheet of anything is 3750 units of material. Materials besides metal/glass require help from other jobs (mining for +- A single sheet of anything is 2000 units of material. Materials besides metal/glass require help from other jobs (mining for other types of metals and chemistry for reagents). -- Add the AUTOLATHE tag to - */ -#define IMPRINTER 1 //For circuits. Uses glass/chemicals. -#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals -#define AUTOLATHE 4 //Uses glass/metal only. -#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually. -#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars. -//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable. +//Note: More then one of these can be added to a design. -datum/design //Datum for object designs, used in construction +/datum/design //Datum for object designs, used in construction var/name = null //Name of the created object. If null it will be 'guessed' from build_path if possible. var/desc = null //Description of the created object. If null it will use group_desc and name where applicable. var/item_name = null //An item name before it is modified by various name-modifying procs var/id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols. var/list/req_tech = list() //IDs of that techs the object originated from and the minimum level requirements. - var/reliability_mod = 0 //Reliability modifier of the device at it's starting point. - var/reliability_base = 100 //Base reliability of a device before modifiers. - var/reliability = 100 //Reliability of the device. var/build_type = null //Flag as to what kind machine the design is built in. See defines. var/list/materials = list() //List of materials. Format: "id" = amount. + var/list/chemicals = list() //List of chemicals. var/build_path = null //The path of the object that gets created. - var/locked = 0 //If true it will spawn inside a lockbox with currently sec access. + var/time = 10 //How many ticks it requires to build var/category = null //Primarily used for Mech Fabricators, but can be used for anything. + var/sort_string = "ZZZZZ" //Sorting order -//A proc to calculate the reliability of a design based on tech levels and innate modifiers. -//Input: A list of /datum/tech; Output: The new reliabilty. -datum/design/proc/CalcReliability(var/list/temp_techs) - var/new_reliability = reliability_mod + reliability_base - for(var/datum/tech/T in temp_techs) - if(T.id in req_tech) - new_reliability += T.level - new_reliability = between(reliability_base, new_reliability, 100) - reliability = new_reliability - return - -datum/design/New() +/datum/design/New() ..() item_name = name AssembleDesignInfo() //These procs are used in subtypes for assigning names and descriptions dynamically -datum/design/proc/AssembleDesignInfo() +/datum/design/proc/AssembleDesignInfo() AssembleDesignName() AssembleDesignDesc() return -datum/design/proc/AssembleDesignName() +/datum/design/proc/AssembleDesignName() if(!name && build_path) //Get name from build path if posible var/atom/movable/A = build_path name = initial(A.name) item_name = name return -datum/design/proc/AssembleDesignDesc() +/datum/design/proc/AssembleDesignDesc() if(!desc) //Try to make up a nice description if we don't have one desc = "Allows for the construction of \a [item_name]." return -/////////////////////////////////// -/////General Type Definitions////// -/////////////////////////////////// -datum/design/circuit - build_type = IMPRINTER - req_tech = list("programming" = 2) - materials = list("$glass" = 2000, "sacid" = 20) - -datum/design/circuit/AssembleDesignName() - ..() - name = "Circuit design ([item_name])" - -datum/design/circuit/AssembleDesignDesc() - if(!desc) - desc = "Allows for the construction of \a [item_name] circuit board." - -datum/design/item +/datum/design/item build_type = PROTOLATHE -/////////////////////////////////// -//////////Computer Boards////////// -/////////////////////////////////// -datum/design/circuit/seccamera - name = "security camera monitor" - id = "seccamera" - build_path = /obj/item/weapon/circuitboard/security - -datum/design/circuit/aicore - name = "AI core" - id = "aicore" - req_tech = list("programming" = 4, "biotech" = 3) - build_path = /obj/item/weapon/circuitboard/aicore - -datum/design/circuit/aiupload - name = "AI upload console" - id = "aiupload" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/aiupload - -datum/design/circuit/borgupload - name = "cyborg upload console" - id = "borgupload" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/borgupload - -datum/design/circuit/operating - name = "patient monitoring console" - id = "operating" - build_path = /obj/item/weapon/circuitboard/operating - -datum/design/circuit/pandemic - name = "PanD.E.M.I.C. 2200" - id = "pandemic" - build_path = /obj/item/weapon/circuitboard/pandemic - -datum/design/circuit/scan_console - name = "DNA machine" - id = "scan_console" - build_path = /obj/item/weapon/circuitboard/scan_consolenew - -datum/design/circuit/comconsole - name = "communications console" - id = "comconsole" - build_path = /obj/item/weapon/circuitboard/communications - -datum/design/circuit/idcardconsole - name = "ID card modification console" - id = "idcardconsole" - build_path = /obj/item/weapon/circuitboard/card - -datum/design/circuit/crewconsole - name = "crew monitoring console" - id = "crewconsole" - req_tech = list("programming" = 3, "magnets" = 2, "biotech" = 2) - build_path = /obj/item/weapon/circuitboard/crew - -datum/design/circuit/teleconsole - name = "teleporter control console" - id = "teleconsole" - req_tech = list("programming" = 3, "bluespace" = 2) - -datum/design/circuit/emp_data - name = "employment records console" - id = "emp_data" - build_path = /obj/item/weapon/circuitboard/skills - -datum/design/circuit/med_data - name = "medical records console" - id = "med_data" - build_path = /obj/item/weapon/circuitboard/med_data - -datum/design/circuit/secdata - name = "security records console" - id = "sec_data" - build_path = /obj/item/weapon/circuitboard/secure_data - -datum/design/circuit/atmosalerts - name = "atmosphere alert console" - id = "atmosalerts" - build_path = /obj/item/weapon/circuitboard/atmos_alert - -datum/design/circuit/air_management - name = "atmosphere monitoring console" - id = "air_management" - build_path = /obj/item/weapon/circuitboard/air_management - -datum/design/circuit/rcon_console - name = "RCON remote control console" - id = "rcon_console" - req_tech = list("programming" = 4, "engineering" = 3, "powerstorage" = 5) - build_path = /obj/item/weapon/circuitboard/rcon_console - -/* Uncomment if someone makes these buildable -datum/design/circuit/general_alert - name = "general alert console" - id = "general_alert" - build_path = /obj/item/weapon/circuitboard/general_alert -*/ - -datum/design/circuit/robocontrol - name = "robotics control console" - id = "robocontrol" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/robotics - -datum/design/circuit/dronecontrol - name = "drone control console" - id = "dronecontrol" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/drone_control - -datum/design/circuit/clonecontrol - name = "cloning control console" - id = "clonecontrol" - req_tech = list("programming" = 3, "biotech" = 3) - build_path = /obj/item/weapon/circuitboard/cloning - -datum/design/circuit/clonepod - name = "clone pod" - id = "clonepod" - req_tech = list("programming" = 3, "biotech" = 3) - build_path = /obj/item/weapon/circuitboard/clonepod - -datum/design/circuit/clonescanner - name = "cloning scanner" - id = "clonescanner" - req_tech = list("programming" = 3, "biotech" = 3) - build_path = /obj/item/weapon/circuitboard/clonescanner - -datum/design/circuit/arcademachine - name = "arcade machine" - id = "arcademachine" - req_tech = list("programming" = 1) - build_path = /obj/item/weapon/circuitboard/arcade - -datum/design/circuit/powermonitor - name = "power monitoring console" - id = "powermonitor" - build_path = /obj/item/weapon/circuitboard/powermonitor - -datum/design/circuit/solarcontrol - name = "solar control console" - id = "solarcontrol" - build_path = /obj/item/weapon/circuitboard/solar_control - -datum/design/circuit/prisonmanage - name = "prisoner management console" - id = "prisonmanage" - build_path = /obj/item/weapon/circuitboard/prisoner - -datum/design/circuit/mechacontrol - name = "exosuit control console" - id = "mechacontrol" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/mecha_control - -datum/design/circuit/mechapower - name = "mech bay power control console" - id = "mechapower" - build_path = /obj/item/weapon/circuitboard/mech_bay_power_console - -datum/design/circuit/rdconsole - name = "R&D control console" - id = "rdconsole" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/rdconsole - -datum/design/circuit/ordercomp - name = "supply ordering console" - id = "ordercomp" - build_path = /obj/item/weapon/circuitboard/ordercomp - -datum/design/circuit/supplycomp - name = "supply control console" - id = "supplycomp" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/supplycomp - -datum/design/circuit/comm_monitor - name = "telecommunications monitoring console" - id = "comm_monitor" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/comm_monitor - -datum/design/circuit/comm_server - name = "telecommunications server monitoring console" - id = "comm_server" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/comm_server - -datum/design/circuit/message_monitor - name = "messaging monitor console" - id = "message_monitor" - req_tech = list("programming" = 5) - build_path = /obj/item/weapon/circuitboard/message_monitor - -datum/design/circuit/aifixer - name = "AI integrity restorer" - id = "aifixer" - req_tech = list("programming" = 3, "biotech" = 2) - build_path = /obj/item/weapon/circuitboard/aifixer - -/////////////////////////////////// -/////////Shield Generators///////// -/////////////////////////////////// -datum/design/circuit/shield - req_tech = list("bluespace" = 4, "phorontech" = 3) - materials = list("$glass" = 2000, "sacid" = 20, "$phoron" = 10000, "$diamond" = 5000, "$gold" = 10000) - -datum/design/circuit/shield/AssembleDesignName() - name = "Shield generator circuit design ([name])" -datum/design/circuit/shield/AssembleDesignDesc() - if(!desc) - desc = "Allows for the construction of \a [name] shield generator." - -datum/design/circuit/shield/bubble - name = "bubble" - id = "shield_gen" - build_path = /obj/item/weapon/circuitboard/shield_gen - -datum/design/circuit/shield/hull - name = "hull" - id = "shield_gen_ex" - build_path = /obj/item/weapon/circuitboard/shield_gen_ex - -datum/design/circuit/shield/capacitor - name = "capacitor" - desc = "Allows for the construction of a shield capacitor circuit board." - id = "shield_cap" - req_tech = list("magnets" = 3, "powerstorage" = 4) - build_path = /obj/item/weapon/circuitboard/shield_cap - -/////////////////////////////////// -//////////AI Module Disks////////// -/////////////////////////////////// -datum/design/aimodule/ - build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) - -datum/design/aimodule/AssembleDesignName() - name = "AI module design ([name])" -datum/design/aimodule/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI module." - -datum/design/aimodule/safeguard - name = "Safeguard" - id = "safeguard" - req_tech = list("programming" = 3, "materials" = 4) - build_path = /obj/item/weapon/aiModule/safeguard - -datum/design/aimodule/onehuman - name = "OneCrewMember" - id = "onehuman" - req_tech = list("programming" = 4, "materials" = 6) - build_path = /obj/item/weapon/aiModule/oneHuman - -datum/design/aimodule/protectstation - name = "ProtectStation" - id = "protectstation" - req_tech = list("programming" = 3, "materials" = 6) - build_path = /obj/item/weapon/aiModule/protectStation - -datum/design/aimodule/notele - name = "TeleporterOffline" - id = "notele" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/aiModule/teleporterOffline - -datum/design/aimodule/quarantine - name = "Quarantine" - id = "quarantine" - req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) - build_path = /obj/item/weapon/aiModule/quarantine - -datum/design/aimodule/oxygen - name = "OxygenIsToxicToHumans" - id = "oxygen" - req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) - build_path = /obj/item/weapon/aiModule/oxygen - -datum/design/aimodule/freeform - name = "Freeform" - id = "freeform" - req_tech = list("programming" = 4, "materials" = 4) - build_path = /obj/item/weapon/aiModule/freeform - -datum/design/aimodule/reset - name = "Reset" - id = "reset" - req_tech = list("programming" = 3, "materials" = 6) - build_path = /obj/item/weapon/aiModule/reset - -datum/design/aimodule/purge - name = "Purge" - id = "purge" - req_tech = list("programming" = 4, "materials" = 6) - build_path = /obj/item/weapon/aiModule/purge - -// *** Core modules -datum/design/aimodule/core - req_tech = list("programming" = 4, "materials" = 6) - -datum/design/aimodule/core/AssembleDesignName() - name = "AI core module design ([name])" -datum/design/aimodule/core/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI core module." - -datum/design/aimodule/core/freeformcore - name = "Freeform" - id = "freeformcore" - build_path = /obj/item/weapon/aiModule/freeformcore - -datum/design/aimodule/core/asimov - name = "Asimov" - id = "asimov" - build_path = /obj/item/weapon/aiModule/asimov - -datum/design/aimodule/core/paladin - name = "P.A.L.A.D.I.N." - id = "paladin" - build_path = /obj/item/weapon/aiModule/paladin - -datum/design/aimodule/core/tyrant - name = "T.Y.R.A.N.T." - id = "tyrant" - req_tech = list("programming" = 4, "syndicate" = 2, "materials" = 6) - build_path = /obj/item/weapon/aiModule/tyrant - -/////////////////////////////////// -////////Telecomms Machinery//////// -/////////////////////////////////// -datum/design/circuit/tcom - req_tech = list("programming" = 4, "engineering" = 4) - -datum/design/circuit/tcom/AssembleDesignName() - name = "Telecommunications machinery circuit design ([name])" -datum/design/circuit/tcom/AssembleDesignDesc() - desc = "Allows for the construction of a telecommunications [name] circuit board." - - -datum/design/circuit/tcom/server - name = "server mainframe" - id = "tcom-server" - build_path = /obj/item/weapon/circuitboard/telecomms/server - -datum/design/circuit/tcom/processor - name = "processor unit" - id = "tcom-processor" - build_path = /obj/item/weapon/circuitboard/telecomms/processor - -datum/design/circuit/tcom/bus - name = "bus mainframe" - id = "tcom-bus" - build_path = /obj/item/weapon/circuitboard/telecomms/bus - -datum/design/circuit/tcom/hub - name = "hub mainframe" - id = "tcom-hub" - build_path = /obj/item/weapon/circuitboard/telecomms/hub - -datum/design/circuit/tcom/relay - name = "relay mainframe" - id = "tcom-relay" - req_tech = list("programming" = 3, "engineering" = 4, "bluespace" = 3) - build_path = /obj/item/weapon/circuitboard/telecomms/relay - -datum/design/circuit/tcom/broadcaster - name = "subspace broadcaster" - id = "tcom-broadcaster" - req_tech = list("programming" = 4, "engineering" = 4, "bluespace" = 2) - build_path = /obj/item/weapon/circuitboard/telecomms/broadcaster - -datum/design/circuit/tcom/receiver - name = "subspace receiver" - id = "tcom-receiver" - req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 2) - build_path = /obj/item/weapon/circuitboard/telecomms/receiver - -/////////////////////////////////// -////////////Mecha Modules////////// -/////////////////////////////////// -datum/design/circuit/mecha - req_tech = list("programming" = 3) - -datum/design/circuit/mecha/AssembleDesignName() - name = "Exosuit module circuit design ([name])" -datum/design/circuit/mecha/AssembleDesignDesc() - desc = "Allows for the construction of \a [name] module." - - -datum/design/circuit/mecha/ripley_main - name = "APLU 'Ripley' central control" - id = "ripley_main" - build_path = /obj/item/weapon/circuitboard/mecha/ripley/main - -datum/design/circuit/mecha/ripley_peri - name = "APLU 'Ripley' peripherals control" - id = "ripley_peri" - build_path = /obj/item/weapon/circuitboard/mecha/ripley/peripherals - -datum/design/circuit/mecha/odysseus_main - name = "'Odysseus' central control" - id = "odysseus_main" - req_tech = list("programming" = 3,"biotech" = 2) - build_path = /obj/item/weapon/circuitboard/mecha/odysseus/main - -datum/design/circuit/mecha/odysseus_peri - name = "'Odysseus' peripherals control" - id = "odysseus_peri" - req_tech = list("programming" = 3,"biotech" = 2) - build_path = /obj/item/weapon/circuitboard/mecha/odysseus/peripherals - -datum/design/circuit/mecha/gygax_main - name = "'Gygax' central control" - id = "gygax_main" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/mecha/gygax/main - -datum/design/circuit/mecha/gygax_peri - name = "'Gygax' peripherals control" - id = "gygax_peri" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/mecha/gygax/peripherals - -datum/design/circuit/mecha/gygax_targ - name = "'Gygax' weapon control and targeting" - id = "gygax_targ" - req_tech = list("programming" = 4, "combat" = 2) - build_path = /obj/item/weapon/circuitboard/mecha/gygax/targeting - -datum/design/circuit/mecha/durand_main - name = "'Durand' central control" - id = "durand_main" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/mecha/durand/main - -datum/design/circuit/mecha/durand_peri - name = "'Durand' peripherals control" - id = "durand_peri" - req_tech = list("programming" = 4) - build_path = /obj/item/weapon/circuitboard/mecha/durand/peripherals - -datum/design/circuit/mecha/durand_targ - name = "'Durand' weapon control and targeting" - id = "durand_targ" - req_tech = list("programming" = 4, "combat" = 2) - build_path = /obj/item/weapon/circuitboard/mecha/durand/targeting - -datum/design/circuit/mecha/honker_main - name = "'H.O.N.K' central control" - id = "honker_main" - build_path = /obj/item/weapon/circuitboard/mecha/honker/main - -datum/design/circuit/mecha/honker_peri - name = "'H.O.N.K' peripherals control" - id = "honker_peri" - build_path = /obj/item/weapon/circuitboard/mecha/honker/peripherals - -datum/design/circuit/mecha/honker_targ - name = "'H.O.N.K' weapon control and targeting" - id = "honker_targ" - build_path = /obj/item/weapon/circuitboard/mecha/honker/targeting - -//////////////////////////////////////// -/////////// Mecha Equpment ///////////// -//////////////////////////////////////// - -datum/design/item/mecha - build_type = MECHFAB - req_tech = list("combat" = 3) - category = "Exosuit Equipment" - -datum/design/item/mecha/AssembleDesignName() - ..() - name = "Exosuit module design ([item_name])" -datum/design/item/mecha/weapon/AssembleDesignName() - ..() - name = "Exosuit weapon design ([item_name])" -datum/design/item/mecha/AssembleDesignDesc() - if(!desc) - desc = "Allows for the construction of \a '[item_name]' exosuit module." - -// *** Weapon modules -datum/design/item/mecha/weapon/scattershot - id = "mech_scattershot" - req_tech = list("combat" = 4) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot - -datum/design/item/mecha/weapon/laser - id = "mech_laser" - req_tech = list("combat" = 3, "magnets" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser - -datum/design/item/mecha/weapon/laser_rigged - desc = "Allows for the construction of a welder-laser assembly package for non-combat exosuits." - id = "mech_laser_rigged" - req_tech = list("combat" = 2, "magnets" = 2) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser - -datum/design/item/mecha/weapon/laser_heavy - id = "mech_laser_heavy" - req_tech = list("combat" = 4, "magnets" = 4) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy - -datum/design/item/mecha/weapon/ion - id = "mech_ion" - req_tech = list("combat" = 4, "magnets" = 4) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion - -datum/design/item/mecha/weapon/grenade_launcher - id = "mech_grenade_launcher" - req_tech = list("combat" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang - -datum/design/item/mecha/weapon/clusterbang_launcher - desc = "A weapon that violates the Geneva Convention at 6 rounds per minute." - id = "clusterbang_launcher" - req_tech = list("combat"= 5, "materials" = 5, "syndicate" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited - -// *** Nonweapon modules -datum/design/item/mecha/wormhole_gen - desc = "An exosuit module that can generate small quasi-stable wormholes." - id = "mech_wormhole_gen" - req_tech = list("bluespace" = 3, "magnets" = 2) - build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator - -datum/design/item/mecha/teleporter - desc = "An exosuit module that allows teleportation to any position in view." - id = "mech_teleporter" - req_tech = list("bluespace" = 10, "magnets" = 5) - build_path = /obj/item/mecha_parts/mecha_equipment/teleporter - -datum/design/item/mecha/rcd - desc = "An exosuit-mounted rapid construction device." - id = "mech_rcd" - req_tech = list("materials" = 4, "bluespace" = 3, "magnets" = 4, "powerstorage"=4, "engineering" = 4) - build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd - -datum/design/item/mecha/gravcatapult - desc = "An exosuit-mounted gravitational catapult." - id = "mech_gravcatapult" - req_tech = list("bluespace" = 2, "magnets" = 3, "engineering" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult - -datum/design/item/mecha/repair_droid - desc = "Automated repair droid, exosuits' best companion. BEEP BOOP" - id = "mech_repair_droid" - req_tech = list("magnets" = 3, "programming" = 3, "engineering" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid - -datum/design/item/mecha/phoron_generator - desc = "Exosuit-mounted phoron generator." - id = "mech_phoron_generator" - req_tech = list("phorontech" = 2, "powerstorage"= 2, "engineering" = 2) - build_path = /obj/item/mecha_parts/mecha_equipment/generator - -datum/design/item/mecha/energy_relay - id = "mech_energy_relay" - req_tech = list("magnets" = 4, "powerstorage" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay - -datum/design/item/mecha/ccw_armor - desc = "Exosuit close-combat armor booster." - id = "mech_ccw_armor" - req_tech = list("materials" = 5, "combat" = 4) - build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster - -datum/design/item/mecha/proj_armor - desc = "Exosuit projectile armor booster." - id = "mech_proj_armor" - req_tech = list("materials" = 5, "combat" = 5, "engineering"=3) - build_path = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster - -datum/design/item/mecha/syringe_gun - desc = "Exosuit-mounted syringe gun and chemical synthesizer." - id = "mech_syringe_gun" - req_tech = list("materials" = 3, "biotech"=4, "magnets"=4, "programming"=3) - build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun - -datum/design/item/mecha/diamond_drill - desc = "A diamond version of the exosuit drill. It's harder, better, faster, stronger." - id = "mech_diamond_drill" - req_tech = list("materials" = 4, "engineering" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill - -datum/design/item/mecha/generator_nuclear - desc = "Exosuit-held nuclear reactor. Converts uranium and everyone's health to energy." - id = "mech_generator_nuclear" - req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3) - build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear - - -//////////////////////////////////////// -//////////Disk Construction Disks/////// -//////////////////////////////////////// -datum/design/design_disk +/datum/design/item/design_disk name = "Design Storage Disk" desc = "Produce additional disks for storing device designs." id = "design_disk" - req_tech = list("programming" = 1) - build_type = PROTOLATHE | AUTOLATHE - materials = list("$metal" = 30, "$glass" = 10) + req_tech = list(TECH_DATA = 1) + materials = list("metal" = 30, "glass" = 10) build_path = /obj/item/weapon/disk/design_disk + sort_string = "GAAAA" -datum/design/tech_disk +/datum/design/item/tech_disk name = "Technology Data Storage Disk" desc = "Produce additional disks for storing technology data." id = "tech_disk" - req_tech = list("programming" = 1) - build_type = PROTOLATHE | AUTOLATHE - materials = list("$metal" = 30, "$glass" = 10) + req_tech = list(TECH_DATA = 1) + materials = list("metal" = 30, "glass" = 10) build_path = /obj/item/weapon/disk/tech_disk + sort_string = "GAAAB" -/////////////////////////////////// -/////Non-Board Computer Stuff////// -/////////////////////////////////// - -datum/design/item/intellicard - name = "'intelliCard', AI preservation and transportation system" - desc = "Allows for the construction of an intelliCard." - id = "intellicard" - req_tech = list("programming" = 4, "materials" = 4) - materials = list("$glass" = 1000, "$gold" = 200) - build_path = /obj/item/device/aicard - -datum/design/item/paicard - name = "'pAI', personal artificial intelligence device" - id = "paicard" - req_tech = list("programming" = 2) - materials = list("$glass" = 500, "$metal" = 500) - build_path = /obj/item/device/paicard - -datum/design/item/posibrain - id = "posibrain" - req_tech = list("engineering" = 4, "materials" = 6, "bluespace" = 2, "programming" = 4) - materials = list("$metal" = 2000, "$glass" = 1000, "$silver" = 1000, "$gold" = 500, "$phoron" = 500, "$diamond" = 100) - build_path = /obj/item/device/mmi/digital/posibrain - -//////////////////////////////////////// -/////////////Stock Parts//////////////// -//////////////////////////////////////// -datum/design/item/stock_part +/datum/design/item/stock_part build_type = PROTOLATHE -datum/design/item/stock_part/AssembleDesignName() +/datum/design/item/stock_part/AssembleDesignName() ..() name = "Component design ([item_name])" -datum/design/item/stock_part/AssembleDesignDesc() +/datum/design/item/stock_part/AssembleDesignDesc() if(!desc) desc = "A stock part used in the construction of various devices." +/datum/design/item/stock_part/basic_capacitor + id = "basic_capacitor" + req_tech = list(TECH_POWER = 1) + materials = list("metal" = 50, "glass" = 50) + build_path = /obj/item/weapon/stock_parts/capacitor + sort_string = "CAAAA" + +/datum/design/item/stock_part/adv_capacitor + id = "adv_capacitor" + req_tech = list(TECH_POWER = 3) + materials = list("metal" = 50, "glass" = 50) + build_path = /obj/item/weapon/stock_parts/capacitor/adv + sort_string = "CAAAB" + +/datum/design/item/stock_part/super_capacitor + id = "super_capacitor" + req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) + materials = list("metal" = 50, "glass" = 50, "gold" = 20) + build_path = /obj/item/weapon/stock_parts/capacitor/super + sort_string = "CAAAC" + +/datum/design/item/stock_part/micro_mani + id = "micro_mani" + req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) + materials = list("metal" = 30) + build_path = /obj/item/weapon/stock_parts/manipulator + sort_string = "CAABA" + +/datum/design/item/stock_part/nano_mani + id = "nano_mani" + req_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2) + materials = list("metal" = 30) + build_path = /obj/item/weapon/stock_parts/manipulator/nano + sort_string = "CAABB" + +/datum/design/item/stock_part/pico_mani + id = "pico_mani" + req_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2) + materials = list("metal" = 30) + build_path = /obj/item/weapon/stock_parts/manipulator/pico + sort_string = "CAABC" + +/datum/design/item/stock_part/basic_matter_bin + id = "basic_matter_bin" + req_tech = list(TECH_MATERIAL = 1) + materials = list("metal" = 80) + build_path = /obj/item/weapon/stock_parts/matter_bin + sort_string = "CAACA" + +/datum/design/item/stock_part/adv_matter_bin + id = "adv_matter_bin" + req_tech = list(TECH_MATERIAL = 3) + materials = list("metal" = 80) + build_path = /obj/item/weapon/stock_parts/matter_bin/adv + sort_string = "CAACB" + +/datum/design/item/stock_part/super_matter_bin + id = "super_matter_bin" + req_tech = list(TECH_MATERIAL = 5) + materials = list("metal" = 80) + build_path = /obj/item/weapon/stock_parts/matter_bin/super + sort_string = "CAACC" + +/datum/design/item/stock_part/basic_micro_laser + id = "basic_micro_laser" + req_tech = list(TECH_MAGNET = 1) + materials = list("metal" = 10, "glass" = 20) + build_path = /obj/item/weapon/stock_parts/micro_laser + sort_string = "CAADA" + +/datum/design/item/stock_part/high_micro_laser + id = "high_micro_laser" + req_tech = list(TECH_MAGNET = 3) + materials = list("metal" = 10, "glass" = 20) + build_path = /obj/item/weapon/stock_parts/micro_laser/high + sort_string = "CAADB" + +/datum/design/item/stock_part/ultra_micro_laser + id = "ultra_micro_laser" + req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5) + materials = list("metal" = 10, "glass" = 20, "uranium" = 10) + build_path = /obj/item/weapon/stock_parts/micro_laser/ultra + sort_string = "CAADC" + +/datum/design/item/stock_part/basic_sensor + id = "basic_sensor" + req_tech = list(TECH_MAGNET = 1) + materials = list("metal" = 50, "glass" = 20) + build_path = /obj/item/weapon/stock_parts/scanning_module + sort_string = "CAAEA" + +/datum/design/item/stock_part/adv_sensor + id = "adv_sensor" + req_tech = list(TECH_MAGNET = 3) + materials = list("metal" = 50, "glass" = 20) + build_path = /obj/item/weapon/stock_parts/scanning_module/adv + sort_string = "CAAEB" + +/datum/design/item/stock_part/phasic_sensor + id = "phasic_sensor" + req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 3) + materials = list("metal" = 50, "glass" = 20, "silver" = 10) + build_path = /obj/item/weapon/stock_parts/scanning_module/phasic + sort_string = "CAAEC" + /datum/design/item/stock_part/RPED name = "Rapid Part Exchange Device" desc = "Special mechanical module made to store, sort, and apply standard machine parts." id = "rped" - req_tech = list("engineering" = 3, "materials" = 3) - materials = list("$metal" = 15000, "$glass" = 5000) + req_tech = list(TECH_ENGINERING = 3, TECH_MATERIAL = 3) + materials = list("metal" = 15000, "glass" = 5000) build_path = /obj/item/weapon/storage/part_replacer + sort_string = "CBAAA" -datum/design/item/stock_part/basic_capacitor - build_type = PROTOLATHE | AUTOLATHE - id = "basic_capacitor" - req_tech = list("powerstorage" = 1) - materials = list("$metal" = 50, "$glass" = 50) - build_path = /obj/item/weapon/stock_parts/capacitor - -datum/design/item/stock_part/basic_sensor - build_type = PROTOLATHE | AUTOLATHE - id = "basic_sensor" - req_tech = list("magnets" = 1) - materials = list("$metal" = 50, "$glass" = 20) - build_path = /obj/item/weapon/stock_parts/scanning_module - -datum/design/item/stock_part/micro_mani - build_type = PROTOLATHE | AUTOLATHE - id = "micro_mani" - req_tech = list("materials" = 1, "programming" = 1) - materials = list("$metal" = 30) - build_path = /obj/item/weapon/stock_parts/manipulator - -datum/design/item/stock_part/basic_micro_laser - build_type = PROTOLATHE | AUTOLATHE - id = "basic_micro_laser" - req_tech = list("magnets" = 1) - materials = list("$metal" = 10, "$glass" = 20) - build_path = /obj/item/weapon/stock_parts/micro_laser - -datum/design/item/stock_part/basic_matter_bin - build_type = PROTOLATHE | AUTOLATHE - id = "basic_matter_bin" - req_tech = list("materials" = 1) - materials = list("$metal" = 80) - build_path = /obj/item/weapon/stock_parts/matter_bin - -datum/design/item/stock_part/adv_capacitor - id = "adv_capacitor" - req_tech = list("powerstorage" = 3) - materials = list("$metal" = 50, "$glass" = 50) - build_path = /obj/item/weapon/stock_parts/capacitor/adv - -datum/design/item/stock_part/adv_sensor - id = "adv_sensor" - req_tech = list("magnets" = 3) - materials = list("$metal" = 50, "$glass" = 20) - build_path = /obj/item/weapon/stock_parts/scanning_module/adv - -datum/design/item/stock_part/nano_mani - id = "nano_mani" - req_tech = list("materials" = 3, "programming" = 2) - materials = list("$metal" = 30) - build_path = /obj/item/weapon/stock_parts/manipulator/nano - -datum/design/item/stock_part/high_micro_laser - id = "high_micro_laser" - req_tech = list("magnets" = 3) - materials = list("$metal" = 10, "$glass" = 20) - build_path = /obj/item/weapon/stock_parts/micro_laser/high - -datum/design/item/stock_part/adv_matter_bin - id = "adv_matter_bin" - req_tech = list("materials" = 3) - materials = list("$metal" = 80) - build_path = /obj/item/weapon/stock_parts/matter_bin/adv - -datum/design/item/stock_part/super_capacitor - id = "super_capacitor" - req_tech = list("powerstorage" = 5, "materials" = 4) - reliability_base = 71 - materials = list("$metal" = 50, "$glass" = 50, "$gold" = 20) - build_path = /obj/item/weapon/stock_parts/capacitor/super - -datum/design/item/stock_part/phasic_sensor - id = "phasic_sensor" - req_tech = list("magnets" = 5, "materials" = 3) - materials = list("$metal" = 50, "$glass" = 20, "$silver" = 10) - reliability_base = 72 - build_path = /obj/item/weapon/stock_parts/scanning_module/phasic - -datum/design/item/stock_part/pico_mani - id = "pico_mani" - req_tech = list("materials" = 5, "programming" = 2) - materials = list("$metal" = 30) - reliability_base = 73 - build_path = /obj/item/weapon/stock_parts/manipulator/pico - -datum/design/item/stock_part/ultra_micro_laser - id = "ultra_micro_laser" - req_tech = list("magnets" = 5, "materials" = 5) - materials = list("$metal" = 10, "$glass" = 20, "$uranium" = 10) - reliability_base = 70 - build_path = /obj/item/weapon/stock_parts/micro_laser/ultra - -datum/design/item/stock_part/super_matter_bin - id = "super_matter_bin" - req_tech = list("materials" = 5) - materials = list("$metal" = 80) - reliability_base = 75 - build_path = /obj/item/weapon/stock_parts/matter_bin/super - -///////////////////////////////////////// -//////////Tcommsat Stock Parts/////////// -///////////////////////////////////////// - -datum/design/item/stock_part/subspace_ansible - id = "s-ansible" - req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) - materials = list("$metal" = 80, "$silver" = 20) - build_path = /obj/item/weapon/stock_parts/subspace/ansible - -datum/design/item/stock_part/hyperwave_filter - id = "s-filter" - req_tech = list("programming" = 3, "magnets" = 3) - materials = list("$metal" = 40, "$silver" = 10) - build_path = /obj/item/weapon/stock_parts/subspace/filter - -datum/design/item/stock_part/subspace_amplifier - id = "s-amplifier" - req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) - materials = list("$metal" = 10, "$gold" = 30, "$uranium" = 15) - build_path = /obj/item/weapon/stock_parts/subspace/amplifier - -datum/design/item/stock_part/subspace_treatment - id = "s-treatment" - req_tech = list("programming" = 3, "magnets" = 2, "materials" = 4, "bluespace" = 2) - materials = list("$metal" = 10, "$silver" = 20) - build_path = /obj/item/weapon/stock_parts/subspace/treatment - -datum/design/item/stock_part/subspace_analyzer - id = "s-analyzer" - req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) - materials = list("$metal" = 10, "$gold" = 15) - build_path = /obj/item/weapon/stock_parts/subspace/analyzer - -datum/design/item/stock_part/subspace_crystal - id = "s-crystal" - req_tech = list("magnets" = 4, "materials" = 4, "bluespace" = 2) - materials = list("$glass" = 1000, "$silver" = 20, "$gold" = 20) - build_path = /obj/item/weapon/stock_parts/subspace/crystal - -datum/design/item/stock_part/subspace_transmitter - id = "s-transmitter" - req_tech = list("magnets" = 5, "materials" = 5, "bluespace" = 3) - materials = list("$glass" = 100, "$silver" = 10, "$uranium" = 15) - build_path = /obj/item/weapon/stock_parts/subspace/transmitter - -//////////////////////////////////////// -//////////Misc Circuit Boards/////////// -//////////////////////////////////////// - -datum/design/circuit/destructive_analyzer - name = "destructive analyzer" - id = "destructive_analyzer" - req_tech = list("programming" = 2, "magnets" = 2, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/destructive_analyzer - -datum/design/circuit/protolathe - name = "protolathe" - id = "protolathe" - req_tech = list("programming" = 2, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/protolathe - -datum/design/circuit/circuit_imprinter - name = "circuit imprinter" - id = "circuit_imprinter" - req_tech = list("programming" = 2, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/circuit_imprinter - -datum/design/circuit/autolathe - name = "autolathe board" - id = "autolathe" - req_tech = list("programming" = 2, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/autolathe - -datum/design/circuit/rdservercontrol - name = "R&D server control console" - id = "rdservercontrol" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/rdservercontrol - -datum/design/circuit/rdserver - name = "R&D server" - id = "rdserver" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/circuitboard/rdserver - -datum/design/circuit/mechfab - name = "exosuit fabricator" - id = "mechfab" - req_tech = list("programming" = 3, "engineering" = 3) - build_path = /obj/item/weapon/circuitboard/mechfab - -datum/design/circuit/gas_heater - name = "gas heating system" - id = "gasheater" - req_tech = list("powerstorage" = 2, "engineering" = 1) - build_path = /obj/item/weapon/circuitboard/unary_atmos/heater - -datum/design/circuit/gas_cooler - name = "gas cooling system" - id = "gascooler" - req_tech = list("magnets" = 2, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/unary_atmos/cooler - -datum/design/circuit/secure_airlock - name = "secure airlock electronics" - desc = "Allows for the construction of a tamper-resistant airlock electronics." - id = "securedoor" - req_tech = list("programming" = 3) - build_path = /obj/item/weapon/airlock_electronics/secure - -datum/design/circuit/biogenerator - name = "biogenerator" - id = "biogenerator" - req_tech = list("programming" = 2) - build_path = /obj/item/weapon/circuitboard/biogenerator - -datum/design/circuit/recharge_station - name = "cyborg recharge station" - id = "recharge_station" - req_tech = list("programming" = 3, "engineering" = 2) - build_path = /obj/item/weapon/circuitboard/recharge_station - -///////////////////////////////////////// -////////Power Stuff Circuitboards//////// -///////////////////////////////////////// -datum/design/circuit/pacman - name = "PACMAN-type generator" - id = "pacman" - req_tech = list("programming" = 3, "phorontech" = 3, "powerstorage" = 3, "engineering" = 3) - reliability_base = 79 - materials = list("$glass" = 2000, "sacid" = 20) - build_path = /obj/item/weapon/circuitboard/pacman - -datum/design/circuit/superpacman - name = "SUPERPACMAN-type generator" - id = "superpacman" - req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4) - reliability_base = 76 - materials = list("$glass" = 2000, "sacid" = 20) - build_path = /obj/item/weapon/circuitboard/pacman/super - -datum/design/circuit/mrspacman - name = "MRSPACMAN-type generator" - id = "mrspacman" - req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 5) - reliability_base = 74 - materials = list("$glass" = 2000, "sacid" = 20) - build_path = /obj/item/weapon/circuitboard/pacman/mrs - -datum/design/circuit/batteryrack - name = "cell rack PSU" - id = "batteryrack" - req_tech = list("powerstorage" = 3, "engineering" = 2) - materials = list("$glass" = 2000, "sacid" = 20) - build_path = /obj/item/weapon/circuitboard/batteryrack - -datum/design/circuit/smes_cell - name = "'SMES' superconductive magnetic energy storage" - desc = "Allows for the construction of circuit boards used to build a SMES." - id = "smes_cell" - req_tech = list("powerstorage" = 7, "engineering" = 5) - //A uniquely-priced board; probably not the best idea - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 1000, "$silver" = 1000, "$diamond" = 500) - build_path = /obj/item/weapon/circuitboard/smes - -//////////////////////////////////////// -///////////////Power Items////////////// -//////////////////////////////////////// -datum/design/item/light_replacer - name = "Light replacer" - desc = "A device to automatically replace lights. Refill with working lightbulbs." - id = "light_replacer" - req_tech = list("magnets" = 3, "materials" = 4) - materials = list("$metal" = 1500, "$silver" = 150, "$glass" = 3000) - build_path = /obj/item/device/lightreplacer - -// *** Power cells -datum/design/item/powercell +/datum/design/item/powercell build_type = PROTOLATHE | MECHFAB -datum/design/item/powercell/AssembleDesignName() +/datum/design/item/powercell/AssembleDesignName() name = "Power cell model ([item_name])" -datum/design/item/powercell/AssembleDesignDesc() +/datum/design/item/powercell/AssembleDesignDesc() if(build_path) var/obj/item/weapon/cell/C = build_path desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy." -datum/design/item/powercell/basic +/datum/design/item/powercell/basic name = "basic" - build_type = PROTOLATHE | AUTOLATHE | MECHFAB + build_type = PROTOLATHE | MECHFAB id = "basic_cell" - req_tech = list("powerstorage" = 1) - materials = list("$metal" = 700, "$glass" = 50) + req_tech = list(TECH_POWER = 1) + materials = list("metal" = 700, "glass" = 50) build_path = /obj/item/weapon/cell category = "Misc" + sort_string = "DAAAA" -datum/design/item/powercell/high +/datum/design/item/powercell/high name = "high-capacity" - build_type = PROTOLATHE | AUTOLATHE | MECHFAB + build_type = PROTOLATHE | MECHFAB id = "high_cell" - req_tech = list("powerstorage" = 2) - materials = list("$metal" = 700, "$glass" = 60) + req_tech = list(TECH_POWER = 2) + materials = list("metal" = 700, "glass" = 60) build_path = /obj/item/weapon/cell/high category = "Misc" + sort_string = "DAAAB" -datum/design/item/powercell/super +/datum/design/item/powercell/super name = "super-capacity" id = "super_cell" - req_tech = list("powerstorage" = 3, "materials" = 2) - reliability_base = 75 - materials = list("$metal" = 700, "$glass" = 70) + req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 2) + materials = list("metal" = 700, "glass" = 70) build_path = /obj/item/weapon/cell/super category = "Misc" + sort_string = "DAAAC" -datum/design/item/powercell/hyper +/datum/design/item/powercell/hyper name = "hyper-capacity" id = "hyper_cell" - req_tech = list("powerstorage" = 5, "materials" = 4) - reliability_base = 70 - materials = list("$metal" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70) + req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) + materials = list("metal" = 400, "gold" = 150, "silver" = 150, "glass" = 70) build_path = /obj/item/weapon/cell/hyper category = "Misc" + sort_string = "DAAAD" -///////////////////////////////////////// -////////////Medical Tools//////////////// -///////////////////////////////////////// -datum/design/item/medical - materials = list("$metal" = 30, "$glass" = 20) +/datum/design/item/hud + materials = list("metal" = 50, "glass" = 50) -datum/design/item/medical/AssembleDesignName() +/datum/design/item/hud/AssembleDesignName() + ..() + name = "HUD glasses prototype ([item_name])" + +/datum/design/item/hud/AssembleDesignDesc() + desc = "Allows for the construction of \a [item_name] HUD glasses." + +/datum/design/item/hud/health + name = "health scanner" + id = "health_hud" + req_tech = list(TECH_BIO = 2, TECH_MAGNET = 3) + build_path = /obj/item/clothing/glasses/hud/health + sort_string = "GAAAA" + +/datum/design/item/hud/security + name = "security records" + id = "security_hud" + req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2) + build_path = /obj/item/clothing/glasses/hud/security + sort_string = "GAAAB" + +/datum/design/item/mesons + name = "Optical meson scanners design" + desc = "Using the meson-scanning technology those glasses allow you to see through walls, floor or anything else." + id = "mesons" + req_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2) + materials = list("metal" = 50, "glass" = 50) + build_path = /obj/item/clothing/glasses/meson + sort_string = "GAAAC" + +/datum/design/item/weapon/mining/AssembleDesignName() + ..() + name = "Mining equipment design ([item_name])" + +/datum/design/item/weapon/mining/jackhammer + id = "jackhammer" + req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINERING = 2) + materials = list("metal" = 2000, "glass" = 500, "silver" = 500) + build_path = /obj/item/weapon/pickaxe/jackhammer + sort_string = "KAAAA" + +/datum/design/item/weapon/mining/drill + id = "drill" + req_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINERING = 2) + materials = list("metal" = 6000, "glass" = 1000) //expensive, but no need for miners. + build_path = /obj/item/weapon/pickaxe/drill + sort_string = "KAAAB" + +/datum/design/item/weapon/mining/plasmacutter + id = "plasmacutter" + req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINERING = 3) + materials = list("metal" = 1500, "glass" = 500, "gold" = 500, "phoron" = 500) + build_path = /obj/item/weapon/pickaxe/plasmacutter + sort_string = "KAAAC" + +/datum/design/item/weapon/mining/pick_diamond + id = "pick_diamond" + req_tech = list(TECH_MATERIAL = 6) + materials = list("diamond" = 3000) + build_path = /obj/item/weapon/pickaxe/diamond + sort_string = "KAAAD" + +/datum/design/item/weapon/mining/drill_diamond + id = "drill_diamond" + req_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINERING = 4) + materials = list("metal" = 3000, "glass" = 1000, "diamond" = 2000) + build_path = /obj/item/weapon/pickaxe/diamonddrill + sort_string = "KAAAE" + +/datum/design/item/medical + materials = list("metal" = 30, "glass" = 20) + +/datum/design/item/medical/AssembleDesignName() ..() name = "Biotech device prototype ([item_name])" -datum/design/item/medical/robot_scanner +/datum/design/item/medical/robot_scanner desc = "A hand-held scanner able to diagnose robotic injuries." id = "robot_scanner" - req_tech = list("magnets" = 3, "biotech" = 2, "engineering" = 3) - materials = list("$metal" = 500, "$glass" = 200) + req_tech = list(TECH_MAGNET = 3, TECH_BIO = 2, TECH_ENGINERING = 3) + materials = list("metal" = 500, "glass" = 200) build_path = /obj/item/device/robotanalyzer + sort_string = "MACFA" -datum/design/item/medical/mass_spectrometer +/datum/design/item/medical/mass_spectrometer desc = "A device for analyzing chemicals in blood." id = "mass_spectrometer" - req_tech = list("biotech" = 2, "magnets" = 2) - reliability_base = 76 + req_tech = list(TECH_BIO = 2, TECH_MAGNET = 2) build_path = /obj/item/device/mass_spectrometer + sort_string = "MACAA" -datum/design/item/medical/adv_mass_spectrometer +/datum/design/item/medical/adv_mass_spectrometer desc = "A device for analyzing chemicals in blood and their quantities." id = "adv_mass_spectrometer" - req_tech = list("biotech" = 2, "magnets" = 4) - reliability_base = 74 + req_tech = list(TECH_BIO = 2, TECH_MAGNET = 4) build_path = /obj/item/device/mass_spectrometer/adv + sort_string = "MACAB" -datum/design/item/medical/reagent_scanner +/datum/design/item/medical/reagent_scanner desc = "A device for identifying chemicals." id = "reagent_scanner" - req_tech = list("biotech" = 2, "magnets" = 2) - reliability_base = 76 + req_tech = list(TECH_BIO = 2, TECH_MAGNET = 2) build_path = /obj/item/device/reagent_scanner + sort_string = "MACBA" -datum/design/item/medical/adv_reagent_scanner +/datum/design/item/medical/adv_reagent_scanner desc = "A device for identifying chemicals and their proportions." id = "adv_reagent_scanner" - req_tech = list("biotech" = 2, "magnets" = 4) - reliability_base = 74 + req_tech = list(TECH_BIO = 2, TECH_MAGNET = 4) build_path = /obj/item/device/reagent_scanner/adv + sort_string = "MACBB" -datum/design/item/medical/mmi - id = "mmi" - req_tech = list("programming" = 2, "biotech" = 3) - build_type = PROTOLATHE | MECHFAB - materials = list("$metal" = 1000, "$glass" = 500) - reliability_base = 76 - build_path = /obj/item/device/mmi - category = "Misc" - -datum/design/item/medical/mmi_radio - id = "mmi_radio" - req_tech = list("programming" = 2, "biotech" = 4) - build_type = PROTOLATHE | MECHFAB - materials = list("$metal" = 1200, "$glass" = 500) - reliability_base = 74 - build_path = /obj/item/device/mmi/radio_enabled - category = "Misc" - -datum/design/item/medical/synthetic_flash - id = "sflash" - req_tech = list("magnets" = 3, "combat" = 2) - build_type = MECHFAB - materials = list("$metal" = 750, "$glass" = 750) - reliability_base = 76 - build_path = /obj/item/device/flash/synthetic - category = "Misc" - -datum/design/item/medical/nanopaste - desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." - id = "nanopaste" - req_tech = list("materials" = 4, "engineering" = 3) - materials = list("$metal" = 7000, "$glass" = 7000) - build_path = /obj/item/stack/nanopaste - -datum/design/item/scalpel_laser1 - name = "Basic Laser Scalpel" - desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved." - id = "scalpel_laser1" - req_tech = list("biotech" = 2, "materials" = 2, "magnets" = 2) - materials = list("$metal" = 12500, "$glass" = 7500) - build_path = /obj/item/weapon/scalpel/laser1 - -datum/design/item/scalpel_laser2 - name = "Improved Laser Scalpel" - desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks somewhat advanced." - id = "scalpel_laser2" - req_tech = list("biotech" = 3, "materials" = 4, "magnets" = 4) - materials = list("$metal" = 12500, "$glass" = 7500, "$silver" = 2500) - build_path = /obj/item/weapon/scalpel/laser2 - -datum/design/item/scalpel_laser3 - name = "Advanced Laser Scalpel" - desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks to be the pinnacle of precision energy cutlery!" - id = "scalpel_laser3" - req_tech = list("biotech" = 4, "materials" = 6, "magnets" = 5) - materials = list("$metal" = 12500, "$glass" = 7500, "$silver" = 2000, "$gold" = 1500) - build_path = /obj/item/weapon/scalpel/laser3 - -datum/design/item/scalpel_manager - name = "Incision Management System" - desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." - id = "scalpel_manager" - req_tech = list("biotech" = 4, "materials" = 7, "magnets" = 5, "programming" = 4) - materials = list ("$metal" = 12500, "$glass" = 7500, "$silver" = 1500, "$gold" = 1500, "$diamond" = 750) - build_path = /obj/item/weapon/scalpel/manager - -// *** Beakers (not really a subtype of design/item/medical) -datum/design/item/beaker/AssembleDesignName() +/datum/design/item/beaker/AssembleDesignName() name = "Beaker prototype ([item_name])" -datum/design/item/beaker/bluespace - name = "bluespace" - desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." - id = "bluespacebeaker" - req_tech = list("bluespace" = 2, "materials" = 6) - materials = list("$metal" = 3000, "$phoron" = 3000, "$diamond" = 500) - reliability_base = 76 - build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace - -datum/design/item/beaker/noreact +/datum/design/item/beaker/noreact name = "cryostasis" desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units." id = "splitbeaker" - req_tech = list("materials" = 2) - materials = list("$metal" = 3000) - reliability_base = 76 + req_tech = list(TECH_MATERIAL = 2) + materials = list("metal" = 3000) build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreact - category = "Misc" + sort_string = "MADAA" -// *** Implants (not really a subtype of design/item/medical) -datum/design/item/implant - materials = list("$metal" = 50, "$glass" = 50) +/datum/design/item/beaker/bluespace + name = TECH_BLUESPACE + desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." + id = "bluespacebeaker" + req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 6) + materials = list("metal" = 3000, "phoron" = 3000, "diamond" = 500) + build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace + sort_string = "MADAB" -datum/design/item/implant/AssembleDesignName() +/datum/design/item/medical/nanopaste + desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." + id = "nanopaste" + req_tech = list(TECH_MATERIAL = 4, TECH_ENGINERING = 3) + materials = list("metal" = 7000, "glass" = 7000) + build_path = /obj/item/stack/nanopaste + sort_string = "MBAAA" + +/datum/design/item/scalpel_laser1 + name = "Basic Laser Scalpel" + desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved." + id = "scalpel_laser1" + req_tech = list(TECH_BIO = 2, TECH_MATERIAL = 2, TECH_MAGNET = 2) + materials = list("metal" = 12500, "glass" = 7500) + build_path = /obj/item/weapon/scalpel/laser1 + sort_string = "MBBAA" + +/datum/design/item/scalpel_laser2 + name = "Improved Laser Scalpel" + desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks somewhat advanced." + id = "scalpel_laser2" + req_tech = list(TECH_BIO = 3, TECH_MATERIAL = 4, TECH_MAGNET = 4) + materials = list("metal" = 12500, "glass" = 7500, "silver" = 2500) + build_path = /obj/item/weapon/scalpel/laser2 + sort_string = "MBBAB" + +/datum/design/item/scalpel_laser3 + name = "Advanced Laser Scalpel" + desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks to be the pinnacle of precision energy cutlery!" + id = "scalpel_laser3" + req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 5) + materials = list("metal" = 12500, "glass" = 7500, "silver" = 2000, "gold" = 1500) + build_path = /obj/item/weapon/scalpel/laser3 + sort_string = "MBBAC" + +/datum/design/item/scalpel_manager + name = "Incision Management System" + desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." + id = "scalpel_manager" + req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 7, TECH_MAGNET = 5, TECH_DATA = 4) + materials = list ("metal" = 12500, "glass" = 7500, "silver" = 1500, "gold" = 1500, "diamond" = 750) + build_path = /obj/item/weapon/scalpel/manager + sort_string = "MBBAD" + +/datum/design/item/implant + materials = list("metal" = 50, "glass" = 50) + +/datum/design/item/implant/AssembleDesignName() ..() name = "Implantable biocircuit design ([item_name])" -/* // Removal of loyalty implants. Can't think of a way to add this to the config option. -datum/design/item/implant/loyalty - name = "loyalty" - id = "implant_loyal" - req_tech = list("materials" = 2, "biotech" = 3) - materials = list("$metal" = 7000, "$glass" = 7000) - build_path = /obj/item/weapon/implantcase/loyalty" -*/ - -datum/design/item/implant/chemical +/datum/design/item/implant/chemical name = "chemical" id = "implant_chem" - req_tech = list("materials" = 2, "biotech" = 3) + req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3) build_path = /obj/item/weapon/implantcase/chem + sort_string = "MFAAA" -datum/design/item/implant/freedom +/datum/design/item/implant/freedom name = "freedom" id = "implant_free" - req_tech = list("syndicate" = 2, "biotech" = 3) + req_tech = list(TECH_ILLEGAL = 2, TECH_BIO = 3) build_path = /obj/item/weapon/implantcase/freedom + sort_string = "MFAAB" -///////////////////////////////////////// -/////////////////Weapons///////////////// -///////////////////////////////////////// -datum/design/item/weapon/AssembleDesignName() +/datum/design/item/weapon/AssembleDesignName() ..() name = "Weapon prototype ([item_name])" -datum/design/item/weapon/AssembleDesignDesc() +/datum/design/item/weapon/AssembleDesignDesc() if(!desc) if(build_path) var/obj/item/I = build_path desc = initial(I.desc) ..() -datum/design/item/weapon/nuclear_gun - id = "nuclear_gun" - req_tech = list("combat" = 3, "materials" = 5, "powerstorage" = 3) - materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 500) - reliability_base = 76 - build_path = /obj/item/weapon/gun/energy/gun/nuclear - locked = 1 - -datum/design/item/weapon/stunrevolver +/datum/design/item/weapon/stunrevolver id = "stunrevolver" - req_tech = list("combat" = 3, "materials" = 3, "powerstorage" = 2) - materials = list("$metal" = 4000) + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) + materials = list("metal" = 4000) build_path = /obj/item/weapon/gun/energy/stunrevolver - locked = 1 + sort_string = "TAAAA" -datum/design/item/weapon/lasercannon +/datum/design/item/weapon/nuclear_gun + id = "nuclear_gun" + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3) + materials = list("metal" = 5000, "glass" = 1000, "uranium" = 500) + build_path = /obj/item/weapon/gun/energy/gun/nuclear + sort_string = "TAAAB" + +/datum/design/item/weapon/lasercannon desc = "The lasing medium of this prototype is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core." id = "lasercannon" - req_tech = list("combat" = 4, "materials" = 3, "powerstorage" = 3) - materials = list("$metal" = 10000, "$glass" = 1000, "$diamond" = 2000) + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) + materials = list("metal" = 10000, "glass" = 1000, "diamond" = 2000) build_path = /obj/item/weapon/gun/energy/lasercannon - locked = 1 + sort_string = "TAAAC" -datum/design/item/weapon/decloner +/datum/design/item/weapon/phoronpistol + id = "ppistol" + req_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) + materials = list("metal" = 5000, "glass" = 1000, "phoron" = 3000) + build_path = /obj/item/weapon/gun/energy/toxgun + sort_string = "TAAAD" + +/datum/design/item/weapon/decloner id = "decloner" - req_tech = list("combat" = 8, "materials" = 7, "biotech" = 5, "powerstorage" = 6) - materials = list("$gold" = 5000,"$uranium" = 10000, "mutagen" = 40) + req_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 7, TECH_BIO = 5, TECH_POWER = 6) + materials = list("gold" = 5000,"uranium" = 10000, "mutagen" = 40) build_path = /obj/item/weapon/gun/energy/decloner - locked = 1 + sort_string = "TAAAE" -datum/design/item/weapon/chemsprayer - desc = "An advanced chem spraying device." - id = "chemsprayer" - req_tech = list("materials" = 3, "engineering" = 3, "biotech" = 2) - materials = list("$metal" = 5000, "$glass" = 1000) - reliability_base = 100 - build_path = /obj/item/weapon/reagent_containers/spray/chemsprayer - -datum/design/item/weapon/rapidsyringe - id = "rapidsyringe" - req_tech = list("combat" = 3, "materials" = 3, "engineering" = 3, "biotech" = 2) - materials = list("$metal" = 5000, "$glass" = 1000) - build_path = /obj/item/weapon/gun/launcher/syringe/rapid -/* -datum/design/item/weapon/largecrossbow - name = "Energy Crossbow" - desc = "A weapon favoured by syndicate infiltration teams." - id = "largecrossbow" - req_tech = list("combat" = 4, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3) - materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 1000, "$silver" = 1000) - build_path = /obj/item/weapon/gun/energy/crossbow/largecrossbow" -*/ -datum/design/item/weapon/temp_gun - desc = "A gun that shoots high-powered glass-encased energy temperature bullets." - id = "temp_gun" - req_tech = list("combat" = 3, "materials" = 4, "powerstorage" = 3, "magnets" = 2) - materials = list("$metal" = 5000, "$glass" = 500, "$silver" = 3000) - build_path = /obj/item/weapon/gun/energy/temperature - locked = 1 - -datum/design/item/weapon/flora_gun - id = "flora_gun" - req_tech = list("materials" = 2, "biotech" = 3, "powerstorage" = 3) - materials = list("$metal" = 2000, "$glass" = 500, "$uranium" = 500) - build_path = /obj/item/weapon/gun/energy/floragun - -datum/design/item/weapon/large_grenade - id = "large_Grenade" - req_tech = list("combat" = 3, "materials" = 2) - materials = list("$metal" = 3000) - reliability_base = 79 - build_path = /obj/item/weapon/grenade/chem_grenade/large - -datum/design/item/weapon/smg +/datum/design/item/weapon/smg id = "smg" - req_tech = list("combat" = 4, "materials" = 3) - materials = list("$metal" = 8000, "$silver" = 2000, "$diamond" = 1000) + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3) + materials = list("metal" = 8000, "silver" = 2000, "diamond" = 1000) build_path = /obj/item/weapon/gun/projectile/automatic - locked = 1 + sort_string = "TAABA" -datum/design/item/weapon/ammo_9mm +/datum/design/item/weapon/ammo_9mm id = "ammo_9mm" - req_tech = list("combat" = 4, "materials" = 3) - materials = list("$metal" = 3750, "$silver" = 100) + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3) + materials = list("metal" = 3750, "silver" = 100) build_path = /obj/item/ammo_magazine/c9mm + sort_string = "TAACA" -datum/design/item/weapon/stunshell +/datum/design/item/weapon/stunshell desc = "A stunning shell for a shotgun." id = "stunshell" - req_tech = list("combat" = 3, "materials" = 3) - materials = list("$metal" = 4000) + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3) + materials = list("metal" = 4000) build_path = /obj/item/ammo_casing/shotgun/stunshell + sort_string = "TAACB" -datum/design/item/weapon/phoronpistol - id = "ppistol" - req_tech = list("combat" = 5, "phorontech" = 4) - materials = list("$metal" = 5000, "$glass" = 1000, "$phoron" = 3000) - build_path = /obj/item/weapon/gun/energy/toxgun +/datum/design/item/weapon/chemsprayer + desc = "An advanced chem spraying device." + id = "chemsprayer" + req_tech = list(TECH_MATERIAL = 3, TECH_ENGINERING = 3, TECH_BIO = 2) + materials = list("metal" = 5000, "glass" = 1000) + build_path = /obj/item/weapon/reagent_containers/spray/chemsprayer + sort_string = "TABAA" -///////////////////////////////////////// -/////////////////Mining////////////////// -///////////////////////////////////////// -//Subtype of item/weapon/, because we get the nice desc update -datum/design/item/weapon/mining/AssembleDesignName() - ..() - name = "Mining equipment design ([item_name])" +/datum/design/item/weapon/rapidsyringe + id = "rapidsyringe" + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINERING = 3, TECH_BIO = 2) + materials = list("metal" = 5000, "glass" = 1000) + build_path = /obj/item/weapon/gun/launcher/syringe/rapid + sort_string = "TABAB" -datum/design/item/weapon/mining/jackhammer - id = "jackhammer" - req_tech = list("materials" = 3, "powerstorage" = 2, "engineering" = 2) - materials = list("$metal" = 2000, "$glass" = 500, "$silver" = 500) - build_path = /obj/item/weapon/pickaxe/jackhammer +/datum/design/item/weapon/temp_gun + desc = "A gun that shoots high-powered glass-encased energy temperature bullets." + id = "temp_gun" + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2) + materials = list("metal" = 5000, "glass" = 500, "silver" = 3000) + build_path = /obj/item/weapon/gun/energy/temperature + sort_string = "TABAC" -datum/design/item/weapon/mining/drill - id = "drill" - req_tech = list("materials" = 2, "powerstorage" = 3, "engineering" = 2) - materials = list("$metal" = 6000, "$glass" = 1000) //expensive, but no need for miners. - build_path = /obj/item/weapon/pickaxe/drill +/datum/design/item/weapon/large_grenade + id = "large_Grenade" + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2) + materials = list("metal" = 3000) + build_path = /obj/item/weapon/grenade/chem_grenade/large + sort_string = "TACAA" -datum/design/item/weapon/mining/plasmacutter - id = "plasmacutter" - req_tech = list("materials" = 4, "phorontech" = 3, "engineering" = 3) - materials = list("$metal" = 1500, "$glass" = 500, "$gold" = 500, "$phoron" = 500) - reliability_base = 79 - build_path = /obj/item/weapon/pickaxe/plasmacutter +/datum/design/item/weapon/flora_gun + id = "flora_gun" + req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) + materials = list("metal" = 2000, "glass" = 500, "uranium" = 500) + build_path = /obj/item/weapon/gun/energy/floragun + sort_string = "TBAAA" -datum/design/item/weapon/mining/pick_diamond - id = "pick_diamond" - req_tech = list("materials" = 6) - materials = list("$diamond" = 3000) - build_path = /obj/item/weapon/pickaxe/diamond +/datum/design/item/stock_part/subspace_ansible + id = "s-ansible" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list("metal" = 80, "silver" = 20) + build_path = /obj/item/weapon/stock_parts/subspace/ansible + sort_string = "UAAAA" -datum/design/item/weapon/mining/drill_diamond - id = "drill_diamond" - req_tech = list("materials" = 6, "powerstorage" = 4, "engineering" = 4) - materials = list("$metal" = 3000, "$glass" = 1000, "$diamond" = 3750) //Yes, a whole diamond is needed. - reliability_base = 79 - build_path = /obj/item/weapon/pickaxe/diamonddrill +/datum/design/item/stock_part/hyperwave_filter + id = "s-filter" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 3) + materials = list("metal" = 40, "silver" = 10) + build_path = /obj/item/weapon/stock_parts/subspace/filter + sort_string = "UAAAB" -///////////////////////////////////////// -//////////////Blue Space///////////////// -///////////////////////////////////////// -datum/design/item/beacon +/datum/design/item/stock_part/subspace_amplifier + id = "s-amplifier" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list("metal" = 10, "gold" = 30, "uranium" = 15) + build_path = /obj/item/weapon/stock_parts/subspace/amplifier + sort_string = "UAAAC" + +/datum/design/item/stock_part/subspace_treatment + id = "s-treatment" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list("metal" = 10, "silver" = 20) + build_path = /obj/item/weapon/stock_parts/subspace/treatment + sort_string = "UAAAD" + +/datum/design/item/stock_part/subspace_analyzer + id = "s-analyzer" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list("metal" = 10, "gold" = 15) + build_path = /obj/item/weapon/stock_parts/subspace/analyzer + sort_string = "UAAAE" + +/datum/design/item/stock_part/subspace_crystal + id = "s-crystal" + req_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list("glass" = 1000, "silver" = 20, "gold" = 20) + build_path = /obj/item/weapon/stock_parts/subspace/crystal + sort_string = "UAAAF" + +/datum/design/item/stock_part/subspace_transmitter + id = "s-transmitter" + req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3) + materials = list("glass" = 100, "silver" = 10, "uranium" = 15) + build_path = /obj/item/weapon/stock_parts/subspace/transmitter + sort_string = "UAAAG" + +/datum/design/item/light_replacer + name = "Light replacer" + desc = "A device to automatically replace lights. Refill with working lightbulbs." + id = "light_replacer" + req_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 4) + materials = list("metal" = 1500, "silver" = 150, "glass" = 3000) + build_path = /obj/item/device/lightreplacer + sort_string = "VAAAH" + +/datum/design/item/paicard + name = "'pAI', personal artificial intelligence device" + id = "paicard" + req_tech = list(TECH_DATA = 2) + materials = list("glass" = 500, "metal" = 500) + build_path = /obj/item/device/paicard + sort_string = "VABAI" + +/datum/design/item/intellicard + name = "'intelliCard', AI preservation and transportation system" + desc = "Allows for the construction of an intelliCard." + id = "intellicard" + req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) + materials = list("glass" = 1000, "gold" = 200) + build_path = /obj/item/device/aicard + sort_string = "VACAA" + +/datum/design/item/posibrain + id = "posibrain" + req_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 6, TECH_BLUESPACE = 2, TECH_DATA = 4) + materials = list("metal" = 2000, "glass" = 1000, "silver" = 1000, "gold" = 500, "phoron" = 500, "diamond" = 100) + build_path = /obj/item/device/mmi/digital/posibrain + sort_string = "VACAB" + +/datum/design/item/medical/mmi + id = "mmi" + req_tech = list(TECH_DATA = 2, TECH_BIO = 3) + build_type = PROTOLATHE | MECHFAB + materials = list("metal" = 1000, "glass" = 500) + build_path = /obj/item/device/mmi + category = "Misc" + sort_string = "VACBA" + +/datum/design/item/medical/mmi_radio + id = "mmi_radio" + req_tech = list(TECH_DATA = 2, TECH_BIO = 4) + build_type = PROTOLATHE | MECHFAB + materials = list("metal" = 1200, "glass" = 500) + build_path = /obj/item/device/mmi/radio_enabled + category = "Misc" + sort_string = "VACBB" + +/datum/design/item/beacon name = "Bluespace tracking beacon design" id = "beacon" - req_tech = list("bluespace" = 1) - materials = list ("$metal" = 20, "$glass" = 10) + req_tech = list(TECH_BLUESPACE = 1) + materials = list ("metal" = 20, "glass" = 10) build_path = /obj/item/device/radio/beacon + sort_string = "VADAA" -datum/design/item/bag_holding +/datum/design/item/bag_holding name = "'Bag of Holding', an infinite capacity bag prototype" desc = "Using localized pockets of bluespace this bag prototype offers incredible storage capacity with the contents weighting nothing. It's a shame the bag itself is pretty heavy." id = "bag_holding" - req_tech = list("bluespace" = 4, "materials" = 6) - materials = list("$gold" = 3000, "$diamond" = 1500, "$uranium" = 250) - reliability_base = 80 + req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 6) + materials = list("gold" = 3000, "diamond" = 1500, "uranium" = 250) build_path = /obj/item/weapon/storage/backpack/holding + sort_string = "VAEAA" + +/datum/design/item/binaryencrypt + name = "Binary encryption key" + desc = "Allows for deciphering the binary channel on-the-fly." + id = "binaryencrypt" + req_tech = list(TECH_ILLEGAL = 2) + materials = list("metal" = 300, "glass" = 300) + build_path = /obj/item/device/encryptionkey/binary + sort_string = "VASAA" + +/datum/design/item/chameleon + name = "Holographic equipment kit" + desc = "A kit of dangerous, high-tech equipment with changeable looks." + id = "chameleon" + req_tech = list(TECH_ILLEGAL = 2) + materials = list("metal" = 500) + build_path = /obj/item/weapon/storage/box/syndie_kit/chameleon + sort_string = "VASBA" /* -datum/design/bluespace_crystal - name = "Artificial bluespace crystal" - desc = "A small blue crystal with mystical properties." - id = "bluespace_crystal" - req_tech = list("bluespace" = 5, "materials" = 7) - build_type = PROTOLATHE - materials = list("$gold" = 1500, "$diamond" = 3000, "$phoron" = 1500) - reliability_base = 100 - build_path = /obj/item/bluespace_crystal/artificial" +CIRCUITS BELOW */ -///////////////////////////////////////// -/////////////////HUDs//////////////////// -///////////////////////////////////////// -datum/design/item/hud - materials = list("$metal" = 50, "$glass" = 50) +/datum/design/circuit + build_type = IMPRINTER + req_tech = list(TECH_DATA = 2) + materials = list("glass" = 2000) + chemicals = list("sacid" = 20) + time = 5 -datum/design/item/hud/AssembleDesignName() +/datum/design/circuit/AssembleDesignName() ..() - name = "HUD glasses prototype ([item_name])" + var/obj/item/weapon/circuitboard/C = new build_path() + if(C && istype(C)) + if(C.board_type == "machine") + name = "Machine circuit design ([item_name])" + del(C) + return + else if(C.board_type == "computer") + name = "Computer circuit design ([item_name])" + del(C) + return + name = "Circuit design ([item_name])" + del(C) -datum/design/item/hud/AssembleDesignDesc() - desc = "Allows for the construction of \a [item_name] HUD glasses." +/datum/design/circuit/AssembleDesignDesc() + if(!desc) + desc = "Allows for the construction of \a [item_name] circuit board." -datum/design/item/hud/health - name = "health scanner" - id = "health_hud" - req_tech = list("biotech" = 2, "magnets" = 3) - build_path = /obj/item/clothing/glasses/hud/health +/datum/design/circuit/arcademachine + name = "arcade machine" + id = "arcademachine" + req_tech = list(TECH_DATA = 1) + build_path = /obj/item/weapon/circuitboard/arcade + sort_string = "MAAAA" -datum/design/item/hud/security - name = "security records" - id = "security_hud" - req_tech = list("magnets" = 3, "combat" = 2) - build_path = /obj/item/clothing/glasses/hud/security - locked = 1 +/datum/design/circuit/seccamera + name = "security camera monitor" + id = "seccamera" + build_path = /obj/item/weapon/circuitboard/security + sort_string = "DAAAA" -///////////////////////////////////////// -////////////////PDA Stuff//////////////// -///////////////////////////////////////// -datum/design/item/pda +/datum/design/circuit/secdata + name = "security records console" + id = "sec_data" + build_path = /obj/item/weapon/circuitboard/secure_data + sort_string = "DABAA" + +/datum/design/circuit/prisonmanage + name = "prisoner management console" + id = "prisonmanage" + build_path = /obj/item/weapon/circuitboard/prisoner + sort_string = "DACAA" + +/datum/design/circuit/med_data + name = "medical records console" + id = "med_data" + build_path = /obj/item/weapon/circuitboard/med_data + sort_string = "FAAAA" + +/datum/design/circuit/operating + name = "patient monitoring console" + id = "operating" + build_path = /obj/item/weapon/circuitboard/operating + sort_string = "FACAA" + +/datum/design/circuit/pandemic + name = "PanD.E.M.I.C. 2200" + id = "pandemic" + build_path = /obj/item/weapon/circuitboard/pandemic + sort_string = "FAEAA" + +/datum/design/circuit/scan_console + name = "DNA machine" + id = "scan_console" + build_path = /obj/item/weapon/circuitboard/scan_consolenew + sort_string = "FAGAA" + +/datum/design/circuit/clonecontrol + name = "cloning control console" + id = "clonecontrol" + req_tech = list(TECH_DATA = 3, TECH_BIO = 3) + build_path = /obj/item/weapon/circuitboard/cloning + sort_string = "FAGAC" + +/datum/design/circuit/clonepod + name = "clone pod" + id = "clonepod" + req_tech = list(TECH_DATA = 3, TECH_BIO = 3) + build_path = /obj/item/weapon/circuitboard/clonepod + sort_string = "FAGAE" + +/datum/design/circuit/clonescanner + name = "cloning scanner" + id = "clonescanner" + req_tech = list(TECH_DATA = 3, TECH_BIO = 3) + build_path = /obj/item/weapon/circuitboard/clonescanner + sort_string = "FAGAG" + +/datum/design/circuit/crewconsole + name = "crew monitoring console" + id = "crewconsole" + req_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_BIO = 2) + build_path = /obj/item/weapon/circuitboard/crew + sort_string = "FAGAI" + +/datum/design/circuit/teleconsole + name = "teleporter control console" + id = "teleconsole" + req_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 2) + sort_string = "HAAAA" + +/datum/design/circuit/robocontrol + name = "robotics control console" + id = "robocontrol" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/robotics + sort_string = "HAAAB" + +/datum/design/circuit/mechacontrol + name = "exosuit control console" + id = "mechacontrol" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/mecha_control + sort_string = "HAAAC" + +/datum/design/circuit/mechapower + name = "mech bay power control console" + id = "mechapower" + build_path = /obj/item/weapon/circuitboard/mech_bay_power_console + sort_string = "HAAAD" + +/datum/design/circuit/rdconsole + name = "R&D control console" + id = "rdconsole" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/rdconsole + sort_string = "HAAAE" + +/datum/design/circuit/aifixer + name = "AI integrity restorer" + id = "aifixer" + req_tech = list(TECH_DATA = 3, TECH_BIO = 2) + build_path = /obj/item/weapon/circuitboard/aifixer + sort_string = "HAAAF" + +/datum/design/circuit/comm_monitor + name = "telecommunications monitoring console" + id = "comm_monitor" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/comm_monitor + sort_string = "HAACA" + +/datum/design/circuit/comm_server + name = "telecommunications server monitoring console" + id = "comm_server" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/comm_server + sort_string = "HAACB" + +/datum/design/circuit/message_monitor + name = "messaging monitor console" + id = "message_monitor" + req_tech = list(TECH_DATA = 5) + build_path = /obj/item/weapon/circuitboard/message_monitor + sort_string = "HAACC" + +/datum/design/circuit/aiupload + name = "AI upload console" + id = "aiupload" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/aiupload + sort_string = "HAABA" + +/datum/design/circuit/borgupload + name = "cyborg upload console" + id = "borgupload" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/borgupload + sort_string = "HAABB" + +/datum/design/circuit/destructive_analyzer + name = "destructive analyzer" + id = "destructive_analyzer" + req_tech = list(TECH_DATA = 2, TECH_MAGNET = 2, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/destructive_analyzer + sort_string = "HABAA" + +/datum/design/circuit/protolathe + name = "protolathe" + id = "protolathe" + req_tech = list(TECH_DATA = 2, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/protolathe + sort_string = "HABAB" + +/datum/design/circuit/circuit_imprinter + name = "circuit imprinter" + id = "circuit_imprinter" + req_tech = list(TECH_DATA = 2, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/circuit_imprinter + sort_string = "HABAC" + +/datum/design/circuit/autolathe + name = "autolathe board" + id = "autolathe" + req_tech = list(TECH_DATA = 2, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/autolathe + sort_string = "HABAD" + +/datum/design/circuit/rdservercontrol + name = "R&D server control console" + id = "rdservercontrol" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/rdservercontrol + sort_string = "HABBA" + +/datum/design/circuit/rdserver + name = "R&D server" + id = "rdserver" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/rdserver + sort_string = "HABBB" + +/datum/design/circuit/mechfab + name = "exosuit fabricator" + id = "mechfab" + req_tech = list(TECH_DATA = 3, TECH_ENGINERING = 3) + build_path = /obj/item/weapon/circuitboard/mechfab + sort_string = "HABAE" + +/datum/design/circuit/recharge_station + name = "cyborg recharge station" + id = "recharge_station" + req_tech = list(TECH_DATA = 3, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/recharge_station + sort_string = "HACAA" + +/datum/design/circuit/atmosalerts + name = "atmosphere alert console" + id = "atmosalerts" + build_path = /obj/item/weapon/circuitboard/atmos_alert + sort_string = "JAAAA" + +/datum/design/circuit/air_management + name = "atmosphere monitoring console" + id = "air_management" + build_path = /obj/item/weapon/circuitboard/air_management + sort_string = "JAAAB" + +/datum/design/circuit/rcon_console + name = "RCON remote control console" + id = "rcon_console" + req_tech = list(TECH_DATA = 4, TECH_ENGINERING = 3, TECH_POWER = 5) + build_path = /obj/item/weapon/circuitboard/rcon_console + sort_string = "JAAAC" + +/datum/design/circuit/dronecontrol + name = "drone control console" + id = "dronecontrol" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/drone_control + sort_string = "JAAAD" + +/datum/design/circuit/powermonitor + name = "power monitoring console" + id = "powermonitor" + build_path = /obj/item/weapon/circuitboard/powermonitor + sort_string = "JAAAE" + +/datum/design/circuit/solarcontrol + name = "solar control console" + id = "solarcontrol" + build_path = /obj/item/weapon/circuitboard/solar_control + sort_string = "JAAAF" + +/datum/design/circuit/pacman + name = "PACMAN-type generator" + id = "pacman" + req_tech = list(TECH_DATA = 3, TECH_PHORON = 3, TECH_POWER = 3, TECH_ENGINERING = 3) + build_path = /obj/item/weapon/circuitboard/pacman + sort_string = "JBAAA" + +/datum/design/circuit/superpacman + name = "SUPERPACMAN-type generator" + id = "superpacman" + req_tech = list(TECH_DATA = 3, TECH_POWER = 4, TECH_ENGINERING = 4) + build_path = /obj/item/weapon/circuitboard/pacman/super + sort_string = "JBAAB" + +/datum/design/circuit/mrspacman + name = "MRSPACMAN-type generator" + id = "mrspacman" + req_tech = list(TECH_DATA = 3, TECH_POWER = 5, TECH_ENGINERING = 5) + build_path = /obj/item/weapon/circuitboard/pacman/mrs + sort_string = "JBAAC" + +/datum/design/circuit/batteryrack + name = "cell rack PSU" + id = "batteryrack" + req_tech = list(TECH_POWER = 3, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/batteryrack + sort_string = "JBABA" + +/datum/design/circuit/smes_cell + name = "'SMES' superconductive magnetic energy storage" + desc = "Allows for the construction of circuit boards used to build a SMES." + id = "smes_cell" + req_tech = list(TECH_POWER = 7, TECH_ENGINERING = 5) + build_path = /obj/item/weapon/circuitboard/smes + sort_string = "JBABB" + +/datum/design/circuit/gas_heater + name = "gas heating system" + id = "gasheater" + req_tech = list(TECH_POWER = 2, TECH_ENGINERING = 1) + build_path = /obj/item/weapon/circuitboard/unary_atmos/heater + sort_string = "JCAAA" + +/datum/design/circuit/gas_cooler + name = "gas cooling system" + id = "gascooler" + req_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2) + build_path = /obj/item/weapon/circuitboard/unary_atmos/cooler + sort_string = "JCAAB" + +/datum/design/circuit/secure_airlock + name = "secure airlock electronics" + desc = "Allows for the construction of a tamper-resistant airlock electronics." + id = "securedoor" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/airlock_electronics/secure + sort_string = "JDAAA" + +/datum/design/circuit/ordercomp + name = "supply ordering console" + id = "ordercomp" + build_path = /obj/item/weapon/circuitboard/ordercomp + sort_string = "KAAAA" + +/datum/design/circuit/supplycomp + name = "supply control console" + id = "supplycomp" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/circuitboard/supplycomp + sort_string = "KAAAB" + +/datum/design/circuit/biogenerator + name = "biogenerator" + id = "biogenerator" + req_tech = list(TECH_DATA = 2) + build_path = /obj/item/weapon/circuitboard/biogenerator + sort_string = "KBAAA" + +/datum/design/circuit/comconsole + name = "communications console" + id = "comconsole" + build_path = /obj/item/weapon/circuitboard/communications + sort_string = "LAAAA" + +/datum/design/circuit/idcardconsole + name = "ID card modification console" + id = "idcardconsole" + build_path = /obj/item/weapon/circuitboard/card + sort_string = "LAAAB" + +/datum/design/circuit/emp_data + name = "employment records console" + id = "emp_data" + build_path = /obj/item/weapon/circuitboard/skills + sort_string = "LAAAC" + +/datum/design/circuit/mecha + req_tech = list(TECH_DATA = 3) + +/datum/design/circuit/mecha/AssembleDesignName() + name = "Exosuit module circuit design ([name])" +/datum/design/circuit/mecha/AssembleDesignDesc() + desc = "Allows for the construction of \a [name] module." + +/datum/design/circuit/mecha/ripley_main + name = "APLU 'Ripley' central control" + id = "ripley_main" + build_path = /obj/item/weapon/circuitboard/mecha/ripley/main + sort_string = "NAAAA" + +/datum/design/circuit/mecha/ripley_peri + name = "APLU 'Ripley' peripherals control" + id = "ripley_peri" + build_path = /obj/item/weapon/circuitboard/mecha/ripley/peripherals + sort_string = "NAAAB" + +/datum/design/circuit/mecha/odysseus_main + name = "'Odysseus' central control" + id = "odysseus_main" + req_tech = list(TECH_DATA = 3,TECH_BIO = 2) + build_path = /obj/item/weapon/circuitboard/mecha/odysseus/main + sort_string = "NAABA" + +/datum/design/circuit/mecha/odysseus_peri + name = "'Odysseus' peripherals control" + id = "odysseus_peri" + req_tech = list(TECH_DATA = 3,TECH_BIO = 2) + build_path = /obj/item/weapon/circuitboard/mecha/odysseus/peripherals + sort_string = "NAABB" + +/datum/design/circuit/mecha/gygax_main + name = "'Gygax' central control" + id = "gygax_main" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/mecha/gygax/main + sort_string = "NAACA" + +/datum/design/circuit/mecha/gygax_peri + name = "'Gygax' peripherals control" + id = "gygax_peri" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/mecha/gygax/peripherals + sort_string = "NAACB" + +/datum/design/circuit/mecha/gygax_targ + name = "'Gygax' weapon control and targeting" + id = "gygax_targ" + req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) + build_path = /obj/item/weapon/circuitboard/mecha/gygax/targeting + sort_string = "NAACC" + +/datum/design/circuit/mecha/durand_main + name = "'Durand' central control" + id = "durand_main" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/mecha/durand/main + sort_string = "NAADA" + +/datum/design/circuit/mecha/durand_peri + name = "'Durand' peripherals control" + id = "durand_peri" + req_tech = list(TECH_DATA = 4) + build_path = /obj/item/weapon/circuitboard/mecha/durand/peripherals + sort_string = "NAADB" + +/datum/design/circuit/mecha/durand_targ + name = "'Durand' weapon control and targeting" + id = "durand_targ" + req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) + build_path = /obj/item/weapon/circuitboard/mecha/durand/targeting + sort_string = "NAADC" + +/datum/design/circuit/tcom + req_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4) + +/datum/design/circuit/tcom/AssembleDesignName() + name = "Telecommunications machinery circuit design ([name])" +/datum/design/circuit/tcom/AssembleDesignDesc() + desc = "Allows for the construction of a telecommunications [name] circuit board." + +/datum/design/circuit/tcom/server + name = "server mainframe" + id = "tcom-server" + build_path = /obj/item/weapon/circuitboard/telecomms/server + sort_string = "PAAAA" + +/datum/design/circuit/tcom/processor + name = "processor unit" + id = "tcom-processor" + build_path = /obj/item/weapon/circuitboard/telecomms/processor + sort_string = "PAAAB" + +/datum/design/circuit/tcom/bus + name = "bus mainframe" + id = "tcom-bus" + build_path = /obj/item/weapon/circuitboard/telecomms/bus + sort_string = "PAAAC" + +/datum/design/circuit/tcom/hub + name = "hub mainframe" + id = "tcom-hub" + build_path = /obj/item/weapon/circuitboard/telecomms/hub + sort_string = "PAAAD" + +/datum/design/circuit/tcom/relay + name = "relay mainframe" + id = "tcom-relay" + req_tech = list(TECH_DATA = 3, TECH_ENGINERING = 4, TECH_BLUESPACE = 3) + build_path = /obj/item/weapon/circuitboard/telecomms/relay + sort_string = "PAAAE" + +/datum/design/circuit/tcom/broadcaster + name = "subspace broadcaster" + id = "tcom-broadcaster" + req_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4, TECH_BLUESPACE = 2) + build_path = /obj/item/weapon/circuitboard/telecomms/broadcaster + sort_string = "PAAAF" + +/datum/design/circuit/tcom/receiver + name = "subspace receiver" + id = "tcom-receiver" + req_tech = list(TECH_DATA = 4, TECH_ENGINERING = 3, TECH_BLUESPACE = 2) + build_path = /obj/item/weapon/circuitboard/telecomms/receiver + sort_string = "PAAAG" + +/datum/design/circuit/shield + req_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3) + materials = list("glass" = 2000, "gold" = 1000) + +/datum/design/circuit/shield/AssembleDesignName() + name = "Shield generator circuit design ([name])" +/datum/design/circuit/shield/AssembleDesignDesc() + if(!desc) + desc = "Allows for the construction of \a [name] shield generator." + +/datum/design/circuit/shield/bubble + name = "bubble" + id = "shield_gen" + build_path = /obj/item/weapon/circuitboard/shield_gen + sort_string = "VAAAA" + +/datum/design/circuit/shield/hull + name = "hull" + id = "shield_gen_ex" + build_path = /obj/item/weapon/circuitboard/shield_gen_ex + sort_string = "VAAAB" + +/datum/design/circuit/shield/capacitor + name = "capacitor" + desc = "Allows for the construction of a shield capacitor circuit board." + id = "shield_cap" + req_tech = list(TECH_MAGNET = 3, TECH_POWER = 4) + build_path = /obj/item/weapon/circuitboard/shield_cap + sort_string = "VAAAC" + +/datum/design/circuit/aicore + name = "AI core" + id = "aicore" + req_tech = list(TECH_DATA = 4, TECH_BIO = 3) + build_path = /obj/item/weapon/circuitboard/aicore + sort_string = "XAAAA" + +/datum/design/aimodule + build_type = IMPRINTER + materials = list("glass" = 2000, "gold" = 100) + +/datum/design/aimodule/AssembleDesignName() + name = "AI module design ([name])" + +/datum/design/aimodule/AssembleDesignDesc() + desc = "Allows for the construction of \a '[name]' AI module." + +/datum/design/aimodule/safeguard + name = "Safeguard" + id = "safeguard" + req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) + build_path = /obj/item/weapon/aiModule/safeguard + sort_string = "XABAA" + +/datum/design/aimodule/onehuman + name = "OneCrewMember" + id = "onehuman" + req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) + build_path = /obj/item/weapon/aiModule/oneHuman + sort_string = "XABAB" + +/datum/design/aimodule/protectstation + name = "ProtectStation" + id = "protectstation" + req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) + build_path = /obj/item/weapon/aiModule/protectStation + sort_string = "XABAC" + +/datum/design/aimodule/notele + name = "TeleporterOffline" + id = "notele" + req_tech = list(TECH_DATA = 3) + build_path = /obj/item/weapon/aiModule/teleporterOffline + sort_string = "XABAD" + +/datum/design/aimodule/quarantine + name = "Quarantine" + id = "quarantine" + req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) + build_path = /obj/item/weapon/aiModule/quarantine + sort_string = "XABAE" + +/datum/design/aimodule/oxygen + name = "OxygenIsToxicToHumans" + id = "oxygen" + req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) + build_path = /obj/item/weapon/aiModule/oxygen + sort_string = "XABAF" + +/datum/design/aimodule/freeform + name = "Freeform" + id = "freeform" + req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) + build_path = /obj/item/weapon/aiModule/freeform + sort_string = "XABAG" + +/datum/design/aimodule/reset + name = "Reset" + id = "reset" + req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) + build_path = /obj/item/weapon/aiModule/reset + sort_string = "XAAAA" + +/datum/design/aimodule/purge + name = "Purge" + id = "purge" + req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) + build_path = /obj/item/weapon/aiModule/purge + sort_string = "XAAAB" + +// Core modules +/datum/design/aimodule/core + req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) + +/datum/design/aimodule/core/AssembleDesignName() + name = "AI core module design ([name])" + +/datum/design/aimodule/core/AssembleDesignDesc() + desc = "Allows for the construction of \a '[name]' AI core module." + +/datum/design/aimodule/core/freeformcore + name = "Freeform" + id = "freeformcore" + build_path = /obj/item/weapon/aiModule/freeformcore + sort_string = "XACAA" + +/datum/design/aimodule/core/asimov + name = "Asimov" + id = "asimov" + build_path = /obj/item/weapon/aiModule/asimov + sort_string = "XACAB" + +/datum/design/aimodule/core/paladin + name = "P.A.L.A.D.I.N." + id = "paladin" + build_path = /obj/item/weapon/aiModule/paladin + sort_string = "XACAC" + +/datum/design/aimodule/core/tyrant + name = "T.Y.R.A.N.T." + id = "tyrant" + req_tech = list(TECH_DATA = 4, TECH_ILLEGAL = 2, TECH_MATERIAL = 6) + build_path = /obj/item/weapon/aiModule/tyrant + sort_string = "XACAD" + +/datum/design/item/pda name = "PDA design" desc = "Cheaper than whiny non-digital assistants." id = "pda" - req_tech = list("engineering" = 2, "powerstorage" = 3) - materials = list("$metal" = 50, "$glass" = 50) + req_tech = list(TECH_ENGINERING = 2, TECH_POWER = 3) + materials = list("metal" = 50, "glass" = 50) build_path = /obj/item/device/pda + sort_string = "VAAAA" -// *** Cartridges -datum/design/item/pda_cartridge - req_tech = list("engineering" = 2, "powerstorage" = 3) - materials = list("$metal" = 50, "$glass" = 50) +// Cartridges +/datum/design/item/pda_cartridge + req_tech = list(TECH_ENGINERING = 2, TECH_POWER = 3) + materials = list("metal" = 50, "glass" = 50) -datum/design/item/pda_cartridge/AssembleDesignName() +/datum/design/item/pda_cartridge/AssembleDesignName() ..() name = "PDA accessory ([item_name])" -datum/design/item/pda_cartridge/cart_basic +/datum/design/item/pda_cartridge/cart_basic id = "cart_basic" build_path = /obj/item/weapon/cartridge -datum/design/item/pda_cartridge/engineering + sort_string = "VBAAA" + +/datum/design/item/pda_cartridge/engineering id = "cart_engineering" build_path = /obj/item/weapon/cartridge/engineering -datum/design/item/pda_cartridge/atmos + sort_string = "VBAAB" + +/datum/design/item/pda_cartridge/atmos id = "cart_atmos" build_path = /obj/item/weapon/cartridge/atmos -datum/design/item/pda_cartridge/medical + sort_string = "VBAAC" + +/datum/design/item/pda_cartridge/medical id = "cart_medical" build_path = /obj/item/weapon/cartridge/medical -datum/design/item/pda_cartridge/chemistry + sort_string = "VBAAD" + +/datum/design/item/pda_cartridge/chemistry id = "cart_chemistry" build_path = /obj/item/weapon/cartridge/chemistry -datum/design/item/pda_cartridge/security + sort_string = "VBAAE" + +/datum/design/item/pda_cartridge/security id = "cart_security" build_path = /obj/item/weapon/cartridge/security - locked = 1 -datum/design/item/pda_cartridge/janitor + sort_string = "VBAAF" + +/datum/design/item/pda_cartridge/janitor id = "cart_janitor" build_path = /obj/item/weapon/cartridge/janitor -/* -datum/design/item/pda_cartridge/clown - id = "cart_clown" - build_path = /obj/item/weapon/cartridge/clown" -datum/design/item/pda_cartridge/mime - id = "cart_mime" - build_path = /obj/item/weapon/cartridge/mime" -*/ -datum/design/item/pda_cartridge/science + sort_string = "VBAAG" + +/datum/design/item/pda_cartridge/science id = "cart_science" build_path = /obj/item/weapon/cartridge/signal/science -datum/design/item/pda_cartridge/quartermaster + sort_string = "VBAAH" + +/datum/design/item/pda_cartridge/quartermaster id = "cart_quartermaster" build_path = /obj/item/weapon/cartridge/quartermaster - locked = 1 -datum/design/item/pda_cartridge/hop + sort_string = "VBAAI" + +/datum/design/item/pda_cartridge/hop id = "cart_hop" build_path = /obj/item/weapon/cartridge/hop - locked = 1 -datum/design/item/pda_cartridge/hos + sort_string = "VBAAJ" + +/datum/design/item/pda_cartridge/hos id = "cart_hos" build_path = /obj/item/weapon/cartridge/hos - locked = 1 -datum/design/item/pda_cartridge/ce + sort_string = "VBAAK" + +/datum/design/item/pda_cartridge/ce id = "cart_ce" build_path = /obj/item/weapon/cartridge/ce - locked = 1 -datum/design/item/pda_cartridge/cmo + sort_string = "VBAAL" + +/datum/design/item/pda_cartridge/cmo id = "cart_cmo" build_path = /obj/item/weapon/cartridge/cmo - locked = 1 -datum/design/item/pda_cartridge/rd + sort_string = "VBAAM" + +/datum/design/item/pda_cartridge/rd id = "cart_rd" build_path = /obj/item/weapon/cartridge/rd - locked = 1 -datum/design/item/pda_cartridge/captain + sort_string = "VBAAN" + +/datum/design/item/pda_cartridge/captain id = "cart_captain" build_path = /obj/item/weapon/cartridge/captain - locked = 1 + sort_string = "VBAAO" -///////////////////////////////////////// -///////////////Misc Stuff//////////////// -///////////////////////////////////////// -datum/design/item/borg_syndicate_module +/* +MECHAS BELOW +*/ + +/datum/design/item/mecha + build_type = MECHFAB + req_tech = list(TECH_COMBAT = 3) + category = "Exosuit Equipment" + +/datum/design/item/mecha/AssembleDesignName() + ..() + name = "Exosuit module design ([item_name])" + +/datum/design/item/mecha/weapon/AssembleDesignName() + ..() + name = "Exosuit weapon design ([item_name])" + +/datum/design/item/mecha/AssembleDesignDesc() + if(!desc) + desc = "Allows for the construction of \a '[item_name]' exosuit module." + +// *** Weapon modules +/datum/design/item/mecha/weapon/scattershot + id = "mech_scattershot" + req_tech = list(TECH_COMBAT = 4) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot + +/datum/design/item/mecha/weapon/laser + id = "mech_laser" + req_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser + +/datum/design/item/mecha/weapon/laser_rigged + desc = "Allows for the construction of a welder-laser assembly package for non-combat exosuits." + id = "mech_laser_rigged" + req_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser + +/datum/design/item/mecha/weapon/laser_heavy + id = "mech_laser_heavy" + req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy + +/datum/design/item/mecha/weapon/ion + id = "mech_ion" + req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion + +/datum/design/item/mecha/weapon/grenade_launcher + id = "mech_grenade_launcher" + req_tech = list(TECH_COMBAT = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang + +/datum/design/item/mecha/weapon/clusterbang_launcher + desc = "A weapon that violates the Geneva Convention at 6 rounds per minute." + id = "clusterbang_launcher" + req_tech = list(TECH_COMBAT= 5, TECH_MATERIAL = 5, TECH_ILLEGAL = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited + +// *** Nonweapon modules +/datum/design/item/mecha/wormhole_gen + desc = "An exosuit module that can generate small quasi-stable wormholes." + id = "mech_wormhole_gen" + req_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 2) + build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator + +/datum/design/item/mecha/teleporter + desc = "An exosuit module that allows teleportation to any position in view." + id = "mech_teleporter" + req_tech = list(TECH_BLUESPACE = 10, TECH_MAGNET = 5) + build_path = /obj/item/mecha_parts/mecha_equipment/teleporter + +/datum/design/item/mecha/rcd + desc = "An exosuit-mounted rapid construction device." + id = "mech_rcd" + req_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER=4, TECH_ENGINERING = 4) + build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd + +/datum/design/item/mecha/gravcatapult + desc = "An exosuit-mounted gravitational catapult." + id = "mech_gravcatapult" + req_tech = list(TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_ENGINERING = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult + +/datum/design/item/mecha/repair_droid + desc = "Automated repair droid, exosuits' best companion. BEEP BOOP" + id = "mech_repair_droid" + req_tech = list(TECH_MAGNET = 3, TECH_DATA = 3, TECH_ENGINERING = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid + +/datum/design/item/mecha/phoron_generator + desc = "Exosuit-mounted phoron generator." + id = "mech_phoron_generator" + req_tech = list(TECH_PHORON = 2, TECH_POWER= 2, TECH_ENGINERING = 2) + build_path = /obj/item/mecha_parts/mecha_equipment/generator + +/datum/design/item/mecha/energy_relay + id = "mech_energy_relay" + req_tech = list(TECH_MAGNET = 4, TECH_POWER = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay + +/datum/design/item/mecha/ccw_armor + desc = "Exosuit close-combat armor booster." + id = "mech_ccw_armor" + req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4) + build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster + +/datum/design/item/mecha/proj_armor + desc = "Exosuit projectile armor booster." + id = "mech_proj_armor" + req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 5, TECH_ENGINERING=3) + build_path = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster + +/datum/design/item/mecha/syringe_gun + desc = "Exosuit-mounted syringe gun and chemical synthesizer." + id = "mech_syringe_gun" + req_tech = list(TECH_MATERIAL = 3, TECH_BIO=4, TECH_MAGNET=4, TECH_DATA=3) + build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun + +/datum/design/item/mecha/diamond_drill + desc = "A diamond version of the exosuit drill. It's harder, better, faster, stronger." + id = "mech_diamond_drill" + req_tech = list(TECH_MATERIAL = 4, TECH_ENGINERING = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill + +/datum/design/item/mecha/generator_nuclear + desc = "Exosuit-held nuclear reactor. Converts uranium and everyone's health to energy." + id = "mech_generator_nuclear" + req_tech = list(TECH_POWER= 3, TECH_ENGINERING = 3, TECH_MATERIAL = 3) + build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear + +/datum/design/item/synthetic_flash + id = "sflash" + req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2) + build_type = MECHFAB + materials = list("metal" = 750, "glass" = 750) + build_path = /obj/item/device/flash/synthetic + category = "Misc" + +/datum/design/item/borg_syndicate_module name = "Cyborg lethal weapons upgrade" desc = "Allows for the construction of lethal upgrades for cyborgs." id = "borg_syndicate_module" build_type = MECHFAB - req_tech = list("combat" = 4, "syndicate" = 3) + req_tech = list(TECH_COMBAT = 4, TECH_ILLEGAL = 3) build_path = /obj/item/borg/upgrade/syndicate category = "Cyborg Upgrade Modules" -datum/design/item/mesons - name = "Optical meson scanners design" - desc = "Using the meson-scanning technology those glasses allow you to see through walls, floor or anything else." - id = "mesons" - req_tech = list("magnets" = 2, "engineering" = 2) - materials = list("$metal" = 50, "$glass" = 50) - build_path = /obj/item/clothing/glasses/meson +/* Uncomment if someone makes these buildable +/datum/design/circuit/general_alert + name = "general alert console" + id = "general_alert" + build_path = /obj/item/weapon/circuitboard/general_alert -datum/design/item/binaryencrypt - name = "Binary encryption key" - desc = "Allows for deciphering the binary channel on-the-fly." - id = "binaryencrypt" - req_tech = list("syndicate" = 2) - materials = list("$metal" = 300, "$glass" = 300) - build_path = /obj/item/device/encryptionkey/binary +// Removal of loyalty implants. Can't think of a way to add this to the config option. +/datum/design/item/implant/loyalty + name = "loyalty" + id = "implant_loyal" + req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3) + materials = list("metal" = 7000, "glass" = 7000) + build_path = /obj/item/weapon/implantcase/loyalty" -datum/design/item/chameleon - name = "Holographic equipment kit" - desc = "A kit of dangerous, high-tech equipment with changeable looks." - id = "chameleon" - req_tech = list("syndicate" = 2) - materials = list("$metal" = 500) - build_path = /obj/item/weapon/storage/box/syndie_kit/chameleon +/datum/design/rust_core_control + name = "Circuit Design (RUST core controller)" + desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine." + id = "rust_core_control" + req_tech = list("programming" = 4, "engineering" = 4) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20) + build_path = "/obj/item/weapon/circuitboard/rust_core_control" + +datum/design/rust_fuel_control + name = "Circuit Design (RUST fuel controller)" + desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine." + id = "rust_fuel_control" + req_tech = list("programming" = 4, "engineering" = 4) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20) + build_path = "/obj/item/weapon/circuitboard/rust_fuel_control" + +datum/design/rust_fuel_port + name = "Internal circuitry (RUST fuel port)" + desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine." + id = "rust_fuel_port" + req_tech = list("engineering" = 4, "materials" = 5) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20, "uranium" = 3000) + build_path = "/obj/item/weapon/module/rust_fuel_port" + +datum/design/rust_fuel_compressor + name = "Circuit Design (RUST fuel compressor)" + desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine." + id = "rust_fuel_compressor" + req_tech = list("materials" = 6, "phorontech" = 4) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20, "phoron" = 3000, "diamond" = 1000) + build_path = "/obj/item/weapon/module/rust_fuel_compressor" + +datum/design/rust_core + name = "Internal circuitry (RUST tokamak core)" + desc = "The circuit board that for a RUST-pattern tokamak fusion core." + id = "pacman" + req_tech = list(bluespace = 3, phorontech = 4, magnets = 5, powerstorage = 6) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20, "phoron" = 3000, "diamond" = 2000) + build_path = "/obj/item/weapon/circuitboard/rust_core" + +datum/design/rust_injector + name = "Internal circuitry (RUST tokamak core)" + desc = "The circuit board that for a RUST-pattern particle accelerator." + id = "pacman" + req_tech = list(powerstorage = 3, engineering = 4, phorontech = 4, materials = 6) + build_type = IMPRINTER + materials = list("glass" = 2000, "sacid" = 20, "phoron" = 3000, "uranium" = 2000) + build_path = "/obj/item/weapon/circuitboard/rust_core" +*/ \ No newline at end of file diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 7b7445f099..ab15f20c70 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -1,5 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - /* Destructive Analyzer @@ -7,13 +5,13 @@ It is used to destroy hand-held objects and advance technological research. Cont Note: Must be placed within 3 tiles of the R&D Console */ + /obj/machinery/r_n_d/destructive_analyzer name = "destructive analyzer" icon_state = "d_analyzer" var/obj/item/weapon/loaded_item = null - var/decon_mod = 1 - var/min_reliability = 90 - + var/decon_mod = 0 + use_power = 1 idle_power_usage = 30 active_power_usage = 2500 @@ -32,18 +30,11 @@ Note: Must be placed within 3 tiles of the R&D Console for(var/obj/item/weapon/stock_parts/S in src) T += S.rating decon_mod = T * 0.1 - min_reliability = 93 - T /obj/machinery/r_n_d/destructive_analyzer/meteorhit() del(src) return -/obj/machinery/r_n_d/destructive_analyzer/proc/ConvertReqString2List(var/list/source_list) - var/list/temp_list = params2list(source_list) - for(var/O in temp_list) - temp_list[O] = text2num(temp_list[O]) - return temp_list - /obj/machinery/r_n_d/destructive_analyzer/update_icon() if(panel_open) icon_state = "d_analyzer_t" @@ -53,8 +44,12 @@ Note: Must be placed within 3 tiles of the R&D Console icon_state = "d_analyzer" /obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/O as obj, var/mob/user as mob) - if(shocked) - shock(user, 50) + if(busy) + user << "\The [src] is busy right now." + return + if(loaded_item) + user << "There is something already loaded into \the [src]." + return 1 if(default_deconstruction_screwdriver(user, O)) if(linked_console) linked_console.linked_destroy = null @@ -67,32 +62,23 @@ Note: Must be placed within 3 tiles of the R&D Console if(panel_open) user << "You can't load \the [src] while it's opened." return 1 - if(disabled) - return if(!linked_console) - user << "\The [src] must be linked to an R&D console first!" - return - if(busy) - user << "\The [src] is busy right now." + user << "\The [src] must be linked to an R&D console first." return if(istype(O, /obj/item) && !loaded_item) if(isrobot(user)) //Don't put your module items in there! return if(!O.origin_tech) - user << "This doesn't seem to have a tech origin!" + user << "This doesn't seem to have a tech origin." return - var/list/temp_tech = ConvertReqString2List(O.origin_tech) - if(temp_tech.len == 0) - user << "You cannot deconstruct this item!" - return - if(O.reliability < min_reliability && O.crit_fail == 0) - usr << "Item is neither reliable enough nor broken enough to learn from." + if(O.origin_tech.len == 0) + user << "You cannot deconstruct this item." return busy = 1 loaded_item = O user.drop_item() O.loc = src - user << "You add \the [O] to \the [src]!" + user << "You add \the [O] to \the [src]." flick("d_analyzer_la", src) spawn(10) update_icon() diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 22df4b82dd..ed6df5dcae 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -1,12 +1,3 @@ -/* -Protolathe - -Similar to an autolathe, you load glass and metal sheets (but not other objects) into it to be used as raw materials for the stuff -it creates. All the menus and other manipulation commands are in the R&D console. - -Note: Must be placed west/left of and R&D console to function. - -*/ /obj/machinery/r_n_d/protolathe name = "Protolathe" icon_state = "protolathe" @@ -16,16 +7,16 @@ Note: Must be placed west/left of and R&D console to function. idle_power_usage = 30 active_power_usage = 5000 - var/max_material_storage = 100000 //All this could probably be done better with a list but meh. - var/m_amount = 0.0 - var/g_amount = 0.0 - var/gold_amount = 0.0 - var/silver_amount = 0.0 - var/phoron_amount = 0.0 - var/uranium_amount = 0.0 - var/diamond_amount = 0.0 + var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + var/list/datum/design/queue = list() + var/progress = 0 + var/max_material_storage = 100000 // All this could probably be done better with a list but meh. var/mat_efficiency = 1 + var/speed = 1 + + var/datum/design/chassis/current_chassis = null + var/list/datum/design/current_components = list() /obj/machinery/r_n_d/protolathe/New() ..() @@ -39,61 +30,76 @@ Note: Must be placed west/left of and R&D console to function. component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) RefreshParts() +/obj/machinery/r_n_d/protolathe/process() + ..() + if(stat) + update_icon() + return + if(queue.len == 0) + busy = 0 + update_icon() + return + var/datum/design/D = queue[1] + if(canBuild(D)) + busy = 1 + progress += speed + if(progress >= D.time) + build(D) + progress = 0 + removeFromQueue(1) + if(linked_console) + linked_console.updateUsrDialog() + update_icon() + else + if(busy) + visible_message("\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].") + busy = 0 + update_icon() + /obj/machinery/r_n_d/protolathe/proc/TotalMaterials() //returns the total of all the stored materials. Makes code neater. - return m_amount + g_amount + gold_amount + silver_amount + phoron_amount + uranium_amount + diamond_amount + var/t = 0 + for(var/f in materials) + t += materials[f] + return t /obj/machinery/r_n_d/protolathe/RefreshParts() var/T = 0 for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) T += G.reagents.maximum_volume - var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials. - reagents = R - R.my_atom = src - T = 0 + create_reagents(T) + max_material_storage = 0 for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - T += M.rating - max_material_storage = T * 75000 + max_material_storage += M.rating * 75000 T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating mat_efficiency = 1 - (T - 2) / 8 + speed = T / 2 /obj/machinery/r_n_d/protolathe/dismantle() for(var/obj/I in component_parts) if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker)) reagents.trans_to(I, reagents.total_volume) - if(m_amount >= 3750) - var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(loc) - G.amount = round(m_amount / G.perunit) - if(g_amount >= 3750) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(loc) - G.amount = round(g_amount / G.perunit) - if(phoron_amount >= 2000) - var/obj/item/stack/sheet/mineral/phoron/G = new /obj/item/stack/sheet/mineral/phoron(loc) - G.amount = round(phoron_amount / G.perunit) - if(silver_amount >= 2000) - var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(loc) - G.amount = round(silver_amount / G.perunit) - if(gold_amount >= 2000) - var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(loc) - G.amount = round(gold_amount / G.perunit) - if(uranium_amount >= 2000) - var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(loc) - G.amount = round(uranium_amount / G.perunit) - if(diamond_amount >= 2000) - var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(loc) - G.amount = round(diamond_amount / G.perunit) + for(var/f in materials) + if(materials[f] >= SHEET_MATERIAL_AMOUNT) + var/path = getMaterialType(f) + if(path) + var/obj/item/stack/S = new f(loc) + S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT) ..() /obj/machinery/r_n_d/protolathe/update_icon() if(panel_open) icon_state = "protolathe_t" + else if(busy) + icon_state = "protolathe_n" else icon_state = "protolathe" /obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(shocked) - shock(user, 50) + if(busy) + user << "\The [src] is busy. Please wait for completion of previous operation." + return 1 if(default_deconstruction_screwdriver(user, O)) if(linked_console) linked_console.linked_lathe = null @@ -108,71 +114,142 @@ Note: Must be placed west/left of and R&D console to function. if(panel_open) user << "You can't load \the [src] while it's opened." return 1 - if(disabled) - return if(!linked_console) user << "\The [src] must be linked to an R&D console first!" return 1 - if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." - return 1 if(!istype(O, /obj/item/stack/sheet)) user << "You cannot insert this item into \the [src]!" return 1 if(stat) return 1 - if(istype(O,/obj/item/stack/sheet)) - var/obj/item/stack/sheet/S = O - if(TotalMaterials() + S.perunit > max_material_storage) - user << "\The [src]'s material bin is full. Please remove material before adding more." - return 1 + + if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage) + user << "\The [src]'s material bin is full. Please remove material before adding more." + return 1 var/obj/item/stack/sheet/stack = O var/amount = round(input("How many sheets do you want to add?") as num)//No decimals if(!O) return - if(amount < 0)//No negative numbers - amount = 0 - if(amount == 0) + if(amount <= 0)//No negative numbers return if(amount > stack.get_amount()) amount = stack.get_amount() - if(max_material_storage - TotalMaterials() < (amount * stack.perunit))//Can't overfill - amount = min(stack.amount, round((max_material_storage - TotalMaterials()) / stack.perunit)) + if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill + amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT)) - overlays += "protolathe_[stack.name]" - sleep(10) - overlays -= "protolathe_[stack.name]" - - icon_state = "protolathe" - busy = 1 - use_power(max(1000, (3750 * amount / 10))) var/stacktype = stack.type - stack.use(amount) - if(do_after(user, 16)) - user << "You add [amount] sheets to \the [src]." - icon_state = "protolathe" - switch(stacktype) - if(/obj/item/stack/sheet/metal) - m_amount += amount * 3750 - if(/obj/item/stack/sheet/glass) - g_amount += amount * 3750 - if(/obj/item/stack/sheet/mineral/gold) - gold_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/silver) - silver_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/phoron) - phoron_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/uranium) - uranium_amount += amount * 2000 - if(/obj/item/stack/sheet/mineral/diamond) - diamond_amount += amount * 2000 - else - new stacktype(loc, amount) + var/t = getMaterialName(stacktype) + overlays += "protolathe_[t]" + spawn(10) + overlays -= "protolathe_[t]" + + busy = 1 + use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10))) + if(t) + if(do_after(user, 16)) + if(stack.use(amount)) + user << "You add [amount] sheets to \the [src]." + materials[t] += amount * SHEET_MATERIAL_AMOUNT busy = 0 updateUsrDialog() return -//This is to stop these machines being hackable via clicking. -/obj/machinery/r_n_d/protolathe/attack_hand(mob/user as mob) - return \ No newline at end of file +/obj/machinery/r_n_d/protolathe/proc/getMaterialType(var/name) // TODO: make not copypasted to CI + switch(name) + if("metal") + return /obj/item/stack/sheet/metal + if("glass") + return /obj/item/stack/sheet/glass + if("gold") + return /obj/item/stack/sheet/mineral/gold + if("silver") + return /obj/item/stack/sheet/mineral/silver + if("phoron") + return /obj/item/stack/sheet/mineral/phoron + if("uranium") + return /obj/item/stack/sheet/mineral/uranium + if("diamond") + return /obj/item/stack/sheet/mineral/diamond + return null + +/obj/machinery/r_n_d/protolathe/proc/getMaterialName(var/type) + switch(type) + if(/obj/item/stack/sheet/metal) + return "metal" + if(/obj/item/stack/sheet/glass) + return "glass" + if(/obj/item/stack/sheet/mineral/gold) + return "gold" + if(/obj/item/stack/sheet/mineral/silver) + return "silver" + if(/obj/item/stack/sheet/mineral/phoron) + return "phoron" + if(/obj/item/stack/sheet/mineral/uranium) + return "uranium" + if(/obj/item/stack/sheet/mineral/diamond) + return "diamond" + +/obj/machinery/r_n_d/protolathe/proc/addToQueue(var/datum/design/D) + queue += D + return + +/obj/machinery/r_n_d/protolathe/proc/removeFromQueue(var/index) + queue.Cut(index, index + 1) + return + +/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D) + for(var/M in D.materials) + if(materials[M] < D.materials[M]) + return 0 + for(var/C in D.chemicals) + if(!reagents.has_reagent(C, D.chemicals[C])) + return 0 + return 1 + +/obj/machinery/r_n_d/protolathe/proc/getLackingMaterials(var/datum/design/D) + var/ret = "" + for(var/M in D.materials) + if(materials[M] < D.materials[M]) + if(ret != "") + ret += ", " + ret += "[D.materials[M] - materials[M]] [M]" + for(var/C in D.chemicals) + if(!reagents.has_reagent(C, D.chemicals[C])) + if(ret != "") + ret += ", " + ret += C + return ret + +/obj/machinery/r_n_d/protolathe/proc/build(var/datum/design/D) + var/power = active_power_usage + for(var/M in D.materials) + power += round(D.materials[M] / 5) + power = max(active_power_usage, power) + use_power(power) + for(var/M in D.materials) + materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency) + for(var/C in D.chemicals) + reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) + + if(D.build_path) + var/obj/new_item = new D.build_path(src) + new_item.loc = loc + if(mat_efficiency != 1) // No matter out of nowhere + if(new_item.matter && new_item.matter.len > 0) + for(var/i in new_item.matter) + new_item.matter[i] = new_item.matter[i] * mat_efficiency + +/obj/machinery/r_n_d/protolathe/proc/choosePart(var/name, var/datum/design/D) + current_components[name] = D + +/obj/machinery/r_n_d/protolathe/proc/buildChassis() + var/obj/item/I = new current_chassis.build_path(loc) + for(var/t in current_components) + var/datum/design/D = current_components[t] + var/obj/item/O = new D.build_path(I) + world << I + world << I.type + current_chassis.setup(I, O, t) + current_components.Cut() + current_chassis = null \ No newline at end of file diff --git a/code/modules/research/rd-readme.dm b/code/modules/research/rd-readme.dm index 92e2c5b28e..0f98395145 100644 --- a/code/modules/research/rd-readme.dm +++ b/code/modules/research/rd-readme.dm @@ -3,7 +3,7 @@ Research and Development System. (Designed specifically for the /tg/station 13 ( ///////////////Overview/////////////////// This system is a "tech tree" research and development system designed for SS13. It allows a "researcher" job (this document assumes -the "scientist" job is given this role) the tools necessiary to research new and better technologies. In general, the system works +the "scientist" job is given this role) the tools necessary to research new and better technologies. In general, the system works by breaking existing technology and using what you learn from to advance your knowledge of SCIENCE! As your knowledge progresses, you can build newer (and better?) devices (which you can also, eventually, deconstruct to advance your knowledge). @@ -29,211 +29,4 @@ Each tech path should have at LEAST one item at every level (levels 1 - 20). Thi researching. Existing tech (ie, anything you can find on the station or get from the quartermaster) shouldn't go higher then level 5 or 7. Everything past that should be stuff you research. -Below is a checklist to make sure every tree is filled. As new items get added to R&D, add them here if there is an empty slot. -When thinking about new stuff, check here to see if there are any slots unfilled. - -//MATERIALS -1 | Metal -2 | Solid Phoron -3 | Silver -4 | Gold, Super Capacitor -5 | Uranium, Nuclear Gun, SUPERPACMAN -6 | Diamond, MRSPACMAN -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//PHORON TECH -1 | -2 | Solid Phoron -3 | Pacman Generator -4 | -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//POWER TECH -1 | Basic Capacitor, Basic Cell -2 | High-Capacity Cell (10,000) -3 | Super-Capacity Cell (20,000), Powersink, PACMAN -4 | SUPERPACMAN -5 | MRSPACMAN, Super Capacitor -6 | Hyper-Capacity Cell (30,000) -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//BLUE SPACE -1 | -2 | Teleporter Console Board -3 | Teleport Gun, Hand Tele -4 | Teleportation Scroll -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//BIOTECH -1 | Bruise Pack, Scalpel -2 | PANDEMIC Board, Mass Spectrometer -3 | AI Core, Brains (MMI) -4 | MMI+Radio -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//MAGNETS -1 | Basic Sensor -2 | Comm Console Board -3 | Adv Sensor -4 | Adv Mass Spectrometer, Chameleon Projector -5 | Phasic Sensor -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//PROGRAMMING -1 | Arcade Board -2 | Sec Camera -3 | Cloning Machine Console Board -4 | AI Core, Intellicard -5 | Pico-Manipulator, Ultra-Micro-Laser -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//SYNDICATE -1 | Sleepypen -2 | TYRANT Module, Emag -3 | Cloaking Device, Power Sink -4 | -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - -//COMBAT -1 | Flashbang, Mousetrap, Nettle -2 | Stun Baton -3 | Power Axe, Death Nettle, Nuclear Gun -4 | -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | -16 | -17 | -18 | -19 | -20 | - - - - - - - */ \ No newline at end of file diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 1ad86378b0..471a7a4093 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -42,7 +42,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/screen = 1.0 //Which screen is currently showing. var/id = 0 //ID of the computer (for server restrictions). var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console - var/errored = 0 //Errored during item construction. + var/picking_part = null req_access = list(access_research) //Data and setting manipulation requires scientist access. @@ -57,30 +57,27 @@ won't update every console in existence) but it's more of a hassle to do. Also, del(check_tech) check_tech = null break - return return_name /obj/machinery/computer/rdconsole/proc/CallMaterialName(var/ID) + var/return_name = ID + switch(return_name) + if("metal") + return_name = "Metal" + if("glass") + return_name = "Glass" + if("gold") + return_name = "Gold" + if("silver") + return_name = "Silver" + if("phoron") + return_name = "Solid Phoron" + if("uranium") + return_name = "Uranium" + if("diamond") + return_name = "Diamond" +/* var/datum/reagent/temp_reagent - var/return_name = null - if (copytext(ID, 1, 2) == "$") - return_name = copytext(ID, 2) - switch(return_name) - if("metal") - return_name = "Metal" - if("glass") - return_name = "Glass" - if("gold") - return_name = "Gold" - if("silver") - return_name = "Silver" - if("phoron") - return_name = "Solid Phoron" - if("uranium") - return_name = "Uranium" - if("diamond") - return_name = "Diamond" - else for(var/R in typesof(/datum/reagent) - /datum/reagent) temp_reagent = null temp_reagent = new R() @@ -89,11 +86,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, del(temp_reagent) temp_reagent = null break + */ return return_name /obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any). - for(var/obj/machinery/r_n_d/D in oview(3,src)) - if(D.linked_console != null || D.disabled || D.panel_open) + for(var/obj/machinery/r_n_d/D in range(3, src)) + if(D.linked_console != null || D.panel_open) continue if(istype(D, /obj/machinery/r_n_d/destructive_analyzer)) if(linked_destroy == null) @@ -109,8 +107,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, D.linked_console = src return -//Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO -/obj/machinery/computer/rdconsole/proc/griefProtection() +/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work for(var/obj/machinery/r_n_d/server/centcom/C in machines) for(var/datum/tech/T in files.known_tech) C.files.AddTech2Known(T) @@ -129,11 +126,6 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/initialize() SyncRDevices() -/* Instead of calling this every tick, it is only being called when needed -/obj/machinery/computer/rdconsole/process() - griefProtection() -*/ - /obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) //Loading a disk into it. if(istype(D, /obj/item/weapon/disk)) @@ -141,18 +133,20 @@ won't update every console in existence) but it's more of a hassle to do. Also, user << "A disk is already loaded into the machine." return - if(istype(D, /obj/item/weapon/disk/tech_disk)) t_disk = D - else if (istype(D, /obj/item/weapon/disk/design_disk)) d_disk = D + if(istype(D, /obj/item/weapon/disk/tech_disk)) + t_disk = D + else if (istype(D, /obj/item/weapon/disk/design_disk)) + d_disk = D else - user << "\red Machine cannot accept disks in that format." + user << "Machine cannot accept disks in that format." return user.drop_item() D.loc = src - user << "\blue You add the disk to the machine!" + user << "You add \the [D] to the machine." else if(istype(D, /obj/item/weapon/card/emag) && !emagged) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 - user << "\blue You you disable the security protocols" + user << "You you disable the security protocols." else //The construction/deconstruction of the console code. ..() @@ -169,17 +163,11 @@ won't update every console in existence) but it's more of a hassle to do. Also, usr.set_machine(src) if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code. var/temp_screen = text2num(href_list["menu"]) - if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access. + if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || allowed(usr) || emagged) //Unless you are making something, you need access. screen = temp_screen else usr << "Unauthorized Access." - else if(href_list["reset"]) - warning("RnD console has errored during protolathe operation. Resetting.") - errored = 0 - screen = 1.0 - updateUsrDialog() - else if(href_list["updt_tech"]) //Update the research holder with information from the technology disk. screen = 0.0 spawn(50) @@ -192,7 +180,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, t_disk.stored = null else if(href_list["eject_tech"]) //Eject the technology disk. - t_disk:loc = src.loc + t_disk.loc = loc t_disk = null screen = 1.0 @@ -215,7 +203,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, d_disk.blueprint = null else if(href_list["eject_design"]) //Eject the design disk. - d_disk:loc = src.loc + d_disk.loc = loc d_disk = null screen = 1.0 @@ -229,7 +217,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer. if(linked_destroy) if(linked_destroy.busy) - usr << "\red The destructive analyzer is busy at the moment." + usr << "The destructive analyzer is busy at the moment." else if(linked_destroy.loaded_item) linked_destroy.loaded_item.loc = linked_destroy.loc @@ -240,9 +228,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder. if(linked_destroy) if(linked_destroy.busy) - usr << "\red The destructive analyzer is busy at the moment." + usr << "The destructive analyzer is busy at the moment." else - if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) return + if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) + return linked_destroy.busy = 1 screen = 0.1 updateUsrDialog() @@ -250,25 +239,23 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(24) if(linked_destroy) linked_destroy.busy = 0 - if(!linked_destroy.hacked) - if(!linked_destroy.loaded_item) - usr <<"\red The destructive analyzer appears to be empty." - screen = 1.0 - return - if(linked_destroy.loaded_item.reliability >= linked_destroy.min_reliability) - var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech) - for(var/T in temp_tech) - files.UpdateTech(T, temp_tech[T]) - if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail) - files.UpdateDesign(linked_destroy.loaded_item.type) - if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any. - linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod)) - linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod)) - linked_destroy.loaded_item = null + if(!linked_destroy.loaded_item) + usr <<"The destructive analyzer appears to be empty." + screen = 1.0 + return + + for(var/T in linked_destroy.loaded_item.origin_tech) + files.UpdateTech(T, linked_destroy.loaded_item.origin_tech[T]) + if(linked_lathe && linked_destroy.loaded_item.matter) // Also sends salvaged materials to a linked protolathe, if any. + for(var/t in linked_destroy.loaded_item.matter) + if(t in linked_lathe.materials) + linked_lathe.materials[t] += min(linked_lathe.max_material_storage - linked_lathe.TotalMaterials(), linked_destroy.loaded_item.matter[t] * linked_destroy.decon_mod) + + linked_destroy.loaded_item = null for(var/obj/I in linked_destroy.contents) for(var/mob/M in I.contents) M.death() - if(istype(I,/obj/item/stack/sheet))//Only deconsturcts one sheet at a time instead of the entire stack + if(istype(I,/obj/item/stack/sheet)) //Only deconstructs one sheet at a time instead of the entire stack var/obj/item/stack/sheet/S = I if(S.get_amount() > 1) S.use(1) @@ -280,12 +267,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(!(I in linked_destroy.component_parts)) del(I) linked_destroy.icon_state = "d_analyzer" + use_power(linked_destroy.active_power_usage) screen = 1.0 updateUsrDialog() else if(href_list["lock"]) //Lock the console from use by anyone without tox access. - if(src.allowed(usr)) + if(allowed(usr)) screen = text2num(href_list["lock"]) else usr << "Unauthorized Access." @@ -293,15 +281,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected. screen = 0.0 if(!sync) - usr << "\red You must connect to the network first!" + usr << "You must connect to the network first." else griefProtection() //Putting this here because I dont trust the sync process spawn(30) if(src) for(var/obj/machinery/r_n_d/server/S in machines) var/server_processed = 0 - if(S.disabled) - continue if((id in S.id_with_upload) || istype(S, /obj/machinery/r_n_d/server/centcom)) for(var/datum/tech/T in files.known_tech) S.files.AddTech2Known(T) @@ -309,7 +295,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, S.files.AddDesign2Known(D) S.files.RefreshResearch() server_processed = 1 - if(((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom)) || S.hacked) + if((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom)) for(var/datum/tech/T in S.files.known_tech) files.AddTech2Known(T) for(var/datum/design/D in S.files.known_designs) @@ -332,57 +318,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, being_built = D break if(being_built) - var/power = linked_lathe.active_power_usage - for(var/M in being_built.materials) - power += round(being_built.materials[M] / 5) - power = max(linked_lathe.active_power_usage, power) - screen = 0.3 - linked_lathe.busy = 1 - flick("protolathe_n",linked_lathe) - var/key = usr.key //so we don't lose the info during the spawn delay - spawn(16) - use_power(power) - spawn(16) - errored = 1 - for(var/M in being_built.materials) - switch(M) - if("$metal") - linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$glass") - linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$gold") - linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$silver") - linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$phoron") - linked_lathe.phoron_amount = max(0, (linked_lathe.phoron_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$uranium") - linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - if("$diamond") - linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]*linked_lathe.mat_efficiency)) - else - linked_lathe.reagents.remove_reagent(M, being_built.materials[M]*linked_lathe.mat_efficiency) + linked_lathe.addToQueue(being_built) - if(being_built.build_path) - var/obj/new_item = new being_built.build_path(src) - if( new_item.type == /obj/item/weapon/storage/backpack/holding ) - new_item.investigate_log("built by [key]","singulo") - new_item.reliability = being_built.reliability - if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0) - /*if(being_built.locked) - var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc) - new_item.loc = L - L.name += " ([new_item.name])"*/ - else - new_item.loc = linked_lathe.loc - if(linked_lathe.mat_efficiency != 1) // No matter out of nowhere - if(new_item.matter && new_item.matter.len > 0) - for(var/i in new_item.matter) - new_item.matter[i] = new_item.matter[i] * linked_lathe.mat_efficiency - linked_lathe.busy = 0 - screen = 3.1 - errored = 0 - updateUsrDialog() + screen = 3.1 + updateUsrDialog() else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. if(linked_imprinter) @@ -392,36 +331,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, being_built = D break if(being_built) - var/power = linked_imprinter.active_power_usage - for(var/M in being_built.materials) - power += round(being_built.materials[M] / 5) - power = max(linked_imprinter.active_power_usage, power) - screen = 0.4 - linked_imprinter.busy = 1 - flick("circuit_imprinter_ani",linked_imprinter) - spawn(16) - errored = 1 - use_power(power) - for(var/M in being_built.materials) - switch(M) - if("$glass") - linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]*linked_imprinter.mat_efficiency)) - if("$gold") - linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]*linked_imprinter.mat_efficiency)) - if("$diamond") - linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]*linked_imprinter.mat_efficiency)) - if("$uranium") - linked_imprinter.uranium_amount = max(0, (linked_imprinter.uranium_amount-being_built.materials[M]*linked_imprinter.mat_efficiency)) - else - linked_imprinter.reagents.remove_reagent(M, being_built.materials[M]*linked_imprinter.mat_efficiency) - var/obj/new_item = new being_built.build_path(src) - new_item.reliability = being_built.reliability - if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0) - new_item.loc = linked_imprinter.loc - linked_imprinter.busy = 0 - screen = 4.1 - errored = 0 - updateUsrDialog() + linked_imprinter.addToQueue(being_built) + screen = 4.1 + updateUsrDialog() else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it) linked_imprinter.reagents.del_reagent(href_list["dispose"]) @@ -429,12 +341,18 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(href_list["disposeallI"] && linked_imprinter) //Causes the circuit imprinter to dispose of all it's reagents. linked_imprinter.reagents.clear_reagents() + else if(href_list["removeI"] && linked_lathe) + linked_imprinter.removeFromQueue(text2num(href_list["removeI"])) + else if(href_list["disposeP"] && linked_lathe) //Causes the protolathe to dispose of a single reagent (all of it) linked_lathe.reagents.del_reagent(href_list["dispose"]) else if(href_list["disposeallP"] && linked_lathe) //Causes the protolathe to dispose of all it's reagents. linked_lathe.reagents.clear_reagents() + else if(href_list["removeP"] && linked_lathe) + linked_lathe.removeFromQueue(text2num(href_list["removeP"])) + else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material var/desired_num_sheets = text2num(href_list["amount"]) var/res_amount, type @@ -464,9 +382,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(ispath(type) && hasvar(linked_lathe, res_amount)) var/obj/item/stack/sheet/sheet = new type(linked_lathe.loc) var/available_num_sheets = round(linked_lathe.vars[res_amount]/sheet.perunit) - if(available_num_sheets>0) + if(available_num_sheets > 0) sheet.amount = min(available_num_sheets, desired_num_sheets) - linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount]-sheet.amount * sheet.perunit)) + linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount] - sheet.amount * sheet.perunit)) else del sheet else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material @@ -490,13 +408,40 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/available_num_sheets = round(linked_imprinter.vars[res_amount]/sheet.perunit) if(available_num_sheets>0) sheet.amount = min(available_num_sheets, desired_num_sheets) - linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount]-sheet.amount * sheet.perunit)) + linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount] - sheet.amount * sheet.perunit)) else del sheet + else if(href_list["plan"]) + if(linked_lathe) + for(var/datum/design/D in files.known_designs) + if(D.id == href_list["plan"]) + linked_lathe.current_chassis = D + break + screen = 3.6 + updateUsrDialog() + + else if(href_list["pickpart"]) + picking_part = href_list["pickpart"] + screen = 3.7 + updateUsrDialog() + + else if(href_list["choosepart"]) + for(var/datum/design/D in files.known_designs) + if(D.id == href_list["choosepart"]) + linked_lathe.choosePart(picking_part, D) + break + screen = 3.6 + updateUsrDialog() + + else if(href_list["buildchassis"]) + linked_lathe.buildChassis() + screen = 3.1 + updateUsrDialog() + else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with. screen = 0.0 - spawn(20) + spawn(10) SyncRDevices() screen = 1.7 updateUsrDialog() @@ -550,6 +495,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/dat dat += "