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

ANOMALIES #2609

Merged
merged 23 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/controllers/subsystems/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ SUBSYSTEM_DEF(mapping)
var/list/away_sites_templates = list()
var/list/submaps = list()
var/list/submap_archetypes = list()
/// The largest plane offset we've generated so far
var/max_plane_offset = 0


/datum/controller/subsystem/mapping/UpdateStat(time)
Expand Down
11 changes: 11 additions & 0 deletions code/controllers/subsystems/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ SUBSYSTEM_DEF(supply)
"crate" = "From exported crates",
"gep" = "From uploaded good explorer points",
"anomaly" = "From scanned and categorized anomalies",
//[SIERRA-ADD] - ANOMALY - Добавляем категорию "Артефакты"
"artefacts" = "From artefacts",
//[SIERRA-ADD]
"total" = "Total" // If you're adding additional point sources, add it here in a new line. Don't forget to put a comma after the old last line.
)

Expand Down Expand Up @@ -117,6 +120,14 @@ SUBSYSTEM_DEF(supply)
if(istype(A, /obj/item/disk/survey))
var/obj/item/disk/survey/D = A
add_points_from_source(round(D.Value() * 0.05), "gep")
//[SIERRA-ADD] - ANOMALY - Продажа артефактов
if(istype(A, /obj/item/artefact))
var/obj/item/artefact/D = A
add_points_from_source(D.cargo_price, "artefacts")
if(istype(A, /obj/item/collector))
var/obj/item/collector/D = A
add_points_from_source(D.stored_artefact.cargo_price, "artefacts")
//[SIERRA-ADD]

