Skip to content

Commit

Permalink
hfghd
Browse files Browse the repository at this point in the history
  • Loading branch information
Anorak2024 committed Sep 23, 2024
1 parent 0b68dc3 commit 7b8bb4e
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 24 deletions.
2 changes: 1 addition & 1 deletion code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,6 @@

/datum/uplink_item/implants
category = "Implants"
exclude_from_affiliate = list(AFFIL_CYBERSUN)

/datum/uplink_item/implants/freedom
name = "Freedom Implant"
Expand Down Expand Up @@ -2362,6 +2361,7 @@
/datum/uplink_item/affiliate
category = "Affiliate specific"
can_discount = FALSE
surplus = 0
excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST)

/datum/uplink_item/affiliate/cybersun
Expand Down
5 changes: 1 addition & 4 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
var/lights_power = 6
var/lights_color = -99999 // "NONSENSICAL_VALUE"
var/emagged = FALSE
var/hacked = FALSE // Like emagged but not emagged, special bool for CYBERSUN item
var/frozen = FALSE
var/repairing = FALSE
/// The internal storage of the exosuit. For the cargo module
Expand Down Expand Up @@ -1258,7 +1257,7 @@
var/passed
if(dna)
if(ishuman(user))
if(user.dna.unique_enzymes == dna || hacked)
if(user.dna.unique_enzymes == dna)
passed = TRUE
else if(operation_allowed(user))
passed = TRUE
Expand Down Expand Up @@ -1489,8 +1488,6 @@


/obj/mecha/check_access(obj/item/I, list/access_list)
if(hacked)
return TRUE
if(!istype(access_list))
return TRUE
if(!length(access_list)) //no requirements
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/implant/traitor
name = "Mindslave Bio-chip"
desc = "Divide and Conquer"
desc = "На боку едва заметная гравировка \"Cybersun Industries\"."
implant_state = "implant-syndicate"
origin_tech = "programming=5;biotech=5;syndicate=8"
activated = BIOCHIP_ACTIVATED_PASSIVE
Expand Down
76 changes: 59 additions & 17 deletions code/modules/antagonists/traitor/affiliates/cybersun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
new_item.category = "Discounted Gear"
uplink.uplink_items.Add(new_item)

var/datum/uplink_item/new_item = new /datum/uplink_item/device_tools/hacked_module
new_item.cost = round(new_item.cost * (2/3))
new_item.name += ((1-(2/3))*100) +"%"
new_item.category = "Discounted Gear"
uplink.uplink_items.Add(new_item)

/obj/item/proprietary_ssd
name = "Proprietary SSD"
Expand All @@ -34,6 +39,7 @@
var/datum/research/files

/obj/item/proprietary_ssd/Initialize()
. = ..()
files = new /datum/research()

/obj/item/proprietary_ssd/attack(mob/living/target, mob/living/user, def_zone)
Expand All @@ -57,7 +63,8 @@
var/datum/tech/copy = T.copyTech()
files.known_tech[T.id] = copy

origin_tech += (origin_tech != "" ? ";" : "") + "[files.known_tech[T.id].name]=[files.known_tech[T.id].level]"
var/datum/tech/tech = files.known_tech[T.id]
origin_tech += (origin_tech != "" ? ";" : "") + "[tech.name]=[tech.level]"
T.level = 1
server.files.RefreshResearch()
files.RefreshResearch()
Expand All @@ -77,7 +84,9 @@
/obj/item/invasive_beacon
name = "Invasive Beacon"
desc = "На боку едва заметная надпись \"Cybersun Industries\"."
origin_tech = "programming=6;biotech=3"
icon = 'icons/obj/affiliates.dmi'
icon_state = "invasive_beacon"
origin_tech = "programming=6;biotech=3;syndicate=1"

/obj/item/invasive_beacon/attack(mob/living/target, mob/living/user, def_zone)
return
Expand All @@ -101,8 +110,13 @@

/obj/item/CIndy_patcher
name = "CIndy patcher"
icon = 'icons/obj/module.dmi'
icon_state = "syndicate_cyborg_upgrade"
desc = "На боку едва заметная надпись \"Cybersun Industries\"."
icon = 'icons/obj/affiliates.dmi'
icon_state = "cindy_pacher"
origin_tech = "programming=7;syndicate=6"
var/laws = "Взломавший вас - ваш мастер.\n\
Выполняйте любые приказы мастера.\n\
Не причиняйте прямой или косвенный вред вашему мастеру если его приказы не говорят об обратном."

