From f10af06a6beac9279822cc2a2b635ecfeecda300 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Thu, 16 Dec 2010 03:11:49 +0000 Subject: [PATCH] Monkeys can now be stungloved Cyborgs got a makeover Standard model now gets an energy sword when emagged Engineering model RCDs now run on cell charge for engyborgs Emagged engyborgs get the functional equivalent of stungloves Security model gets a laser when emagged Janitor model Spraybottle contents slowly refill at the cost of cell charge Emagged janitors get a spraybottle full of space lube Brobot Bottle contents slowly refill at the cost of cell charge Emagged brobots get a bottle of Mickey Finn's Special Brew Traitor/malf AIs can 'emag' their borgs with the robotics terminal (subject to removal/conversion to malf module should it prove hilariously overpowered) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@634 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/Chemistry-Tools.dm | 9 +++ .../game/gamemodes/malfunction/malfunction.dm | 2 +- code/game/machinery/computer/robot.dm | 12 ++++ code/game/objects/items/weapons/RCD.dm | 71 +++++++++++++------ code/game/objects/items/weapons/guns_ammo.dm | 6 +- .../objects/items/weapons/mops_cleaners.dm | 7 ++ .../mob/living/carbon/monkey/monkey.dm | 17 +++++ code/modules/mob/living/silicon/robot/life.dm | 2 +- .../modules/mob/living/silicon/robot/robot.dm | 5 ++ .../mob/living/silicon/robot/robot_modules.dm | 43 +++++++++-- 10 files changed, 145 insertions(+), 29 deletions(-) diff --git a/code/WorkInProgress/Chemistry-Tools.dm b/code/WorkInProgress/Chemistry-Tools.dm index d0761e563a9..2da49d07c3f 100644 --- a/code/WorkInProgress/Chemistry-Tools.dm +++ b/code/WorkInProgress/Chemistry-Tools.dm @@ -865,6 +865,7 @@ return attack(mob/M as mob, mob/user as mob, def_zone) var/datum/reagents/R = src.reagents + var/fillevel = gulp_size if(!R.total_volume || !R) user << "\red None of [src] left, oh no!" @@ -892,6 +893,14 @@ spawn(5) reagents.trans_to(M, gulp_size) + if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell + var/mob/living/silicon/robot/bro = user + bro.cell.charge -= 30 + var/refill = R.get_master_reagent_id() + spawn(600) + R.add_reagent(refill, fillevel) + + playsound(M.loc,'drink.ogg', rand(10,50), 1) return 1 diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 173341f875b..be58f428606 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -33,7 +33,7 @@ sleep(50) world.Reboot() return*/ - + AI_mind.special_role = "malfunction" AI_mind.current << "\redYou are malfunctioning! You do not have to follow any laws." AI_mind.current << "The crew do not know you have malfunctioned. You may keep it a secret or go wild." diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index abb2958e0fa..f92688abc45 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -91,6 +91,9 @@ dat += " Slaved to [R.connected_ai.name] |" else dat += " Independent from AI |" + if (istype(user, /mob/living/silicon/ai)) + if(user.mind.special_role && !R.emagged) + dat += "(Hack) " dat += "([R.canmove ? "Lockdown" : "Release"]) " dat += "(Destroy)" dat += "
" @@ -208,6 +211,15 @@ else usr << "\red Access Denied." + else if (href_list["magbot"]) + if(src.allowed(usr)) + var/mob/living/silicon/robot/R = locate(href_list["magbot"]) + if(R) + var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort") + if(choice == "Confirm") + if(R) + R.emagged = 1 + src.add_fingerprint(usr) src.updateUsrDialog() return diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 2a7dbf2efa8..5a3c5b8a43c 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -53,9 +53,13 @@ RCD spark_system.set_up(5, 0, src) src.spark_system.start() A:ReplaceWithFloor() - matter-- - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 30 + else + matter-- + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return if (istype(A, /turf/simulated/floor) && matter >= 3) user << "Building Wall (3)..." @@ -66,9 +70,13 @@ RCD src.spark_system.start() A:ReplaceWithWall() playsound(src.loc, 'Deconstruct.ogg', 50, 1) - matter -= 3 - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 90 + else + matter -= 3 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return else if (istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10) user << "Building Airlock (10)..." @@ -78,12 +86,17 @@ RCD spark_system.set_up(5, 0, src) src.spark_system.start() var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A ) - matter -= 10 T.autoclose = 1 playsound(src.loc, 'Deconstruct.ogg', 50, 1) - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." playsound(src.loc, 'sparks2.ogg', 50, 1) + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 300 + else + matter -= 10 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." + return else if (mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) ) if (istype(A, /turf/simulated/wall) && matter >= 5) @@ -93,11 +106,15 @@ RCD if (!disabled) spark_system.set_up(5, 0, src) src.spark_system.start() - matter -= 5 A:ReplaceWithFloor() playsound(src.loc, 'Deconstruct.ogg', 50, 1) - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 150 + else + matter -= 5 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return if (istype(A, /turf/simulated/wall/r_wall) && matter >= 5) user << "Deconstructing RWall (5)..." @@ -106,11 +123,15 @@ RCD if (!disabled) spark_system.set_up(5, 0, src) src.spark_system.start() - matter -= 5 A:ReplaceWithWall() playsound(src.loc, 'Deconstruct.ogg', 50, 1) - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 150 + else + matter -= 5 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return if (istype(A, /turf/simulated/floor) && matter >= 5) user << "Deconstructing Floor (5)..." @@ -119,11 +140,15 @@ RCD if (!disabled) spark_system.set_up(5, 0, src) src.spark_system.start() - matter -= 5 A:ReplaceWithSpace() playsound(src.loc, 'Deconstruct.ogg', 50, 1) - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 150 + else + matter -= 5 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return if (istype(A, /obj/machinery/door/airlock) && matter >= 10) user << "Deconstructing Airlock (10)..." @@ -132,9 +157,13 @@ RCD if (!disabled) spark_system.set_up(5, 0, src) src.spark_system.start() - matter -= 10 del(A) playsound(src.loc, 'Deconstruct.ogg', 50, 1) - user << "The RCD now holds [matter]/30 matter-units." - desc = "A RCD. It currently holds [matter]/30 matter-units." + if (isrobot(user)) + var/mob/living/silicon/robot/engy = user + engy.cell.charge -= 300 + else + matter -= 10 + user << "The RCD now holds [matter]/30 matter-units." + desc = "A RCD. It currently holds [matter]/30 matter-units." return diff --git a/code/game/objects/items/weapons/guns_ammo.dm b/code/game/objects/items/weapons/guns_ammo.dm index ba515e194fe..1ed6ac4ae9f 100644 --- a/code/game/objects/items/weapons/guns_ammo.dm +++ b/code/game/objects/items/weapons/guns_ammo.dm @@ -597,7 +597,11 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us return playsound(user, 'Laser.ogg', 50, 1) - src.charges-- + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.charge -= 30 + else + src.charges-- update_icon() var/turf/T = user.loc diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm index 0011f96b01c..5d4beb4c59c 100644 --- a/code/game/objects/items/weapons/mops_cleaners.dm +++ b/code/game/objects/items/weapons/mops_cleaners.dm @@ -37,6 +37,13 @@ MOP sleep(3) del(D) + if(isrobot(user)) //Cyborgs can clean forever if they keep charged + var/mob/living/silicon/robot/janitor = user + janitor.cell.charge -= 20 + var/refill = src.reagents.get_master_reagent_id() + spawn(600) + src.reagents.add_reagent(refill, 10) + return /obj/item/weapon/cleaner/examine() diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 1aa07746ec4..8626d397fb3 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -179,6 +179,23 @@ /mob/living/carbon/monkey/attack_hand(mob/M as mob) ..() + if (istype(M, /mob/living/carbon/human)) + if ((M:gloves && M:gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if(M:gloves.uses > 0) + M:gloves.uses-- + if (src.weakened < 5) + src.weakened = 5 + if (src.stuttering < 5) + src.stuttering = 5 + if (src.stunned < 5) + src.stunned = 5 + for(var/mob/O in viewers(src, null)) + if (O.client) + O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall", 2) + else + M:gloves.elecgen = 0 + M << "\red Not enough charge! " + return if (M.a_intent == "help") src.sleeping = 0 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 21f8b6ff7fa..4c063665c3e 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -202,7 +202,7 @@ src.cells.icon_state = "charge3" if(0.25 to 0.5) src.cells.icon_state = "charge2" - if(0.01 to 0.25) + if(0 to 0.25) src.cells.icon_state = "charge1" else src.cells.icon_state = "charge0" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a320f59d6ee..f41cc96d17d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -627,6 +627,11 @@ dat += text("[obj]: Activated
") else dat += text("[obj]: Activate
") + if (emagged) + if(src.activated(src.module.emag)) + dat += text("[src.module.emag]: Activated
") + else + dat += text("[src.module.emag]: Activate
") /* if(src.activated(obj)) dat += text("[obj]: \[Activated | Deactivate\]
") diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 2263829ec7d..70b662fd519 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -6,6 +6,7 @@ item_state = "electronic" flags = FPRINT|TABLEPASS | CONDUCT var/list/modules = list() + var/obj/item/emag /obj/item/weapon/robot_module/standard name = "standard robot module" @@ -27,6 +28,8 @@ /obj/item/weapon/robot_module/New()//Shit all the mods have src.modules += new /obj/item/device/flash(src) + src.emag = new /obj/item/toy/sword(src) + src.emag.name = "Placeholder Emag Item" /obj/item/weapon/robot_module/standard/New() @@ -36,6 +39,7 @@ src.modules += new /obj/item/weapon/wrench(src) src.modules += new /obj/item/weapon/crowbar(src) src.modules += new /obj/item/device/healthanalyzer(src) + src.emag = new /obj/item/weapon/sword(src) /obj/item/weapon/robot_module/engineering/New() ..() @@ -67,6 +71,8 @@ W.amount = 50 src.modules += W + src.emag = new /obj/item/weapon/borg/stun(src) + /* /obj/item/weapon/robot_module/medical/New() ..() @@ -83,19 +89,46 @@ src.modules += new /obj/item/weapon/baton(src) src.modules += new /obj/item/weapon/handcuffs(src) src.modules += new /obj/item/weapon/gun/energy/taser_gun(src) - src.modules += new /obj/item/device/flash(src) + src.emag = new /obj/item/weapon/gun/energy/laser_gun(src) + /obj/item/weapon/robot_module/janitor/New() ..() src.modules += new /obj/item/weapon/cleaner(src) src.modules += new /obj/item/weapon/mop(src) - src.modules += new /obj/item/weapon/reagent_containers/glass/bucket + src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src) + src.emag = new /obj/item/weapon/cleaner(src) + var/datum/reagents/R = new/datum/reagents(1000) + src.emag.reagents = R + R.my_atom = src.emag + R.add_reagent("lube", 1000) + src.emag.name = "Lube spray" /obj/item/weapon/robot_module/brobot/New() ..() src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) - src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) - src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) - src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) src.modules += new /obj/item/weapon/spacecash(src) + src.emag = new /obj/item/weapon/reagent_containers/food/drinks/beer(src) + var/datum/reagents/R = new/datum/reagents(50) + src.emag.reagents = R + R.my_atom = src.emag + R.add_reagent("chloralhydrate", 50) + src.emag.name = "Mickey Finn's Special Brew" + +/obj/item/weapon/borg/stun + name = "Electrified Arm" + icon = 'decals.dmi' + icon_state = "shock" + + attack(mob/M as mob, mob/living/silicon/robot/user as mob) + user.cell.charge -= 30 + if (M.weakened < 5) + M.weakened = 5 + if (M.stuttering < 5) + M.stuttering = 5 + if (M.stunned < 5) + M.stunned = 5 + for(var/mob/O in viewers(M, null)) + if (O.client) + O.show_message("\red [user] has prodded [M] with an electrically-charged arm!", 1, "\red You hear someone fall", 2)