From 5f98ccaaf8938b5bc15004b3b96a4cfb2f2eec1d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 31 May 2014 22:15:28 +0930 Subject: [PATCH 1/4] Added smaller spraybottle for drones. --- code/modules/reagents/reagent_containers/spray.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 47e2ca5a7b..741a5493d9 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -118,11 +118,14 @@ name = "space cleaner" desc = "BLAM!-brand non-foaming space cleaner!" +/obj/item/weapon/reagent_containers/spray/cleaner/drone + name = "space cleaner" + desc = "BLAM!-brand non-foaming space cleaner!" + volume = 50 /obj/item/weapon/reagent_containers/spray/cleaner/New() ..() - reagents.add_reagent("cleaner", 250) - + reagents.add_reagent("cleaner", src.volume) //pepperspray /obj/item/weapon/reagent_containers/spray/pepper name = "pepperspray" From 46df8d4cef48cf4c285eb6e52efd7ccd27ad77ab Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 31 May 2014 22:15:47 +0930 Subject: [PATCH 2/4] Allowed drones to login to airlock electronics. --- code/game/machinery/doors/airlock_electronics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index f56ff86384..33621a301f 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -59,7 +59,7 @@ Topic(href, href_list) ..() - if (usr.stat || usr.restrained() || !ishuman(usr)) + if (usr.stat || usr.restrained() || (!ishuman(usr) && !istype(usr,/mob/living/silicon))) return if (href_list["close"]) usr << browse(null, "window=airlock") From 273f729eee822fa656ebec8f15ee1fbb26395d4e Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 31 May 2014 22:28:05 +0930 Subject: [PATCH 3/4] Several drone fixes (walking over, pushing, pulling, AI sync) --- code/modules/mob/living/carbon/human/human.dm | 5 +++ .../mob/living/silicon/robot/drone/drone.dm | 14 +++++++ .../living/silicon/robot/drone/drone_items.dm | 2 +- .../modules/mob/living/silicon/robot/robot.dm | 11 ++---- .../mob/living/silicon/robot/robot_modules.dm | 4 +- .../mob/living/simple_animal/simple_animal.dm | 38 +++++++++---------- 6 files changed, 45 insertions(+), 29 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f17bb061d9..7b254cf890 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -106,6 +106,11 @@ now_pushing = 0 return + if(istype(tmob,/mob/living/silicon/robot/drone)) //I have no idea why the hell this isn't already happening. How do mice do it? + loc = tmob.loc + now_pushing = 0 + return + //BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around! var/turf/oldloc = loc diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 4e9c806850..30ffc9b280 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -12,6 +12,7 @@ braintype = "Robot" lawupdate = 0 density = 0 + small = 1 // We need to keep track of a few module items so we don't need to do list operations // every time we need them. These get set in New() after the module is chosen. @@ -303,3 +304,16 @@ src << "Systems rebooted. Loading base pattern maintenance protocol... loaded." full_law_reset() +/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes) + if (!yes) return + if (istype(AM, /obj/machinery/recharge_station)) + var/obj/machinery/recharge_station/F = AM + F.move_inside() + return + +/mob/living/silicon/robot/drone/Bumped(AM as mob|obj) + return + +/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM) + src << "You are too small to pull anything." + return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index a121991977..454aff850c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -160,7 +160,7 @@ stored_comms["plastic"]++ return - else if(istype(M,/mob/living/silicon/robot/drone) && M.stat == 2 && !M.client) + else if(istype(M,/mob/living/silicon/robot/drone) && !M.client) var/mob/living/silicon/robot/drone/D = src.loc diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 484fd521c6..0a98997647 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -91,10 +91,7 @@ modtype = "Security" else if(istype(src,/mob/living/silicon/robot/drone)) laws = new /datum/ai_laws/drone() - connected_ai = select_active_ai_with_fewest_borgs() - if(connected_ai) - connected_ai.connected_robots += src - lawsync() + connected_ai = null else laws = new /datum/ai_laws/nanotrasen() connected_ai = select_active_ai_with_fewest_borgs() @@ -529,15 +526,15 @@ /mob/living/silicon/robot/triggerAlarm(var/class, area/A, list/cameralist, var/source) if (stat == 2) return 1 - + ..() - + queueAlarm(text("--- [class] alarm detected in [A.name]!"), class) /mob/living/silicon/robot/cancelAlarm(var/class, area/A as area, obj/origin) var/has_alarm = ..() - + if (!has_alarm) queueAlarm(text("--- [class] alarm in [A.name] has been cleared."), class, 0) // if (viewalerts) robot_alerts() diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 1aad22242f..c3448aada4 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -292,9 +292,9 @@ src.modules += new /obj/item/weapon/wirecutters(src) src.modules += new /obj/item/device/multitool(src) src.modules += new /obj/item/device/lightreplacer(src) - src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner(src) src.modules += new /obj/item/weapon/gripper(src) src.modules += new /obj/item/weapon/matter_decompiler(src) + src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src) src.emag = new /obj/item/weapon/card/emag(src) src.emag.name = "Cryptographic Sequencer" @@ -308,7 +308,7 @@ /obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R) var/obj/item/weapon/reagent_containers/spray/cleaner/C = locate() in src.modules - C.reagents.add_reagent("cleaner", 10) + C.reagents.add_reagent("cleaner", 3) for(var/T in stacktypes) var/O = locate(T) in src.modules diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 69eaa58b77..30ba30f6ad 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -454,22 +454,22 @@ overlays = null if (targeted_by && target_locked) overlays += target_locked - -/mob/living/simple_animal/say(var/message) - if(stat) - return - - if(copytext(message,1,2) == "*") - return emote(copytext(message,2)) - - if(stat) - return - - var/verb = "says" - - if(speak_emote.len) - verb = pick(speak_emote) - - message = capitalize(trim_left(message)) - - ..(message, null, verb) + +/mob/living/simple_animal/say(var/message) + if(stat) + return + + if(copytext(message,1,2) == "*") + return emote(copytext(message,2)) + + if(stat) + return + + var/verb = "says" + + if(speak_emote.len) + verb = pick(speak_emote) + + message = capitalize(trim_left(message)) + + ..(message, null, verb) From a3be0051130c9de84f10db88bcb4177751148309 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 1 Jun 2014 02:05:25 +0930 Subject: [PATCH 4/4] Adds a drone spawn blurb. --- code/modules/mob/living/silicon/robot/drone/drone.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 30ffc9b280..ebf427720d 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -299,10 +299,15 @@ if(player.mob && player.mob.mind) player.mob.mind.transfer_to(src) - emagged = 0 lawupdate = 0 src << "Systems rebooted. Loading base pattern maintenance protocol... loaded." full_law_reset() + src << "
You are a maintenance drone, a tiny-brained robotic repair machine." + src << "You have no individual will, no personality, and no drives or urges other than your laws." + src << "Use :b to talk to your fellow synthetics, or use say to speak silently to other drones nearby." + src << "Remember, you are lawed against interference with the crew." + src << "Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets." + src << "If a crewmember has noticed you, you are probably breaking your third law." /mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes) if (!yes) return