This commit is contained in:
Furlucis
2014-01-17 03:05:04 -05:00
57 changed files with 2296 additions and 1262 deletions

View File

@@ -134,6 +134,7 @@ zone/proc/DebugDisplay(client/client)
client/proc/TestZASRebuild()
set category = "Debug"
// var/turf/turf = get_turf(mob)
var/zone/current_zone = mob.loc:zone
if(!current_zone)
@@ -155,7 +156,7 @@ client/proc/TestZASRebuild()
for(var/direction in cardinal)
var/turf/simulated/adjacent = get_step(current, direction)
if(!current.ZAirPass(adjacent))
if(!current.ZCanPass(adjacent))
continue
if(turfs.Find(adjacent))
current_adjacents += adjacent
@@ -210,4 +211,9 @@ client/proc/TestZASRebuild()
for(var/turf/current in turfs)
current.overlays -= overlays
return final_arrangement
return final_arrangement
/client/proc/ZASSettings()
set category = "Debug"
vsc.SetDefault(mob)

View File

@@ -67,7 +67,7 @@ var/global/vs_control/vsc = new
var/connection_insulation = 1
var/connection_insulation_NAME = "Connections - Insulation"
var/connection_insulation_DESC = "How insulative a connection is, in terms of heat transfer. 1 is perfectly insulative, and 0 is perfectly conductive."
var/connection_insulation_DESC = "Boolean, should doors forbid heat transfer?"
var/connection_temperature_delta = 10
var/connection_temperature_delta_NAME = "Connections - Temperature Difference"
@@ -288,6 +288,7 @@ var/global/vs_control/vsc = new
airflow_speed_decay = 1
airflow_delay = 20
airflow_mob_slowdown = 3
connection_insulation = 0
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"

View File

@@ -28,6 +28,11 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
var/progress = "nothing"
/datum/gas_mixture/zone
Del()
CRASH("Something tried to delete a zone's air!")
. = ..()
//CREATION AND DELETION
/zone/New(turf/start)
. = ..()
@@ -47,7 +52,8 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
//Generate the gas_mixture for use in txhis zone by using the average of the gases
//defined at startup.
air = new
//Changed to try and find the source of the error.
air = new /datum/gas_mixture/zone()
air.group_multiplier = contents.len
for(var/turf/simulated/T in contents)
if(!T.air)
@@ -102,6 +108,10 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
C.A.zone = null
if(C.B.zone == src)
C.B.zone = null
if(C.zone_A == src)
C.zone_A = null
if(C.zone_B == src)
C.zone_B = null
direct_connections = null
//Ensuring the zone list doesn't get clogged with null values.
@@ -114,12 +124,17 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
//Removing zone connections and scheduling connection cleanup
for(var/zone/Z in connected_zones)
Z.connected_zones.Remove(src)
Z.closed_connection_zones.Remove(src)
if(!Z.connected_zones.len)
Z.connected_zones = null
if(Z.closed_connection_zones)
Z.closed_connection_zones.Remove(src)
if(!Z.closed_connection_zones.len)
Z.closed_connection_zones = null
connected_zones = null
closed_connection_zones = null
return 1
@@ -177,6 +192,10 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
if(!unsim_air_needs_update && air_unsim) //if air_unsim doesn't exist, we need to create it even if we don't need an update.
return
//Tempfix.
if(!air)
return
unsim_air_needs_update = 0
if(!air_unsim)
@@ -356,25 +375,26 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
Z.interactions_with_neighbors++
interactions_with_neighbors++
for(var/zone/Z in closed_connection_zones)
//If that zone has already processed, skip it.
if(Z.last_update > last_update)
continue
var/handle_temperature = abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta
if(Z.status == ZONE_SLEEPING)
if (handle_temperature)
Z.SetStatus(ZONE_ACTIVE)
else
if(!vsc.connection_insulation)
for(var/zone/Z in closed_connection_zones)
//If that zone has already processed, skip it.
if(Z.last_update > last_update || !Z.air)
continue
if(air && Z.air)
if( handle_temperature )
ShareHeat(air, Z.air, closed_connection_zones[Z])
var/handle_temperature = abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta
Z.interactions_with_neighbors++
interactions_with_neighbors++
if(Z.status == ZONE_SLEEPING)
if (handle_temperature)
Z.SetStatus(ZONE_ACTIVE)
else
continue
if(air && Z.air)
if( handle_temperature )
ShareHeat(air, Z.air, closed_connection_zones[Z])
Z.interactions_with_neighbors++
interactions_with_neighbors++
if(!interactions_with_neighbors && !interactions_with_unsim)
SetStatus(ZONE_SLEEPING)
@@ -649,6 +669,18 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//This implements a simplistic version of the Stefan-Boltzmann law.
var/energy_delta = ((A.temperature - B.temperature) ** 4) * 5.6704e-8 * connecting_tiles * 2.5
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
if(maximum_energy_delta > abs(energy_delta))
if(energy_delta < 0)
maximum_energy_delta *= -1
energy_delta = maximum_energy_delta
A.temperature -= energy_delta / (A.heat_capacity() * A.group_multiplier)
B.temperature += energy_delta / (B.heat_capacity() * B.group_multiplier)
/* This was bad an I feel bad.
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -671,7 +703,7 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
A.temperature = max(0, (A.temperature - temp_avg) * (1- (ratio / max(1,A.group_multiplier)) ) + temp_avg )
B.temperature = max(0, (B.temperature - temp_avg) * (1- (ratio / max(1,B.group_multiplier)) ) + temp_avg )
*/
///////////////////
//Zone Rebuilding//
@@ -763,6 +795,9 @@ zone/proc/Rebuild()
final_arrangement[current_identifier] = list(current)
else
//Sanity check.
if(!islist(final_arrangement[current_identifier]))
final_arrangement[current_identifier] = list()
final_arrangement[current_identifier] += current
//lazy but fast

View File

@@ -23,6 +23,9 @@ var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/whitelisted_species = list("Human")
// Posters
var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster
//Preferences stuff
//Hairstyles
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name

View File

@@ -204,26 +204,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Replacement lights"
group = "Engineering"
/datum/supply_packs/costume
name = "Standard Costume crate"
contains = list(/obj/item/weapon/storage/backpack/clown,
/obj/item/clothing/shoes/clown_shoes,
/obj/item/clothing/mask/gas/clown_hat,
/obj/item/clothing/under/rank/clown,
/obj/item/weapon/bikehorn,
/obj/item/clothing/under/mime,
/obj/item/clothing/shoes/black,
/obj/item/clothing/gloves/white,
/obj/item/clothing/mask/gas/mime,
/obj/item/clothing/head/beret,
/obj/item/clothing/suit/suspenders,
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing)
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
group = "Operations"
/datum/supply_packs/wizard
name = "Wizard costume"
contains = list(/obj/item/weapon/staff,
@@ -902,6 +882,27 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Pizza crate"
group = "Hospitality"
/datum/supply_packs/randomised/costume
num_contained = 2
contains = list(/obj/item/clothing/suit/pirate,
/obj/item/clothing/suit/johnny_coat,
/obj/item/clothing/suit/judgerobe,
/obj/item/clothing/suit/wcoat,
/obj/item/clothing/suit/hastur,
/obj/item/clothing/suit/imperium_monk,
/obj/item/clothing/suit/ianshirt,
/obj/item/clothing/suit/leathercoat,
/obj/item/clothing/suit/browncoat,
/obj/item/clothing/suit/suspenders,
/obj/item/clothing/suit/storage/labcoat/mad,
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit)
name = "Standard Costume crate"
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
group = "Operations"
/datum/supply_packs/formal_wear
contains = list(/obj/item/clothing/head/bowler,
/obj/item/clothing/head/that,

View File

@@ -400,7 +400,9 @@
/obj/item/weapon/module/power_control
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
desc = "Heavy-duty switching circuits for power control."
m_amt = 50
g_amt = 50
/obj/item/weapon/module/id_auth
name = "\improper ID authentication module"

View File

@@ -272,7 +272,7 @@
I.loc = src
src.disk = I
user << "You insert [I]."
nanomanager.update_uis(src) // update all UIs attached to src()
nanomanager.update_uis(src) // update all UIs attached to src
return
else
src.attack_hand(user)
@@ -342,7 +342,7 @@
W.loc = src
src.disk = W
user << "You insert [W]."
nanomanager.update_uis(src) // update all UIs attached to src()
nanomanager.update_uis(src) // update all UIs attached to src
/*
/obj/machinery/computer/scan_consolenew/process() //not really used right now
if(stat & (NOPOWER|BROKEN))

View File

@@ -69,12 +69,12 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
//=======//RIGHT CLICK TELEPORT//=======//
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
set name = "Phase Shift (1E)"
set name = "Phase Shift (400E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
var/C = 200
var/C = 40
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
@@ -83,6 +83,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1)
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
cell.use(C*10)
handle_teleport_grab(T, U)
U.loc = T
@@ -92,19 +93,19 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
playsound(U.loc, 'sound/effects/sparks2.ogg', 50, 1)
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
else
U << "\red You cannot teleport into solid walls or from solid matter"
U << "\red You cannot teleport into solid walls or from solid matter."
return
//=======//EM PULSE//=======//
//Disables nearby tech equipment.
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
set name = "EM Burst (1,000E)"
set name = "EM Burst (2,000E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 250
if(!ninjacost(C,100)) // EMP's now cost 1,000Energy about 30%
var/C = 200
if(!ninjacost(C,0)) // EMP's now cost 1,000Energy about 30%
var/mob/living/carbon/human/U = affecting
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
@@ -115,13 +116,13 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
//=======//ENERGY BLADE//=======//
//Summons a blade of energy in active hand.
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
set name = "Energy Blade (20E)"
set name = "Energy Blade (500E)"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
if(!ninjacost(C, 800)) //Same spawn cost but higher upkeep cost
if(!ninjacost(C,0)) //Same spawn cost but higher upkeep cost
var/mob/living/carbon/human/U = affecting
if(!kamikaze)
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
@@ -148,12 +149,12 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
/*Shoots ninja stars at random people.
This could be a lot better but I'm too tired atm.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
set name = "Energy Star (1,000E)"
set name = "Energy Star (800E)"
set desc = "Launches an energy star at a random living target."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
var/C = 80
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/targets[] = list()//So yo can shoot while yo throw dawg
@@ -173,7 +174,7 @@ This could be a lot better but I'm too tired atm.*/
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
cell.use(C*100)// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
cell.use(C*10)
A.process()
else
U << "\red There are no targets in view."
@@ -183,13 +184,13 @@ This could be a lot better but I'm too tired atm.*/
/*Allows the ninja to capture people, I guess.
Must right click on a mob to activate.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
set name = "Energy Net (8,000E)"
set name = "Energy Net (7,000E)"
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
set category = null
set src = usr.contents
var/C = 500
if(!ninjacost(C,80)&&iscarbon(M)) // Nets now cost 8,000
var/C = 700
if(!ninjacost(C,0)&&iscarbon(M))
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
//if(M)//DEBUG
@@ -200,7 +201,7 @@ Must right click on a mob to activate.*/
return
spawn(0)
U.Beam(M,"n_beam",,15)
M.anchored = 1//Anchors them so they can't move.
M.captured = 1
U.say("Get over here!")
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
E.layer = M.layer+1//To have it appear one layer above the mob.
@@ -210,7 +211,7 @@ Must right click on a mob to activate.*/
E.master = U
spawn(0)//Parallel processing.
E.process(M)
cell.use(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
cell.use(C*10) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
else
U << "They are already trapped inside an energy net."
else

View File

@@ -1385,7 +1385,8 @@ It is possible to destroy the net by the occupant or someone else.
if(!isnull(master))//As long as they still exist.
master << "\blue <b>SUCCESS</b>: \black transport procedure of \the [affecting] complete."
M.anchored = 0//Important.
M.captured = 0 //Important.
M.anchored = initial(M.anchored) //Changes the mob's anchored status to the original one; this is not handled by the can_move proc.
else//And they are free.
M << "\blue You are free of the net!"

View File

@@ -21,7 +21,8 @@
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
if(H.age>49)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)

View File

@@ -19,7 +19,6 @@
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
@@ -362,4 +361,4 @@
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
return 1
return 1

View File

@@ -138,8 +138,6 @@
if(air_contents.temperature > PLASMA_FLASHPOINT)
air_contents.zburn()
src.updateDialog()
return
/obj/machinery/portable_atmospherics/canister/return_air()
@@ -194,6 +192,10 @@
return
..()
nanomanager.update_uis(src) // Update all NanoUIs attached to src
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -202,94 +204,94 @@
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
return src.interact(user)
return src.ui_interact(user)
/obj/machinery/portable_atmospherics/canister/interact(var/mob/user as mob)
/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if (src.destroyed)
return
user.set_machine(src)
var/holding_text
if(holding)
holding_text = {"<BR><B>Tank Pressure</B>: [holding.air_contents.return_pressure()] KPa<BR>
<A href='?src=\ref[src];remove_tank=1'>Remove Tank</A><BR>
"}
var/output_text = {"<TT><B>[name]</B>[can_label?" <A href='?src=\ref[src];relabel=1'><small>relabel</small></a>":""]<BR>
Pressure: [air_contents.return_pressure()] KPa<BR>
Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text]
<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=-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>
<A href='?src=\ref[user];mach_close=canister'>Close</A><BR>
"}
// this is the data which will be sent to the ui
var/data[0]
data["name"] = name
data["canLabel"] = can_label ? 1 : 0
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
data["minReleasePressure"] = round(ONE_ATMOSPHERE/10)
data["maxReleasePressure"] = round(10*ONE_ATMOSPHERE)
data["valveOpen"] = valve_open ? 1 : 0
data["hasHoldingTank"] = holding ? 1 : 0
if (holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
user << browse("<html><head><title>[src]</title></head><body>[output_text]</body></html>", "window=canister;size=600x300")
onclose(user, "canister")
return
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict.
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=canister")
onclose(usr, "canister")
return
if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
usr.set_machine(src)
if(href_list["toggle"])
if (valve_open)
if (holding)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
else
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict.
if (!istype(src.loc, /turf))
return 0
if(href_list["toggle"])
if (valve_open)
if (holding)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
else
if (holding)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
else
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
valve_open = !valve_open
if (href_list["remove_tank"])
if(holding)
if(istype(holding, /obj/item/weapon/tank))
holding.manipulated_by = usr.real_name
holding.loc = loc
holding = null
if (href_list["pressure_adj"])
var/diff = text2num(href_list["pressure_adj"])
if(diff > 0)
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
else
if (holding)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
valve_open = !valve_open
if (href_list["relabel"])
if (can_label)
var/list/colors = list(\
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Toxin (Bio)\]" = "orange", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
if (label)
src.canister_color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
src.updateUsrDialog()
src.add_fingerprint(usr)
update_icon()
else
usr << browse(null, "window=canister")
return
return
if (href_list["remove_tank"])
if(holding)
if(istype(holding, /obj/item/weapon/tank))
holding.manipulated_by = usr.real_name
holding.loc = loc
holding = null
if (href_list["pressure_adj"])
var/diff = text2num(href_list["pressure_adj"])
if(diff > 0)
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
if (href_list["relabel"])
if (can_label)
var/list/colors = list(\
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Toxin (Bio)\]" = "orange", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
if (label)
src.canister_color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
src.add_fingerprint(usr)
update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/toxins/New()

View File

@@ -16,7 +16,8 @@ var/global/list/autolathe_recipes = list( \
new /obj/item/weapon/stock_parts/console_screen(), \
new /obj/item/weapon/airlock_electronics(), \
new /obj/item/weapon/airalarm_electronics(), \
new /obj/item/weapon/firealarm_electronics(), \
new /obj/item/weapon/firealarm_electronics(), \
new /obj/item/weapon/module/power_control(), \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \

View File

@@ -1,8 +1,6 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 10
/obj/item/weapon/contraband
name = "contraband item"
desc = "You probably shouldn't be holding this."
@@ -15,54 +13,16 @@
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface."
icon_state = "rolled_poster"
var/serial_number = 0
var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
/obj/item/weapon/contraband/poster/New(turf/loc, var/given_serial = 0)
if(given_serial == 0)
serial_number = rand(1, NUM_OF_POSTER_DESIGNS)
resulting_poster = new(serial_number)
serial_number = rand(1, poster_designs.len)
else
serial_number = given_serial
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
name += " - No. [serial_number]"
..(loc)
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
if(resulting_poster)
resulting_poster.add_fingerprint(user)
..()*/
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
if(istype(A, /turf/simulated/wall))
if(resulting_poster == null)
return
else
var/turf/simulated/wall/W = A
var/check = 0
var/stuff_on_wall = 0
for(var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
if(istype(O,/obj/structure/sign/poster))
check = 1
break
stuff_on_wall++
if(stuff_on_wall == 3)
check = 1
break
if(check)
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
return
resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
W.contents += resulting_poster
del(src)*/
//############################## THE ACTUAL DECALS ###########################
obj/structure/sign/poster
@@ -79,44 +39,13 @@ obj/structure/sign/poster/New(var/serial)
serial_number = serial
if(serial_number == loc)
serial_number = rand(1, NUM_OF_POSTER_DESIGNS) //This is for the mappers that want individual posters without having to use rolled posters.
serial_number = rand(1, poster_designs.len) //This is for the mappers that want individual posters without having to use rolled posters.
icon_state = "poster[serial_number]"
switch(serial_number)
if(1)
name += " - Free Tonto"
desc += " A framed shred of a much larger flag, colors bled together and faded from age."
if(2)
name += " - Atmosia Declaration of Independence"
desc += " A relic of a failed rebellion"
if(3)
name += " - Fun Police"
desc += " A poster condemning the station's security forces."
if(4)
name += " - Lusty Xeno"
desc += " A heretical poster depicting the titular star of an equally heretical book."
if(5)
name += " - Syndicate Recruitment Poster"
desc += " See the galaxy! Shatter corrupt megacorporations! Join today!"
if(6)
name += " - Clown"
desc += " Honk."
if(7)
name += " - Smoke"
desc += " A poster depicting a carton of cigarettes."
if(8)
name += " - Grey Tide"
desc += " A rebellious poster symbolizing assistant solidarity."
if(9)
name += " - Missing Gloves"
desc += " This poster is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
if(10)
name += " - Hacking Guide"
desc += " This poster details the internal workings of the common Nanotrasen airlock."
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
var/designtype = poster_designs[serial_number]
var/datum/poster/design=new designtype
name += " - [design.name]"
desc += " [design.desc]"
icon_state = design.icon_state // poster[serial_number]
..()
obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -151,14 +80,17 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/sign/poster/proc/roll_and_drop(turf/newloc)
var/obj/item/weapon/contraband/poster/P = new(src, serial_number)
P.resulting_poster = src
P.loc = newloc
src.loc = P
del(src)
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
//separated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
if(!P.resulting_poster) return
if(!istype(src,/turf/simulated/wall))
user << "\red You can't place this here!"
return
var/stuff_on_wall = 0
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
@@ -173,7 +105,7 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
var/obj/structure/sign/poster/D = P.resulting_poster
var/obj/structure/sign/poster/D = new(P.serial_number)
var/temp_loc = user.loc
flick("poster_being_set",D)
@@ -188,4 +120,11 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "<span class='notice'>You place the poster!</span>"
else
D.roll_and_drop(temp_loc)
return
return
/datum/poster
// Name suffix. Poster - [name]
var/name=""
// Description suffix
var/desc=""
var/icon_state=""

View File

@@ -0,0 +1,145 @@
// baystation12 posters
/datum/poster/bay_1
icon_state="bsposter1"
name = "Unlucky Space Explorer"
desc = "This particular one depicts a skeletal form within a space suit."
/datum/poster/bay_2
icon_state="bsposter2"
name = "Positronic Logic Conflicts"
desc = "This particular one depicts the cold, unmoving stare of a particular advanced AI."
/datum/poster/bay_3
icon_state="bsposter3"
name = "Paranoia"
desc = "This particular one warns of the dangers of trusting your co-workers too much."
/datum/poster/bay_4
icon_state="bsposter4"
name = "Keep Calm"
desc = "This particular one is of a famous New Earth design, although a bit modified. Someone has scribbled an O over the A on the poster."
/datum/poster/bay_5
icon_state="bsposter5"
name = "Martian Warlord"
desc = "This particular one depicts the cartoony mug of a certain Martial Warmonger."
/datum/poster/bay_6
icon_state="bsposter6"
name = "Technological Singularity"
desc = "This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
/datum/poster/bay_7
icon_state="bsposter7"
name = "Wasteland"
desc = "This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"12\" is visible on their blue jumpsuits."
/datum/poster/bay_8
icon_state="bsposter8"
name = "Pinup Girl Cindy"
desc = "This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
/datum/poster/bay_9
icon_state="bsposter9"
name = "Pinup Girl Amy"
desc = "This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
/datum/poster/bay_10
icon_state="bsposter10"
name = "Don't Panic"
desc = "This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
/datum/poster/bay_11
icon_state="bsposter11"
name = "Underwater Laboratory"
desc = "This particular one is of the fabled last crew of Nanotrasen's previous project before going big on plasma research."
/datum/poster/bay_12
icon_state="bsposter12"
name = "Rogue AI"
desc = "This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
/datum/poster/bay_13
icon_state="bsposter13"
name = "User of the Arcane Arts"
desc = "This particular one depicts a wizard, casting a spell. You can't really make out if it's an actual photograph or a computer-generated image."
/datum/poster/bay_14
icon_state="bsposter14"
name = "Levitating Skull"
desc = "This particular one is the portrait of a flying enchanted skull. Its adventures along with its fabled companion are now fading through history..."
/datum/poster/bay_15
icon_state="bsposter15"
name = "Augmented Legend"
desc = "This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
/datum/poster/bay_16
icon_state="bsposter16"
name = "Dangerous Static"
desc = "This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, but it's ripped off."
/datum/poster/bay_17
icon_state="bsposter17"
name = "Pinup Girl Val"
desc = "Luscious Val McNeil, the vertically challenged Legal Extraordinaire, winner of Miss Space two years running and favoured pinup girl of Lawyers Weekly."
/datum/poster/bay_18
icon_state="bsposter18"
name = "Derpman, Enforcer of the State"
desc = "Here to protect and serve... your donuts! A generously proportioned man, he teaches you the value of hiding your snacks."
/datum/poster/bay_19
icon_state="bsposter19"
name = "Respect a Soghun"
desc = "This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
/datum/poster/bay_20
icon_state="bsposter20"
name = "Skrell Twilight"
desc = "This poster depicts a mysteriously inscrutable, alien scene. Numerous Skrell can be seen conversing amidst great, crystalline towers rising above crashing waves"
/datum/poster/bay_21
icon_state="bsposter21"
name = "Join the Fuzz!"
desc = "It's a nice recruitment poster of a white haired Chinese woman that says; \"Big Guns, Hot Women, Good Times. Security. We get it done.\""
/datum/poster/bay_22
icon_state="bsposter22"
name = "Looking for a career with excitement?"
desc = "A recruitment poster starring a dark haired woman with glasses and a purple shirt that has \"Got Brains? Got Talent? Not afraid of electric flying monsters that want to suck the soul out of you? Then Xenobiology could use someone like you!\" written on the bottom."
/datum/poster/bay_23
icon_state="bsposter23"
name = "Safety first: because electricity doesn't wait!"
desc = "A safety poster starring a clueless looking redhead with frazzled hair. \"Every year, hundreds of NT employees expose themselves to electric shock. Play it safe. Avoid suspicious doors after electrical storms, and always wear protection when doing electric maintenance.\""
/datum/poster/bay_24
icon_state="bsposter24"
name = "Responsible medbay habits, No #259"
desc = "A poster with a nervous looking geneticist on it states; \"Friends Don't Tell Friends They're Clones. It can cause severe and irreparable emotional trauma. Always do the right thing and never tell them that they were dead.\""
/datum/poster/bay_25
icon_state="bsposter25"
name = "Irresponsible medbay habits, No #2"
desc = "This is a safety poster starring a perverted looking naked doctor. \"Sexual harassment is never okay. REPORT any acts of sexual deviance or harassment that disrupt a healthy working environment.\""
/datum/poster/bay_26
icon_state="bsposter26"
name = "The Men We Knew"
desc = "This movie poster depicts a group of soldiers fighting a large mech, the movie seems to be a patriotic war movie."
/datum/poster/bay_27
icon_state="bsposter27"
name = "Plastic Sheep Can't Scream"
desc = "This is a movie poster for an upcoming horror movie, it features an AI in the front of it."
/datum/poster/bay_28
icon_state="bsposter28"
name = "The Stars Know Love"
desc = "This is a movie poster. A bleeding woman is shown drawing a heart in her blood on the window of space ship, it seems to be a romantic Drama."
/datum/poster/bay_29
icon_state="bsposter29"
name = "Winter Is Coming"
desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""

View File

@@ -0,0 +1,50 @@
// /tg/ posters.
/datum/poster/tg_1
name = "Free Tonto"
desc = "A framed shred of a much larger flag, colors bled together and faded from age."
icon_state="poster1"
/datum/poster/tg_2
name = "Atmosia Declaration of Independence"
desc = "A relic of a failed rebellion"
icon_state="poster2"
/datum/poster/tg_3
name = "Fun Police"
desc = "A poster condemning the station's security forces."
icon_state="poster3"
/datum/poster/tg_4
name = "Lusty Xeno"
desc = "A heretical poster depicting the titular star of an equally heretical book."
icon_state="poster4"
/datum/poster/tg_5
name = "Syndicate Recruitment Poster"
desc = "See the galaxy! Shatter corrupt megacorporations! Join today!"
icon_state="poster5"
/datum/poster/tg_6
name = "Clown"
desc = "Honk."
icon_state="poster6"
/datum/poster/tg_7
name = "Smoke"
desc = "A poster depicting a carton of cigarettes."
icon_state="poster7"
/datum/poster/tg_8
name = "Grey Tide"
desc = "A rebellious poster symbolizing assistant solidarity."
icon_state="poster8"
/datum/poster/tg_9
name = "Missing Gloves"
desc = "This poster is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
icon_state="poster9"
/datum/poster/tg_10
name = "Hacking Guide"
desc = "This poster details the internal workings of the common Nanotrasen airlock."
icon_state="poster10"

View File

@@ -379,21 +379,21 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["stationTime"] = worldtime2text()
data["newMessage"] = newmessage
if(mode==2)
var/convopdas[0]
var/pdas[0]
var/count = 0
for (var/obj/item/device/pda/P in sortAtom(PDAs))
if (!P.owner||P.toff||P == src||P.hidden) continue
if(conversations.Find("\ref[P]"))
convopdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "1")))
else
pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0")))
count++
var/convopdas[0]
var/pdas[0]
var/count = 0
for (var/obj/item/device/pda/P in sortAtom(PDAs))
if (!P.owner||P.toff||P == src||P.hidden) continue
if(conversations.Find("\ref[P]"))
convopdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "1")))
else
pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0")))
count++
data["convopdas"] = convopdas
data["pdas"] = pdas
data["pda_count"] = count
data["convopdas"] = convopdas
data["pdas"] = pdas
data["pda_count"] = count
if(mode==21)
data["messagescount"] = tnote.len

View File

@@ -33,6 +33,7 @@
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
update_icon()
nanomanager.update_uis(src) // update all UIs attached to src
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
@@ -53,6 +54,7 @@
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
nanomanager.update_uis(src) // update all UIs attached to src
return
@@ -63,49 +65,60 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]
<BR> <B> Valve attachment:</B> [attached_device ? "<A href='?src=\ref[src];device=1'>[attached_device]</A>" : "None"] [attached_device ? "<A href='?src=\ref[src];rem_device=1'>Remove</A>" : ""]
<BR> <B> Valve status: </B> [ valve_open ? "<A href='?src=\ref[src];open=1'>Closed</A> <B>Open</B>" : "<B>Closed</B> <A href='?src=\ref[src];open=1'>Open</A>"]"}
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user << browse(dat, "window=trans_valve;size=600x300")
onclose(user, "trans_valve")
return
// this is the data which will be sent to the ui
var/data[0]
data["attachmentOne"] = tank_one ? tank_one.name : null
data["attachmentTwo"] = tank_two ? tank_two.name : null
data["valveAttachment"] = attached_device ? attached_device.name : null
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
return
if (src.loc == usr)
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
return 0
if (src.loc != usr)
return 0
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
update_icon()
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
src.attack_self(usr)
src.add_fingerprint(usr)
return
return
if(href_list["device"])
attached_device.attack_self(usr)
src.add_fingerprint(usr)
return 1 // Returning 1 sends an update to attached UIs
/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D)
if(toggle)

