Massive singularity fix:

-engine won't get unlimited floor tiles from reinforced floor and thus won't grow constantly;
-collectors can receive energy from several sings;
-various graphic glitches fixed;
-released singularity can now be catched. In theory.
-singularity cannot be killed by small/far explosion;
-containment field cannot be exploded at all;
-fields and singularity now are immune to blob;
-messages improved;
-machinery fingerprints handling fixed;
-engines 3*3 sings must work now;
-emitters (and some other machines) now really uses power;
-collector arrays and controllers now requires engine access;
-powerful singularity now deal more radiation damage, but you can hide behind walls;
-improved generator's sprites
Miscellaneous: 
-cell chargers now actually consumes power;
-fixed examine verb for tanks;
-fixed airlocks won't opens automatically in rare cases;
-beer now don't instakill plants;
-vents and scrubbers now requires and uses power;
-more user-friendly canisters interface;
Optimizations:
-brig doors now causes lesser cpu load;
-small optimizations and code cleanup for some atmos machinery;



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@691 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rastaf.zero@gmail.com
2010-12-23 03:31:13 +00:00
parent d6c3063bee
commit 90b9654061
17 changed files with 651 additions and 601 deletions

View File

@@ -29,19 +29,21 @@
var/welded = 0 // Added for aliens -- TLE var/welded = 0 // Added for aliens -- TLE
update_icon() update_icon()
if(on&&node) if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction) if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return return
process() process()
..() ..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
broadcast_status() broadcast_status()
if(!on) if(!on)
@@ -66,6 +68,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles) var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
use_power(10, ENVIRON)
loc.assume_air(removed) loc.assume_air(removed)
if(network) if(network)
@@ -84,7 +87,9 @@
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION) var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles) var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
use_power(10, ENVIRON)
air_contents.merge(removed) air_contents.merge(removed)
if(network) if(network)
@@ -204,14 +209,13 @@
user << "\blue You need more welding fuel to complete this task." user << "\blue You need more welding fuel to complete this task."
return return
W:use_fuel(1) W:use_fuel(1)
playsound(src.loc, 'Welder2.ogg', 50, 1)
if(!welded) if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.") user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
playsound(src.loc, 'Welder2.ogg', 50, 1)
welded = 1 welded = 1
else else
user.visible_message("[user] unwelds the vent.", "You unweld the vent.") user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
playsound(src.loc, 'Welder2.ogg', 50, 1)
welded = 0 welded = 0
examine() examine()
@@ -219,3 +223,10 @@
..() ..()
if(welded) if(welded)
usr << "It seems welded shut." usr << "It seems welded shut."
power_change()
if(powered(ENVIRON))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()

View File

@@ -21,18 +21,15 @@
var/panic = 0 //is this scrubber panicked? var/panic = 0 //is this scrubber panicked?
update_icon() update_icon()
if(on&&node) if(node && on && !(stat & (NOPOWER|BROKEN)))
if(scrubbing) if(scrubbing)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off" icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return return
proc proc
set_frequency(new_frequency) set_frequency(new_frequency)
radio_controller.remove_object(src, "[frequency]") radio_controller.remove_object(src, "[frequency]")
@@ -66,11 +63,15 @@
process() process()
..() ..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
broadcast_status() broadcast_status()
if(!on) if(!on)
return 0 return 0
var/datum/gas_mixture/environment = loc.return_air() var/datum/gas_mixture/environment = loc.return_air()
if(scrubbing) if(scrubbing)
@@ -79,7 +80,9 @@
//Take a gas sample //Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles) var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
use_power(30, ENVIRON)
//Filter it //Filter it
var/datum/gas_mixture/filtered_out = new var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature filtered_out.temperature = removed.temperature
@@ -109,6 +112,7 @@
network.update = 1 network.update = 1
else //Just siphoning all air else //Just siphoning all air
use_power(volume_rate/12, ENVIRON)
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles) var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
@@ -161,3 +165,10 @@
broadcast_status() broadcast_status()
update_icon() update_icon()
return return
power_change()
if(powered(ENVIRON))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()

