From fcb2b5866453aa59630ece2327b3eea4116be93c Mon Sep 17 00:00:00 2001
From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com>
Date: Wed, 20 May 2020 22:03:20 -0400
Subject: [PATCH] Upgrade able Medical bot and Floor bot as well! + Clean bot
fix! (#12112)
* Misstake are now
* Still dosnt all work
* no more range upgrade it just dosnt work
* bithell
* a this
---
code/__DEFINES/robots.dm | 13 ++
.../mob/living/simple_animal/bot/cleanbot.dm | 34 ++++--
.../mob/living/simple_animal/bot/floorbot.dm | 32 +++++
.../mob/living/simple_animal/bot/medbot.dm | 113 ++++++++++++++++--
strings/tips.txt | 1 +
5 files changed, 174 insertions(+), 19 deletions(-)
diff --git a/code/__DEFINES/robots.dm b/code/__DEFINES/robots.dm
index affa23d30a..09cea91540 100644
--- a/code/__DEFINES/robots.dm
+++ b/code/__DEFINES/robots.dm
@@ -51,6 +51,19 @@
#define ASSEMBLY_FOURTH_STEP 3
#define ASSEMBLY_FIFTH_STEP 4
+//Bot Upgrade defines
+#define UPGRADE_CLEANER_ADVANCED_MOP (1<<0)
+#define UPGRADE_CLEANER_BROOM (1<<1)
+
+#define UPGRADE_MEDICAL_HYPOSPRAY (1<<0)
+#define UPGRADE_MEDICAL_CHEM_BOARD (1<<1)
+#define UPGRADE_MEDICAL_CRYO_BOARD (1<<2)
+#define UPGRADE_MEDICAL_CHEM_MASTER (1<<3)
+#define UPGRADE_MEDICAL_SLEEP_BOARD (1<<4)
+#define UPGRADE_MEDICAL_PIERERCING (1<<5)
+
+#define UPGRADE_FLOOR_ARTBOX (1<<0)
+#define UPGRADE_FLOOR_SYNDIBOX (1<<1)
//Checks to determine borg availability depending on the server's config. These are defines in the interest of reducing copypasta
#define BORG_SEC_AVAILABLE (!CONFIG_GET(flag/disable_secborg) && GLOB.security_level >= CONFIG_GET(number/minimum_secborg_alert))
diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
index adb49938e1..73099d8d9f 100644
--- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
@@ -20,9 +20,7 @@
weather_immunities = list("lava","ash")
var/clean_time = 50 //How long do we take to clean?
- var/broom = FALSE //Do we have an speed buff from a broom?
- var/adv_mop = FALSE //Do we have a cleaning buff from a better mop?
-
+ var/upgrades = 0
var/blood = 1
var/trash = 0
@@ -79,26 +77,38 @@
if(open)
to_chat(user, "Please close the access panel before locking it.")
else
- to_chat(user, "\The [src] doesn't seem to respect your authority.")
+ to_chat(user, "The [src] doesn't seem to respect your authority.")
- if(istype(W, /obj/item/mop/advanced))
- if(bot_core.allowed(user) && open && adv_mop == TRUE)
+ else if(istype(W, /obj/item/mop/advanced))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_CLEANER_ADVANCED_MOP))
to_chat(user, "You replace \the [src] old mop with a new better one!")
- adv_mop = TRUE
+ upgrades |= UPGRADE_CLEANER_ADVANCED_MOP
clean_time = 20 //2.5 the speed!
window_name = "Automatic Station Cleaner v2.1 BETA" //New!
qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannle is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
else
- to_chat(user, "\the [src] already has this mop!")
+ to_chat(user, "The [src] already has this mop!")
- if(istype(W, /obj/item/twohanded/broom))
- if(bot_core.allowed(user) && open && broom == TRUE)
+ else if(istype(W, /obj/item/twohanded/broom))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_CLEANER_BROOM))
to_chat(user, "You add to \the [src] a broom speeding it up!")
- broom = TRUE
+ upgrades |= UPGRADE_CLEANER_BROOM
base_speed = 1 //2x faster!
qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
else
- to_chat(user, "\the [src] already has a broom!")
+ to_chat(user, "The [src] already has a broom!")
else
return ..()
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm
index 1bf3883ea7..0f4608f48c 100644
--- a/code/modules/mob/living/simple_animal/bot/floorbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm
@@ -33,6 +33,8 @@
var/oldloc = null
var/toolbox = /obj/item/storage/toolbox/mechanical
+ var/upgrades = 0
+
#define HULL_BREACH 1
#define LINE_SPACE_MODE 2
#define FIX_TILE 3
@@ -120,6 +122,36 @@
to_chat(user, "You load [loaded] tiles into the floorbot. It now contains [specialtiles] tiles.")
else
to_chat(user, "You need at least one floor tile to put into [src]!")
+
+ else if(istype(W, /obj/item/storage/toolbox/artistic))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_FLOOR_ARTBOX))
+ to_chat(user, "You upgrade \the [src] case to hold more!")
+ upgrades |= UPGRADE_FLOOR_ARTBOX
+ maxtiles += 100 //Double the storage!
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannle is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has a upgraded case!")
+
+ else if(istype(W, /obj/item/storage/toolbox/syndicate))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_FLOOR_SYNDIBOX))
+ to_chat(user, "You upgrade \the [src] case to hold more!")
+ upgrades |= UPGRADE_FLOOR_SYNDIBOX
+ maxtiles += 200 //Double bse storage
+ base_speed = 1 //2x faster!
+ qdel(W)
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has a upgraded case!")
+
+
else
..()
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 3ea66679a2..7d93669c31 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -42,6 +42,7 @@
var/declare_crit = 1 //If active, the bot will transmit a critical patient alert to MedHUD users.
var/declare_cooldown = 0 //Prevents spam of critical patient alerts.
var/stationary_mode = 0 //If enabled, the Medibot will not move automatically.
+ var/injection_time = 30 //How long we take to inject someone
//Setting which reagents to use to treat what by default. By id.
var/treatment_brute_avoid = /datum/reagent/medicine/tricordrazine
var/treatment_brute = /datum/reagent/medicine/bicaridine
@@ -51,19 +52,25 @@
var/treatment_fire = /datum/reagent/medicine/kelotane
var/treatment_tox_avoid = /datum/reagent/medicine/tricordrazine
var/treatment_tox = /datum/reagent/medicine/charcoal
- var/treatment_tox_toxlover = /datum/reagent/toxin
+ var/treatment_tox_toxlover = /datum/reagent/toxin //Injects toxins into people that heal via toxins
var/treatment_virus_avoid = null
var/treatment_virus = /datum/reagent/medicine/spaceacillin
var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible.
var/shut_up = 0 //self explanatory :)
+ var/upgrades = 0
+ var/upgraded_dispenser_1 //Do we have the nicer chemicals? - replaces dex with salbutamol
+ var/upgraded_dispenser_2 //Do we have the nicer chemicals? - replaces kep with oxandrolone
+ var/upgraded_dispenser_3 //Do we have the nicer chemicals? - replaces bic with sal acid
+ var/upgraded_dispenser_4 //Do we have the nicer chemicals? - replaces charcoal/toxin with pentetic acid / pentetic jelly
+
/mob/living/simple_animal/bot/medbot/mysterious
name = "\improper Mysterious Medibot"
desc = "International Medibot of mystery."
skin = "bezerk"
- treatment_brute = /datum/reagent/medicine/tricordrazine
- treatment_fire = /datum/reagent/medicine/tricordrazine
- treatment_tox = /datum/reagent/medicine/tricordrazine
+ treatment_brute = /datum/reagent/medicine/regen_jelly
+ treatment_fire = /datum/reagent/medicine/regen_jelly
+ treatment_tox = /datum/reagent/medicine/regen_jelly
/mob/living/simple_animal/bot/medbot/derelict
name = "\improper Old Medibot"
@@ -220,7 +227,6 @@
/mob/living/simple_animal/bot/medbot/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/reagent_containers/glass))
- . = 1 //no afterattack
if(locked)
to_chat(user, "You cannot insert a beaker because the panel is locked!")
return
@@ -234,6 +240,97 @@
to_chat(user, "You insert [W].")
show_controls(user)
+ else if(istype(W, /obj/item/reagent_containers/syringe/piercing))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
+ to_chat(user, "You replace \the [src] syringe with a diamond-tipped one!")
+ upgrades |= UPGRADE_MEDICAL_PIERERCING
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has a diamond-tipped syringe!")
+
+ else if(istype(W, /obj/item/hypospray/mkii))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_HYPOSPRAY))
+ to_chat(user, "You replace \the [src] syringe base with a DeForest Medical MK.II Hypospray!")
+ upgrades |= UPGRADE_MEDICAL_HYPOSPRAY
+ injection_time = 15 //Half the time half the death!
+ window_name = "Automatic Medical Unit v2.4 ALPHA"
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has a DeForest Medical Hypospray base!")
+
+ else if(istype(W, /obj/item/circuitboard/machine/chem_dispenser))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CHEM_BOARD))
+ to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
+ upgrades |= UPGRADE_MEDICAL_CHEM_BOARD
+ treatment_oxy = /datum/reagent/medicine/salbutamol //Replaces Dex with salbutamol "better" healing of o2
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has this upgrade!")
+
+ else if(istype(W, /obj/item/circuitboard/machine/cryo_tube))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CRYO_BOARD))
+ to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
+ upgrades |= UPGRADE_MEDICAL_CRYO_BOARD
+ treatment_fire = /datum/reagent/medicine/oxandrolone //Replaces Kep with oxandrolone "better" healing of burns
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has this upgrade!")
+
+ else if(istype(W, /obj/item/circuitboard/machine/chem_master))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CHEM_MASTER))
+ to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
+ upgrades |= UPGRADE_MEDICAL_CHEM_MASTER
+ treatment_brute = /datum/reagent/medicine/sal_acid //Replaces Bic with Sal Acid "better" healing of brute
+ qdel(W)
+ if(!open)
+ to_chat(user, "the [src] access pannel is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "the [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "the [src] already has this upgrade!")
+
+ else if(istype(W, /obj/item/circuitboard/machine/sleeper))
+ if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_SLEEP_BOARD))
+ to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
+ upgrades |= UPGRADE_MEDICAL_SLEEP_BOARD
+ treatment_tox = /datum/reagent/medicine/pen_acid //replaces charcoal with pen acid a "better" healing of toxins
+ treatment_tox_toxlover = /datum/reagent/medicine/pen_acid/pen_jelly //Injects pen jelly into people that heal via toxins
+ qdel(W)
+ if(!open)
+ to_chat(user, "The [src] access pannle is not open!")
+ return
+ if(!bot_core.allowed(user))
+ to_chat(user, "The [src] access pannel locked off to you!")
+ return
+ else
+ to_chat(user, "The [src] already has this upgrade!")
+
else
var/current_health = health
..()
@@ -249,6 +346,8 @@
audible_message("[src] buzzes oddly!")
flick("medibot_spark", src)
playsound(src, "sparks", 75, 1)
+ if(!CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
+ upgrades |= UPGRADE_MEDICAL_PIERERCING //Jabs even harder through the clothing!
if(user)
oldpatient = user
@@ -361,7 +460,7 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
- if (H.wear_suit && H.head && istype(H.wear_suit, /obj/item/clothing) && istype(H.head, /obj/item/clothing))
+ if (H.wear_suit && H.head && istype(H.wear_suit, /obj/item/clothing) && istype(H.head, /obj/item/clothing) && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
var/obj/item/clothing/CS = H.wear_suit
var/obj/item/clothing/CH = H.head
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
@@ -504,7 +603,7 @@
"[src] is trying to inject you!")
var/failed = FALSE
- if(do_mob(src, patient, 30)) //Is C == patient? This is so confusing
+ if(do_mob(src, patient, injection_time)) //Is C == patient? This is so confusing
if((get_dist(src, patient) <= 1) && (on) && assess_patient(patient))
if(reagent_id == "internal_beaker")
if(use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
diff --git a/strings/tips.txt b/strings/tips.txt
index c8f233bb1a..0176420dd3 100644
--- a/strings/tips.txt
+++ b/strings/tips.txt
@@ -64,6 +64,7 @@ As a Roboticist, you can greatly help out Shaft Miners by building a Firefighter
As a Roboticist, you can augment people with cyborg limbs. Augmented limbs can easily be repaired with cables and welders.
As a Roboticist, you can use your printer that is linked to the ore silo to teleport mats into your work place!
As a Roboticist, you can upgrade cleanbots with adv mops and brooms to make them faster and better!
+As a Roboticist, you can upgrade medical bots with diamond-tipped syringes, MK.II Hypospray, dispenser-sleeper-chemheater boards to make them inject faster, harder and better chems!
As the AI, you can click on people's names to look at them. This only works if there are cameras that can see them.
As the AI, you can quickly open and close doors by holding shift while clicking them, bolt them when holding ctrl, and even shock them while holding alt.
As the AI, you can take pictures with your camera and upload them to newscasters.