Files
Bubberstation/code/modules/research/research_disk.dm
SkyratBot f30aa24b85 [MIRROR] Stops tech disks from creating two techwebs & Adds more research logging [MDB IGNORE] (#17706)
* Stops tech disks from creating two techwebs & Adds more research logging (#71442)

## About The Pull Request

This hopes to stop floodings in SSresearch.techwebs by making tech disks
not initialize techwebs twice each time, especially since techwebs never
get deleted currently.

I also added some loggings to research because currently its only use is
when completing an experiment.

## Why It's Good For The Game

Better logs for research stuff and prevents a flood of techwebs when
trying to find one specific one in SSresearch's techweb list.
It would also slightly help with
https://github.com/tgstation/tgstation/issues/71434 because I don't know
what would cause this as bepis isn't logged.

## Changelog

🆑
admin: Researching nodes and bepis unlocking stuff is now logged in
research.
/🆑

* Stops tech disks from creating two techwebs & Adds more research logging

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-11-24 09:09:51 -05:00

44 lines
1.6 KiB
Plaintext

/obj/item/disk/tech_disk
name = "technology disk"
desc = "A disk for storing technology data for further research."
icon_state = "datadisk0"
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
var/datum/techweb/stored_research
/obj/item/disk/tech_disk/Initialize(mapload)
. = ..()
if(!stored_research)
stored_research = new /datum/techweb
pixel_x = base_pixel_x + rand(-5, 5)
pixel_y = base_pixel_y + rand(-5, 5)
/obj/item/disk/tech_disk/debug
name = "\improper CentCom technology disk"
desc = "A debug item for research"
custom_materials = null
/obj/item/disk/tech_disk/debug/Initialize(mapload)
stored_research = SSresearch.admin_tech
return ..()
/obj/item/disk/tech_disk/major
name = "Reformatted technology disk"
desc = "A disk containing a new, completed tech from the B.E.P.I.S. Upload the disk to an R&D Console to redeem the tech."
icon_state = "rndmajordisk"
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
/obj/item/disk/tech_disk/major/Initialize(mapload)
stored_research = new /datum/techweb/bepis
return ..()
/obj/item/disk/tech_disk/spaceloot
name = "Old experimental technology disk"
desc = "A disk containing some long-forgotten technology from a past age. You hope it still works after all these years. Upload the disk to an R&D Console to redeem the tech."
icon_state = "rndmajordisk"
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
/obj/item/disk/tech_disk/spaceloot/Initialize(mapload)
stored_research = new /datum/techweb/bepis(remove_tech = FALSE)
return ..()