View File

@@ -669,7 +669,7 @@ datum
result_amount = 5 result_amount = 5
manhattan manhattan
name = "Manhattan " name = "Manhattan"
id = "manhattan" id = "manhattan"
result = "manhattan" result = "manhattan"
required_reagents = list("whiskey" = 2, "vermouth" = 1) required_reagents = list("whiskey" = 2, "vermouth" = 1)

View File

@@ -150,7 +150,7 @@
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes) /atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
spawn( 0 ) spawn( 0 )
if ((A && yes)) if ((A && yes))
A.last_bumped = world.timeofday A.last_bumped = world.time
A.Bumped(src) A.Bumped(src)
return return
..() ..()

View File

@@ -93,16 +93,14 @@
..() ..()
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
var/env_pressure = environment.return_pressure()
if(valve_open) if(valve_open)
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
var/env_pressure = environment.return_pressure()
var/pressure_delta = min(release_pressure - env_pressure, (air_contents.return_pressure() - env_pressure)/2) var/pressure_delta = min(release_pressure - env_pressure, (air_contents.return_pressure() - env_pressure)/2)
//Can not have a pressure delta that would cause environment pressure > tank pressure //Can not have a pressure delta that would cause environment pressure > tank pressure
@@ -117,9 +115,9 @@
environment.merge(removed) environment.merge(removed)
else else
loc.assume_air(removed) loc.assume_air(removed)
src.update_icon()
src.updateDialog() src.updateDialog()
src.update_icon()
return return
/obj/machinery/portable_atmospherics/canister/return_air() /obj/machinery/portable_atmospherics/canister/return_air()
@@ -166,7 +164,7 @@ Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text] [holding_text]
<BR> <BR>
Release Valve: <A href='?src=\ref[src];toggle=1'>[valve_open?("Open"):("Closed")]</A><BR> Release Valve: <A href='?src=\ref[src];toggle=1'>[valve_open?("Open"):("Closed")]</A><BR>
Release Pressure: <A href='?src=\ref[src];pressure_adj=-100'>-</A> <A href='?src=\ref[src];pressure_adj=-10'>-</A> [release_pressure] <A href='?src=\ref[src];pressure_adj=10'>+</A> <A href='?src=\ref[src];pressure_adj=100'>+</A><BR> Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?src=\ref[src];pressure_adj=-100'>-</A> <A href='?src=\ref[src];pressure_adj=-10'>-</A> <A href='?src=\ref[src];pressure_adj=-1'>-</A> [release_pressure] <A href='?src=\ref[src];pressure_adj=1'>+</A> <A href='?src=\ref[src];pressure_adj=10'>+</A> <A href='?src=\ref[src];pressure_adj=100'>+</A> <A href='?src=\ref[src];pressure_adj=1000'>+</A><BR>
<HR> <HR>
<A href='?src=\ref[user];mach_close=canister'>Close</A><BR> <A href='?src=\ref[user];mach_close=canister'>Close</A><BR>
"} "}

View File

@@ -22,6 +22,8 @@
if(!connected_port) //only react when pipe_network will ont it do it for you if(!connected_port) //only react when pipe_network will ont it do it for you
//Allow for reactions //Allow for reactions
air_contents.react() air_contents.react()
else
update_icon()
Del() Del()
del(air_contents) del(air_contents)

View File