// Sell artefacts (in anomaly cages)
if (istype(AM, /obj/machinery/anomaly_container))
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/random/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,10 @@ something, make sure it's not in one of the other lists.*/
/obj/item/storage/firstaid/surgery = 4,
/obj/item/cell/infinite = 1,
/obj/item/archaeological_find = 2,
/obj/machinery/artifact = 1,
//[SIERRA-EDIT] - ANOMALIES,
// /obj/machinery/artifact = 1,
/obj/machinery/artifact/no_anomalies = 1,
//[SIERRA-EDIT],
/obj/item/device/multitool/hacktool = 2,
/obj/item/surgicaldrill = 7,
/obj/item/FixOVein = 7,
Expand Down
42 changes: 34 additions & 8 deletions maps/sierra/z1-z5_sierra.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -29754,7 +29754,13 @@
d2 = 4;
icon_state = "0-4"
},
/obj/machinery/papershredder,
/obj/structure/table/steel_reinforced,
/obj/item/storage/bolt_bag/full_of_bolts{
pixel_x = -6
},
/obj/item/storage/bolt_bag/full_of_bolts{
pixel_x = 6
},
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"epq" = (
Expand Down Expand Up @@ -33530,7 +33536,7 @@
d2 = 4;
icon_state = "1-4"
},
/obj/machinery/artifact,
/obj/machinery/artifact/no_anomalies,
/obj/machinery/anomaly_container,
/turf/simulated/floor/reinforced,
/area/shuttle/petrov/cell1)
Expand Down Expand Up @@ -45292,6 +45298,7 @@
pixel_y = 13
},
/obj/structure/disposalpipe/segment,
/obj/item/storage/box/glasses,
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"gGZ" = (
Expand Down Expand Up @@ -48777,6 +48784,7 @@
"hgJ" = (
/obj/structure/table/steel_reinforced,
/obj/item/device/synthesized_instrument/guitar,
/obj/item/paper/sierra/exploration,
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"hgL" = (
Expand Down Expand Up @@ -51125,7 +51133,21 @@
dir = 4;
pixel_x = -24
},
/obj/machinery/photocopier,
/obj/structure/table/steel_reinforced,
/obj/item/device/ano_scanner{
pixel_x = 6;
pixel_y = 12
},
/obj/item/device/ano_scanner{
pixel_y = 12;
pixel_x = -6
},
/obj/item/device/ano_scanner{
pixel_x = -6
},
/obj/item/device/ano_scanner{
pixel_x = 6
},
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"hAt" = (
Expand Down Expand Up @@ -66781,11 +66803,16 @@
dir = 8
},
/obj/structure/table/steel_reinforced,
/obj/item/storage/box/glasses,
/obj/machinery/camera/network/expedition{
c_tag = "Expedition - Briefing Room";
dir = 4
},
/obj/item/storage/bolt_bag/full_of_bolts{
pixel_x = -6
},
/obj/item/storage/bolt_bag/full_of_bolts{
pixel_x = 6
},
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"jUf" = (
Expand Down Expand Up @@ -74074,12 +74101,10 @@
/obj/floor_decal/corner/purple/border{
dir = 4
},
/obj/structure/bed/chair/armchair/purple{
dir = 8
},
/obj/structure/sign/poster{
pixel_x = 32
},
/obj/machinery/photocopier,
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"kVi" = (
Expand Down Expand Up @@ -112811,6 +112836,7 @@
/obj/floor_decal/corner/purple/bordercorner2{
dir = 1
},
/obj/machinery/papershredder,
/turf/simulated/floor/tiled,
/area/quartermaster/exploration/briefing_room)
"qIB" = (
Expand Down Expand Up @@ -122530,7 +122556,7 @@
d2 = 8;
icon_state = "4-8"
},
/obj/machinery/artifact,
/obj/machinery/artifact/no_anomalies,
/obj/machinery/anomaly_container,
/turf/simulated/floor/reinforced,
/area/shuttle/petrov/cell2)
Expand Down
42 changes: 34 additions & 8 deletions mods/RnD/code/experiment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var/global/list/rnd_server_list = list()
var/list/saved_tech_levels = list() // list("materials" = list(1, 4, ...), ...)
var/list/saved_autopsy_weapons = list()
var/list/saved_artifacts = list()
var/list/saved_small_artefacts = list()
var/list/saved_plants = list()
var/list/saved_slimecores = list()
var/list/saved_spectrometers = list()
Expand Down Expand Up @@ -246,6 +247,22 @@ var/global/list/rnd_server_list = list()
points += reward
saved_slimecores += core

for(var/artefacts in I.scanned_small_artefacts)
if(artefacts in saved_small_artefacts)
continue
var/reward = 1000
switch(artefacts)
if(/obj/item/artefact/pruzhina)
reward = 2000
if(/obj/item/artefact/zjar)
reward = 3500
if(/obj/item/artefact/gravi)
reward = 2500
if(/obj/item/artefact/svetlyak)
reward = 5000
points += reward
saved_small_artefacts += artefacts

I.clear_data()
return round(points)

Expand Down Expand Up @@ -372,6 +389,7 @@ var/global/list/rnd_server_list = list()
var/list/scanned_slimecores = list()
var/list/scanned_spectrometers = list()
var/list/scanned_xenofauna = list()
var/list/scanned_small_artefacts = list()
var/species
var/new_species = FALSE
var/potency
Expand All @@ -389,14 +407,14 @@ var/global/list/rnd_server_list = list()
to_chat(user, "<span class='notice'>[disk] stores approximately [disk.stored_points] research points</span>")
return

if(istype(O,/obj/item/paper/autopsy_report))
else if(istype(O,/obj/item/paper/autopsy_report))
var/obj/item/paper/autopsy_report/report = O
for(var/datum/autopsy_data/W in report.autopsy_data)
if(!(W.weapon in scanned_autopsy_weapons))
scanneddata += 1
scanned_autopsy_weapons += W.weapon

if(istype(O,/obj/item/paper/plant_report))
else if(istype(O,/obj/item/paper/plant_report))
var/obj/item/paper/plant_report/report = O
if(!(report.info in scanned_plants))
scanneddata += 1
Expand All @@ -407,7 +425,7 @@ var/global/list/rnd_server_list = list()
return


if(istype(O,/obj/item/paper/radiocarbon_spectrometer_report))
else if(istype(O,/obj/item/paper/radiocarbon_spectrometer_report))
var/obj/item/paper/radiocarbon_spectrometer_report/report = O
if(!(report in scanned_spectrometers))
if(report.anomalous)
Expand All @@ -417,7 +435,7 @@ var/global/list/rnd_server_list = list()
to_chat(user, "<span class='notice'>[src] already has data about this report</span>")
return

if(istype(O,/obj/item/paper/xenofauna_report))
else if(istype(O,/obj/item/paper/xenofauna_report))
var/obj/item/paper/xenofauna_report/report = O
if(!(report in scanned_xenofauna))
if(report.species)
Expand All @@ -432,7 +450,7 @@ var/global/list/rnd_server_list = list()
return


if(istype(O, /obj/item/paper/anomaly_scan))
else if(istype(O, /obj/item/paper/anomaly_scan))
var/obj/item/paper/anomaly_scan/report = O
if(report.artifact)
for(var/list/artifact in scanned_artifacts)
Expand All @@ -448,7 +466,7 @@ var/global/list/rnd_server_list = list()
scanneddata += 1


if(istype(O, /obj/item/slime_extract))
else if(istype(O, /obj/item/slime_extract))
if(!(O.type in scanned_slimecores))
scanned_slimecores += O.type
scanneddata += 1
Expand All @@ -461,15 +479,15 @@ var/global/list/rnd_server_list = list()
to_chat(user, "<span class='notice'>[src] received [scanneddata] data block[scanneddata>1?"s":""] from scanning [O]</span>")
return

if(istype(O, /obj/item/device/beacon/explosion_watcher))
else if(istype(O, /obj/item/device/beacon/explosion_watcher))
var/obj/item/device/beacon/explosion_watcher/explosion = O
if(explosion.calculated_research_points > 0)
to_chat(user, "<span class='notice'>Estimated research value of [O.name] is [explosion.calculated_research_points]</span>")
else
to_chat(user, "<span class='notice'>[O] has no research value</span>")
return

if(istype(O, /obj/item/disk/tech_disk))
else if(istype(O, /obj/item/disk/tech_disk))
var/obj/item/disk/tech_disk/T = O
if(T.stored)
var/science_value = T.stored.level * 1000
Expand All @@ -478,6 +496,14 @@ var/global/list/rnd_server_list = list()
else
to_chat(user, "<span class='notice'>[O] has no research value</span>")

else if(istype(O, /obj/item/artefact))
if(!(O.type in scanned_small_artefacts))
var/obj/item/artefact/art = O
scanned_small_artefacts += art.type
scanneddata += 1
else
to_chat(user, "<span class='notice'>[src] already has data about this report</span>")

else if(istype(O, /obj/item))
var/science_value = experiments.get_object_research_value(O)
if(science_value > 0)
Expand Down
2 changes: 1 addition & 1 deletion mods/RnD/code/tech_engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
required_tech_levels = list()
cost = 500

unlocks_designs = list("depth_scanner", "ano_scanner", "pick_set")
unlocks_designs = list("depth_scanner", "ano_scanner", "pick_set", "collector")


/datum/technology/engineering/excavation_drill
Expand Down
77 changes: 77 additions & 0 deletions mods/anomaly/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

#### Список PRов:
https://github.com/SierraBay/SierraBay12/pull/2609
<!--
Ссылки на PRы, связанные с модом:
- Создание
- Большие изменения
-->

<!-- Название мода. Не важно на русском или на английском. -->
## ID мода

ID мода: ANOMALY
<!--
Название модпака прописными буквами, СОЕДИНЁННЫМИ_ПОДЧЁРКИВАНИЕМ,
которое ты будешь использовать для обозначения файлов.
-->

### Описание мода

Добавляет в игру аномалии, по типу тех что из сталкера и Ашан Скуф.
<!--
Что он делает, что добавляет: что, куда, зачем и почему - всё здесь.
А также любая полезная информация.
-->

### Изменения *кор кода*
- Отсутствуют
<!--
Если вы редактировали какие-либо процедуры или переменные в кор коде,
они должны быть указаны здесь.
Нужно указать и файл, и процедуры/переменные.

Изменений нет - напиши "Отсутствуют"
-->

### Оверрайды

- Отсутствуют
<!--
Если ты добавлял новый модульный оверрайд, его нужно указать здесь.
Здесь указываются оверрайды в твоём моде и папке `_master_files`

Изменений нет - напиши "Отсутствуют"
-->

### Дефайны

- Отсутствуют
<!--
Если требовалось добавить какие-либо дефайны, укажи файлы,
в которые ты их добавил, а также перечисли имена.
И то же самое, если ты используешь дефайны, определённые другим модом.

Не используешь - напиши "Отсутствуют"
-->

### Используемые файлы, не содержащиеся в модпаке

- Отсутствуют
<!--
Будь то немодульный файл или модульный файл, который не содержится в папке,
принадлежащей этому конкретному моду, он должен быть упомянут здесь.
Хорошими примерами являются иконки или звуки, которые используются одновременно
несколькими модулями, или что-либо подобное.
-->

### Авторы:

Shegar - Кодер
Iceberg - Тестер
Teteshnik - Тестер
<!--
Здесь находится твой никнейм
Если работал совместно - никнеймы тех, кто помогал.
В случае порта чего-либо должна быть ссылка на источник.
-->
4 changes: 4 additions & 0 deletions mods/anomaly/_anomaly.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/singleton/modpack/colony_types
name = "Интерактивные аномалии"
desc = "Добавляет в игру полноценные аномалии, вдохновлённые Ашаном, пикником на обочине и сталкером."
author = "Shegar"
Loading