mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
Mining Drone Tweaks (#8262)
This commit is contained in:
@@ -32,13 +32,13 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Class D Kinetic Accelerator", /obj/item/gun/custom_ka/frame02/prebuilt, 12, 400),
|
||||
new /datum/data/mining_equipment("Autochisel", /obj/item/autochisel, 10, 400),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/tank/jetpack, 10, 400),
|
||||
new /datum/data/mining_equipment("Drone Drill Upgrade", /obj/item/device/mine_bot_ugprade, 10, 400),
|
||||
new /datum/data/mining_equipment("Drone Drill Upgrade", /obj/item/device/mine_bot_upgrade, 10, 400),
|
||||
new /datum/data/mining_equipment("Industrial Drill Brace", /obj/machinery/mining/brace, -1, 500, 1),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/card/mining_point_card, -1, 500),
|
||||
new /datum/data/mining_equipment("Explorer's Belt", /obj/item/storage/belt/mining, 10, 500),
|
||||
new /datum/data/mining_equipment("Item-Warp Beacon", /obj/item/warp_core, 25, 500),
|
||||
new /datum/data/mining_equipment("Item-Warp Pack", /obj/item/extraction_pack, 25, 600),
|
||||
new /datum/data/mining_equipment("Drone Health Upgrade", /obj/item/device/mine_bot_ugprade/health, 20, 600),
|
||||
new /datum/data/mining_equipment("Drone Health Upgrade", /obj/item/device/mine_bot_upgrade/health, 20, 600),
|
||||
new /datum/data/mining_equipment("RFD M-Class", /obj/item/rfd/mining, 10, 600),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 30, 600),
|
||||
new /datum/data/mining_equipment("Ore Magnet", /obj/item/oremagnet, 10, 600),
|
||||
@@ -49,7 +49,7 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Mass Driver", /obj/item/mass_driver_diy, 5, 800),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/silicon/robot/drone/mining, 15, 800),
|
||||
new /datum/data/mining_equipment("Minecart Engine", /obj/vehicle/train/cargo/engine/mining, -1, 800, 1),
|
||||
new /datum/data/mining_equipment("Drone KA Upgrade", /obj/item/device/mine_bot_ugprade/ka, 10, 800),
|
||||
new /datum/data/mining_equipment("Drone KA Upgrade", /obj/item/device/mine_bot_upgrade/ka, 10, 800),
|
||||
new /datum/data/mining_equipment("Ore Summoner", /obj/item/oreportal, 35, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/lazarus_injector, 25, 1000),
|
||||
new /datum/data/mining_equipment("Industrial Drill Head", /obj/machinery/mining/drill, -1, 1000, 1),
|
||||
|
||||
+57
-121
@@ -17,38 +17,42 @@
|
||||
/mob/living/silicon/robot/drone/mining/Initialize()
|
||||
. = ..()
|
||||
|
||||
verbs += /mob/living/proc/hide
|
||||
remove_language("Robot Talk")
|
||||
add_language("Drone Talk", 1)
|
||||
verbs |= /mob/living/proc/hide
|
||||
remove_language(LANGUAGE_ROBOT)
|
||||
remove_language(LANGUAGE_DRONE)
|
||||
add_language(LANGUAGE_TCB, TRUE)
|
||||
add_language(LANGUAGE_EAL, TRUE)
|
||||
|
||||
//They are unable to be upgraded, so let's give them a bit of a better battery.
|
||||
cell.maxcharge = 10000
|
||||
cell.charge = 10000
|
||||
|
||||
// NO BRAIN.
|
||||
mmi = null
|
||||
mmi = /obj/item/organ/internal/mmi_holder/circuit
|
||||
|
||||
// Allows mining drones to pull ore boxes, might be useful for supporting miners
|
||||
pull_list |= /obj/structure/ore_box
|
||||
|
||||
//We need to screw with their HP a bit. They have around one fifth as much HP as a full borg.
|
||||
for(var/V in components) if(V != "power cell")
|
||||
var/datum/robot_component/C = components[V]
|
||||
C.max_damage = 15
|
||||
for(var/V in components)
|
||||
if(V != "power cell")
|
||||
var/datum/robot_component/C = components[V]
|
||||
C.max_damage = 15
|
||||
|
||||
verbs -= /mob/living/silicon/robot/verb/Namepick
|
||||
verbs -= /mob/living/silicon/robot/drone/verb/set_mail_tag
|
||||
updateicon()
|
||||
density = 0
|
||||
density = FALSE
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/updatename()
|
||||
real_name = "NT-I-[rand(100,999)]"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/init()
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
|
||||
additional_law_channels["Drone"] = ":d"
|
||||
if(!laws) laws = new law_type
|
||||
if(!module) module = new module_type(src)
|
||||
if(!jetpack)
|
||||
jetpack = new /obj/item/tank/jetpack/carbondioxide/synthetic(src)
|
||||
aiCamera = new /obj/item/device/camera/siliconcam/drone_camera(src)
|
||||
if(!laws)
|
||||
laws = new law_type
|
||||
if(!module)
|
||||
module = new module_type(src)
|
||||
|
||||
flavor_text = "It's a tiny little mining drone. The casing is stamped with an corporate logo and the subscript: '[current_map.company_name] Automated Pickaxe!'"
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
@@ -60,126 +64,57 @@
|
||||
G.request_player(src, "Someone is attempting to reboot a mining drone.", 30 SECONDS)
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/welcome_drone()
|
||||
to_chat(src, "<b>You are a mining drone, a tiny-brained robotic industrial machine</b>.")
|
||||
to_chat(src, "You have little individual will, some personality, and no drives or urges other than your laws and the art of mining.")
|
||||
to_chat(src, "Remember, <b>you DO NOT take orders from the AI.</b>")
|
||||
to_chat(src, "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows.")
|
||||
to_chat(src, span("danger", "<b>You are a mining drone, a tiny-brained robotic industrial machine</b>."))
|
||||
to_chat(src, span("danger", "You have little individual will, some personality, and no drives or urges other than your laws and the art of mining."))
|
||||
to_chat(src, span("danger", "Remember, <b>you DO NOT take orders from the AI.</b>"))
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
if(istype(W, /obj/item/borg/upgrade/))
|
||||
to_chat(user, "<span class='danger'>\The [src] is not compatible with \the [W].</span>")
|
||||
/mob/living/silicon/robot/drone/mining/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/borg/upgrade))
|
||||
to_chat(user, span("warning", "\The [src] is not compatible with \the [W]."))
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
|
||||
|
||||
var/choice = input("Select your choice.") in list("Reboot","Recycle")
|
||||
if(choice=="Reboot")
|
||||
|
||||
if(!config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
|
||||
to_chat(user, "<span class='danger'>The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.</span>")
|
||||
return
|
||||
|
||||
if(!allowed(usr))
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] swipes \his ID card through \the [src], attempting to reboot it.</span>", "<span class='danger'>>You swipe your ID card through \the [src], attempting to reboot it.</span>")
|
||||
request_player()
|
||||
else if (istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(!allowed(user))
|
||||
to_chat(user, span("warning", "Access denied."))
|
||||
return
|
||||
|
||||
else
|
||||
var/obj/item/card/id/ID = W
|
||||
if(!allowed(usr))
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] swipes \his ID card through \the [src], recycling it into points.</span>", "<span class='danger'>>You swipe your ID card through \the [src], recycling it into points.</span>")
|
||||
ID.mining_points += 800
|
||||
if(health_upgrade)
|
||||
ID.mining_points += 600
|
||||
health_upgrade = 0
|
||||
if(ranged_upgrade)
|
||||
ID.mining_points += 600
|
||||
ranged_upgrade = 0
|
||||
if(melee_upgrade)
|
||||
ID.mining_points += 400
|
||||
melee_upgrade = 0
|
||||
if(drill_upgrade)
|
||||
ID.mining_points += 2000
|
||||
drill_upgrade = 0
|
||||
qdel(src)
|
||||
if(!config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
|
||||
to_chat(user, span("warning", "The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one."))
|
||||
return
|
||||
|
||||
user.visible_message(span("warning", "\The [user] swipes \his ID card through \the [src], attempting to reboot it."), span("warning", "You swipe your ID card through \the [src], attempting to reboot it."))
|
||||
request_player()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/verb/print_report()
|
||||
set name = "Print Message"
|
||||
set desc = "Print out a status report of your own choosing."
|
||||
set category = "Robot Commands"
|
||||
|
||||
var/input = sanitize(input(usr, "Please enter a message to print out. NOTE: BBCode does not work.", "Print readout", "") as message|null)
|
||||
if (!input)
|
||||
to_chat(usr, "<span class='warning'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
var/customname = input(usr, "Pick a title for the report", "Title") as text|null
|
||||
if (!customname)
|
||||
to_chat(usr, "<span class='warning'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
var/status_report
|
||||
switch(src.health)
|
||||
if((maxHealth - (maxHealth/3)) to maxHealth)
|
||||
status_report = "All systems nominal."
|
||||
if((maxHealth/3) to maxHealth/2)
|
||||
status_report = "Systems compromised."
|
||||
if(0 to (maxHealth/3))
|
||||
status_report = "Systems failing."
|
||||
else
|
||||
status_report = "System status unknown."
|
||||
|
||||
// Create the reply message
|
||||
to_chat(usr, "<span class='warning'>You begin printing the message.</span>")
|
||||
if(do_after(src,20))
|
||||
var/obj/item/paper/P = new /obj/item/paper(src.loc)
|
||||
P.name = "mining report - [customname]"
|
||||
P.info = {"<center><img src = ntlogo.png></center>
|
||||
<center><b><i>NanoTrasen Mining Drone Report</b></i><br>
|
||||
<font size = \"1\">FOR YOUR EYES ONLY</font><hr><br>
|
||||
<font size = \"1\"><font face='Courier New'>[input]</font></font><hr>
|
||||
<font size = \"1\">[status_report]</font><br>
|
||||
<center><img src = barcode[rand(0, 3)].png></center></center>"}
|
||||
P.update_icon()
|
||||
visible_message("\icon[src] <span class = 'notice'>The [usr] pings, \"[P.name] ready for review\", and happily disgorges a small printout.</span>", range = 2)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/process_level_restrictions()
|
||||
//Abort if they should not get blown
|
||||
if (lockcharge || scrambledcodes || emagged)
|
||||
if(lockcharge || scrambledcodes || emagged)
|
||||
return
|
||||
//Check if they are not on a station level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || isStationLevel(T.z))
|
||||
return
|
||||
to_chat(src,"WARNING: Removal from NanoTrasen property detected. Anti-Theft mode activated.")
|
||||
to_chat(src, span("danger", "WARNING: Removal from NanoTrasen property detected. Anti-Theft mode activated."))
|
||||
gib()
|
||||
|
||||
/**********************Minebot Upgrades**********************/
|
||||
|
||||
/obj/item/device/mine_bot_ugprade
|
||||
/obj/item/device/mine_bot_upgrade
|
||||
name = "minebot drill upgrade"
|
||||
desc = "A minebot upgrade."
|
||||
icon_state = "mainboard"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/afterattack(var/mob/living/silicon/robot/drone/mining/M, mob/user, proximity)
|
||||
/obj/item/device/mine_bot_upgrade/afterattack(var/mob/living/silicon/robot/drone/mining/M, mob/user, proximity)
|
||||
if(!istype(M) || !proximity)
|
||||
return
|
||||
upgrade_bot(M, user)
|
||||
if(upgrade_bot(M, user))
|
||||
to_chat(user, span("notice", "You successfully install \the [src] into \the [M]."))
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/proc/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
/obj/item/device/mine_bot_upgrade/proc/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.melee_upgrade)
|
||||
to_chat(user, "[src] already has a drill upgrade installed!")
|
||||
to_chat(user, span("warning", "[src] already has a drill upgrade installed!"))
|
||||
return
|
||||
M.modtype = initial(M.modtype)
|
||||
M.uneq_all()
|
||||
@@ -189,31 +124,33 @@
|
||||
new /obj/item/robot_module/mining_drone/drillandka(M)
|
||||
else
|
||||
new /obj/item/robot_module/mining_drone/drill(M)
|
||||
M.melee_upgrade = TRUE
|
||||
M.module.rebuild()
|
||||
M.recalculate_synth_capacities()
|
||||
if(!M.jetpack)
|
||||
M.jetpack = new /obj/item/tank/jetpack/carbondioxide/synthetic(src)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health
|
||||
/obj/item/device/mine_bot_upgrade/health
|
||||
name = "minebot chassis upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
/obj/item/device/mine_bot_upgrade/health/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.health_upgrade)
|
||||
to_chat(user, "[src] already has a reinforced chassis!")
|
||||
to_chat(user, span("warning", "[src] already has a reinforced chassis!"))
|
||||
return
|
||||
M.maxHealth = 100
|
||||
M.health += 55
|
||||
for(var/V in M.components) if(V != "power cell")
|
||||
var/datum/robot_component/C = M.components[V]
|
||||
C.max_damage = 30
|
||||
M.health_upgrade = 1
|
||||
for(var/V in M.components)
|
||||
if(V != "power cell")
|
||||
var/datum/robot_component/C = M.components[V]
|
||||
C.max_damage = 30
|
||||
M.health_upgrade = TRUE
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/ka
|
||||
/obj/item/device/mine_bot_upgrade/ka
|
||||
name = "minebot kinetic accelerator upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/ka/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
/obj/item/device/mine_bot_upgrade/ka/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.ranged_upgrade)
|
||||
to_chat(user, "[src] already has a KA upgrade installed!")
|
||||
return
|
||||
@@ -225,9 +162,8 @@
|
||||
new /obj/item/robot_module/mining_drone/drillandka(M)
|
||||
else
|
||||
new /obj/item/robot_module/mining_drone/ka(M)
|
||||
M.ranged_upgrade = 1
|
||||
M.ranged_upgrade = TRUE
|
||||
M.module.rebuild()
|
||||
M.recalculate_synth_capacities()
|
||||
if(!M.jetpack)
|
||||
M.jetpack = new /obj/item/tank/jetpack/carbondioxide/synthetic(src)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user