Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xenoarchaeology part code readability, some artifact changes #7933

Merged
merged 47 commits into from Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
02fd91a
makes effect code worse
Morar1 Sep 2, 2021
180b5ac
makes artifact code worse, also some effects touches
Morar1 Sep 3, 2021
3cf32fb
little accident after testing prev commit
Morar1 Sep 3, 2021
fc8c4a6
DoEffectDestroy and final touches
Morar1 Sep 4, 2021
9256311
Update artifact_unknown.dm
Morar1 Sep 4, 2021
18a6c4d
why that was deleted
Morar1 Sep 4, 2021
3729aaa
i forgor
Morar1 Sep 4, 2021
3b79377
renames stuff around, max_charge for pulse effect, no holder checks i…
Morar1 Sep 6, 2021
f93209e
Update taucetistation.dme
Morar1 Sep 6, 2021
b1fea34
buffs second effect spawn rate
Morar1 Sep 6, 2021
1f6af97
more coode + relic water + chem var + gas/poltergeist dead talk no more
Morar1 Sep 7, 2021
89fe5c8
adds more effects, renames stuff around, changes code little bit, cha…
Morar1 Sep 8, 2021
335a97f
9 + 10
Morar1 Sep 8, 2021
5f377aa
adds mecha wreckage to a artifact_find poool
Morar1 Sep 8, 2021
f028a4f
Update artifact_unknown.dm
Morar1 Sep 8, 2021
7b8c7e0
linter time
Morar1 Sep 8, 2021
d46ddf1
Merge branch 'master' into xenoarchorsmth
Morar1 Sep 8, 2021
8acddbd
Update artifact_unknown.dm
Morar1 Sep 8, 2021
69ec2f0
heal_overall_damage revert, moods for artifact effects
Morar1 Sep 8, 2021
d96433f
Update taucetistation.dme
Morar1 Sep 8, 2021
97268cd
mood_event better type
Morar1 Sep 8, 2021
d97f3ea
sprite doesnt change trigger method, remove the comment
Morar1 Sep 8, 2021
666715f
trailing spaces and requested stuff
Morar1 Sep 8, 2021
fb5b23a
returns in a concrete procs, var/used_power = ;more whitespace removal
Morar1 Sep 8, 2021
552a1c2
removes invoke_async in ToggleActivate, grav change to range, removes…
Morar1 Sep 8, 2021
5f5bcf2
проверку не прошел
Morar1 Sep 8, 2021
36cb12d
timer
Morar1 Sep 8, 2021
448d474
removes scan delay in a trigger_proxy thing in a process
Morar1 Sep 9, 2021
a30879e
tab
Morar1 Sep 9, 2021
a44e4b6
bugs, pick_n_take to pick cos i messed up
Morar1 Sep 9, 2021
51e2c34
its like console print testing here
Morar1 Sep 9, 2021
f7537c5
base procs were made wrong and i was blind okay? thanking visual stud…
Morar1 Sep 9, 2021
e07789d
turf to step
Morar1 Sep 9, 2021
656fc03
Update code/datums/mood_events/artifact_events.dm
Morar1 Sep 10, 2021
0e643ed
requested stuff
Morar1 Sep 10, 2021
155cad0
blind
Morar1 Sep 10, 2021
cbfaf7a
blind x2
Morar1 Sep 10, 2021
d9e98f5
no ecs but ill do the rest
Morar1 Sep 10, 2021
6f38ea5
... as anything ...
Morar1 Sep 10, 2021
d7c400e
idk ill move this define to relic water
Morar1 Sep 10, 2021
15f11b3
timeout to mood_events
Morar1 Sep 10, 2021
86d46e4
Merge branch 'master' into xenoarchorsmth
LudwigVonChesterfield Sep 13, 2021
f68fa72
renames stuff around, rnd points for artifact paper scans, deletes no…
Morar1 Sep 14, 2021
19714e8
type_name moving
Morar1 Sep 14, 2021
3cded6c
oaky this thing works again
Morar1 Sep 14, 2021
dfe7d29
oopsie whoopsie
Morar1 Sep 14, 2021
ab17957
Update artifact_harvester.dm
Morar1 Sep 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion code/datums/spells/conjure.dm
Expand Up @@ -150,7 +150,6 @@
color = "#9c3636"
toxpwr = 0
custom_metabolism = 1
random_unrestricted = FALSE

