Files
Aurora.3/code/modules/modular_computers/hardware/ai_slot.dm
Alberyk 76b743a986 Adds the Aut'akh unathi (#5919)
* Base work for the unathi robot subspecies.

* Adds metabolism species, kidney vars, and the robot unathi organs.

* Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here.

* First autakh implant power.

* Fixes the organs action button this time.

* Finishes more implants, and interactions with flashs and vaurca.

* Prepare for great changes.

* Drops the real bomb, boss.

* He who fights with monsters.

* Far more work into augments and limb removing powers.

* Limb verbs should be good now.

* A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case.

* Probably the last work on implants.

* Some extra touches.

* Some tweaks to the species.

* More fixes and adds kyre's sprites.

* More runtime fixes.

* Fixes the species name too.

* Fixes travis.

* Updates this file too to work with the new tools procs.

* Adds changelog

* Fixed changelog.

* Unathi hair and lore description.

* Some tweaks to this too.

* Locks away them for now, they will be released after we got all the events and etc done.

* Changes this chemical.

* Fixes an airlock runtime.

* Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning.

* Organs removal changes; can't take out the organ if it is too damage.

* Restricts them back again.

* Robotic organs now have the proper icons and names.

* Adds sprites for their organs and some extra tweaks.

* Fixes this missing icon.

* emp should also now hurt assited organs.

* Tweaks more organ related things.

* Fixes the head not being properly set as well.

* Fixes their flags.

* fixes the flag for real this time.

* Poze's review.

* Changes the au'takh organ buttons to don't be animated.

* Helps with adminbus or something.

* Fowl's requested changes.

* Fixes a typo.

* Robotic limb's brute and burn mods are now controlled by the limb model.

* Fowl's changes once more.

* Stops some spam.

* More grammar.

* No eal.

* Skull's review.
2019-01-23 19:27:44 +01:00

43 lines
1.4 KiB
Plaintext

// A wrapper that allows the computer to contain an intellicard.
/obj/item/weapon/computer_hardware/ai_slot
name = "intellicard slot"
desc = "An IIS interlink with connection uplinks that allow the device to interface with most common intellicard models. Too large to fit into tablets. Uses a lot of power when active."
icon_state = "aislot"
hardware_size = 2
critical = 0
power_usage = 100
origin_tech = list(TECH_POWER = 2, TECH_DATA = 3)
var/obj/item/weapon/aicard/stored_card
var/power_usage_idle = 100
var/power_usage_occupied = 2 KILOWATTS
/obj/item/weapon/computer_hardware/ai_slot/proc/update_power_usage()
if(!stored_card || !stored_card.carded_ai)
power_usage = power_usage_idle
return
power_usage = power_usage_occupied
/obj/item/weapon/computer_hardware/ai_slot/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(..())
return 1
if(istype(W, /obj/item/weapon/aicard))
if(stored_card)
user << "\The [src] is already occupied."
return
user.drop_from_inventory(W,src)
stored_card = W
update_power_usage()
if(W.isscrewdriver())
user << "You manually remove \the [stored_card] from \the [src]."
stored_card.forceMove(get_turf(src))
stored_card = null
update_power_usage()
/obj/item/weapon/computer_hardware/ai_slot/Destroy()
if(holder2 && (holder2.ai_slot == src))
holder2.ai_slot = null
if(stored_card)
stored_card.forceMove(get_turf(holder2))
holder2 = null
return ..()