@@ -23,15 +23,12 @@
/obj/machinery/portable_atmospherics/pump/process() /obj/machinery/portable_atmospherics/pump/process()
..() ..()
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
if(on) if(on)
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
if(direction_out) if(direction_out)
var/pressure_delta = target_pressure - environment.return_pressure() var/pressure_delta = target_pressure - environment.return_pressure()
//Can not have a pressure delta that would cause environment pressure > tank pressure //Can not have a pressure delta that would cause environment pressure > tank pressure
@@ -63,9 +60,9 @@
removed = loc.remove_air(transfer_moles) removed = loc.remove_air(transfer_moles)
air_contents.merge(removed) air_contents.merge(removed)
//src.update_icon()
src.updateDialog() src.updateDialog()
src.update_icon()
return return
/obj/machinery/portable_atmospherics/pump/return_air() /obj/machinery/portable_atmospherics/pump/return_air()
@@ -93,7 +90,7 @@ Port Status: [(connected_port)?("Connected"):("Disconnected")]
<BR> <BR>
Power Switch: <A href='?src=\ref[src];power=1'>[on?("On"):("Off")]</A><BR> Power Switch: <A href='?src=\ref[src];power=1'>[on?("On"):("Off")]</A><BR>
Pump Direction: <A href='?src=\ref[src];direction=1'>[direction_out?("Out"):("In")]</A><BR> Pump Direction: <A href='?src=\ref[src];direction=1'>[direction_out?("Out"):("In")]</A><BR>
Target Pressure: <A href='?src=\ref[src];pressure_adj=-10'>-</A> <A href='?src=\ref[src];pressure_adj=-1'>-</A> [target_pressure] <A href='?src=\ref[src];pressure_adj=1'>+</A> <A href='?src=\ref[src];pressure_adj=10'>+</A><BR> Target Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?src=\ref[src];pressure_adj=-100'>-</A> <A href='?src=\ref[src];pressure_adj=-10'>-</A> <A href='?src=\ref[src];pressure_adj=-1'>-</A> [target_pressure] <A href='?src=\ref[src];pressure_adj=1'>+</A> <A href='?src=\ref[src];pressure_adj=10'>+</A> <A href='?src=\ref[src];pressure_adj=100'>+</A> <A href='?src=\ref[src];pressure_adj=1000'>+</A><BR>
<HR> <HR>
<A href='?src=\ref[user];mach_close=pump'>Close</A><BR> <A href='?src=\ref[user];mach_close=pump'>Close</A><BR>
"} "}

View File

@@ -23,14 +23,12 @@
/obj/machinery/portable_atmospherics/scrubber/process() /obj/machinery/portable_atmospherics/scrubber/process()
..() ..()
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
if(on) if(on)
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else
environment = loc.return_air()
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
//Take a gas sample //Take a gas sample
@@ -64,9 +62,8 @@
environment.merge(removed) environment.merge(removed)
else else
loc.assume_air(removed) loc.assume_air(removed)
//src.update_icon()
src.updateDialog() src.updateDialog()
src.update_icon()
return return
/obj/machinery/portable_atmospherics/scrubber/return_air() /obj/machinery/portable_atmospherics/scrubber/return_air()
@@ -93,7 +90,8 @@ Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text] [holding_text]
<BR> <BR>
Power Switch: <A href='?src=\ref[src];power=1'>[on?("On"):("Off")]</A><BR> Power Switch: <A href='?src=\ref[src];power=1'>[on?("On"):("Off")]</A><BR>
Target Pressure: <A href='?src=\ref[src];volume_adj=-10'>-</A> <A href='?src=\ref[src];volume_adj=-1'>-</A> [volume_rate] <A href='?src=\ref[src];volume_adj=1'>+</A> <A href='?src=\ref[src];pressure_adj=10'>+</A><BR> Power regulator: <A href='?src=\ref[src];volume_adj=-1000'>-</A> <A href='?src=\ref[src];volume_adj=-100'>-</A> <A href='?src=\ref[src];volume_adj=-10'>-</A> <A href='?src=\ref[src];volume_adj=-1'>-</A> [volume_rate] <A href='?src=\ref[src];volume_adj=1'>+</A> <A href='?src=\ref[src];volume_adj=10'>+</A> <A href='?src=\ref[src];volume_adj=100'>+</A> <A href='?src=\ref[src];volume_adj=1000'>+</A><BR>
<HR> <HR>
<A href='?src=\ref[user];mach_close=scrubber'>Close</A><BR> <A href='?src=\ref[user];mach_close=scrubber'>Close</A><BR>
"} "}

