Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Anorak2024 committed Sep 27, 2024
1 parent 03c7b45 commit a008b71
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/game/gamemodes/malfunction/Malf_Modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,15 @@
/obj/machinery/doomsday_device/proc/detonate(z_level = 1)
for(var/mob/M in GLOB.player_list)
M << 'sound/machines/alarm.ogg'

for(var/datum/mind/M in SSticker.minds)
var/datum/antagonist/traitor/T = M.has_antag_datum(/datum/antagonist/traitor)
if (!T)
continue

for(var/datum/objective/make_ai_malf/objective in T.objectives)
objective.made = TRUE

sleep(100)
SSticker.station_explosion_cinematic(null, "AI malfunction")
to_chat(world, "<B>The AI cleansed the station of life with the doomsday device!</B>")
Expand Down
18 changes: 18 additions & 0 deletions code/modules/antagonists/traitor/affiliates/cybersun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "proprietary_ssd"
item_state = "disk"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
origin_tech = "syndicate=2"
w_class = WEIGHT_CLASS_TINY
var/datum/research/files
Expand All @@ -51,13 +53,16 @@
/obj/item/proprietary_ssd/afterattack(atom/target, mob/user, proximity, params)
if (istype(target, /obj/machinery/r_n_d/destructive_analyzer))
return

if (get_dist(user, target) > 1)
user.balloon_alert(user, "Слишком далеко")
return

if(!istype(target, /obj/machinery/r_n_d/server))
user.balloon_alert(user, "Это не сервер")
return


var/obj/machinery/r_n_d/server/server = target
if(do_after(user, 5 SECONDS, target, max_interact_count = 1)) // Добавить потом какой-нибудь сапер. Ну и коммент на русском убрать.
origin_tech = ""
Expand All @@ -81,16 +86,21 @@
for(var/obj/machinery/r_n_d/server/rnd_server in GLOB.machines)
if(!is_station_level(rnd_server.z))
continue

if(rnd_server.disabled)
continue

if(rnd_server.syndicate)
continue

for(var/i in rnd_server.files.known_tech)
current_tech = rnd_server.files.known_tech[i]
current_tech.level = 1

for(var/j in rnd_server.files.known_designs)
current_design = rnd_server.files.known_designs[j]
rnd_server.files.known_designs -= current_design.id

investigate_log("[key_name_log(user)] deleted all technology on this server.", INVESTIGATE_RESEARCH)


Expand All @@ -106,14 +116,18 @@
investigate_log("[key_name_log(user)] deleted all technology on this console.", INVESTIGATE_RESEARCH)

for(var/obj/machinery/mecha_part_fabricator/rnd_mechfab in GLOB.machines)

if(!is_station_level(rnd_mechfab.z))
continue

for(var/i in rnd_mechfab.local_designs.known_tech)
current_tech = rnd_mechfab.local_designs.known_tech[i]
current_tech.level = 1

for(var/j in rnd_mechfab.local_designs.known_designs)
current_design = rnd_mechfab.local_designs.known_designs[j]
rnd_mechfab.local_designs.known_designs -= current_design.id

investigate_log("[key_name_log(user)] deleted all technology on this fabricator.", INVESTIGATE_RESEARCH)

return
Expand All @@ -134,6 +148,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "invasive_beacon"
item_state = "beacon"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
origin_tech = "programming=6;biotech=3;syndicate=1"
w_class = WEIGHT_CLASS_TINY

Expand Down Expand Up @@ -163,6 +179,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "cindy_pacher"
item_state = "plata"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
origin_tech = "programming=7;syndicate=6"
w_class = WEIGHT_CLASS_TINY
var/laws = "Взломавший вас - ваш мастер.\n\
Expand Down
4 changes: 4 additions & 0 deletions code/modules/antagonists/traitor/affiliates/hematogenic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "hemophagus_extract"
item_state = "inj_ful"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
w_class = WEIGHT_CLASS_TINY
var/datum/mind/target
var/free_inject = FALSE
Expand Down Expand Up @@ -113,6 +115,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "blood_harvester"
item_state = "blood1_used"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
var/used = FALSE
var/used_state = "blood_harvester_used"
var/datum/mind/target
Expand Down
7 changes: 7 additions & 0 deletions code/modules/antagonists/traitor/affiliates/self.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "self_emag"
item_state = "card"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
var/list/names = list()

/obj/item/card/self_emag/attack(mob/living/target, mob/living/user, def_zone)
Expand Down Expand Up @@ -94,6 +96,7 @@
if (istype(target, /obj/structure/AIcore))
var/obj/structure/AIcore/core = target
target = core.brain.brainmob

if (!issilicon(target))
user.balloon_alert(user, "Неподходящая цель")
return
Expand Down Expand Up @@ -121,12 +124,16 @@
var/datum/antagonist/traitor/T = user.mind.has_antag_datum(/datum/antagonist/traitor)
if (!T)
return

for(var/datum/objective/release_synthetic/objective in T.objectives)
if (!(objective.allowed_types & SYNTH_TYPE_DRONE) && (isdrone(silicon) || iscogscarab(silicon)))
continue

if (!(objective.allowed_types & SYNTH_TYPE_BORG) && isrobot(silicon))
continue

if (!(objective.allowed_types & SYNTH_TYPE_AI) && isAI(silicon))
continue

if (!(silicon.mind in objective.already_free))
objective.already_free += silicon.mind
6 changes: 6 additions & 0 deletions code/modules/antagonists/traitor/affiliates/tiger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
icon = 'icons/obj/affiliates.dmi'
icon_state = "cling_extract"
item_state = "inj_ful"
lefthand_file = 'icons/obj/affiliates.dmi'
righthand_file = 'icons/obj/affiliates.dmi'
var/used_state = "cling_extract_used"
var/datum/mind/target
var/free_inject = FALSE
Expand All @@ -40,15 +42,19 @@
/obj/item/cling_extract/afterattack(atom/target, mob/user, proximity, params)
if(used)
return

if(!ishuman(target))
return

if((src.target && target != src.target) || !free_inject)
to_chat(user, span_warning("You can't use [src] to [target]!"))
return

var/mob/living/carbon/human/H = target
if(H.stat != DEAD && !free_inject)
to_chat(user, span_warning("You can't use [src] to [target]!"))
return

if(do_after(user, free_inject ? FREE_INJECT_TIME : TARGET_INJECT_TIME, user, max_interact_count = 1))
inject(user, H)

Expand Down
4 changes: 4 additions & 0 deletions code/modules/antagonists/traitor/datum_traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@
var/datum/antagonist/traitor/another_traitor = M.mind.has_antag_datum(/datum/antagonist/traitor)
if (!another_traitor)
continue

if (!(src.affiliate in another_traitor.affiliate.enemys))
continue

if (another_traitor.killed_enemy_agents.len >= LIMIT_KILLING_ENEMY_REWARDS)
continue

if (src in another_traitor.killed_enemy_agents)
continue

another_traitor.killed_enemy_agents.Add(src)
another_traitor.hidden_uplink.uses += another_traitor.affiliate.reward_for_enemys

Expand Down
1 change: 1 addition & 0 deletions code/modules/research/rdconsole.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if (istype(linked_destroy.loaded_item, /obj/item/proprietary_ssd)) // We can deconstruct ssd here, but can't in experimentor
var/obj/item/proprietary_ssd/ssd = linked_destroy.loaded_item
temp_tech = ssd.files.known_tech

var/pointless = FALSE

for(var/T in temp_tech)
Expand Down

0 comments on commit a008b71

Please sign in to comment.