mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-07 23:42:44 +00:00
Fikou said they would've made MODsuits be controllable by pAI's rather than AI's, if pAI code wasn't as bad. But pAI code ISN'T AS BAD AS AI CODE LIKE HOLY SHIT WHAT THE FUCK MAN??? Anyways, this is just general code improvements for pAIs that I thought would be nice to have. Documents previously undocumented vars Moves loose vars to be where they should be Removes single-letter variables Makes pAI a defined job Moves vars around to where they should be while removing unused ones. Makes pAI abilities its own .dm file Replaces var/silent with Stun() (like cyborgs) Reworks pAI's doorjack to not have a ton of procs, copy paste, and a reliance on Life(), instead it just uses a do_after() Moves screwdrivering radios from attackby to screwdriver_act Just general code improvement for Silicon, the thing no one likes or wants to touch.
19 lines
663 B
Plaintext
19 lines
663 B
Plaintext
/obj/item/pai_cable
|
|
desc = "A flexible coated cable with a universal jack on one end."
|
|
name = "data cable"
|
|
icon = 'icons/obj/power.dmi'
|
|
icon_state = "wire1"
|
|
item_flags = NOBLUDGEON
|
|
var/obj/machinery/machine //what machine we're currently hacking.
|
|
|
|
/obj/item/pai_cable/Destroy()
|
|
machine = null
|
|
return ..()
|
|
|
|
|
|
/obj/item/pai_cable/proc/plugin(obj/machinery/M, mob/living/user)
|
|
if(!user.transferItemToLoc(src, M))
|
|
return
|
|
user.visible_message(span_notice("[user] inserts [src] into a data port on [M]."), span_notice("You insert [src] into a data port on [M]."), span_hear("You hear the satisfying click of a wire jack fastening into place."))
|
|
machine = M
|