View File

@@ -19,27 +19,41 @@
var/timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing var/timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing
var/childproof = 0 // boolean, when activating the door controls, locks door for 1 minute var/childproof = 0 // boolean, when activating the door controls, locks door for 1 minute
var/picture_state // icon_state of alert picture, if not displaying text/numbers var/picture_state // icon_state of alert picture, if not displaying text/numbers
var/obj/machinery/door/window/brigdoor/targetdoor
var/list/obj/machinery/flasher/targetflashers
/obj/machinery/door_timer/New()
..()
for(var/obj/machinery/door/window/brigdoor/M in world)
if (M.id == src.id)
targetdoor = M
break
if (isnull(targetdoor))
stat |= BROKEN
targetflashers = list()
for(var/obj/machinery/flasher/F in world)
if(F.id == src.id)
targetflashers += F
//Main door timer loop, if it's timing and time is >0 reduce time by 1. //Main door timer loop, if it's timing and time is >0 reduce time by 1.
// if it's less than 0, open door, reset timer // if it's less than 0, open door, reset timer
// update the door_timer window and the icon // update the door_timer window and the icon
/obj/machinery/door_timer/process() /obj/machinery/door_timer/process()
..() if (stat & (NOPOWER|BROKEN))
return
if (src.timing) if (src.timing)
if (src.time > 0) if (src.time > 0)
src.time = round(src.time) - 1 src.time--
else else
src.opendoor() // open doors, reset timer, clear status screen src.opendoor() // open doors, reset timer, clear status screen
src.time = 0 src.time = 0
src.timing = 0 src.timing = 0
src.updateDialog() src.updateDialog()
src.update_icon() src.update_icon()
else // keep door open may cause lag as it's checking every second if someone closed door else
for(var/obj/machinery/door/window/brigdoor/M in world) if(targetdoor && targetdoor.density) //door searching cicle moved to New()
if (M.id == src.id) spawn( 0 )
if(M.density) targetdoor.open()
spawn( 0 )
M.open()
return return
// has the door power sitatuation changed, if so update icon. // has the door power sitatuation changed, if so update icon.
@@ -51,11 +65,9 @@
/obj/machinery/door_timer/proc/opendoor() /obj/machinery/door_timer/proc/opendoor()
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return return
for(var/obj/machinery/door/window/brigdoor/M in world) if(targetdoor.density)
if (M.id == src.id) spawn( 0 )
if(M.density) targetdoor.open()
spawn( 0 )
M.open()
src.updateUsrDialog() src.updateUsrDialog()
src.update_icon() src.update_icon()
return return
@@ -63,11 +75,9 @@
/obj/machinery/door_timer/proc/closedoor() /obj/machinery/door_timer/proc/closedoor()
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return return
for(var/obj/machinery/door/window/brigdoor/M in world) if(!targetdoor.density)
if (M.id == src.id) spawn( 0 )
if(!M.density) targetdoor.close()
spawn( 0 )
M.close()
src.updateUsrDialog() src.updateUsrDialog()
src.update_icon() src.update_icon()
return return
@@ -100,12 +110,13 @@
var/second = src.time % 60 var/second = src.time % 60
var/minute = (src.time - second) / 60 var/minute = (src.time - second) / 60
dat += text("<br><HR>\nTimer System: [d2]\nTime Left: [(minute ? text("[minute]:") : null)][second] <A href='?src=\ref[src];tp=-60'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=60'>+</A>") dat += text("<br><HR>\nTimer System: [d2]\nTime Left: [(minute ? text("[minute]:") : null)][second] <A href='?src=\ref[src];tp=-60'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=60'>+</A>")
for(var/obj/machinery/flasher/F in world) if (targetflashers.len)
if(F.id == src.id) dat += "<BR>"
if(F.last_flash && world.time < F.last_flash + 150) for(var/obj/machinery/flasher/F in targetflashers)
dat += text("<BR><BR><A href='?src=\ref[];fc=1'>Flash Cell (Charging)</A>", src) if(F.last_flash && world.time < F.last_flash + 150)
else dat += text("<BR><A href='?src=\ref[];fc=1'>Flash Cell (Charging)</A>", src)
dat += text("<BR><BR><A href='?src=\ref[];fc=1'>Flash Cell</A>", src) else
dat += text("<BR><A href='?src=\ref[];fc=1'>Flash Cell</A>", src)
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user) dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500") user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer") onclose(user, "computer")
@@ -136,9 +147,8 @@
src.closedoor() src.closedoor()
if (href_list["fc"]) if (href_list["fc"])
if(src.allowed(usr)) if(src.allowed(usr))
for (var/obj/machinery/flasher/F in world) for (var/obj/machinery/flasher/F in targetflashers)
if (F.id == src.id) F.flash()
F.flash()
src.add_fingerprint(usr) src.add_fingerprint(usr)
src.updateUsrDialog() src.updateUsrDialog()
src.update_icon() src.update_icon()
@@ -151,10 +161,6 @@
// if BROKEN, display blue screen of death icon AI uses // if BROKEN, display blue screen of death icon AI uses
// if timing=true, run update display function // if timing=true, run update display function
/obj/machinery/door_timer/proc/update_icon() /obj/machinery/door_timer/proc/update_icon()
var/disp1
var/disp2
disp1 = uppertext(id)
disp2 = "[add_zero(num2text((time / 60) % 60),2)]~[add_zero(num2text(time % 60), 2)]"
if(stat & (NOPOWER)) if(stat & (NOPOWER))
icon_state = "frame" icon_state = "frame"
return return
@@ -164,6 +170,8 @@
return return
else else
if(src.timing) if(src.timing)
var/disp1 = uppertext(id)
var/disp2 = "[add_zero(num2text((time / 60) % 60),2)]~[add_zero(num2text(time % 60), 2)]"
spawn( 5 ) spawn( 5 )
update_display(disp1, disp2) update_display(disp1, disp2)