/datum/reagent/toxin/harvester/on_general_digest(mob/living/carbon/M)
..()
Expand Down
1 change: 0 additions & 1 deletion code/game/gamemodes/modes_gameplays/blob/blobs/factory.dm
Expand Up @@ -134,7 +134,6 @@
description = "A toxic spore cloud which blocks vision when ingested."
color = "#9acd32"
toxpwr = 0.5
random_unrestricted = FALSE

/datum/reagent/toxin/spore/on_general_digest(mob/living/M)
..()
Expand Down
Expand Up @@ -353,7 +353,6 @@
color = "#000000" //Complete black (RGB: 0, 0, 0)
//metabolization_rate = 100 //lel
custom_metabolism = 100
random_unrestricted = FALSE

/datum/reagent/shadowling_blindness_smoke/on_general_digest(mob/living/M)
..()
Expand Down
13 changes: 0 additions & 13 deletions code/modules/reagents/Chemistry-Holder.dm
Expand Up @@ -637,16 +637,3 @@ var/const/INGEST = 2
/atom/proc/create_reagents(max_vol)
reagents = new/datum/reagents(max_vol)
reagents.my_atom = src

/**
* Returns a random reagent ID minus most foods and drinks
*/
/proc/get_unrestricted_random_reagent_id()
var/static/list/random_reagents = list()
if(!random_reagents.len)
for(var/thing in subtypesof(/datum/reagent))
var/datum/reagent/R = thing
if(initial(R.random_unrestricted))
random_reagents += initial(R.id)
var/picked_reagent = pick(random_reagents)
return picked_reagent
2 changes: 0 additions & 2 deletions code/modules/reagents/Chemistry-Reagents.dm
Expand Up @@ -22,8 +22,6 @@
var/taste_message = "bitterness" //life's bitter by default. Cool points for using a span class for when you're tasting <span class='userdanger'>LIQUID FUCKING DEATH</span>
var/list/restrict_species = list(IPC) // Species that simply can not digest this reagent.
var/list/flags = list()
///is reagent unrestricted to get from random
var/random_unrestricted = TRUE

var/overdose = 0
var/overdose_dam = 1
Expand Down
15 changes: 15 additions & 0 deletions code/modules/reagents/_chemistry.dm
@@ -1,3 +1,18 @@
#define SOLID 1
#define LIQUID 2
#define GAS 3

///chem list, minus foods/drinks/base chems/paint and special chems, only for waterbottle/relic
#define RESTRICTED_CHEM_LIST list(\
LudwigVonChesterfield marked this conversation as resolved.
Show resolved Hide resolved
"stoxin2", "inaprovaline", "ryetalyn", "paracetamol", "tramadol", "oxycodone", "sterilizine", "leporazine",\
"kelotane", "dermaline", "dexalin", "dextromethorphan", "dexalinp", "tricordrazine", "anti_toxin", "thermopsis",\
"synaptizine", "hyronalin", "arithrazine", "alkysine", "imidazoline", "aurisine", "peridaxon", "kyphotorin",\
"bicaridine", "hyperzine", "cryoxadone", "clonexadone", "rezadone", "spaceacillin", "ethylredoxrazine",\
"vitamin", "lipozine", "stimulants", "nanocalcium", "toxin", "amatoxin", "mutagen", "phoron", "lexorin",\
"slimejelly", "cyanide", "minttoxin", "carpotoxin", "zombiepowder", "mindbreaker", "plantbgone", "stoxin",\
"chloralhydrate", "potassium_chloride", "potassium_chlorophoride", "beer2", "mutetoxin", "sacid", "pacid",\
"alphaamanitin", "aflatoxin", "chefspecial", "dioxin", "mulligan", "mutationtoxin", "amutationtoxin", "space_drugs",\
"serotrotium", "cryptobiolin", "impedrezene", "ectoplasm", "methylphenidate", "methylphenidate", "citalopram",\
"citalopram", "paroxetine", "paroxetine", "lube", "plasticide", "glycerol", "nitroglycerin",\
"thermite", "virusfood", "fuel", "cleaner", "xenomicrobes", "fluorosurfactant", "foaming_agent", "nicotine",\
"ammonia", "glue", "diethylamine", "luminophore","nanites", "nanites2", "nanobots", "mednanobots", "ectoplasm")
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers/food/cans.dm
Expand Up @@ -141,7 +141,7 @@
var/reagents = volume
while(reagents)
var/newreagent = rand(1, min(reagents, 30))
list_reagents += list(get_unrestricted_random_reagent_id() = newreagent)
list_reagents += list(pick(RESTRICTED_CHEM_LIST) = newreagent)
reagents -= newreagent
..()

