AI Malfunction Update (#2193)

Incorporates many of the things from: https://forums.aurorastation.org/viewtopic.php?f=18&t=7845.
Added several new features to the Malf AI gamemode based on the thread above.
This commit is contained in:
Ron
2017-05-15 15:20:40 -04:00
committed by skull132
parent fd990dd06b
commit fa64b7cf7b
16 changed files with 731 additions and 131 deletions
+1 -31
View File
@@ -1,9 +1,4 @@
/**
* Multitool -- A multitool is used for hacking electronic devices.
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
*
*/
// used to debug malf AI apc's. Maybe in the future it can be used for computers.
/obj/item/device/debugger
name = "debugger"
desc = "Used to debug electronic equipment."
@@ -15,32 +10,7 @@
throwforce = 5.0
throw_range = 15
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
if(istype(O, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = O
if(A.emagged || A.hacker)
user << "<span class='warning'>There is a software error with the device.</span>"
else
user << "<span class='notice'>The device's software appears to be fine.</span>"
return 1
if(istype(O, /obj/machinery/door))
var/obj/machinery/door/D = O
if(D.operating == -1)
user << "<span class='warning'>There is a software error with the device.</span>"
else
user << "<span class='notice'>The device's software appears to be fine.</span>"
return 1
else if(istype(O, /obj/machinery))
var/obj/machinery/A = O
if(A.emagged)
user << "<span class='warning'>There is a software error with the device.</span>"
else
user << "<span class='notice'>The device's software appears to be fine.</span>"
return 1
+41
View File
@@ -0,0 +1,41 @@
// Malf AI RTF.
var/malftransformermade = 0
/obj/item/weapon/rtf
name = "\improper Rapid-Transformer-Fabricator"
desc = "A device used to deploy a transformer. It can only be used once and there can not be more than one made."
icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0.0
w_class = 3.0
/obj/item/weapon/rtf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(user,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
if(R.stat || !R.cell || R.cell.charge <= 0)
return
if(!istype(A, /turf/simulated/floor))
return
if(malftransformermade)
user << "There is already a transformer machine made!"
return
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
var/used_energy = 100
var/obj/product = new /obj/machinery/transformer
user << "Fabricating machine..."
if(do_after(user, 30 SECONDS, act_target = src))
malftransformermade = 1
product.loc = get_turf(A)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(R.cell)
R.cell.use(used_energy)