View File

@@ -2,7 +2,7 @@
if(p_open || operating) return if(p_open || operating) return
if(ismob(AM)) if(ismob(AM))
var/mob/M = AM var/mob/M = AM
if(world.timeofday - AM.last_bumped <= 60) return if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that?
if(M.client && !M:handcuffed) if(M.client && !M:handcuffed)
bumpopen(M) bumpopen(M)
else if(istype(AM, /obj/machinery/bot)) else if(istype(AM, /obj/machinery/bot))
@@ -237,7 +237,7 @@
return return
if(ismob(AM)) if(ismob(AM))
var/mob/M = AM var/mob/M = AM
if(world.timeofday - AM.last_bumped <= 60) return if(world.time - AM.last_bumped <= 60) return
if(M.client && !M:handcuffed) if(M.client && !M:handcuffed)
bumpopen(M) bumpopen(M)
else if(istype(AM, /obj/machinery/bot)) else if(istype(AM, /obj/machinery/bot))

View File

@@ -436,7 +436,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
// Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay? // Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay?
if(S.reagents.has_reagent("beer", 1)) if(S.reagents.has_reagent("beer", 1))
src.health =- round(S.reagents.get_reagent_amount("beer")*0.05) src.health -= round(S.reagents.get_reagent_amount("beer")*0.05)
src.nutrilevel += round(S.reagents.get_reagent_amount("beer")*0.04) src.nutrilevel += round(S.reagents.get_reagent_amount("beer")*0.04)
src.waterlevel += round(S.reagents.get_reagent_amount("beer")*0.7) src.waterlevel += round(S.reagents.get_reagent_amount("beer")*0.7)
@@ -694,7 +694,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else if(src.myseed.species == "liberty") else if(src.myseed.species == "liberty")
t_prod.drug_amt = round(src.myseed.potency / 5, 1) // TRIP TIME t_prod.drug_amt = round(src.myseed.potency / 5, 1) // TRIP TIME
else if(src.myseed.species == "chili" || src.myseed.species == "chiliice") else if(src.myseed.species == "chili" || src.myseed.species == "chiliice")
t_prod.heat_amt = src.myseed.potency // BRING ON THE HEAT t_prod.heat_amt = src.myseed.potency // BRING ON THE HEAT //BUG: heat_amt not used at all
t_amount++ t_amount++
src.harvest = 0 src.harvest = 0
src.lastproduce = src.age src.lastproduce = src.age

