diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 713f6cb0a7f..d99e96d3ac1 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -50,6 +50,8 @@ var/humans_need_surnames = 0 var/allow_random_events = 0 // enables random events mid-round when set to 1 var/allow_ai = 1 // allow ai job + var/forbid_secborg = 0 // disallow secborg module to be chosen. + var/forbid_peaceborg = 0 // disallow peacekeeper module to be chosen. var/hostedby = null var/respawn = 0 var/guest_jobban = 1 @@ -334,6 +336,12 @@ if("allow_ai") config.allow_ai = 1 + if("disable_secborg") + forbid_secborg = 1 + + if("disable_peaceborg") + forbid_peaceborg = 1 + // if("authentication") // config.enable_authentication = 1 diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 15f5493543e..43db22601af 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -135,7 +135,7 @@ datum/game_mode/nations AI.show_laws() for(var/mob/living/silicon/robot/R in AI.connected_robots) var/obj/item/device/mmi/oldmmi = R.mmi - R.change_mob_type(/mob/living/silicon/robot/peacekeeper, null, null, 1, 1 ) + R.change_mob_type(/mob/living/silicon/robot/nations, null, null, 1, 1 ) R.lawsync() R.show_laws() qdel(oldmmi) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 0e9d9a0ac09..a4fcc1db00b 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -1,10 +1,11 @@ /********************************************************************** Cyborg Spec Items ***********************************************************************/ -//Might want to move this into several files later but for now it works here +/obj/item/borg + icon = 'icons/mob/robot_items.dmi' + /obj/item/borg/stun - name = "electrified arm" - icon = 'icons/obj/items.dmi' + name = "electrically-charged arm" icon_state = "elecarm" var/charge_cost = 30 @@ -34,3 +35,198 @@ name = "Overdrive" icon = 'icons/obj/decals.dmi' icon_state = "shock" + +#define BORG_HUG 0 +#define BORG_HUG_SUPER 1 +#define BORG_HUG_SHOCK 2 +#define BORG_HUG_CRUSH 3 + +/obj/item/borg/cyborghug + name = "Hugging Module" + icon_state = "hugmodule" + desc = "For when a someone really needs a hug." + var/mode = BORG_HUG //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH + var/ccooldown = 0 + var/scooldown = 0 + var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default. + var/boop = FALSE + +/obj/item/borg/cyborghug/attack_self(mob/living/user) + if(isrobot(user)) + var/mob/living/silicon/robot/P = user + if(P.emagged && shockallowed) + if(mode < BORG_HUG_CRUSH) + mode++ + else + mode = BORG_HUG + else if(mode < BORG_HUG_SUPER) + mode++ + else + mode = BORG_HUG + switch(mode) + if(BORG_HUG) + to_chat(user, "Power reset. Hugs!") + if(BORG_HUG_SUPER) + to_chat(user, "Power increased!") + if(BORG_HUG_SHOCK) + to_chat(user, "BZZT. Electrifying arms...") + if(BORG_HUG_CRUSH) + to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.") + +/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user) + if(M == user) + return + switch(mode) + if(BORG_HUG) + if(M.health >= config.health_threshold_crit) + if(user.zone_sel.selecting == "head") + user.visible_message("[user] playfully boops [M] on the head!", \ + "You playfully boop [M] on the head!") + user.do_attack_animation(M) + playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1) + else if(ishuman(M)) + if(M.lying) + user.visible_message("[user] shakes [M] trying to get \him up!", \ + "You shake [M] trying to get \him up!") + else + user.visible_message("[user] hugs [M] to make \him feel better!", \ + "You hug [M] to make \him feel better!") + if(M.resting) + M.resting = FALSE + M.update_canmove() + else + user.visible_message("[user] pets [M]!", \ + "You pet [M]!") + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + if(BORG_HUG_SUPER) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + if(M.lying) + user.visible_message("[user] shakes [M] trying to get \him up!", \ + "You shake [M] trying to get \him up!") + else if(user.zone_sel.selecting == "head") + user.visible_message("[user] bops [M] on the head!", \ + "You bop [M] on the head!") + user.do_attack_animation(M) + else + user.visible_message("[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...", \ + "You hug [M] firmly to make \him feel better! [M] looks uncomfortable...") + if(M.resting) + M.resting = FALSE + M.update_canmove() + else + user.visible_message("[user] bops [M] on the head!", \ + "You bop [M] on the head!") + playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1) + if(BORG_HUG_SHOCK) + if(!scooldown) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + M.electrocute_act(5, "[user]", safety = 1) + user.visible_message("[user] electrocutes [M] with their touch!", \ + "You electrocute [M] with your touch!") + M.update_canmove() + else + if(!isrobot(M)) + M.adjustFireLoss(10) + user.visible_message("[user] shocks [M]!", \ + "You shock [M]!") + else + user.visible_message("[user] shocks [M]. It does not seem to have an effect", \ + "You shock [M] to no effect.") + playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1) + user.cell.charge -= 500 + scooldown = TRUE + spawn(20) + scooldown = FALSE + if(BORG_HUG_CRUSH) + if(!ccooldown) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + user.visible_message("[user] crushes [M] in their grip!", \ + "You crush [M] in your grip!") + else + user.visible_message("[user] crushes [M]!", \ + "You crush [M]!") + playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1) + M.adjustBruteLoss(15) + user.cell.charge -= 300 + ccooldown = TRUE + spawn(10) + ccooldown = FALSE + +#undef BORG_HUG +#undef BORG_HUG_SUPER +#undef BORG_HUG_SHOCK +#undef BORG_HUG_CRUSH + +/obj/item/borg/cyborghug/peacekeeper + shockallowed = TRUE + +/obj/item/device/harmalarm + name = "Sonic Harm Prevention Tool" + desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH" + icon_state = "megaphone" + var/cooldown = 0 + var/emagged = FALSE + +/obj/item/device/harmalarm/emag_act(mob/user) + emagged = !emagged + if(emagged) + to_chat(user, "You short out the safeties on the [src]!") + else + to_chat(user, "You reset the safeties on the [src]!") + +/obj/item/device/harmalarm/attack_self(mob/user) + var/safety = !emagged + if(cooldown > world.time) + to_chat(user, "The device is still recharging!") + return + + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(R.cell.charge < 1200) + to_chat(user, "You don't have enough charge to do this!") + return + R.cell.charge -= 1000 + if(R.emagged) + safety = FALSE + + if(safety) + user.visible_message("[user] blares out a near-deafening siren from its speakers!") + for(var/mob/living/carbon/M in get_mobs_in_view(9, user)) + if(!M.check_ear_prot()) + M.AdjustConfused(6) + to_chat(M, "The siren pierces your hearing!") + audible_message("HUMAN HARM") + playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) + cooldown = world.time + 200 + log_game("[key_name(user)] used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(R.connected_ai) + to_chat(R.connected_ai, "
NOTICE - Peacekeeping 'HARM ALARM' used by: [user]
") + + return + + user.audible_message("BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT") + for(var/mob/living/carbon/human/H in get_mobs_in_view(9, user)) + if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf) + continue + var/earsafety = FALSE + if(H.check_ear_prot()) + earsafety = TRUE + + if(earsafety) + H.AdjustConfused(5) + H.AdjustStuttering(10) + H.Jitter(10) + else + H.Weaken(2) + H.AdjustConfused(10) + H.AdjustStuttering(15) + H.Jitter(25) + + playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3) + cooldown = world.time + 600 + log_game("[key_name(user)] used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") \ No newline at end of file diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index ddeefa002b0..639bd65dd57 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -232,3 +232,76 @@ RSF to_chat(user, "The RSF now holds [matter]/30 fabrication-units.") desc = "A RSF. It currently holds [matter]/30 fabrication-units." return + +/obj/item/weapon/cookiesynth + name = "\improper Cookie Synthesizer" + desc = "A self-recharging device used to rapidly deploy cookies." + icon = 'icons/obj/tools.dmi' + icon_state = "rcd" + var/matter = 10 + var/toxin = FALSE + var/cooldown = 0 + var/cooldowndelay = 10 + var/emagged = FALSE + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/weapon/cookiesynth/examine(mob/user) + ..() + to_chat(user, "It currently holds [matter]/10 cookie-units.") + +/obj/item/weapon/cookiesynth/attackby() + return + +/obj/item/weapon/cookiesynth/emag_act(mob/user) + emagged = !emagged + if(emagged) + to_chat(user, "You short out [src]'s reagent safety checker!") + else + to_chat(user, "You reset [src]'s reagent safety checker!") + toxin = FALSE + +/obj/item/weapon/cookiesynth/attack_self(mob/user) + var/mob/living/silicon/robot/P = null + if(isrobot(user)) + P = user + if(emagged && !toxin) + toxin = TRUE + to_chat(user, "Cookie Synthesizer Hacked.") + else if(P.emagged && !toxin) + toxin = TRUE + to_chat(user, "Cookie Synthesizer Hacked.") + else + toxin = FALSE + to_chat(user, "Cookie Synthesizer Reset.") + +/obj/item/weapon/cookiesynth/process() + if(matter < 10) + matter++ + +/obj/item/weapon/cookiesynth/afterattack(atom/A, mob/user, proximity) + if(cooldown > world.time) + return + if(!proximity) + return + if(!(istype(A, /obj/structure/table) || isfloorturf(A))) + return + if(matter < 1) + to_chat(user, "[src] doesn't have enough matter left. Wait for it to recharge!") + return + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(!R.cell || R.cell.charge < 400) + to_chat(user, "You do not have enough power to use [src].") + return + var/turf/T = get_turf(A) + playsound(loc, 'sound/machines/click.ogg', 10, 1) + to_chat(user, "Fabricating Cookie..") + var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T) + if(toxin) + S.reagents.add_reagent("pancuronium", 2.4) + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.charge -= 100 + else + matter-- + cooldown = world.time + cooldowndelay \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3de8b868430..f89b4f6377c 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -262,14 +262,18 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/proc/pick_module() if(module) return - var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security") + var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service") + if(!config.forbid_secborg) + modules += "Security" + if(!config.forbid_peaceborg) + modules += "Peacekeeper" if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis) to_chat(src, "Crisis mode active. Combat module available.") - modules+="Combat" + modules += "Combat" if(ticker && ticker.mode && ticker.mode.name == "nations") var/datum/game_mode/nations/N = ticker.mode if(N.kickoff) - modules = list("Peacekeeper") + modules = list("Nations") if(mmi != null && mmi.alien) modules = "Hunter" modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules @@ -336,6 +340,11 @@ var/list/robot_verbs_default = list( module_sprites["Noble-SEC"] = "Noble-SEC" status_flags &= ~CANPUSH + if("Peacekeeper") + module = new /obj/item/weapon/robot_module/peacekeeper(src) + module_sprites["Peacekeeper"] = "peace" + status_flags &= ~CANPUSH + if("Engineering") module = new /obj/item/weapon/robot_module/engineering(src) module.channels = list("Engineering" = 1) @@ -362,8 +371,8 @@ var/list/robot_verbs_default = list( module.channels = list("Security" = 1) icon_state = "droidcombat" - if("Peacekeeper") - module = new /obj/item/weapon/robot_module/peacekeeper(src) + if("Nations") + module = new /obj/item/weapon/robot_module/nations(src) module.channels = list() icon_state = "droidpeace" @@ -388,7 +397,7 @@ var/list/robot_verbs_default = list( feedback_inc("cyborg_[lowertext(modtype)]",1) rename_character(real_name, get_default_name()) - if(modtype == "Medical" || modtype == "Security" || modtype == "Combat" || modtype == "Peacekeeper") + if(modtype == "Medical" || modtype == "Security" || modtype == "Combat" || modtype == "Peacekeeper" || modtype == "Nations") status_flags &= ~CANPUSH choose_icon(6,module_sprites) @@ -958,7 +967,7 @@ var/list/robot_verbs_default = list( else overlays += "[panelprefix]-openpanel -c" - var/combat = list("Combat","Peacekeeper") + var/combat = list("Combat","Nations") if(modtype in combat) if(base_icon == "") base_icon = icon_state @@ -1437,15 +1446,15 @@ var/list/robot_verbs_default = list( radio.config(module.channels) notify_ai(2) -/mob/living/silicon/robot/peacekeeper +/mob/living/silicon/robot/nations base_icon = "droidpeace" icon_state = "droidpeace" - modtype = "Peacekeeper" - designation = "Peacekeeper" + modtype = "Nations" + designation = "Nations" -/mob/living/silicon/robot/peacekeeper/init() +/mob/living/silicon/robot/nations/init() ..() - module = new /obj/item/weapon/robot_module/peacekeeper(src) + module = new /obj/item/weapon/robot_module/nations(src) //languages module.add_languages(src) //subsystems diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index d257293eac1..83467748888 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -229,6 +229,22 @@ fix_modules() +/obj/item/weapon/robot_module/peacekeeper + name = "peacekeeping robot module" + module_type = "Standard" + +/obj/item/weapon/robot_module/peacekeeper/New() + ..() + modules += new /obj/item/weapon/cookiesynth(src) + modules += new /obj/item/device/harmalarm(src) + modules += new /obj/item/weapon/reagent_containers/borghypo/peace(src) + modules += new /obj/item/taperoll/police(src) + modules += new /obj/item/borg/cyborghug/peacekeeper(src) + modules += new /obj/item/weapon/extinguisher(src) + emag = new /obj/item/weapon/reagent_containers/borghypo/peace/hacked(src) + + fix_modules() + /obj/item/weapon/robot_module/janitor name = "janitorial robot module" module_type = "Janitor" @@ -414,11 +430,11 @@ fix_modules() -/obj/item/weapon/robot_module/peacekeeper - name = "peacekeeper robot module" +/obj/item/weapon/robot_module/nations + name = "nations robot module" module_type = "Malf" -/obj/item/weapon/robot_module/peacekeeper/New() +/obj/item/weapon/robot_module/nations/New() ..() modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src) modules += new /obj/item/weapon/gun/energy/gun/cyborg(src) diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index dc99e5e77d9..5d6523f7913 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -1132,3 +1132,30 @@ M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you playsound(M, "sparks", 50, 1) ..() + +/datum/reagent/peaceborg/confuse + name = "Dizzying Solution" + id = "dizzysolution" + description = "Makes the target off balance and dizzy" + metabolization_rate = 1.5 * REAGENTS_METABOLISM + +/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/M) + M.AdjustConfused(3, bound_lower = 0, bound_upper = 5) + M.AdjustDizzy(3, bound_lower = 0, bound_upper = 5) + if(prob(20)) + to_chat(M, "You feel confused and disorientated.") + ..() + +/datum/reagent/peaceborg/tire + name = "Tiring Solution" + id = "tiresolution" + description = "An extremely weak stamina-toxin that tires out the target. Completely harmless." + metabolization_rate = 1.5 * REAGENTS_METABOLISM + +/datum/reagent/peaceborg/tire/on_mob_life(mob/living/M) + var/healthcomp = (M.maxHealth - M.health) + if(M.staminaloss < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.) + M.adjustStaminaLoss(10) + if(prob(30)) + to_chat(M, "You feel like you should sit down and take a rest...") + ..() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 70ba27e7dcc..0ae8bba3008 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -33,6 +33,15 @@ reagent_ids = list("syndicate_nanites", "potass_iodide", "ether") bypass_protection = 1 +/obj/item/weapon/reagent_containers/borghypo/peace + name = "Peace Hypospray" + reagent_ids = list("dizzysolution","tiresolution") + +/obj/item/weapon/reagent_containers/borghypo/peace/hacked + desc = "Everything's peaceful in death!" + icon_state = "borghypo_s" + reagent_ids = list("dizzysolution","tiresolution","tirizene","sulfonal","sodium_thiopental","cyanide","neurotoxin2") + /obj/item/weapon/reagent_containers/borghypo/New() ..() for(var/R in reagent_ids) diff --git a/config/example/config.txt b/config/example/config.txt index 5617b5ad039..51018432c3c 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -137,6 +137,14 @@ DEFAULT_NO_VOTE ## allow AI job ALLOW_AI +## Secborg ### +## Uncomment to prevent the security cyborg module from being chosen +#DISABLE_SECBORG + +## Peacekeeper Borg ### +## Uncomment to prevent the peacekeeper cyborg module from being chosen +#DISABLE_PEACEBORG + ## Allow ghosts to see antagonist through AntagHUD ALLOW_ANTAG_HUD diff --git a/icons/mob/robot_items.dmi b/icons/mob/robot_items.dmi new file mode 100644 index 00000000000..862e1be3843 Binary files /dev/null and b/icons/mob/robot_items.dmi differ diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index 6ea8f69d632..63d92cae2ef 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index cb535c90165..4e6f781cb1b 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/sound/AI/harmalarm.ogg b/sound/AI/harmalarm.ogg new file mode 100644 index 00000000000..b9107f6e44d Binary files /dev/null and b/sound/AI/harmalarm.ogg differ