Expand Down
24 changes: 0 additions & 24 deletions code/modules/reagents/reagent_types/Chemistry-Core.dm
Expand Up @@ -6,7 +6,6 @@
color = "#0064c8" // rgb: 0, 100, 200
custom_metabolism = 0.01
taste_message = null
random_unrestricted = FALSE

/datum/reagent/water/reaction_mob(mob/M, method=TOUCH, volume)
if(method == TOUCH)
Expand Down Expand Up @@ -91,7 +90,6 @@
id = "holywater"
description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality."
color = "#e0e8ef" // rgb: 224, 232, 239
random_unrestricted = FALSE

needed_aspects = list(ASPECT_RESCUE = 1)

Expand Down Expand Up @@ -152,7 +150,6 @@
id = "unholywater"
description = "A corpsen-ectoplasmic-water mix, this solution could alter concepts of reality itself."
color = "#c80064" // rgb: 200,0, 100
random_unrestricted = FALSE

data = list()

Expand Down Expand Up @@ -237,7 +234,6 @@
color = "#808080" // rgb: 128, 128, 128
taste_message = null
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/oxygen/on_vox_digest(mob/living/M)
..()
Expand All @@ -252,7 +248,6 @@
color = "#6e3b08" // rgb: 110, 59, 8
taste_message = null
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/nitrogen
name = "Nitrogen"
Expand All @@ -262,7 +257,6 @@
color = "#808080" // rgb: 128, 128, 128
taste_message = null
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/nitrogen/on_diona_digest(mob/living/M)
..()
Expand All @@ -287,7 +281,6 @@
color = "#808080" // rgb: 128, 128, 128
taste_message = null
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/potassium
name = "Potassium"
Expand All @@ -297,7 +290,6 @@
color = "#a0a0a0" // rgb: 160, 160, 160
taste_message = "bad ideas"
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/mercury
name = "Mercury"
Expand All @@ -308,7 +300,6 @@
overdose = REAGENTS_OVERDOSE
taste_message = "druggie poison"
restrict_species = list(IPC, DIONA)
random_unrestricted = FALSE

/datum/reagent/mercury/on_general_digest(mob/living/M)
..()
Expand All @@ -326,7 +317,6 @@
color = "#bf8c00" // rgb: 191, 140, 0
taste_message = "impulsive decisions"
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/carbon
name = "Carbon"
Expand All @@ -336,7 +326,6 @@
color = "#1c1300" // rgb: 30, 20, 0
taste_message = "like a pencil or something"
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/carbon/reaction_turf(turf/T, volume)
. = ..()
Expand All @@ -356,7 +345,6 @@
color = "#808080" // rgb: 128, 128, 128
overdose = REAGENTS_OVERDOSE
taste_message = "characteristic taste"
random_unrestricted = FALSE

/datum/reagent/chlorine/on_general_digest(mob/living/M)
..()
Expand All @@ -370,7 +358,6 @@
color = "#808080" // rgb: 128, 128, 128
overdose = REAGENTS_OVERDOSE
taste_message = "toothpaste"
random_unrestricted = FALSE