File diff suppressed because it is too large Load Diff

View File

@@ -220,27 +220,27 @@
var/obj/item/weapon/icon = src var/obj/item/weapon/icon = src
if (istype(src.loc, /obj/item/assembly)) if (istype(src.loc, /obj/item/assembly))
icon = src.loc icon = src.loc
if (!in_range(src, usr)) if (!in_range(src, usr))
if (icon == src) usr << "\blue It's a \icon[icon]! If you want any more information you'll need to get closer." if (icon == src) usr << "\blue It's a \icon[icon][src]! If you want any more information you'll need to get closer."
return return
var/celsius_temperature = src.air_contents.temperature-T0C var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive var/descriptive
if (celsius_temperature < 20) if (celsius_temperature < 20)
descriptive = "cold" descriptive = "cold"
else if (celsius_temperature < 40) else if (celsius_temperature < 40)
descriptive = "room temperature" descriptive = "room temperature"
else if (celsius_temperature < 80) else if (celsius_temperature < 80)
descriptive = "lukewarm" descriptive = "lukewarm"
else if (celsius_temperature < 100) else if (celsius_temperature < 100)
descriptive = "warm" descriptive = "warm"
else if (celsius_temperature < 300) else if (celsius_temperature < 300)
descriptive = "hot" descriptive = "hot"
else else
descriptive = "furiously hot" descriptive = "furiously hot"
usr << text("\blue The \icon[] feels []", icon, descriptive) usr << text("\blue The \icon[][src] feels []", icon, descriptive)
return return

View File

@@ -38,9 +38,11 @@
// recharge the cell // recharge the cell
/obj/item/weapon/cell/proc/give(var/amount) /obj/item/weapon/cell/proc/give(var/amount)
charge = min(maxcharge, charge+amount) var/power_used = min(maxcharge-charge,amount)
charge += power_used
if(rigged && amount > 0) if(rigged && amount > 0)
explode() explode()
return power_used
/obj/item/weapon/cell/examine() /obj/item/weapon/cell/examine()
@@ -52,9 +54,6 @@
usr << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!!!\nThe charge meter reads [round(src.percent() )]%." usr << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!!!\nThe charge meter reads [round(src.percent() )]%."
/obj/item/weapon/cell/attackby(obj/item/W, mob/user) /obj/item/weapon/cell/attackby(obj/item/W, mob/user)
var/obj/item/clothing/gloves/G = W var/obj/item/clothing/gloves/G = W
if(istype(G)) if(istype(G))
@@ -82,7 +81,7 @@
/obj/item/weapon/cell/proc/explode() /obj/item/weapon/cell/proc/explode()
var/turf/T = get_turf(src.loc) var/turf/T = get_turf(src.loc)
explosion(T, 0, 1, 2, 2) explosion(T, 0, 1, 2, 2) //TODO: involve charge
spawn(1) spawn(1)
del(src) del(src)

View File

@@ -363,6 +363,11 @@
return return
makepowernets() //TODO: find fast way makepowernets() //TODO: find fast way
/obj/machinery/power/proc/disconnect_from_network()
//TODO: dunno how to do that
return
/turf/proc/get_cable_node() /turf/proc/get_cable_node()
if(!istype(src, /turf/simulated/floor)) if(!istype(src, /turf/simulated/floor))
return return

View File

@@ -1,5 +1,2 @@
deuryn - Host rastaf0 - Host
tle - Host
mport2004 - Coder

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB