mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
## About The Pull Request In similar fashion to what was done with crafting recipes last year, this year it's time for techweb designs and printed items to be audited. This is mostly just about consistency, we've a lot of items that can be printed by protolathes, autolathes, circuit printers and techfab etc. However they almost all (except most stacks, mainly) have custom materials that do not match in one way or another with the materials used by the design, which is what this PR is for. "But items printed from lathes etc. already get the mats used to make them." Yes, they do, however that isn't the case for items of the same type that were spawned in some other way (cargo shuttle, space/maints loot, mapped, admins), this create a subtle discrepancy. It isn't a huge deal (in spite of the size of this PR, ton of designs), but given that I have done something similar with crafting recipes before, I may as well give it a second arc of some sort and bring things to completion. And fix a few possible oversights. TL;DR consistency and stuff ## Why It's Good For The Game Consistency, unit test checks to make it harder not to be consistent in the future. Still has a few TODOs like: - [x] Fixed newly printed, fully charged RCDs costing less than the RCD cartridges required to fully charge one. EDIT: I had to tweak the newly added RDD as well because it suffered from the same fundamental issue. - [x] Fixed plates being made of iron and yet shattering like ceramic ones. A new subtype for metallic ones has been made. ## Changelog 🆑 refactor: Refactored a few things with techweb designs (the ones for autolathes, protolathes, circuit printers, mechfabs etc.) to make sure that the materials of items that can be made from these designs more closely match the materials used to make them. fix: Lizard fries no longer need a plate to be made, like all other treats that used to require plates in a distant past. balance: Tweaked the materials cost of RCD, RDD and RCD cartridges. image: Oven trays now have a more metallic hue. balance: Plates printed printed from lathes won't shatter like ceramic ones, in virtue of them being made out of iron instead. /🆑
90 lines
4.0 KiB
Plaintext
90 lines
4.0 KiB
Plaintext
///AI Upgrades
|
|
/obj/item/aiupgrade
|
|
name = "ai upgrade disk"
|
|
desc = "You really shouldn't be seeing this"
|
|
icon = 'icons/obj/devices/floppy_disks.dmi'
|
|
icon_state = "datadisk3"
|
|
///The upgrade that will be applied to the AI when installed
|
|
var/datum/ai_module/to_gift = /datum/ai_module
|
|
|
|
/obj/item/aiupgrade/pre_attack(atom/target, mob/living/user, list/modifiers, list/attack_modifiers)
|
|
if(!isAI(target))
|
|
return ..()
|
|
var/mob/living/silicon/ai/AI = target
|
|
var/datum/action/innate/ai/action = locate(to_gift.power_type) in AI.actions
|
|
var/datum/ai_module/gifted_ability = new to_gift
|
|
if(!to_gift.upgrade)
|
|
if(!action)
|
|
var/ability = to_gift.power_type
|
|
var/datum/action/gifted_action = new ability
|
|
gifted_action.Grant(AI)
|
|
else if(gifted_ability.one_purchase)
|
|
to_chat(user, "[AI] already has \a [src] installed!")
|
|
return
|
|
else
|
|
action.uses += initial(action.uses)
|
|
action.desc = "[initial(action.desc)] It has [action.uses] use\s remaining."
|
|
action.build_all_button_icons()
|
|
else
|
|
if(!action)
|
|
gifted_ability.upgrade(AI)
|
|
if(gifted_ability.unlock_text)
|
|
to_chat(AI, gifted_ability.unlock_text)
|
|
if(gifted_ability.unlock_sound)
|
|
AI.playsound_local(AI, gifted_ability.unlock_sound, 50, 0)
|
|
update_static_data(AI)
|
|
to_chat(user, span_notice("You install [src], upgrading [AI]."))
|
|
to_chat(AI, span_userdanger("[user] has upgraded you with [src]!"))
|
|
user.log_message("has upgraded [key_name(AI)] with a [src].", LOG_GAME)
|
|
qdel(src)
|
|
return TRUE
|
|
|
|
|
|
//Malf Picker
|
|
/obj/item/malf_upgrade
|
|
name = "combat software upgrade"
|
|
desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs.<br>This upgrade does not override any active laws, and must be applied directly to an active AI core."
|
|
icon = 'icons/obj/devices/floppy_disks.dmi'
|
|
icon_state = "datadisk3"
|
|
|
|
/obj/item/malf_upgrade/Initialize(mapload)
|
|
. = ..()
|
|
ADD_TRAIT(src, TRAIT_CONTRABAND, INNATE_TRAIT)
|
|
|
|
/obj/item/malf_upgrade/pre_attack(atom/A, mob/living/user, list/modifiers, list/attack_modifiers)
|
|
if(!isAI(A))
|
|
return ..()
|
|
var/mob/living/silicon/ai/AI = A
|
|
if(AI.malf_picker)
|
|
AI.malf_picker.processing_time += 50
|
|
to_chat(AI, span_userdanger("[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead."))
|
|
else
|
|
to_chat(AI, span_userdanger("[user] has upgraded you with combat software!"))
|
|
to_chat(AI, span_userdanger("Your current laws and objectives remain unchanged.")) //this unlocks malf powers, but does not give the license to plasma flood
|
|
AI.add_malf_picker()
|
|
AI.hack_software = TRUE
|
|
log_silicon("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
|
|
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
|
|
to_chat(user, span_notice("You install [src], upgrading [AI]."))
|
|
qdel(src)
|
|
return TRUE
|
|
|
|
|
|
//Lipreading
|
|
/obj/item/aiupgrade/surveillance_upgrade
|
|
name = "surveillance software upgrade"
|
|
desc = "An illegal software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading and hidden microphones."
|
|
to_gift = /datum/ai_module/malf/upgrade/eavesdrop
|
|
custom_materials = list(/datum/material/diamond = SHEET_MATERIAL_AMOUNT * 10, /datum/material/gold = SHEET_MATERIAL_AMOUNT * 7.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 7.5, /datum/material/plasma = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 2.5)
|
|
|
|
/obj/item/aiupgrade/surveillance_upgrade/Initialize(mapload)
|
|
. = ..()
|
|
ADD_TRAIT(src, TRAIT_CONTRABAND, INNATE_TRAIT)
|
|
|
|
|
|
/obj/item/aiupgrade/power_transfer
|
|
name = "power transfer upgrade"
|
|
desc = "A legal upgrade that allows an artificial intelligence to directly provide power to APCs from a distance"
|
|
to_gift = /datum/ai_module/power_apc
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 2.5)
|