/datum/reagent/fluorine/on_general_digest(mob/living/M)
..()
Expand All @@ -384,7 +371,6 @@
color = "#808080" // rgb: 128, 128, 128
taste_message = "horrible misjudgement"
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/phosphorus
name = "Phosphorus"
Expand All @@ -394,7 +380,6 @@
color = "#832828" // rgb: 131, 40, 40
taste_message = "misguided choices"
custom_metabolism = 0.01
random_unrestricted = FALSE

/datum/reagent/phosphorus/on_diona_digest(mob/living/M)
..()
Expand All @@ -414,7 +399,6 @@
overdose = REAGENTS_OVERDOSE
taste_message = "happiness"
restrict_species = list(IPC, DIONA)
random_unrestricted = FALSE

/datum/reagent/lithium/on_general_digest(mob/living/M)
..()
Expand All @@ -430,7 +414,6 @@
reagent_state = SOLID
color = "#ffffff" // rgb: 255, 255, 255
taste_message = "sweetness"
random_unrestricted = FALSE

needed_aspects = list(ASPECT_FOOD = 1)

Expand All @@ -445,7 +428,6 @@
reagent_state = SOLID
color = "#c7c7c7" // rgb: 199,199,199
taste_message = "bonehurting juice"
random_unrestricted = FALSE

/datum/reagent/radium/on_general_digest(mob/living/M)
..()
Expand Down Expand Up @@ -482,7 +464,6 @@
color = "#c8a5dc" // rgb: 200, 165, 220
overdose = REAGENTS_OVERDOSE
taste_message = "metal"
random_unrestricted = FALSE

/datum/reagent/gold
name = "Gold"
Expand All @@ -491,7 +472,6 @@
reagent_state = SOLID
color = "#f7c430" // rgb: 247, 196, 48
taste_message = "bling"
random_unrestricted = FALSE

needed_aspects = list(ASPECT_GREED = 1)

Expand All @@ -502,7 +482,6 @@
reagent_state = SOLID
color = "#d0d0d0" // rgb: 208, 208, 208
taste_message = "sub-par bling"
random_unrestricted = FALSE

needed_aspects = list(ASPECT_GREED = 1)

Expand All @@ -513,7 +492,6 @@
reagent_state = SOLID
color = "#b8b8c0" // rgb: 184, 184, 192
taste_message = "bonehurting juice"
random_unrestricted = FALSE

/datum/reagent/uranium/on_general_digest(mob/living/M)
..()
Expand All @@ -534,7 +512,6 @@
reagent_state = SOLID
color = "#a8a8a8" // rgb: 168, 168, 168
taste_message = null
random_unrestricted = FALSE

/datum/reagent/silicon
name = "Silicon"
Expand All @@ -543,4 +520,3 @@
reagent_state = SOLID
color = "#a8a8a8" // rgb: 168, 168, 168
taste_message = "a CPU"
random_unrestricted = FALSE
1 change: 0 additions & 1 deletion code/modules/reagents/reagent_types/Chemistry-Foods.dm
Expand Up @@ -5,7 +5,6 @@
nutriment_factor = 1
taste_message = null
var/last_volume = 0 // Check digestion code below.
random_unrestricted = FALSE

data = list()

Expand Down
1 change: 0 additions & 1 deletion code/modules/reagents/reagent_types/Chemistry-Medicine.dm
Expand Up @@ -338,7 +338,6 @@
reagent_state = LIQUID
color = "#c8a5dc" // rgb: 200, 165, 220
taste_message = "admin abuse"
random_unrestricted = FALSE

/datum/reagent/adminordrazine/on_general_digest(mob/living/M)
..()
Expand Down
Expand Up @@ -629,7 +629,6 @@
color = "#808080"
color_weight = 20
taste_message = "strong liquid colour"
random_unrestricted = FALSE

/datum/reagent/paint/red
name = "Red Paint"
Expand Down
Expand Up @@ -55,10 +55,10 @@
init_turfs_around()

/**
* Adds a entered/exited signal to each turf around orange 3
* Adds a entered/exited signal to each turf around RANGE_TURFS(3 , src)
*/
/obj/machinery/artifact/proc/init_turfs_around()
for(var/turf/T in orange(3, src))
for(var/turf/T in RANGE_TURFS(3, src))
Morar1 marked this conversation as resolved.
Show resolved Hide resolved
RegisterSignal(T, list(COMSIG_ATOM_ENTERED), .proc/turf_around_enter)
RegisterSignal(T, list(COMSIG_ATOM_EXITED), .proc/turf_around_exit)
turfs_around += T
Expand Down Expand Up @@ -87,7 +87,7 @@
mobs_around -= mover

/**
* Rebuilds proxy trigger zone, does this on a move
* Rebuilds proxy trigger zone, does this if after moved then stayed in one place for 3 seconds
*/
/obj/machinery/artifact/proc/rebuild_zone()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я понимаю что тут происхоидт и почему, но я предвижу что это может быть жуткий лагодром. ты с ТГ портировал?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это не с тг, а с алтаря капелланов. Но там зоны реже пересобираются

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

но я предвижу что это может быть жуткий лагодром

Хз, зона может быть пока что только у кристалла с астероида и тот стоит на месте всегда. А если и движется, то пересобирается через секунды 3 без движения

Это не с тг, а с алтаря капелланов.

Да

clear_turfs_around()
Expand Down Expand Up @@ -343,7 +343,9 @@
secondary_effect?.UpdateMove()

if(my_effect?.trigger == TRIGGER_PROXY || secondary_effect?.trigger == TRIGGER_PROXY)
addtimer(CALLBACK(src, .proc/rebuild_zone), 3 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE)
if(turfs_around.len != 0)
clear_turfs_around()
addtimer(CALLBACK(src, .proc/init_turfs_around), 3 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE)

/obj/machinery/artifact/update_icon()
var/check_activity = null
Expand Down
Expand Up @@ -7,38 +7,37 @@
if(!.)
return
for(var/obj/item/weapon/stock_parts/cell/D in user.contents)
D.charge += 150
D.give(150)
if(isrobot(user))
to_chat(user, "<span class='notice'>SYSTEM ALERT: Energy boost detected!</span>")

/datum/artifact_effect/cellcharge/DoEffectAura()
. = ..()
if(!.)
return
var/turf/curr_turf = get_turf(holder)
recharge_everything_in_range(25, range, curr_turf)
recharge_everything_in_range(25, range, holder)

/datum/artifact_effect/cellcharge/DoEffectPulse()
. = ..()
if(!.)
return
var/used_power = .
var/turf/curr_turf = get_turf(holder)
recharge_everything_in_range(200 * used_power, range, curr_turf)
recharge_everything_in_range(200 * used_power, range, holder)

/datum/artifact_effect/cellcharge/DoEffectDestroy()
var/turf/curr_turf = get_turf(holder)
recharge_everything_in_range(10000, 7, curr_turf)
recharge_everything_in_range(10000, 7, holder)

/datum/artifact_effect/cellcharge/proc/recharge_everything_in_range(power, range, center)
for(var/obj/item/weapon/stock_parts/cell/C in range(range, center))
C.charge += power
for(var/obj/machinery/power/apc/A in range(range, center))
/datum/artifact_effect/cellcharge/proc/recharge_everything_in_range(power, range)
var/turf/curr_turf = get_turf(holder)
var/list/captured_atoms = range(range, curr_turf)
for(var/obj/item/weapon/stock_parts/cell/C in captured_atoms)
C.give(power)
for(var/obj/machinery/power/apc/A in captured_atoms)
for(var/obj/item/weapon/stock_parts/cell/B in A.contents)
B.charge += power
for(var/obj/machinery/power/smes/S in range(range, center))
B.give(power)
for(var/obj/machinery/power/smes/S in captured_atoms)
S.charge += power
for(var/mob/living/silicon/robot/M in range(range, center))
for(var/mob/living/silicon/robot/M in captured_atoms)
for(var/obj/item/weapon/stock_parts/cell/D in M.contents)
D.charge += power
D.give(power)
to_chat(M, "<span class='notice'>SYSTEM ALERT: Energy boost detected!</span>")