fixes and tweaks for the harvester

Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
caelaislinn
2012-06-25 08:35:19 +10:00
parent 137e15ef62
commit ddda9f2ce3
5 changed files with 38 additions and 14 deletions

View File

@@ -209,6 +209,7 @@
cur_artifact.name = "alien artifact ([cur_artifact.display_id])" 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_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_id = cur_artifact.display_id
cur_artifact.my_effect.artifact_id = cur_artifact.display_id
/obj/machinery/artifact_analyser/Topic(href, href_list) /obj/machinery/artifact_analyser/Topic(href, href_list)

View File

@@ -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)) if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
continue continue
M << "\blue A wave of energy invigorates you." M << "\blue A wave of energy invigorates you."
M.adjustBruteLoss(5) M.adjustBruteLoss(-5)
M.adjustFireLoss(5) M.adjustFireLoss(-5)
M.adjustToxLoss(5) M.adjustToxLoss(-5)
M.adjustOxyLoss(5) M.adjustOxyLoss(-5)
M.adjustBrainLoss(5) M.adjustBrainLoss(-5)
M.updatehealth() M.updatehealth()
return 1 return 1
if("injure") if("injure")

View File

@@ -66,7 +66,7 @@
else else
if(inserted_battery) 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>[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];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];drainbattery=1'>Drain battery of all charge</a><BR>"
dat += "<A href='?src=\ref[src];harvest=1'>Begin harvesting</a><BR>" dat += "<A href='?src=\ref[src];harvest=1'>Begin harvesting</a><BR>"
@@ -94,7 +94,7 @@
var/mundane = 0 var/mundane = 0
for(var/obj/O in get_turf(owned_pad)) 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++ mundane++
break break
for(var/mob/O in get_turf(owned_pad)) for(var/mob/O in get_turf(owned_pad))

View File

@@ -44,9 +44,9 @@
if(!inserted_battery) if(!inserted_battery)
dat += "Please insert battery<BR>" dat += "Please insert battery<BR>"
else 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>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) if(cooldown && !activated)
dat += "<font color=red>Cooldown in progress.</font><BR>" dat += "<font color=red>Cooldown in progress.</font><BR>"
else if(activated) else if(activated)
@@ -87,13 +87,13 @@
/obj/item/weapon/anodevice/proc/pulse() /obj/item/weapon/anodevice/proc/pulse()
if(activated) if(activated)
time -= 10 time -= 10
stored_charge -= 10 + rand(-1,1)
cooldown += 10 cooldown += 10
if(time <= 0) if(time <= 0)
time = 0 time = 0
activated = 0 activated = 0
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.") T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.")
updateDialog()
else else
inserted_battery.battery_effect.DoEffect(src) inserted_battery.battery_effect.DoEffect(src)
else if(cooldown > 0) else if(cooldown > 0)
@@ -102,15 +102,36 @@
cooldown = 0 cooldown = 0
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
T.visible_message("\icon[src]\blue The utiliser device chimes.", "\icon[src]\blue You hear something chime.") T.visible_message("\icon[src]\blue The utiliser device chimes.", "\icon[src]\blue You hear something chime.")
updateDialog()
spawn(10) spawn(10)
pulse() pulse()
/obj/item/weapon/anodevice/Topic(href, href_list) /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"]) if(href_list["changetime"])
var/mod = href_list["changetime"] time += 10
time += num2text(mod) 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"]) if(href_list["stoptimer"])
activated = 0 activated = 0
@@ -127,4 +148,5 @@
usr << browse(null, "window=anodevice") usr << browse(null, "window=anodevice")
usr.machine = null usr.machine = null
updateDialog() if(usr)
src.interact(usr)

View File

@@ -2,6 +2,7 @@ abi79 - Game Master
arcalane - Game Admin arcalane - Game Admin
bobbehluvspropane - Game Admin bobbehluvspropane - Game Admin
cacophony - Retired Admin cacophony - Retired Admin
caelaislinn - Game Master
cajoes - Game Admin cajoes - Game Admin
cib - Game Master cib - Game Master
compactninja - Game Master compactninja - Game Master