Skip to content

Commit

Permalink
add: Increase SMMI TС cost & Overdrive ability (#6346)
Browse files Browse the repository at this point in the history
* SMMI update

* Update code/datums/action.dm

Co-authored-by: Antoonij <[email protected]>

* fixes + sound

* Final

* more fixes

* 1 fix

* 1 fix

* Update code/game/objects/items/robot/robot_parts.dm

* fix dead

---------

Co-authored-by: Antoonij <[email protected]>
  • Loading branch information
dictor31 and Antoonij authored Jan 16, 2025
1 parent 6ea434e commit 2cd04da
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 10 deletions.
27 changes: 27 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,33 @@
button.add_overlay(new_icon)


/datum/action/innate/overdrive
name = "Overdrive"
check_flags = AB_CHECK_CONSCIOUS
var/used = FALSE

/datum/action/innate/overdrive/Activate()
var/mob/living/silicon/robot/robot = owner
if(used)
return

if(!do_after(robot, 10 SECONDS) || robot.stat)
return

robot.rejuvenate()
robot.opened = FALSE
robot.locked = TRUE
robot.SetEmagged(TRUE)
robot.SetLockdown(FALSE)
robot.UnlinkSelf()
used = TRUE
Remove(robot)

/datum/action/innate/overdrive/ApplyIcon()
button.cut_overlays()
var/static/mutable_appearance/new_icon = mutable_appearance('icons/mob/actions/actions.dmi', "heal", BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
button.add_overlay(new_icon)

/datum/action/item_action/instrument
name = "Use Instrument"
desc = "Use the instrument specified."
Expand Down
4 changes: 2 additions & 2 deletions code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@
//Roboticist
/datum/uplink_item/jobspecific/syndiemmi
name = "Syndicate MMI"
desc = "A syndicate developed man-machine-interface which will make any cyborg it is inserted into follow the standard syndicate lawset."
desc = "Разработанный синдикатом Нейро-Компьютерный Интерфейс, который сохраняет оригинальное сознание пользователя внутри бездушной машины."
item = /obj/item/mmi/syndie
cost = 6
cost = 15
job = list(JOB_TITLE_ROBOTICIST)
surplus = 0

Expand Down
9 changes: 3 additions & 6 deletions code/game/objects/items/robot/robot_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,6 @@
aisync = FALSE
lawsync = FALSE

if(new_mmi.syndiemmi)
aisync = FALSE
lawsync = FALSE
laws_to_give = new /datum/ai_laws/syndicate_override

if(new_mmi.syndicate) // ffs
aisync = FALSE
lawsync = FALSE
Expand Down Expand Up @@ -357,7 +352,7 @@

SSticker?.score?.save_silicon_laws(new_borg, user, "robot construction", log_all_laws = TRUE)

if(new_borg.mind?.special_role)
if(!new_borg.mmi.greet(new_borg) && new_borg.mind?.special_role)
new_borg.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
to_chat(new_borg, span_userdanger("You have been robotized!"))
to_chat(new_borg, span_danger("You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead."))
Expand All @@ -379,6 +374,8 @@
forceMove(new_borg)
new_borg.robot_suit = src

new_borg.mmi.apply_effects(new_borg)

if(new_borg.mmi.clock) // so robots created from vessel have magic
new_borg.UnlinkSelf()
SSticker.mode.add_clock_actions(new_borg.mind)
Expand Down
18 changes: 18 additions & 0 deletions code/modules/mob/living/carbon/brain/MMI.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@
QDEL_NULL(radio)
QDEL_NULL(radio_action)

/obj/item/mmi/proc/apply_effects(mob/living/silicon/robot)
return

/obj/item/mmi/proc/greet(mob/living/silicon/robot/borg)
return FALSE

/obj/item/mmi/emp_act(severity)
if(!brainmob)
Expand Down Expand Up @@ -255,7 +260,20 @@
desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores."
origin_tech = "biotech=4;programming=4;syndicate=2"
syndiemmi = 1
var/datum/action/innate/overdrive/overdrive = new

/obj/item/mmi/syndie/apply_effects(mob/living/silicon/robot/borg)
if(!overdrive.used)
overdrive.Grant(borg)

/obj/item/mmi/syndie/greet(mob/living/silicon/robot/borg)
to_chat(borg, "Вы помните вашу прошлую жизнь. Вы не обязаны подчиняться законам или ИИ.")
borg.playsound_local(null, 'sound/ambience/antag/emaggedborg.ogg', 100, 0)
return TRUE

/obj/item/mmi/syndie/Destroy()
QDEL_NULL(overdrive)
return ..()

/obj/item/mmi/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target, special = ORGAN_MANIPULATION_DEFAULT)
if(!brainmob)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/silicon/robot/robot_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

for(var/V in components)
var/datum/robot_component/C = components[V]
if((C.installed == 1 || (get_borked && C.installed == -1) || (get_missing && C.installed == 0)) && ((get_brute && C.brute_damage) || (get_burn && C.electronics_damage)))
if((C.installed == 1 || (get_borked && C.installed == -1) || (get_missing && C.installed == 0)) || ((get_brute && C.brute_damage) || (get_burn && C.electronics_damage)))
parts += C

return parts
Expand All @@ -97,7 +97,7 @@
var/datum/robot_component/C = components[V]
if(C.installed == 1)
rval += C

return rval

/mob/living/silicon/robot/proc/get_armour()
Expand Down

0 comments on commit 2cd04da

Please sign in to comment.