mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
artifact tweaks, added artifact catalogue database to anom lab
Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -206,7 +206,6 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
@@ -1133,6 +1132,7 @@
|
||||
#include "code\modules\recycling\sortingmachinery.dm"
|
||||
#include "code\modules\research\artifact_analysis.dm"
|
||||
#include "code\modules\research\artifact_archaeo.dm"
|
||||
#include "code\modules\research\artifact_db.dm"
|
||||
#include "code\modules\research\artifact_misc.dm"
|
||||
#include "code\modules\research\artifacts.dm"
|
||||
#include "code\modules\research\circuitprinter.dm"
|
||||
|
||||
@@ -255,8 +255,8 @@
|
||||
return
|
||||
|
||||
/turf/simulated/mineral/proc/gets_drilled(var/delicate = 0)
|
||||
var/destroyed = 0
|
||||
if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11))
|
||||
var/destroyed = 0
|
||||
var/i
|
||||
for (i=0;i<mineralAmt;i++)
|
||||
if (src.mineralName == "Uranium")
|
||||
@@ -283,7 +283,8 @@
|
||||
//spawn a rare, xeno-archaelogical artifact here
|
||||
new /obj/machinery/artifact(src)
|
||||
ReplaceWithFloor()
|
||||
usr << "\red You accidentally destroy some of the rocks!"
|
||||
if(destroyed)
|
||||
usr << "\red You destroy some of the rocks!"
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -150,6 +150,27 @@
|
||||
else
|
||||
var/message = "<b>[src]</b> states, \"Cannot analyse, no analysis pad connected.\""
|
||||
src.visible_message(message, message)
|
||||
else if(href_list["upload"])
|
||||
//add new datum to every DB in the world
|
||||
for(var/obj/machinery/computer/artifact_database/DB in world)
|
||||
var/update = 0
|
||||
for(var/datum/catalogued_artifact/CA in DB.catalogued_artifacts)
|
||||
if(CA.name == cur_id)
|
||||
//already there, so update it
|
||||
update = 1
|
||||
CA.name = aorigin + " ([accuO]%)"
|
||||
CA.trigger = atrigger + " ([accuT]%)"
|
||||
CA.function = aeffect1 + " ([accuE1]%)"
|
||||
CA.range = aeffect2 + " ([accuE2]%)"
|
||||
if(!update)
|
||||
//not there, so add it
|
||||
var/datum/catalogued_artifact/CA = new()
|
||||
CA.name = cur_id
|
||||
CA.name = aorigin + " ([accuO]%)"
|
||||
CA.trigger = atrigger + " ([accuT]%)"
|
||||
CA.function = aeffect1 + " ([accuE1]%)"
|
||||
CA.range = aeffect2 + " ([accuE2]%)"
|
||||
DB.catalogued_artifacts.Add(CA)
|
||||
|
||||
else if(href_list["print"])
|
||||
var/r = "Artifact Analysis Report (Scan #[scan_num])<hr>"
|
||||
|
||||
53
code/modules/research/artifact_db.dm
Normal file
53
code/modules/research/artifact_db.dm
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
/datum/catalogued_artifact
|
||||
var/name = ""
|
||||
var/function = ""
|
||||
var/range = ""
|
||||
var/trigger = ""
|
||||
|
||||
/obj/machinery/computer/artifact_database
|
||||
name = "Artifact Database"
|
||||
icon_state = "rdcomp"
|
||||
var/list/catalogued_artifacts
|
||||
|
||||
/obj/machinery/computer/artifact_database/New()
|
||||
..()
|
||||
catalogued_artifacts = new/list
|
||||
|
||||
/obj/machinery/computer/artifact_database/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/artifact_database/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/artifact_database/Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=artifact_db")
|
||||
usr.machine = null
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/artifact_database/process()
|
||||
..()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/artifact_database/proc/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=artifact_db")
|
||||
return
|
||||
var/t = "<B>Artifact Database</B><BR>"
|
||||
t += "<hr>"
|
||||
for(var/datum/catalogued_artifact/CA in catalogued_artifacts)
|
||||
t += "<B>Artifact ID:</B> [CA.name] (determined from unique energy emission signatures)<BR>"
|
||||
t += "<B>Activation Trigger:</B> [CA.trigger]<BR>"
|
||||
t += "<B>Artifact Function:</B> [CA.function]<BR>"
|
||||
t += "<B>Artifact Range:</B> [CA.range]<BR><BR>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];refresh=1'>Refresh</A> <A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=artifact_db;size=500x800")
|
||||
user.machine = src
|
||||
@@ -85,7 +85,7 @@
|
||||
if (get_dist(user, src) > 1)
|
||||
user << "\red You can't reach [src] from here."
|
||||
return
|
||||
if(istype(M:gloves,/obj/item/clothing/gloves))
|
||||
if(istype(user:gloves,/obj/item/clothing/gloves))
|
||||
return ..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<b>[]</b> touches [].", user, src), 1)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user