View File

@@ -305,7 +305,7 @@
/obj/item/stack/sheet/glass/plasmaglass
name = "plasma glass"
desc = "A very strong and very resistant sheet of a plasma-glass alloy."
singular_name = "glass sheet"
singular_name = "plasma glass sheet"
icon_state = "sheet-plasmaglass"
g_amt = 7500
origin_tech = "materials=3;plasma=2"

View File

@@ -36,6 +36,11 @@ var/global/list/cached_icons = list()
..()
reagents.add_reagent("paint_[paint_type]", volume)
on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
for(var/datum/reagent/paint/P in reagents.reagent_list)
P.color = mixedcolor
red
icon_state = "paint_red"
paint_type = "red"
@@ -171,9 +176,9 @@ var/global/list/cached_icons = list()
datum/reagent/paint
name = "Paint"
id = "paint_"
description = "Floor paint is used to color floor tiles."
reagent_state = 2
color = "#808080"
description = "This paint will only adhere to floor tiles."
reaction_turf(var/turf/T, var/volume)
if(!istype(T) || istype(T, /turf/space))
@@ -192,26 +197,26 @@ datum/reagent/paint
red
name = "Red Paint"
id = "paint_red"
color = "#FF0000"
color = "#FE191A"
green
name = "Green Paint"
color = "#00FF00"
color = "#18A31A"
id = "paint_green"
blue
name = "Blue Paint"
color = "#0000FF"
color = "#247CFF"
id = "paint_blue"
yellow
name = "Yellow Paint"
color = "#FFFF00"
color = "#FDFE7D"
id = "paint_yellow"
violet
name = "Violet Paint"
color = "#FF00FF"
color = "#CC0099"
id = "paint_violet"
black
@@ -221,7 +226,7 @@ datum/reagent/paint
white
name = "White Paint"
color = "#FFFFFF"
color = "#F0F8FF"
id = "paint_white"
datum/reagent/paint_remover

View File

@@ -1,3 +1,6 @@
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
#define TANK_DEFAULT_RELEASE_PRESSURE 24
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
@@ -24,8 +27,7 @@
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
@@ -121,7 +123,10 @@
/obj/item/weapon/tank/attack_self(mob/user as mob)
if (!(src.air_contents))
return
user.set_machine(src)
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/using_internal
if(istype(loc,/mob/living/carbon))
@@ -129,57 +134,69 @@
if(location.internal==src)
using_internal = 1
var/message = {"
<b>Tank</b><BR>
<FONT color='blue'><b>Tank Pressure:</b> [air_contents.return_pressure()]</FONT><BR>
<BR>
<b>Mask Release Pressure:</b> <A href='?src=\ref[src];dist_p=-10'>-</A> <A href='?src=\ref[src];dist_p=-1'>-</A> [distribute_pressure] <A href='?src=\ref[src];dist_p=1'>+</A> <A href='?src=\ref[src];dist_p=10'>+</A><BR>
<b>Mask Release Valve:</b> <A href='?src=\ref[src];stat=1'>[using_internal?("Open"):("Closed")]</A>
"}
user << browse(message, "window=tank;size=600x300")
onclose(user, "tank")
return
// this is the data which will be sent to the ui
var/data[0]
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src || (location.wear_mask && (location.wear_mask.flags & MASKINTERNALS)))
data["maskConnected"] = 1
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/item/weapon/tank/Topic(href, href_list)
..()
if (usr.stat|| usr.restrained())
return
if (src.loc == usr)
usr.set_machine(src)
if (href_list["dist_p"])
return 0
if (src.loc != usr)
return 0
if (href_list["dist_p"])
if (href_list["dist_p"] == "reset")
src.distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
else if (href_list["dist_p"] == "max")
src.distribute_pressure = TANK_MAX_RELEASE_PRESSURE
else
var/cp = text2num(href_list["dist_p"])
src.distribute_pressure += cp
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), 3*ONE_ATMOSPHERE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
if (location.internals)
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
if (location.internals)
location.internals.icon_state = "internal0"
location.internals.icon_state = "internal1"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "\blue You need something to connect to \the [src]."
usr << "\blue You need something to connect to \the [src]."
src.add_fingerprint(usr)
/*
* the following is needed for a tank lying on the floor. But currently we restrict players to use not weared tanks as intrals. --rastaf
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
*/
src.attack_self(usr)
else
usr << browse(null, "window=tank")
return
return
src.add_fingerprint(usr)
return 1
/obj/item/weapon/tank/remove_air(amount)

View File

@@ -42,11 +42,12 @@
msg += "<b>Total Players: [length(Lines)]</b>"
src << msg
/client/verb/adminwho()
/client/verb/staffwho()
set category = "Admin"
set name = "Adminwho"
set name = "Staffwho"
var/msg = ""
var/modmsg = ""
var/num_mods_online = 0
var/num_admins_online = 0
if(holder)
@@ -70,7 +71,20 @@
num_admins_online++
else
modmsg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
modmsg += " - Observing"
else if(istype(C.mob,/mob/new_player))
modmsg += " - Lobby"
else
modmsg += " - Playing"
if(C.is_afk())
modmsg += " (AFK)"
modmsg += "\n"
num_mods_online++
else
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
@@ -78,44 +92,7 @@
msg += "\t[C] is a [C.holder.rank]\n"
num_admins_online++
else
num_mods_online++
modmsg += "\t[C] is a [C.holder.rank]\n"
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg
msg += "<b>There are also [num_mods_online] moderators online.</b> To view online moderators, type 'modwho'\n"
src << msg
/client/verb/modwho()
set category = "Admin"
set name = "Modwho"
var/msg = ""
var/num_admins_online = 0
var/num_mods_online = 0
if(holder)
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
num_admins_online++
else
msg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
msg += " - Observing"
else if(istype(C.mob,/mob/new_player))
msg += " - Lobby"
else
msg += " - Playing"
if(C.is_afk())
msg += " (AFK)"
msg += "\n"
num_mods_online++
else
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
num_admins_online++
else
msg += "\t[C] is a [C.holder.rank]\n"
msg = "<b>Current Moderators ([num_mods_online]):</b>\n" + msg
msg += "<b>There are also [num_admins_online] admins online.</b> To view online admins, type 'adminwho'\n"
src << msg
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg + "\n<b> Current Moderators([num_mods_online]):</b>\n" + modmsg
src << msg

View File

@@ -129,6 +129,7 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
/client/proc/ZASSettings,
/client/proc/cmd_debug_make_powernets,
/client/proc/kill_airgroup,
/client/proc/debug_controller,

View File

@@ -10,7 +10,7 @@
log_admin("[key_name(src)] : [msg]")
if(check_rights(R_ADMIN,0))
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
msg = "<span class='adminsay'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg

View File

@@ -242,29 +242,11 @@
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
// preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in.
// Send NanoUI resources to this client
nanomanager.send_resources(src)
getFiles(
'nano/js/libraries.min.js',
'nano/js/nano_update.js',
'nano/js/nano_config.js',
'nano/js/nano_base_helpers.js',
'nano/css/shared.css',
'nano/css/icons.css',
'nano/templates/chem_dispenser.tmpl',
'nano/templates/cryo.tmpl',
'nano/templates/geoscanner.tmpl',
'nano/templates/dna_modifier.tmpl',
'nano/templates/telescience_console.tmpl',
'nano/templates/pda.tmpl',
'nano/templates/uplink.tmpl',
'nano/images/uiBackground.png',
'nano/images/uiIcons16.png',
'nano/images/uiIcons24.png',
'nano/images/uiBackground-Syndicate.png',
'nano/images/uiLinkPendingIcon.gif',
'nano/images/uiMaskBackground.png',
'nano/images/uiNoticeBackground.jpg',
'nano/images/uiTitleFluff.png',
'nano/images/uiTitleFluff-Syndicate.png',
'html/search.js',
'html/panels.css',
'icons/pda_icons/pda_atmos.png',

View File

@@ -10,7 +10,7 @@
*/
/obj/item/clothing/suit/bluetag
name = "blue laser tag armour"
desc = "Blue Pride, Station Wide"
desc = "Blue Pride, Station Wide."
icon_state = "bluetag"
item_state = "bluetag"
blood_overlay_type = "armor"
@@ -20,7 +20,7 @@
/obj/item/clothing/suit/redtag
name = "red laser tag armour"
desc = "Pew pew pew"
desc = "Reputed to go faster."
icon_state = "redtag"
item_state = "redtag"
blood_overlay_type = "armor"
@@ -76,7 +76,7 @@
/obj/item/clothing/suit/justice
name = "justice suit"
desc = "this pretty much looks ridiculous"
desc = "This pretty much looks ridiculous."
icon_state = "justice"
item_state = "justice"
flags = FPRINT | TABLEPASS

View File

@@ -34,7 +34,7 @@
return
if(IsMultiple(activeFor, 5))
if(prob(25))
if(prob(15))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedVendingMachines.Add(infectedMachine)
@@ -43,7 +43,7 @@
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
@@ -52,6 +52,5 @@
/datum/event/brand_intelligence/end()
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
if(prob(90))
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0

View File

@@ -273,14 +273,6 @@
ore_uranium+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
ore_glass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
ore_plasmaglass+= O:amount
del(O)
@@ -289,6 +281,14 @@
ore_plasmarglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
ore_glass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasteel))
ore_plasteel+= O:amount
del(O)

View File

@@ -348,10 +348,11 @@ var/list/slot_equipment_priority = list( \
return
else
var/deathtime = world.time - src.timeofdeath
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
usr << "\blue <B>Upon using the antagHUD you forfeighted the ability to join the round.</B>"
return
if(istype(src,/mob/dead/observer))
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
usr << "\blue <B>Upon using the antagHUD you forfeighted the ability to join the round.</B>"
return
var/deathtimeminutes = round(deathtime / 600)
var/pluralcheck = "minute"
if(deathtimeminutes == 0)
@@ -753,6 +754,10 @@ note dizziness decrements automatically in the mob's Life() proc.
else if( stunned )
// lying = 0
canmove = 0
else if(captured)
anchored = 1
canmove = 0
lying = 0
else
lying = !can_stand
canmove = has_limbs

View File

@@ -158,7 +158,7 @@
var/voice_name = "unidentifiable voice"
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
var/captured = 0 //Functionally, should give the same effect as being buckled into a chair when true.
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now unused.

View File

@@ -197,4 +197,28 @@
oldMob.open_uis.Cut()
return 1 // success
/**
* Sends all nano assets to the client
* This is called on user login
*
* @param client /client The user's client
*
* @return nothing
*/
/datum/nanomanager/proc/send_resources(client)
var/list/nano_asset_dirs = list(\
"nano/css/",\
"nano/images/",\
"nano/js/",\
"nano/templates/"\
)
var/list/files = null
for (var/path in nano_asset_dirs)
files = flist(path)
for(var/file in files)
if(copytext(file, length(file)) != "/") // files which end in "/" are actually directories, which we want to ignore
client << browse_rsc(file(path + file)) // send the file to the client

View File

@@ -520,129 +520,87 @@
user << browse(t1, "window=apcwires")
onclose(user, "apcwires")
user.set_machine(src)
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
//This goes after the wire stuff. They should be able to fix a physical problem when a wire is cut
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=apc")
return
else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack)
user << "AI control for this APC interface has been disabled."
user.unset_machine()
user << browse(null, "window=apc")
return
else if (src.malfai)
if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai))
user << "AI control for this APC interface has been disabled."
user.unset_machine()
user << browse(null, "window=apc")
return
if(locked && (!istype(user, /mob/living/silicon)))
t += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
t += "Power cell: <B>[cell ? "[round(cell.percent())]%" : "<FONT COLOR=red>Not connected.</FONT>"]</B>"
if(cell)
t += " ([charging ? ( charging == 1 ? "Charging" : "Fully charged" ) : "Not charging"])"
t += " ([chargemode ? "Auto" : "Off"])"
t += "<BR><HR>Power channels<BR><PRE>"
var/list/L = list ("Off","Off (Auto)", "On", "On (Auto)")
t += "Equipment: [add_lspace(lastused_equip, 6)] W : <B>[L[equipment+1]]</B><BR>"
t += "Lighting: [add_lspace(lastused_light, 6)] W : <B>[L[lighting+1]]</B><BR>"
t += "Environmental:[add_lspace(lastused_environ, 6)] W : <B>[L[environ+1]]</B><BR>"
t += "<BR>Total load: [lastused_light + lastused_equip + lastused_environ] W</PRE>"
t += "<HR>Cover lock: <B>[coverlocked ? "Engaged" : "Disengaged"]</B>"
else
if (!istype(user, /mob/living/silicon))
t += "<I>(Swipe ID card to lock interface.)</I><BR>"
t += "Main breaker: [operating ? "<B>On</B> <A href='?src=\ref[src];breaker=1'>Off</A>" : "<A href='?src=\ref[src];breaker=1'>On</A> <B>Off</B>" ]<BR>"
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
if(cell)
t += "Power cell: <B>[round(cell.percent())]%</B>"
t += " ([charging ? ( charging == 1 ? "Charging" : "Fully charged" ) : "Not charging"])"
t += " ([chargemode ? "<A href='?src=\ref[src];cmode=1'>Off</A> <B>Auto</B>" : "<B>Off</B> <A href='?src=\ref[src];cmode=1'>Auto</A>"])"
else
t += "Power cell: <B><FONT COLOR=red>Not connected.</FONT></B>"
t += "<BR><HR>Power channels<BR><PRE>"
t += "Equipment: [add_lspace(lastused_equip, 6)] W : "
switch(equipment)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];eqp=2'>On</A> <A href='?src=\ref[src];eqp=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <A href='?src=\ref[src];eqp=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <B>On</B> <A href='?src=\ref[src];eqp=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <A href='?src=\ref[src];eqp=2'>On</A> <B>Auto (On)</B>"
t +="<BR>"
t += "Lighting: [add_lspace(lastused_light, 6)] W : "
switch(lighting)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];lgt=2'>On</A> <A href='?src=\ref[src];lgt=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <A href='?src=\ref[src];lgt=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <B>On</B> <A href='?src=\ref[src];lgt=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <A href='?src=\ref[src];lgt=2'>On</A> <B>Auto (On)</B>"
t +="<BR>"
t += "Environmental:[add_lspace(lastused_environ, 6)] W : "
switch(environ)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];env=2'>On</A> <A href='?src=\ref[src];env=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];env=1'>Off</A> <A href='?src=\ref[src];env=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];env=1'>Off</A> <B>On</B> <A href='?src=\ref[src];env=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];env=1'>Off</A> <A href='?src=\ref[src];env=2'>On</A> <B>Auto (On)</B>"
t += "<BR>Total load: [lastused_light + lastused_equip + lastused_environ] W</PRE>"
t += "<HR>Cover lock: [coverlocked ? "<B><A href='?src=\ref[src];lock=1'>Engaged</A></B>" : "<B><A href='?src=\ref[src];lock=1'>Disengaged</A></B>"]"
if (istype(user, /mob/living/silicon))
t += "<BR><HR><A href='?src=\ref[src];overload=1'><I>Overload lighting circuit</I></A><BR>"
if (ticker && ticker.mode)
// world << "there's a ticker"
if(user.mind in ticker.mode.malf_ai)
// world << "ticker says its malf"
if (!src.malfai)
t += "<BR><HR><A href='?src=\ref[src];malfhack=1'><I>Override Programming</I></A><BR>"
else
t += "<BR><HR><I>APC Hacked</I><BR>"
/*if(!src.occupant)
t += "<A href='?src=\ref[src];occupyapc=1'><I>Shunt Core Processes</I></A><BR>"
else
t += "<I>Core Processes Uploaded</I><BR>"*/
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT></body></html>"
user << browse(t, "window=apc")
onclose(user, "apc")
// Open the APC NanoUI
ui_interact(user)
return
/obj/machinery/power/apc/proc/get_malf_status(mob/user)
if (ticker && ticker.mode && (user.mind in ticker.mode.malf_ai) && istype(user, /mob/living/silicon/ai))
if (src.malfai == (user:parent ? user:parent : user))
if (src.occupant == user)
return 3 // 3 = User is shunted in this APC
else if (istype(user.loc, /obj/machinery/power/apc))
return 4 // 4 = User is shunted in another APC
else
return 2 // 2 = APC hacked by user, and user is in its core.
else
return 1 // 1 = APC not hacked.
else
return 0 // 0 = User is not a Malf AI
/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if(!user)
return
var/list/data = list(
"locked" = locked,
"isOperating" = operating,
"externalPower" = main_status,
"powerCellStatus" = cell ? cell.percent() : null,
"chargeMode" = chargemode,
"chargingStatus" = charging,
"totalLoad" = lastused_equip + lastused_light + lastused_environ,
"coverLocked" = coverlocked,
"siliconUser" = istype(user, /mob/living/silicon),
"malfStatus" = get_malf_status(user),
"powerChannels" = list(
list(
"title" = "Equipment",
"powerLoad" = lastused_equip,
"status" = equipment,
"topicParams" = list(
"auto" = list("eqp" = 3),
"on" = list("eqp" = 2),
"off" = list("eqp" = 1)
)
),
list(
"title" = "Lighting",
"powerLoad" = lastused_light,
"status" = lighting,
"topicParams" = list(
"auto" = list("lgt" = 3),
"on" = list("lgt" = 2),
"off" = list("lgt" = 1)
)
),
list(
"title" = "Environment",
"powerLoad" = lastused_environ,
"status" = environ,
"topicParams" = list(
"auto" = list("env" = 3),
"on" = list("env" = 2),
"off" = list("env" = 1)
)
)
)
)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 520, data["siliconUser"] ? 465 : 440)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/apc/proc/report()
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
@@ -754,8 +712,8 @@
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
user << "\red You don't have the dexterity to use this [src]!"
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
if(user.restrained())
user << "\red You must have free hands to use this [src]"
@@ -776,13 +734,13 @@
)
if(!loud)
user << "\red \The [src] have AI control disabled!"
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
else
if ((!in_range(src, user) || !istype(src.loc, /turf)))
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
var/mob/living/carbon/human/H = user
@@ -800,9 +758,8 @@
if(!(isrobot(usr) && (href_list["apcwires"] || href_list["pulse"])))
if(!can_use(usr, 1))
return
src.add_fingerprint(usr)
if(usingUI) // If we set their machine and they're not using the UI, it'll cause the UI to pop up.
usr.set_machine(src)
src.add_fingerprint(usr)
if (href_list["apcwires"])
var/t1 = text2num(href_list["apcwires"])
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
@@ -864,12 +821,12 @@
update_icon()
update()
else if( href_list["close"] )
usr << browse(null, "window=apc")
usr.unset_machine()
nanomanager.close_user_uis(usr, src)
return
else if (href_list["close2"])
usr << browse(null, "window=apcwires")
usr.unset_machine()
return
else if (href_list["overload"])

View File

@@ -21,7 +21,7 @@
var/chargecount = 0
var/chargelevel = 50000
var/online = 1
var/n_tag = null
var/name_tag = null
var/obj/machinery/power/terminal/terminal = null
//Holders for powerout event.
var/last_output = 0
@@ -122,7 +122,6 @@
if(last_disp != chargedisplay() || last_chrg != charging || last_onln != online)
updateicon()
updateDialog()
return
// called after all power processes are finished
@@ -164,48 +163,45 @@
/obj/machinery/power/smes/attack_ai(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
ui_interact(user)
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
ui_interact(user)
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/machinery/power/smes/interact(mob/user)
if(get_dist(src, user) > 1 && !istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=smes")
if(stat & BROKEN)
return
user.set_machine(src)
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
t += "Stored capacity : [round(100.0*charge/capacity, 0.1)]%<BR><BR>"
t += "Input: [charging ? "Charging" : "Not Charging"] [chargemode ? "<B>Auto</B> <A href = '?src=\ref[src];cmode=1'>Off</A>" : "<A href = '?src=\ref[src];cmode=1'>Auto</A> <B>Off</B> "]<BR>"
t += "Input level: <A href = '?src=\ref[src];input=-4'>M</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(chargelevel,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>M</A><BR>"
t += "<BR><BR>"
t += "Output: [online ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "Output level: <A href = '?src=\ref[src];output=-4'>M</A> <A href = '?src=\ref[src];output=-3'>-</A> <A href = '?src=\ref[src];output=-2'>-</A> <A href = '?src=\ref[src];output=-1'>-</A> [add_lspace(output,5)] <A href = '?src=\ref[src];output=1'>+</A> <A href = '?src=\ref[src];output=2'>+</A> <A href = '?src=\ref[src];output=3'>+</A> <A href = '?src=\ref[src];output=4'>M</A><BR>"
t += "Output load: [round(loaddemand)] W<BR>"
t += "<BR></PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT>"
user << browse(t, "window=smes;size=460x300")
onclose(user, "smes")
return
// this is the data which will be sent to the ui
var/data[0]
data["nameTag"] = name_tag
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
data["charging"] = charging
data["chargeMode"] = chargemode
data["chargeLevel"] = chargelevel
data["chargeMax"] = SMESMAXCHARGELEVEL
data["outputOnline"] = online
data["outputLevel"] = output
data["outputMax"] = SMESMAXOUTPUT
data["outputLoad"] = round(loaddemand)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/smes/Topic(href, href_list)
..()
@@ -219,85 +215,42 @@
//world << "[href] ; [href_list[href]]"
if (( usr.machine==src && ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
if (!istype(src.loc, /turf) || istype(usr, /mob/living/silicon/ai))
return 0 // Do not update ui
if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
if( href_list["close"] )
usr << browse(null, "window=smes")
usr.unset_machine()
return
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
switch( href_list["input"] )
if("min")
chargelevel = 0
if("max")
chargelevel = SMESMAXCHARGELEVEL //30000
if("set")
chargelevel = input(usr, "Enter new input level (0-[SMESMAXCHARGELEVEL])", "SMES Input Power Control", chargelevel) as num
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = 0
switch(i)
if(-4)
chargelevel = 0
if(4)
chargelevel = SMESMAXCHARGELEVEL //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
chargelevel += d
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["output"] )
var/i = text2num(href_list["output"])
var/d = 0
switch(i)
if(-4)
output = 0
if(4)
output = SMESMAXOUTPUT //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
output += d
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
src.updateUsrDialog()
else
usr << browse(null, "window=smes")
usr.unset_machine()
return
else if( href_list["output"] )
switch( href_list["output"] )
if("min")
output = 0
if("max")
output = SMESMAXOUTPUT //30000
if("set")
output = input(usr, "Enter new output level (0-[SMESMAXOUTPUT])", "SMES Output Power Control", output) as num
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
return 1
/obj/machinery/power/smes/proc/ion_act()
if(src.z == 1)

View File

@@ -1,4 +1,4 @@
/proc/GetColors(hex)
/proc/GetColors(hex) //Actually converts hex to rgb
hex = uppertext(hex)
var/hi1 = text2ascii(hex, 2)
var/lo1 = text2ascii(hex, 3)
@@ -15,7 +15,7 @@
var/list/rgbcolor = list(0,0,0)
var/finalcolor = 0
for(var/datum/reagent/re in reagent_list) // natural color mixing bullshit/algorithm
for(var/datum/reagent/re in reagent_list) //TODO: weigh final colour by amount of reagents; make this algorithm use hex
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color

View File

@@ -146,7 +146,7 @@
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 370, 605)
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window

View File

@@ -134,7 +134,7 @@ About Reagents:
object melting in here ... or something. i dunno.
reaction_turf(var/turf/T)
This is called by the holder's reation proc.
This is called by the holder's reaction proc.
This version is called when the reagents reacts
with a turf. You'll want to put stuff like extra
slippery floors for lube or something in here.
@@ -144,7 +144,7 @@ About Reagents:
This is the place where you put damage for toxins ,
drowsyness for sleep toxins etc etc.
You'll want to call the parents proc by using ..() .
If you dont, the chemical will stay in the mob forever -
If you don't, the chemical will stay in the mob forever -
unless you write your own piece of code to slowly remove it.
(Should be pretty easy, 1 line of code)

View File

@@ -23,7 +23,7 @@ datum
var/list/data = null
var/volume = 0
var/nutriment_factor = 0
var/custom_metabolism = REAGENTS_METABOLISM //Default 0.2
var/custom_metabolism = REAGENTS_METABOLISM
var/overdose = 0
var/overdose_dam = 1
//var/list/viruses = list()

View File

@@ -4,6 +4,7 @@
/obj/item/weapon/reagent_containers/food
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
var/filling_color = "#FFFFFF" //Used by sandwiches.
/obj/item/weapon/reagent_containers/food/New()
..()

View File

@@ -0,0 +1,101 @@
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/csandwich/S = new(get_turf(src))
S.attackby(W,user)
del(src)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich
name = "sandwich"
desc = "The best thing since sliced bread."
icon_state = "breadslice"
trash = /obj/item/trash/plate
bitesize = 2
var/list/ingredients = list()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attackby(obj/item/W as obj, mob/user as mob)
var/sandwich_limit = 4
for(var/obj/item/O in ingredients)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/breadslice))
sandwich_limit += 4
if(src.contents.len > sandwich_limit)
user << "\red If you put anything else on \the [src] it's going to collapse."
return
else if(istype(W,/obj/item/weapon/shard))
user << "\blue You hide [W] in \the [src]."
user.drop_item()
W.loc = src
update()
return
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
user << "\blue You layer [W] over \the [src]."
var/obj/item/weapon/reagent_containers/F = W
F.reagents.trans_to(src, F.reagents.total_volume)
user.drop_item()
W.loc = src
ingredients += W
update()
return
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/proc/update()
var/fullname = "" //We need to build this from the contents of the var.
var/i = 0
overlays.Cut()
for(var/obj/item/weapon/reagent_containers/food/snacks/O in ingredients)
i++
if(i == 1)
fullname += "[O.name]"
else if(i == ingredients.len)
fullname += " and [O.name]"
else
fullname += ", [O.name]"
var/image/I = new(src.icon, "sandwich_filling")
I.color = O.filling_color
I.pixel_x = pick(list(-1,0,1))
I.pixel_y = (i*2)+1
overlays += I
var/image/T = new(src.icon, "sandwich_top")
T.pixel_x = pick(list(-1,0,1))
T.pixel_y = (ingredients.len * 2)+1
overlays += T
name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
w_class = n_ceil(Clamp((ingredients.len/2),1,3))
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Del()
for(var/obj/item/O in ingredients)
del(O)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine()
..()
var/obj/item/O = pick(contents)
usr << "\blue You think you can see [O.name] in there."
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attack(mob/M as mob, mob/user as mob, def_zone)
var/obj/item/shard
for(var/obj/item/O in contents)
if(istype(O,/obj/item/weapon/shard))
shard = O
break
var/mob/living/H
if(istype(M,/mob/living))
H = M
if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable.
H << "\red You lacerate your mouth on a [shard.name] in the sandwich!"
H.adjustBruteLoss(5) //TODO: Target head if human.
..()

File diff suppressed because it is too large Load Diff

View File

@@ -113,6 +113,7 @@
desc = "Needs some butter!"
icon_state = "corn"
potency = 40
filling_color = "#FFEE00"
trash = /obj/item/weapon/corncob
New()
@@ -126,6 +127,7 @@
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
gender = PLURAL
New()
..()
@@ -140,6 +142,7 @@
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
potency = 30
filling_color = "#CC6464"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -153,6 +156,7 @@
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten<65>d not thy breath.\""
icon_state = "harebell"
potency = 1
filling_color = "#D4B2C9"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -165,6 +169,7 @@
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
potency = 25
filling_color = "#E6E8DA"
New()
..()
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
@@ -189,6 +194,7 @@
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
filling_color = "#A332AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -202,6 +208,7 @@
desc = "Nutritious!"
icon_state = "greengrapes"
potency = 25
filling_color = "#A6FFA3"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -215,6 +222,7 @@
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
potency = 25
filling_color = "#A2B5A1"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -226,6 +234,7 @@
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
filling_color = "#C2C9FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -237,6 +246,7 @@
name = "clump of plastellium"
desc = "Hmm, needs some processing"
icon_state = "plastellium"
filling_color = "#C4C4C4"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -247,8 +257,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
seed = "/obj/item/seeds/shandseed"
name = "S'rendarr's Hand leaf"
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on it's native Ahdomai. Smells strongly like wax."
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on its native Ahdomai. Smells strongly like wax."
icon_state = "shand"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -260,6 +271,7 @@
name = "sprig of Messa's Tear"
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of chemicals in it's flower useful to treating burns- Bad for the allergic to pollen."
icon_state = "mtear"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -293,6 +305,7 @@
desc = "Nutritious!"
var/light_on = 1
var/brightness_on = 2 //luminosity when on
filling_color = "#D3FF9E"
icon_state = "glowberrypile"
New()
..()
@@ -320,6 +333,7 @@
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
potency = 50
filling_color = "#9C8E54"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -333,6 +347,7 @@
desc = "Sickly sweet."
icon_state = "sugarcane"
potency = 50
filling_color = "#C0C9AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -345,6 +360,7 @@
icon_state = "poisonberrypile"
gender = PLURAL
potency = 15
filling_color = "#B422C7"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -359,6 +375,7 @@
icon_state = "deathberrypile"
gender = PLURAL
potency = 50
filling_color = "#4E0957"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -373,6 +390,7 @@
desc = "This is a plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
potency = 10
filling_color = "#125709"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -389,6 +407,7 @@
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
potency = 10
filling_color = "#229E11"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -405,6 +424,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#DFE88B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -418,6 +438,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#B3BD5E"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -431,6 +452,7 @@
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
potency = 15
filling_color = "#F5CB42"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -450,6 +472,7 @@
desc = "It's full of watery goodness."
icon_state = "watermelon"
potency = 10
filling_color = "#FA2863"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
New()
@@ -464,6 +487,7 @@
desc = "It's large and scary."
icon_state = "pumpkin"
potency = 10
filling_color = "#FAB728"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -485,6 +509,7 @@
desc = "It's so sour, your face will twist."
icon_state = "lime"
potency = 20
filling_color = "#28FA59"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -497,6 +522,7 @@
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
potency = 20
filling_color = "#FAF328"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -509,6 +535,7 @@
desc = "It's an tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -521,6 +548,7 @@
desc = "You can't beat white-beet."
icon_state = "whitebeet"
potency = 15
filling_color = "#FFFCCC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -535,6 +563,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "banana"
item_state = "banana"
filling_color = "#FCF695"
trash = /obj/item/weapon/bananapeel
New()
@@ -550,6 +579,7 @@
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -567,6 +597,7 @@
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#550F5C"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -578,6 +609,7 @@
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
filling_color = "#E6E8B7"
icon_state = "soybeans"
New()
..()
@@ -590,6 +622,7 @@
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
filling_color = "#FF0000"
potency = 10
New()
..()
@@ -610,6 +643,7 @@
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
icon_state = "killertomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -639,6 +673,7 @@
desc = "So bloody...so...very...bloody....AHHHH!!!!"
icon_state = "bloodtomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -662,6 +697,7 @@
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
potency = 10
filling_color = "#586CFC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -697,6 +733,7 @@
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F7E186"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -709,6 +746,7 @@
desc = "Rice to see you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FFF8DB"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -720,6 +758,7 @@
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#59691B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -733,6 +772,7 @@
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
potency = 20
filling_color = "#66CEED"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -751,6 +791,7 @@
desc = "It's good for the eyes!"
icon_state = "carrot"
potency = 10
filling_color = "#FFC400"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -764,6 +805,7 @@
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
icon_state = "reishi"
potency = 10
filling_color = "#FF4800"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -784,6 +826,7 @@
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -804,6 +847,7 @@
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
potency = 35
filling_color = "#FFDEDE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -824,6 +868,7 @@
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
potency = 15
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -841,6 +886,7 @@
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -852,6 +898,7 @@
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#FFBFEF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -880,6 +927,7 @@
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFE991"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -891,6 +939,7 @@
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
icon_state = "glowshroom"
filling_color = "#DAFF91"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -988,6 +1037,7 @@
icon_state = "bluespacetomato"
potency = 20
origin_tech = "bluespace=3"
filling_color = "#91F8FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops

View File

@@ -3,6 +3,7 @@
desc = "A slab of meat"
icon_state = "meat"
health = 180
filling_color = "#FF1C1C"
New()
..()
reagents.add_reagent("nutriment", 3)

View File

@@ -47,11 +47,11 @@
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue It contains:"
usr << "\blue It contains "
if(reagents && reagents.reagent_list.len)
usr << "\blue [src.reagents.total_volume] units of liquid."
else
usr << "\blue Nothing."
usr << "\blue nothing."
if (!is_open_container())
usr << "\blue Airtight lid seals it completely."
@@ -216,7 +216,7 @@
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
icon_state = "beakerbluespace"
g_amt = 5000
volume = 300

View File

@@ -1451,7 +1451,7 @@ datum/design/chemsprayer
build_type = PROTOLATHE
materials = list("$metal" = 5000, "$glass" = 1000)
reliability_base = 100
build_path = "/obj/item/weapon/chemsprayer"
build_path = "/obj/item/weapon/reagent_containers/spray/chemsprayer"
datum/design/rapidsyringe
name = "Rapid Syringe Gun"

View File

@@ -11,7 +11,7 @@
#define DETONATION_HALLUCINATION 600
#define WARNING_DELAY 60 //45 seconds between warnings.
#define WARNING_DELAY 30 //seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -20,6 +20,7 @@
icon_state = "darkmatter"
density = 1
anchored = 0
luminosity = 4
var/gasefficency = 0.25
@@ -39,9 +40,10 @@
var/explosion_power = 8
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
var/power = 0
var/oxygen = 0 // Moving this up here for easier debugging.
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
var/config_bullet_energy = 2
@@ -102,21 +104,20 @@
power = min(power, 1600)
return 1
if (!removed)
return 1
damage_archived = damage
damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
var/stability = num2text(round((damage / explosion_point) * 100))
if(damage > emergency_point)
radio.autosay(emergency_alert, "Supermatter Monitor")
radio.autosay(addtext(emergency_alert, " Stability: ",stability,"%"), "Supermatter Monitor")
lastwarning = world.timeofday
else if(damage >= damage_archived) // The damage is still going up
radio.autosay(warning_alert, "Supermatter Monitor")
radio.autosay(addtext(warning_alert," Stability: ",stability,"%"), "Supermatter Monitor")
lastwarning = world.timeofday - 150
else // Phew, we're safe
@@ -135,7 +136,7 @@
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
var/oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
var/temp_factor = 100
@@ -174,7 +175,7 @@
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, round(power ** 0.25))) // you have to be seeing the core to get hallucinations
for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / get_dist(l, src) ) ) )
@@ -188,6 +189,12 @@
/obj/machinery/power/supermatter/bullet_act(var/obj/item/projectile/Proj)
var/turf/L = loc
if(!istype(L)) // We don't run process() when we are in space
return 0 // This stops people from being able to really power up the supermatter
// Then bring it inside to explode instantly upon landing on a valid turf.
if(Proj.flag != "bullet")
power += Proj.damage * config_bullet_energy
else

View File

@@ -19,6 +19,7 @@ em {font-style: normal; font-weight: bold;}
.adminobserver {color: #996600; font-weight: bold;}
.admin {color: #386aff; font-weight: bold;}
.adminsay {color: #9611D4; font-weight: bold;}
.name { font-weight: bold;}