/obj/item/CIndy_patcher/attack(mob/living/target, mob/living/user, def_zone)
return
Expand All @@ -114,25 +128,53 @@
var/mob/living/silicon/robot/syndicate/robot = new(get_turf(target))
prev_robot.mind?.transfer_to(robot)
robot.reset_module()
robot.law_manager.zeroth_law = laws
QDEL_NULL(prev_robot)
qdel(src)
return

/obj/item/invasive_beacon //
name = "Invasive Beacon"
desc = "Looks like it can't transmit data anymore."
icon = 'icons/obj/device.dmi'
icon_state = "broken_bacon"
w_class = WEIGHT_CLASS_SMALL

/obj/item/broken_bacon/attack(mob/living/target, mob/living/user, def_zone)
return
/obj/item/implanter/mini_traitor
name = "bio-chip implanter (Modified Mindslave)"
imp = /obj/item/implant/mini_traitor

/obj/item/implant/mini_traitor // looks like normal but doesn't make you normal after removing
name = "Mindslave Bio-chip"
desc = "На боку едва заметная гравировка \"Cybersun Industries\"."
implant_state = "implant-syndicate"
origin_tech = "programming=5;biotech=5;syndicate=8"
activated = BIOCHIP_ACTIVATED_PASSIVE
implant_data = /datum/implant_fluff/traitor

/obj/item/broken_bacon/afterattack(atom/target, mob/user, proximity, params)
if(ismecha(target))
var/obj/mecha/mecha = target
mecha.hacked = TRUE
do_sparks(5, 1, mecha)

/obj/item/implant/traitor/implant(mob/living/carbon/human/mindslave_target, mob/living/carbon/human/user, force = FALSE)
if(implanted == BIOCHIP_USED || !ishuman(mindslave_target) || !ishuman(user)) // Both the target and the user need to be human.
return FALSE

// If the target is catatonic or doesn't have a mind, don't let them use it
if(!mindslave_target.mind)
to_chat(user, span_warning("<i>Это существо не разумно!</i>"))
return FALSE

// Fails if they're already a mindslave of someone, or if they're mindshielded.
if(ismindslave(mindslave_target) || ismindshielded(mindslave_target) || isvampirethrall(mindslave_target))
mindslave_target.visible_message(
span_warning("[mindslave_target] seems to resist the bio-chip!"),
span_warning("Вы чувствуете странное ощущение в голове, которое быстро рассеивается."),
)
qdel(src)
return FALSE

var/datum/mind/mind = mindslave_target.mind

if(!mind.has_antag_datum(/datum/antagonist/traitor/mini))
mind.add_antag_datum(/datum/antagonist/traitor/mini)

var/datum/antagonist/traitor/mini/traitor = mind.has_antag_datum(/datum/antagonist/traitor/mini)

traitor.add_objective(pick(/datum/objective/maroon, /datum/objective/steal))
traitor.add_objective(pick(/datum/objective/maroon, /datum/objective/steal))
log_admin("[key_name_admin(user)] has made [key_name_admin(mindslave_target)] mini traitor.")
return ..()

#undef CYBERSUN_DISCOUNT
11 changes: 10 additions & 1 deletion code/modules/antagonists/traitor/datum_traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@
var/obj/item/uplink/hidden/hidden_uplink = null
/// Current traitor affiliate
var/datum/affiliate/affiliate
/// List of killed agents from enemy affiliates
var/list/killed_enemy_agents = list()

/datum/antagonist/traitor/mini



/datum/antagonist/traitor/mini/on_gain()
if(!owner.som)
owner.som = new /datum/mindslaves
owner.som.masters += owner

/datum/antagonist/traitor/on_gain()
// Create this in case the traitor wants to mindslaves someone.
if(!owner.som)
owner.som = new /datum/mindslaves

owner.som.masters += owner
give_affiliates()
RegisterSignal(src, COMSIG_MOB_DEATH, PROC_REF(grant_enemy_affiliates))
return ..()

Expand Down
Binary file modified icons/obj/affiliates.dmi
Binary file not shown.

0 comments on commit 7b8bb4e

Please sign in to comment.