mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
Merge pull request #1389 from caelaislinn/master
anomaly fixes and tweaks
This commit is contained in:
@@ -209,6 +209,7 @@
|
||||
cur_artifact.name = "alien artifact ([cur_artifact.display_id])"
|
||||
cur_artifact.desc = "A large alien device. It has a small tag near the bottom that reads \"[cur_artifact.display_id]\"."
|
||||
cur_id = cur_artifact.display_id
|
||||
cur_artifact.my_effect.artifact_id = cur_artifact.display_id
|
||||
|
||||
/obj/machinery/artifact_analyser/Topic(href, href_list)
|
||||
|
||||
|
||||
@@ -293,11 +293,11 @@
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\blue A wave of energy invigorates you."
|
||||
M.adjustBruteLoss(5)
|
||||
M.adjustFireLoss(5)
|
||||
M.adjustToxLoss(5)
|
||||
M.adjustOxyLoss(5)
|
||||
M.adjustBrainLoss(5)
|
||||
M.adjustBruteLoss(-5)
|
||||
M.adjustFireLoss(-5)
|
||||
M.adjustToxLoss(-5)
|
||||
M.adjustOxyLoss(-5)
|
||||
M.adjustBrainLoss(-5)
|
||||
M.updatehealth()
|
||||
return 1
|
||||
if("injure")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
else
|
||||
if(inserted_battery)
|
||||
dat += "<b>[inserted_battery.name]</b> inserted, charge level: [inserted_battery.stored_charge]/[inserted_battery.capacity] ([(inserted_battery.stored_charge/inserted_battery.capacity)*100]%)<BR>"
|
||||
dat += "<b>Energy signature ID:</b>[inserted_battery.battery_effect.artifact_id]<BR>"
|
||||
dat += "<b>Energy signature ID:</b>[inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]<BR>"
|
||||
dat += "<A href='?src=\ref[src];ejectbattery=1'>Eject battery</a><BR>"
|
||||
dat += "<A href='?src=\ref[src];drainbattery=1'>Drain battery of all charge</a><BR>"
|
||||
dat += "<A href='?src=\ref[src];harvest=1'>Begin harvesting</a><BR>"
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
var/mundane = 0
|
||||
for(var/obj/O in get_turf(owned_pad))
|
||||
if(!istype(O, /obj/machinery/artifact))
|
||||
if(!istype(O, /obj/machinery/artifact) && !istype(O, /obj/machinery/analyser_pad))
|
||||
mundane++
|
||||
break
|
||||
for(var/mob/O in get_turf(owned_pad))
|
||||
@@ -102,16 +102,7 @@
|
||||
mundane++
|
||||
break
|
||||
|
||||
if(articount > 1 || mundane)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Error isolating energy signature.\""
|
||||
src.visible_message(message, message)
|
||||
else if(!articount)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. No noteworthy energy signature isolated.\""
|
||||
src.visible_message(message, message)
|
||||
else if (cur_artifact.being_used)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Too much interferance from energy scan.\""
|
||||
src.visible_message(message, message)
|
||||
else
|
||||
if(articount == 1 && !mundane)
|
||||
cur_artifact = analysed
|
||||
//check to see if the battery is compatible
|
||||
if(inserted_battery)
|
||||
@@ -130,6 +121,15 @@
|
||||
else if(cur_artifact)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. No battery inserted.\""
|
||||
src.visible_message(message, message)
|
||||
else if(articount > 1 || mundane)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Error isolating energy signature.\""
|
||||
src.visible_message(message, message)
|
||||
else if(!articount)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. No noteworthy energy signature isolated.\""
|
||||
src.visible_message(message, message)
|
||||
else if (cur_artifact.being_used)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Too much interferance from energy scan.\""
|
||||
src.visible_message(message, message)
|
||||
|
||||
if (href_list["stopharvest"])
|
||||
if(harvesting)
|
||||
|
||||
@@ -38,15 +38,17 @@
|
||||
/obj/item/weapon/anodevice/proc/interact(var/mob/user)
|
||||
user.machine = src
|
||||
var/dat = "<b>Anomalous Materials Energy Utiliser</b><br>"
|
||||
if(cooldown)
|
||||
if(activated)
|
||||
dat += "Device active, stand by.<BR>"
|
||||
else if(cooldown)
|
||||
dat += "Cooldown in progress, please wait.<BR>"
|
||||
else
|
||||
if(!inserted_battery)
|
||||
dat += "Please insert battery<BR>"
|
||||
else
|
||||
dat += "[inserted_battery] inserted, anomaly ID: [inserted_battery.battery_effect.artifact_id]<BR>"
|
||||
dat += "[inserted_battery] inserted, anomaly ID: [inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]<BR>"
|
||||
dat += "<b>Total Power:</b> [inserted_battery.stored_charge]/[inserted_battery.capacity]<BR><BR>"
|
||||
dat += "<b>Timed activation:</b> <A href='?src=\ref[src];changetime=-100'>--</a> <A href='?src=\ref[src];changetime=-10'>-</a> [time >= 1000 ? "[time/10]" : time >= 100 ? " [time/10]" : " [time/10]" ] <A href='?src=\ref[src];changetime=10'>+</a> <A href='?src=\ref[src];changetime=100'>++</a><BR>"
|
||||
dat += "<b>Timed activation:</b> <A href='?src=\ref[src];neg_changetime_max=-100'>--</a> <A href='?src=\ref[src];neg_changetime=-10'>-</a> [time >= 1000 ? "[time/10]" : time >= 100 ? " [time/10]" : " [time/10]" ] <A href='?src=\ref[src];changetime=10'>+</a> <A href='?src=\ref[src];changetime_max=100'>++</a><BR>"
|
||||
if(cooldown && !activated)
|
||||
dat += "<font color=red>Cooldown in progress.</font><BR>"
|
||||
else if(activated)
|
||||
@@ -86,31 +88,52 @@
|
||||
|
||||
/obj/item/weapon/anodevice/proc/pulse()
|
||||
if(activated)
|
||||
time -= 10
|
||||
cooldown += 10
|
||||
if(time <= 0)
|
||||
if(time <= 0 || !inserted_battery)
|
||||
time = 0
|
||||
activated = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.")
|
||||
updateDialog()
|
||||
else
|
||||
inserted_battery.battery_effect.DoEffect(src)
|
||||
time -= 10
|
||||
inserted_battery.stored_charge -= 10 + rand(-1,1)
|
||||
cooldown += 10
|
||||
else if(cooldown > 0)
|
||||
cooldown -= 10
|
||||
if(cooldown <= 0)
|
||||
cooldown = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("\icon[src]\blue The utiliser device chimes.", "\icon[src]\blue You hear something chime.")
|
||||
updateDialog()
|
||||
|
||||
spawn(10)
|
||||
pulse()
|
||||
|
||||
/obj/item/weapon/anodevice/Topic(href, href_list)
|
||||
|
||||
if(href_list["neg_changetime_max"])
|
||||
time += -100
|
||||
if(time > inserted_battery.capacity)
|
||||
time = inserted_battery.capacity
|
||||
else if (time < 0)
|
||||
time = 0
|
||||
if(href_list["neg_changetime"])
|
||||
time += -10
|
||||
if(time > inserted_battery.capacity)
|
||||
time = inserted_battery.capacity
|
||||
else if (time < 0)
|
||||
time = 0
|
||||
if(href_list["changetime"])
|
||||
var/mod = href_list["changetime"]
|
||||
time += num2text(mod)
|
||||
time += 10
|
||||
if(time > inserted_battery.capacity)
|
||||
time = inserted_battery.capacity
|
||||
else if (time < 0)
|
||||
time = 0
|
||||
if(href_list["changetime_max"])
|
||||
time += 100
|
||||
if(time > inserted_battery.capacity)
|
||||
time = inserted_battery.capacity
|
||||
else if (time < 0)
|
||||
time = 0
|
||||
|
||||
if(href_list["stoptimer"])
|
||||
activated = 0
|
||||
@@ -126,5 +149,5 @@
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=anodevice")
|
||||
usr.machine = null
|
||||
|
||||
updateDialog()
|
||||
else if(usr)
|
||||
src.interact(usr)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
name = "alien artifact"
|
||||
desc = "A large alien device."
|
||||
icon = 'anomaly.dmi'
|
||||
icon_state = "ano0"
|
||||
icon_state = "ano00"
|
||||
var/icon_num = 0
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/origin = null // Used in the randomisation/research of the artifact.
|
||||
@@ -26,11 +27,12 @@
|
||||
|
||||
src.origin = pick("ancient","martian","wizard","eldritch","precursor")
|
||||
switch(src.origin)
|
||||
if("ancient") src.icon_state = pick("ano2")
|
||||
if("martian") src.icon_state = pick("ano4")
|
||||
if("wizard") src.icon_state = pick("ano0","ano1")
|
||||
if("eldritch") src.icon_state = pick("ano3")
|
||||
if("precursor") src.icon_state = pick("ano5")
|
||||
if("ancient") icon_num = pick(2)//src.icon_state = pick("ano2")
|
||||
if("martian") icon_num = pick(4)//src.icon_state = pick("ano4")
|
||||
if("wizard") icon_num = pick(0,1)//src.icon_state = pick("ano0","ano1")
|
||||
if("eldritch") icon_num = pick(3)//src.icon_state = pick("ano3")
|
||||
if("precursor") icon_num = pick(5)//src.icon_state = pick("ano5")
|
||||
icon_state = "ano[icon_num]0"
|
||||
|
||||
// Low-ish random chance to not look like it's origin
|
||||
if(prob(20)) src.icon_state = pick("ano0","ano1","ano2","ano3","ano4","ano5")
|
||||
@@ -186,18 +188,28 @@
|
||||
/obj/machinery/artifact/proc/Artifact_Activate()
|
||||
src.activated = !src.activated
|
||||
var/display_msg = ""
|
||||
switch(rand(1))
|
||||
if(0)
|
||||
display_msg = "momentarily glows brightly!"
|
||||
if(1)
|
||||
display_msg = "distorts slightly for a moment!"
|
||||
if(2)
|
||||
display_msg = "makes a slightly clicking noise!"
|
||||
if(3)
|
||||
display_msg = "flickers slightly!"
|
||||
if(3)
|
||||
display_msg = "vibrates!"
|
||||
if(activated)
|
||||
switch(rand(4))
|
||||
if(0)
|
||||
display_msg = "momentarily glows brightly!"
|
||||
if(1)
|
||||
display_msg = "distorts slightly for a moment!"
|
||||
if(2)
|
||||
display_msg = "makes a slightly clicking noise!"
|
||||
if(3)
|
||||
display_msg = "flickers slightly!"
|
||||
if(4)
|
||||
display_msg = "vibrates!"
|
||||
else
|
||||
switch(rand(2))
|
||||
if(0)
|
||||
display_msg = "grows dull!"
|
||||
if(1)
|
||||
display_msg = "fades in intensity!"
|
||||
if(2)
|
||||
display_msg = "suddenly becomes very quiet!"
|
||||
|
||||
icon_state = "ano[icon_num][activated]"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<b>[]</b> [display_msg]", src), 1)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
+6114
-6113
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user