mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -8,62 +8,60 @@
|
||||
icon_state = "circ-off"
|
||||
anchored = 0
|
||||
|
||||
//var/side = 1 // 1=left 2=right
|
||||
var/status = 0
|
||||
|
||||
var/recent_moles_transferred = 0
|
||||
var/last_heat_capacity = 0
|
||||
var/last_temperature = 0
|
||||
var/last_pressure_delta = 0
|
||||
var/last_worldtime_transfer = 0
|
||||
|
||||
density = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/New()
|
||||
..()
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
||||
if(!anchored)
|
||||
return null
|
||||
var/datum/gas_mixture/removed
|
||||
if(anchored && !(stat&BROKEN) )
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
last_pressure_delta = max(input_starting_pressure - output_starting_pressure + 10, 0)
|
||||
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
//only circulate air if there is a pressure difference (plus 10 kPa to represent friction in the machine)
|
||||
if(air1.temperature > 0 && last_pressure_delta > 0)
|
||||
|
||||
if(output_starting_pressure >= input_starting_pressure-10)
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
last_pressure_delta = 0
|
||||
return null
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
recent_moles_transferred = last_pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air1.temperature>0)
|
||||
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
|
||||
//Actually transfer the gas
|
||||
removed = air1.remove(recent_moles_transferred)
|
||||
if(removed)
|
||||
last_heat_capacity = removed.heat_capacity()
|
||||
last_temperature = removed.temperature
|
||||
|
||||
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
//Update the gas networks.
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
|
||||
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
|
||||
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
|
||||
if(network2)
|
||||
network2.update = 1
|
||||
last_worldtime_transfer = world.time
|
||||
else
|
||||
recent_moles_transferred = 0
|
||||
|
||||
update_icon()
|
||||
return removed
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
if(last_worldtime_transfer < world.time - 50)
|
||||
recent_moles_transferred = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/update_icon()
|
||||
if(stat & (BROKEN|NOPOWER) || !anchored)
|
||||
icon_state = "circ-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
else if(last_pressure_delta > 0 && recent_moles_transferred > 0)
|
||||
if(last_pressure_delta > 5*ONE_ATMOSPHERE)
|
||||
icon_state = "circ-run"
|
||||
else
|
||||
icon_state = "circ-slow"
|
||||
@@ -105,9 +103,9 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/verb/rotate()
|
||||
/obj/machinery/atmospherics/binary/circulator/verb/rotate_clockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator"
|
||||
set name = "Rotate Circulator (Clockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
@@ -115,3 +113,15 @@
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/verb/rotate_anticlockwise()
|
||||
set category = "Object"
|
||||
set name = "Rotate Circulator (Counterclockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, -90)
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
@@ -101,7 +101,11 @@
|
||||
if("change_code")
|
||||
var/attempt_code = input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
|
||||
if(attempt_code == access_code)
|
||||
access_code = input("Enter a new access code for this device", "Enter new EFTPOS code") as num
|
||||
var/trycode = input("Enter a new access code for this device (4-6 digits, numbers only)", "Enter new EFTPOS code") as num
|
||||
if(trycode >= 1000 && trycode <= 999999)
|
||||
access_code = trycode
|
||||
else
|
||||
alert("That is not a valid code!")
|
||||
print_reference()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
|
||||
@@ -124,7 +128,11 @@
|
||||
if("trans_purpose")
|
||||
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
|
||||
if("trans_value")
|
||||
transaction_amount = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
|
||||
var/try_num = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
|
||||
if(try_num < 0)
|
||||
alert("That is not a valid amount!")
|
||||
else
|
||||
transaction_amount = try_num
|
||||
if("toggle_lock")
|
||||
if(transaction_locked)
|
||||
var/attempt_code = input("Enter EFTPOS access code", "Reset Transaction") as num
|
||||
|
||||
@@ -130,207 +130,202 @@
|
||||
desc = "a mysterious and ancient piece of machinery"
|
||||
var/list/animal_spawners = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
Initialise()
|
||||
|
||||
/obj/machinery/jungle_controller/proc/Initialise()
|
||||
set background = 1
|
||||
spawn(0)
|
||||
world << "\red \b Setting up jungle, this may take a moment..."
|
||||
/obj/machinery/jungle_controller/initialize()
|
||||
world << "\red \b Setting up jungle, this may take a bleeding eternity..."
|
||||
|
||||
//crash dat shuttle
|
||||
var/area/start_location = locate(/area/jungle/crash_ship_source)
|
||||
var/area/clean_location = locate(/area/jungle/crash_ship_clean)
|
||||
var/list/ship_locations = list(/area/jungle/crash_ship_one, /area/jungle/crash_ship_two, /area/jungle/crash_ship_three, /area/jungle/crash_ship_four)
|
||||
var/area/end_location = locate( pick(ship_locations) )
|
||||
ship_locations -= end_location.type
|
||||
//crash dat shuttle
|
||||
var/area/start_location = locate(/area/jungle/crash_ship_source)
|
||||
var/area/clean_location = locate(/area/jungle/crash_ship_clean)
|
||||
var/list/ship_locations = list(/area/jungle/crash_ship_one, /area/jungle/crash_ship_two, /area/jungle/crash_ship_three, /area/jungle/crash_ship_four)
|
||||
var/area/end_location = locate( pick(ship_locations) )
|
||||
ship_locations -= end_location.type
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
for(var/area_type in ship_locations)
|
||||
var/area/cur_location = locate(area_type)
|
||||
clean_location.copy_turfs_to(cur_location)
|
||||
start_location.move_contents_to(end_location)
|
||||
for(var/area_type in ship_locations)
|
||||
var/area/cur_location = locate(area_type)
|
||||
clean_location.copy_turfs_to(cur_location)
|
||||
|
||||
//drop some random river nodes
|
||||
var/list/river_nodes = list()
|
||||
var/max = rand(1,3)
|
||||
var/num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!istype(J))
|
||||
continue
|
||||
if(!J.bushes_spawn)
|
||||
continue
|
||||
river_nodes.Add(new /obj/effect/landmark/river_waypoint(J))
|
||||
num_spawned++
|
||||
//drop some random river nodes
|
||||
var/list/river_nodes = list()
|
||||
var/max = rand(1,3)
|
||||
var/num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!istype(J))
|
||||
continue
|
||||
if(!J.bushes_spawn)
|
||||
continue
|
||||
river_nodes.Add(new /obj/effect/landmark/river_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//make some randomly pathing rivers
|
||||
for(var/obj/effect/landmark/river_waypoint/W in world)
|
||||
if (W.z != src.z || W.connected)
|
||||
continue
|
||||
//make some randomly pathing rivers
|
||||
for(var/obj/effect/landmark/river_waypoint/W in world)
|
||||
if (W.z != src.z || W.connected)
|
||||
continue
|
||||
|
||||
W.connected = 1
|
||||
var/turf/cur_turf = new /turf/unsimulated/jungle/water(get_turf(W))
|
||||
var/turf/target_turf = get_turf(pick(river_nodes))
|
||||
W.connected = 1
|
||||
var/turf/cur_turf = new /turf/unsimulated/jungle/water(get_turf(W))
|
||||
var/turf/target_turf = get_turf(pick(river_nodes))
|
||||
|
||||
var/detouring = 0
|
||||
var/cur_dir = get_dir(cur_turf, target_turf)
|
||||
//
|
||||
while(cur_turf != target_turf)
|
||||
//randomly snake around a bit
|
||||
if(detouring)
|
||||
if(prob(20))
|
||||
detouring = 0
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
else if(prob(20))
|
||||
detouring = 1
|
||||
if(prob(50))
|
||||
cur_dir = turn(cur_dir, 45)
|
||||
else
|
||||
cur_dir = turn(cur_dir, -45)
|
||||
else
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
|
||||
var/skip = 0
|
||||
if(!istype(cur_turf, /turf/unsimulated/jungle) || istype(cur_turf, /turf/unsimulated/jungle/rock))
|
||||
var/detouring = 0
|
||||
var/cur_dir = get_dir(cur_turf, target_turf)
|
||||
//
|
||||
while(cur_turf != target_turf)
|
||||
//randomly snake around a bit
|
||||
if(detouring)
|
||||
if(prob(20))
|
||||
detouring = 0
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
|
||||
if(!skip)
|
||||
var/turf/unsimulated/jungle/water/water_turf = new(cur_turf)
|
||||
water_turf.Spread(75, rand(65, 25))
|
||||
|
||||
var/list/path_nodes = list()
|
||||
|
||||
//place some ladders leading down to pre-generated temples
|
||||
max = rand(2,5)
|
||||
num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
new /obj/effect/landmark/temple(J)
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//put a native tribe somewhere
|
||||
num_spawned = 0
|
||||
while(num_spawned < 1)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
new /obj/effect/jungle_tribe_spawn(J)
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//place some random path waypoints to confuse players
|
||||
max = rand(1,3)
|
||||
num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//get any path nodes placed on the map
|
||||
for(var/obj/effect/landmark/path_waypoint/W in world)
|
||||
if (W.z == src.z)
|
||||
path_nodes.Add(W)
|
||||
|
||||
//make random, connecting paths
|
||||
for(var/obj/effect/landmark/path_waypoint/W in path_nodes)
|
||||
if (W.connected)
|
||||
continue
|
||||
|
||||
W.connected = 1
|
||||
var/turf/cur_turf = get_turf(W)
|
||||
path_nodes.Remove(W)
|
||||
var/turf/target_turf = get_turf(pick(path_nodes))
|
||||
path_nodes.Add(W)
|
||||
//
|
||||
cur_turf = new /turf/unsimulated/jungle/path(cur_turf)
|
||||
|
||||
var/detouring = 0
|
||||
var/cur_dir = get_dir(cur_turf, target_turf)
|
||||
//
|
||||
while(cur_turf != target_turf)
|
||||
//randomly snake around a bit
|
||||
if(detouring)
|
||||
if(prob(20) || get_dist(cur_turf, target_turf) < 5)
|
||||
detouring = 0
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
else if(prob(20) && get_dist(cur_turf, target_turf) > 5)
|
||||
detouring = 1
|
||||
if(prob(50))
|
||||
cur_dir = turn(cur_dir, 45)
|
||||
else
|
||||
cur_dir = turn(cur_dir, -45)
|
||||
else if(prob(20))
|
||||
detouring = 1
|
||||
if(prob(50))
|
||||
cur_dir = turn(cur_dir, 45)
|
||||
else
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_dir = turn(cur_dir, -45)
|
||||
else
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
|
||||
//move a step forward
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
|
||||
var/skip = 0
|
||||
if(!istype(cur_turf, /turf/unsimulated/jungle) || istype(cur_turf, /turf/unsimulated/jungle/rock))
|
||||
detouring = 0
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
|
||||
//if we're not a jungle turf, get back to what we were doing
|
||||
if(!istype(cur_turf, /turf/unsimulated/jungle/))
|
||||
if(!skip)
|
||||
var/turf/unsimulated/jungle/water/water_turf = new(cur_turf)
|
||||
water_turf.Spread(75, rand(65, 25))
|
||||
|
||||
var/list/path_nodes = list()
|
||||
|
||||
//place some ladders leading down to pre-generated temples
|
||||
max = rand(2,5)
|
||||
num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
new /obj/effect/landmark/temple(J)
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//put a native tribe somewhere
|
||||
num_spawned = 0
|
||||
while(num_spawned < 1)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
new /obj/effect/jungle_tribe_spawn(J)
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//place some random path waypoints to confuse players
|
||||
max = rand(1,3)
|
||||
num_spawned = 0
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
|
||||
num_spawned++
|
||||
|
||||
//get any path nodes placed on the map
|
||||
for(var/obj/effect/landmark/path_waypoint/W in world)
|
||||
if (W.z == src.z)
|
||||
path_nodes.Add(W)
|
||||
|
||||
//make random, connecting paths
|
||||
for(var/obj/effect/landmark/path_waypoint/W in path_nodes)
|
||||
if (W.connected)
|
||||
continue
|
||||
|
||||
W.connected = 1
|
||||
var/turf/cur_turf = get_turf(W)
|
||||
path_nodes.Remove(W)
|
||||
var/turf/target_turf = get_turf(pick(path_nodes))
|
||||
path_nodes.Add(W)
|
||||
//
|
||||
cur_turf = new /turf/unsimulated/jungle/path(cur_turf)
|
||||
|
||||
var/detouring = 0
|
||||
var/cur_dir = get_dir(cur_turf, target_turf)
|
||||
//
|
||||
while(cur_turf != target_turf)
|
||||
//randomly snake around a bit
|
||||
if(detouring)
|
||||
if(prob(20) || get_dist(cur_turf, target_turf) < 5)
|
||||
detouring = 0
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
else if(prob(20) && get_dist(cur_turf, target_turf) > 5)
|
||||
detouring = 1
|
||||
if(prob(50))
|
||||
cur_dir = turn(cur_dir, 45)
|
||||
else
|
||||
cur_dir = turn(cur_dir, -45)
|
||||
else
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
|
||||
var/turf/unsimulated/jungle/J = cur_turf
|
||||
if(istype(J, /turf/unsimulated/jungle/impenetrable) || istype(J, /turf/unsimulated/jungle/water/deep))
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
//move a step forward
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
|
||||
if(!istype(J, /turf/unsimulated/jungle/water))
|
||||
J = new /turf/unsimulated/jungle/path(cur_turf)
|
||||
J.Spread(PATH_SPREAD_CHANCE_START, rand(PATH_SPREAD_CHANCE_LOSS_UPPER, PATH_SPREAD_CHANCE_LOSS_LOWER))
|
||||
|
||||
//create monkey spawners
|
||||
num_spawned = 0
|
||||
max = rand(3,6)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
//if we're not a jungle turf, get back to what we were doing
|
||||
if(!istype(cur_turf, /turf/unsimulated/jungle/))
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/monkey(J))
|
||||
num_spawned++
|
||||
|
||||
//create panther spawners
|
||||
num_spawned = 0
|
||||
max = rand(6,12)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
var/turf/unsimulated/jungle/J = cur_turf
|
||||
if(istype(J, /turf/unsimulated/jungle/impenetrable) || istype(J, /turf/unsimulated/jungle/water/deep))
|
||||
cur_dir = get_dir(cur_turf, target_turf)
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/panther(J))
|
||||
num_spawned++
|
||||
|
||||
//create snake spawners
|
||||
num_spawned = 0
|
||||
max = rand(6,12)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/snake(J))
|
||||
num_spawned++
|
||||
if(!istype(J, /turf/unsimulated/jungle/water))
|
||||
J = new /turf/unsimulated/jungle/path(cur_turf)
|
||||
J.Spread(PATH_SPREAD_CHANCE_START, rand(PATH_SPREAD_CHANCE_LOSS_UPPER, PATH_SPREAD_CHANCE_LOSS_LOWER))
|
||||
|
||||
//create parrot spawners
|
||||
num_spawned = 0
|
||||
max = rand(3,6)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/parrot(J))
|
||||
num_spawned++
|
||||
//create monkey spawners
|
||||
num_spawned = 0
|
||||
max = rand(3,6)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/monkey(J))
|
||||
num_spawned++
|
||||
|
||||
//create panther spawners
|
||||
num_spawned = 0
|
||||
max = rand(6,12)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/panther(J))
|
||||
num_spawned++
|
||||
|
||||
//create snake spawners
|
||||
num_spawned = 0
|
||||
max = rand(6,12)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/snake(J))
|
||||
num_spawned++
|
||||
|
||||
//create parrot spawners
|
||||
num_spawned = 0
|
||||
max = rand(3,6)
|
||||
while(num_spawned < max)
|
||||
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
|
||||
if(!J || !istype(J) || !J.bushes_spawn)
|
||||
continue
|
||||
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/parrot(J))
|
||||
num_spawned++
|
||||
|
||||
#undef PATH_SPREAD_CHANCE_START
|
||||
#undef PATH_SPREAD_CHANCE_LOSS_UPPER
|
||||
|
||||
@@ -163,11 +163,11 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
React()
|
||||
|
||||
//forcibly radiate any excess energy
|
||||
var/energy_max = transfer_ratio * 100000
|
||||
/*var/energy_max = transfer_ratio * 100000
|
||||
if(mega_energy > energy_max)
|
||||
var/energy_lost = rand( 1.5 * (mega_energy - energy_max), 2.5 * (mega_energy - energy_max) )
|
||||
mega_energy -= energy_lost
|
||||
radiation += energy_lost
|
||||
radiation += energy_lost*/
|
||||
|
||||
//change held plasma temp according to energy levels
|
||||
//SPECIFIC_HEAT_TOXIN
|
||||
@@ -200,12 +200,14 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
//held_plasma.update_values()
|
||||
|
||||
//handle some reactants formatting
|
||||
//helium-4 has no use at the moment, but a buttload of it is produced
|
||||
if(dormant_reactant_quantities["Helium-4"] > 1000)
|
||||
dormant_reactant_quantities["Helium-4"] = rand(0,dormant_reactant_quantities["Helium-4"])
|
||||
for(var/reactant in dormant_reactant_quantities)
|
||||
if(!dormant_reactant_quantities[reactant])
|
||||
var/amount = dormant_reactant_quantities[reactant]
|
||||
if(amount < 1)
|
||||
dormant_reactant_quantities.Remove(reactant)
|
||||
else if(amount >= 1000000)
|
||||
var/radiate = rand(3 * amount / 4, amount / 4)
|
||||
dormant_reactant_quantities[reactant] -= radiate
|
||||
radiation += radiate
|
||||
|
||||
return 1
|
||||
|
||||
@@ -236,6 +238,10 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
energy += a_energy - a_energy * energy_loss_ratio
|
||||
mega_energy += a_mega_energy - a_mega_energy * energy_loss_ratio
|
||||
|
||||
while(energy > 100000)
|
||||
energy -= 100000
|
||||
mega_energy += 0.1
|
||||
|
||||
/obj/effect/rust_em_field/proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(name in dormant_reactant_quantities)
|
||||
dormant_reactant_quantities[name] += quantity
|
||||
@@ -296,9 +302,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
return changed
|
||||
|
||||
//the !!fun!! part
|
||||
//reactions have to be individually hardcoded, see AttemptReaction() below this
|
||||
/obj/effect/rust_em_field/proc/React()
|
||||
//world << "React()"
|
||||
//loop through the reactants in random order
|
||||
var/list/reactants_reacting_pool = dormant_reactant_quantities.Copy()
|
||||
/*
|
||||
@@ -316,8 +320,8 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
if(!reactants_reacting_pool[reactant])
|
||||
reactants_reacting_pool -= reactant
|
||||
|
||||
var/list/produced_reactants = new/list
|
||||
//loop through all the reacting reagents, picking out random reactions for them
|
||||
var/list/produced_reactants = new/list
|
||||
var/list/primary_reactant_pool = reactants_reacting_pool.Copy()
|
||||
while(primary_reactant_pool.len)
|
||||
//pick one of the unprocessed reacting reagents randomly
|
||||
@@ -331,95 +335,80 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
possible_secondary_reactants[cur_primary_reactant] -= 1
|
||||
if(possible_secondary_reactants[cur_primary_reactant] < 1)
|
||||
possible_secondary_reactants.Remove(cur_primary_reactant)
|
||||
var/list/possible_reactions = new/list
|
||||
|
||||
//loop through and work out all the possible reactions
|
||||
while(possible_secondary_reactants.len)
|
||||
var/cur_secondary_reactant = pick(possible_secondary_reactants)
|
||||
var/list/possible_reactions = new/list
|
||||
for(var/cur_secondary_reactant in possible_secondary_reactants)
|
||||
if(possible_secondary_reactants[cur_secondary_reactant] < 1)
|
||||
possible_secondary_reactants.Remove(cur_secondary_reactant)
|
||||
continue
|
||||
possible_secondary_reactants.Remove(cur_secondary_reactant)
|
||||
var/list/reaction_products = AttemptReaction(cur_primary_reactant, cur_secondary_reactant)
|
||||
if(reaction_products.len)
|
||||
var/datum/fusion_reaction/cur_reaction = get_fusion_reaction(cur_primary_reactant, cur_secondary_reactant)
|
||||
if(cur_reaction)
|
||||
//world << "\blue secondary reactant: [cur_secondary_reactant], [reaction_products.len]"
|
||||
possible_reactions[cur_secondary_reactant] = reaction_products
|
||||
possible_reactions.Add(cur_reaction)
|
||||
|
||||
//if there are no possible reactions here, abandon this primary reactant and move on
|
||||
if(!possible_reactions.len)
|
||||
//world << "\blue no reactions"
|
||||
continue
|
||||
|
||||
//split up the reacting atoms between the possible reactions
|
||||
//the problem is in this while statement below
|
||||
while(possible_reactions.len)
|
||||
//pick another substance to react with
|
||||
var/cur_secondary_reactant = pick(possible_reactions)
|
||||
if(!reactants_reacting_pool[cur_secondary_reactant])
|
||||
possible_reactions.Remove(cur_secondary_reactant)
|
||||
continue
|
||||
var/list/cur_reaction_products = possible_reactions[cur_secondary_reactant]
|
||||
//pick a random substance to react with
|
||||
var/datum/fusion_reaction/cur_reaction = pick(possible_reactions)
|
||||
possible_reactions.Remove(cur_reaction)
|
||||
|
||||
//set the randmax to be the lower of the two involved reactants
|
||||
var/max_num_reactants = reactants_reacting_pool[cur_primary_reactant] > reactants_reacting_pool[cur_secondary_reactant] ? reactants_reacting_pool[cur_secondary_reactant] : reactants_reacting_pool[cur_primary_reactant]
|
||||
var/max_num_reactants = reactants_reacting_pool[cur_reaction.primary_reactant] > reactants_reacting_pool[cur_reaction.secondary_reactant] ? \
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] : reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
if(max_num_reactants < 1)
|
||||
continue
|
||||
|
||||
//make sure we have enough energy
|
||||
if( mega_energy < max_num_reactants*cur_reaction_products["consumption"])
|
||||
max_num_reactants = round(mega_energy / cur_reaction_products["consumption"])
|
||||
if(mega_energy < max_num_reactants * cur_reaction.energy_consumption)
|
||||
max_num_reactants = round(mega_energy / cur_reaction.energy_consumption)
|
||||
if(max_num_reactants < 1)
|
||||
continue
|
||||
|
||||
//randomly determined amount to react
|
||||
var/amount_reacting = rand(1, max_num_reactants)
|
||||
|
||||
//removing the reacting substances from the list of substances that are primed to react this cycle
|
||||
//if there aren't enough of that substance (there should be) then modify the reactant amounts accordingly
|
||||
if( reactants_reacting_pool[cur_primary_reactant] - amount_reacting > -1 )
|
||||
reactants_reacting_pool[cur_primary_reactant] -= amount_reacting
|
||||
if( reactants_reacting_pool[cur_reaction.primary_reactant] - amount_reacting >= 0 )
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] -= amount_reacting
|
||||
else
|
||||
amount_reacting = reactants_reacting_pool[cur_primary_reactant]
|
||||
reactants_reacting_pool[cur_primary_reactant] = 0
|
||||
//
|
||||
if( reactants_reacting_pool[cur_secondary_reactant] - amount_reacting > -1 )
|
||||
reactants_reacting_pool[cur_secondary_reactant] -= amount_reacting
|
||||
amount_reacting = reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] = 0
|
||||
//same again for secondary reactant
|
||||
if( reactants_reacting_pool[cur_reaction.secondary_reactant] - amount_reacting >= 0 )
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] -= amount_reacting
|
||||
else
|
||||
reactants_reacting_pool[cur_primary_reactant] += amount_reacting - reactants_reacting_pool[cur_primary_reactant]
|
||||
amount_reacting = reactants_reacting_pool[cur_secondary_reactant]
|
||||
reactants_reacting_pool[cur_secondary_reactant] = 0
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] += amount_reacting - reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
amount_reacting = reactants_reacting_pool[cur_reaction.secondary_reactant]
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] = 0
|
||||
|
||||
//remove the consumed energy
|
||||
if(cur_reaction_products["consumption"])
|
||||
mega_energy -= max_num_reactants * cur_reaction_products["consumption"]
|
||||
cur_reaction_products.Remove("consumption")
|
||||
mega_energy -= max_num_reactants * cur_reaction.energy_consumption
|
||||
|
||||
//grab any radiation and put it separate
|
||||
//var/new_radiation = 0
|
||||
if("production" in cur_reaction_products)
|
||||
mega_energy += max_num_reactants * cur_reaction_products["production"]
|
||||
cur_reaction_products.Remove("production")
|
||||
/*for(var/i=0, i<dormant_reactant_quantities["proton_quantity"], i++)
|
||||
radiation.Add("proton")
|
||||
radiation_charge.Add(dormant_reactant_quantities["proton_charge"])
|
||||
dormant_reactant_quantities.Remove("proton_quantity")
|
||||
dormant_reactant_quantities.Remove("proton_charge")
|
||||
new_radiation = 1*/
|
||||
//
|
||||
if("radiation" in cur_reaction_products)
|
||||
radiation += max_num_reactants * cur_reaction_products["radiation"]
|
||||
cur_reaction_products.Remove("radiation")
|
||||
/*for(var/i=0, i<dormant_reactant_quantities["neutron_quantity"], i++)
|
||||
radiation.Add("neutron")
|
||||
radiation_charge.Add(dormant_reactant_quantities["neutron_charge"])
|
||||
dormant_reactant_quantities.Remove("neutron_quantity")
|
||||
dormant_reactant_quantities.Remove("neutron_charge")
|
||||
new_radiation = 1*/
|
||||
//add any produced energy
|
||||
mega_energy += max_num_reactants * cur_reaction.energy_production
|
||||
|
||||
//add any produced radiation
|
||||
radiation += max_num_reactants * cur_reaction.radiation
|
||||
|
||||
//create the reaction products
|
||||
for(var/reactant in cur_reaction_products)
|
||||
if(produced_reactants[reactant])
|
||||
produced_reactants[reactant] += cur_reaction_products[reactant] * amount_reacting
|
||||
else
|
||||
produced_reactants[reactant] = cur_reaction_products[reactant] * amount_reacting
|
||||
for(var/reactant in cur_reaction.products)
|
||||
var/success = 0
|
||||
for(var/check_reactant in produced_reactants)
|
||||
if(check_reactant == reactant)
|
||||
produced_reactants[reactant] += cur_reaction.products[reactant] * amount_reacting
|
||||
success = 1
|
||||
break
|
||||
if(!success)
|
||||
produced_reactants[reactant] = cur_reaction.products[reactant] * amount_reacting
|
||||
|
||||
//this reaction is done, and can't be repeated this sub-cycle
|
||||
possible_reactions.Remove(cur_secondary_reactant)
|
||||
possible_reactions.Remove(cur_reaction.secondary_reactant)
|
||||
|
||||
//
|
||||
/*if(new_radiation)
|
||||
@@ -431,7 +420,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
//var/list/neutronic_radiation = new
|
||||
//var/list/protonic_radiation = new
|
||||
for(var/reactant in produced_reactants)
|
||||
AddParticles(reactant, dormant_reactant_quantities[reactant])
|
||||
AddParticles(reactant, produced_reactants[reactant])
|
||||
//world << "produced: [reactant], [dormant_reactant_quantities[reactant]]"
|
||||
|
||||
//check whether there are reactants left, and add them back to the pool
|
||||
@@ -439,213 +428,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
AddParticles(reactant, reactants_reacting_pool[reactant])
|
||||
//world << "retained: [reactant], [reactants_reacting_pool[reactant]]"
|
||||
|
||||
//default fuel assembly quantities
|
||||
/*
|
||||
//new_assembly_quantities["Helium-3"] = 0
|
||||
//new_assembly_quantities["Deuterium"] = 200
|
||||
//new_assembly_quantities["Tritium"] = 100
|
||||
//new_assembly_quantities["Lithium-6"] = 0
|
||||
//new_assembly_quantities["Silver"] = 0
|
||||
*/
|
||||
|
||||
//reactions involving D-T (hydrogen) need 0.1 MeV of core energy
|
||||
//reactions involving helium require 0.4 MeV of energy
|
||||
//reactions involving lithium require 0.6 MeV of energy
|
||||
//reactions involving boron require 1 MeV of energy
|
||||
//returns a list of products, or an empty list if no reaction possible
|
||||
/obj/effect/rust_em_field/proc/AttemptReaction(var/reactant_one, var/reactant_two)
|
||||
//any charge on the atomic reactants / protons produced is abstracted away to enter the core energy pool straightaway
|
||||
//atomic products remain in the core and produce more reactions next cycle
|
||||
//any charged neutrons escape as radiation
|
||||
var/check = 1
|
||||
recheck_reactions:
|
||||
var/list/products = new/list
|
||||
switch(reactant_one)
|
||||
if("Tritium")
|
||||
switch(reactant_two)
|
||||
if("Tritium")
|
||||
if(mega_energy > 0.1)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 11.3
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 11.3
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
//
|
||||
mega_energy -= 0.1
|
||||
if("Deuterium")
|
||||
if(mega_energy > 0.1)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 3.5
|
||||
products["radiation"] = 14.1
|
||||
/*products["photon"] = 3.5
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 14.1
|
||||
//
|
||||
products["consumption"] = 0.1*/
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
if(prob(51))
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 13.1
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 12.1
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
else if (prob(43))
|
||||
products["Helium-4"] = 1
|
||||
products["Deuterium"] = 1
|
||||
//
|
||||
products["production"] = 14.3
|
||||
/*products["photon"] = 4.8 + 9.5//14.3
|
||||
*/
|
||||
else
|
||||
products["Helium-4"] = 1
|
||||
products["production"] = 2.4
|
||||
products["radiation"] = 11.9
|
||||
/*products["photon"] = 0.5//12.4
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 1.9
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 11.9*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Deuterium")
|
||||
switch(reactant_two)
|
||||
if("Deuterium")
|
||||
if(mega_energy > 0.1)
|
||||
if(prob(50))
|
||||
products["Tritium"] = 1
|
||||
//
|
||||
products["production"] = 4.03
|
||||
/*products["photon"] = 1.01
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 3.02*/
|
||||
else
|
||||
products["Helium-3"] = 1
|
||||
//
|
||||
products["production"] = 0.82
|
||||
products["radiation"] = 2.45
|
||||
/*products["photon"] = 0.82
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 2.45*/
|
||||
//
|
||||
products["consumption"] = 0.1
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 18.3
|
||||
/*products["photon"] = 3.6
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 14.7*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
if(prob(25))
|
||||
products["Helium-4"] = 2
|
||||
products["production"] = 1
|
||||
/*products["photon"] = 22.4*/
|
||||
else if(prob(33))
|
||||
products["Helium-3"] = 1
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["radiation"] = 1
|
||||
/*products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
else if(prob(50))
|
||||
products["Lithium-7"] = 1
|
||||
//
|
||||
products["production"] = 1
|
||||
/*products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0*/
|
||||
else
|
||||
products["Beryllium-7"] = 1
|
||||
products["production"] = 3.4
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 3.4
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.6
|
||||
if("Helium-3")
|
||||
switch(reactant_two)
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
products["Helium-4"] = 1
|
||||
products["production"] = 14.9
|
||||
/*products["photon"] = 12.9
|
||||
//
|
||||
products["proton_quantity"] = 2
|
||||
products["proton_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
products["Helium-4"] = 2
|
||||
//
|
||||
products["production"] = 17.9
|
||||
/*products["photon"] = 16.9
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.6
|
||||
/*
|
||||
if("proton")
|
||||
switch(reactant_two)
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
products["Helium-4"] = 1
|
||||
products["Helium-3"] = 1
|
||||
products["photon"] = 4
|
||||
//
|
||||
mega_energy -= 0.6
|
||||
if("Boron-11")
|
||||
if(mega_energy > 1)
|
||||
products["Helium-4"] = 3
|
||||
products["photon"] = 8.7
|
||||
//
|
||||
mega_energy -= 1
|
||||
*/
|
||||
|
||||
//if no reaction happened, switch the two reactants and try again
|
||||
if(!products.len && check)
|
||||
check = 0
|
||||
var/temp = reactant_one
|
||||
reactant_one = reactant_two
|
||||
reactant_two = temp
|
||||
goto recheck_reactions
|
||||
/*if(products.len)
|
||||
world << "\blue [reactant_one] + [reactant_two] reaction occured"
|
||||
for(var/reagent in products)
|
||||
world << "\blue [reagent]: [products[reagent]]"*/
|
||||
/*if(products["neutron"])
|
||||
products -= "neutron"
|
||||
if(products["proton"])
|
||||
products -= "proton"
|
||||
if(products["photon"])
|
||||
products -= "photon"
|
||||
if(products["radiated charge"])
|
||||
products -= "radiated charge"*/
|
||||
return products
|
||||
|
||||
/obj/effect/rust_em_field/Del()
|
||||
//radiate everything in one giant burst
|
||||
for(var/obj/effect/rust_particle_catcher/catcher in particle_catchers)
|
||||
|
||||
@@ -282,6 +282,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/rust_core/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && owned_field)
|
||||
owned_field.AddEnergy(Proj.damage, 0, 1)
|
||||
if(owned_field)
|
||||
return owned_field.bullet_act(Proj)
|
||||
return 0
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "Fuel Rod Assembly"
|
||||
var/list/rod_quantities
|
||||
var/percent_depleted = 1
|
||||
layer = 3.1
|
||||
//
|
||||
New()
|
||||
rod_quantities = new/list
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
|
||||
if(cur_assembly)
|
||||
cur_assembly.loc = get_step(get_turf(src), src.dir)
|
||||
cur_assembly.loc = src.loc//get_step(get_turf(src), src.dir)
|
||||
cur_assembly = null
|
||||
icon_state = "port0"
|
||||
return 1
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
|
||||
var/success = 0
|
||||
if(cur_assembly)
|
||||
if(!cur_assembly)
|
||||
var/turf/check_turf = get_step(get_turf(src), src.dir)
|
||||
check_turf = get_step(check_turf, src.dir)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
|
||||
@@ -89,31 +89,14 @@
|
||||
I.cur_assembly = null
|
||||
icon_state = "port1"
|
||||
success = 1
|
||||
break
|
||||
|
||||
return success
|
||||
|
||||
/*
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_insert_assembly_verb()
|
||||
set name = "Attempt to insert assembly from port into injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_insert_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb()
|
||||
set name = "Attempt to eject assembly from port"
|
||||
set name = "Eject assembly from port"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
eject_assembly()
|
||||
eject_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_draw_assembly_verb()
|
||||
set name = "Draw assembly from injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_draw_assembly()
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ var/const/max_assembly_amount = 300
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel_compressor1"
|
||||
name = "Fuel Compressor"
|
||||
var/list/new_assembly_quantities = list("Deuterium" = 200,"Tritium" = 100,"Helium-3" = 0,"Lithium-6" = 0,"Silver" = 0)
|
||||
var/list/new_assembly_quantities = list("Deuterium" = 150,"Tritium" = 150,"Rodinium-6" = 0,"Stravium-7" = 0, "Pergium" = 0, "Dilithium" = 0)
|
||||
var/compressed_matter = 0
|
||||
anchored = 1
|
||||
layer = 2.9
|
||||
@@ -79,12 +79,16 @@ var/const/max_assembly_amount = 300
|
||||
var/fail = 0
|
||||
var/old_matter = compressed_matter
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
var/req_matter = new_assembly_quantities[reagent] / 30
|
||||
var/req_matter = round(new_assembly_quantities[reagent] / 30)
|
||||
//world << "[reagent] matter: [req_matter]/[compressed_matter]"
|
||||
if(req_matter <= compressed_matter)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
compressed_matter -= req_matter
|
||||
if(compressed_matter < 1)
|
||||
compressed_matter = 0
|
||||
else
|
||||
/*world << "bad reagent: [reagent], [req_matter > compressed_matter ? "req_matter > compressed_matter"\
|
||||
: (req_matter < compressed_matter ? "req_matter < compressed_matter" : "req_matter == compressed_matter")]"*/
|
||||
fail = 1
|
||||
break
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
@@ -93,7 +97,7 @@ var/const/max_assembly_amount = 300
|
||||
compressed_matter = old_matter
|
||||
usr << "\red \icon[src] [src] flashes red: \'Out of matter.\'"
|
||||
else
|
||||
F.loc = get_step(get_turf(src), src.dir)
|
||||
F.loc = src.loc//get_step(get_turf(src), src.dir)
|
||||
F.percent_depleted = 0
|
||||
if(compressed_matter < 0.034)
|
||||
compressed_matter = 0
|
||||
|
||||
@@ -179,11 +179,7 @@
|
||||
id_tag = input("Enter new ID tag", "Modifying ID tag") as text|null
|
||||
|
||||
if( href_list["fuel_assembly"] )
|
||||
if(!trying_to_swap_fuel)
|
||||
trying_to_swap_fuel = 1
|
||||
spawn(50)
|
||||
attempt_fuel_swap()
|
||||
trying_to_swap_fuel = 0
|
||||
attempt_fuel_swap()
|
||||
|
||||
if( href_list["emergency_fuel_assembly"] )
|
||||
if(cur_assembly)
|
||||
@@ -290,3 +286,23 @@
|
||||
updateDialog()
|
||||
else
|
||||
src.visible_message("\red \icon[src] a red light flashes on [src].")
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/verb/rotate_clock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Generator (Clockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Generator (Counterclockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, -90)
|
||||
@@ -0,0 +1,160 @@
|
||||
|
||||
datum/fusion_reaction
|
||||
var/primary_reactant = ""
|
||||
var/secondary_reactant = ""
|
||||
var/energy_consumption = 0
|
||||
var/energy_production = 0
|
||||
var/radiation = 0
|
||||
var/list/products = list()
|
||||
|
||||
/datum/controller/game_controller/var/list/fusion_reactions
|
||||
|
||||
proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
|
||||
if(!master_controller.fusion_reactions)
|
||||
populate_fusion_reactions()
|
||||
if(master_controller.fusion_reactions.Find(primary_reactant))
|
||||
var/list/secondary_reactions = master_controller.fusion_reactions[primary_reactant]
|
||||
if(secondary_reactions.Find(secondary_reactant))
|
||||
return master_controller.fusion_reactions[primary_reactant][secondary_reactant]
|
||||
|
||||
proc/populate_fusion_reactions()
|
||||
if(!master_controller.fusion_reactions)
|
||||
master_controller.fusion_reactions = list()
|
||||
for(var/cur_reaction_type in typesof(/datum/fusion_reaction) - /datum/fusion_reaction)
|
||||
var/datum/fusion_reaction/cur_reaction = new cur_reaction_type()
|
||||
if(!master_controller.fusion_reactions[cur_reaction.primary_reactant])
|
||||
master_controller.fusion_reactions[cur_reaction.primary_reactant] = list()
|
||||
master_controller.fusion_reactions[cur_reaction.primary_reactant][cur_reaction.secondary_reactant] = cur_reaction
|
||||
if(!master_controller.fusion_reactions[cur_reaction.secondary_reactant])
|
||||
master_controller.fusion_reactions[cur_reaction.secondary_reactant] = list()
|
||||
master_controller.fusion_reactions[cur_reaction.secondary_reactant][cur_reaction.primary_reactant] = cur_reaction
|
||||
|
||||
//Fake elements and fake reactions, but its nicer gameplay-wise
|
||||
//Deuterium
|
||||
//Tritium
|
||||
//Uridium-3
|
||||
//Obdurium
|
||||
//Solonium
|
||||
//Rodinium-6
|
||||
//Dilithium
|
||||
//Trilithium
|
||||
//Pergium
|
||||
//Stravium-7
|
||||
|
||||
//Primary Production Reactions
|
||||
|
||||
datum/fusion_reaction/tritium_deuterium
|
||||
primary_reactant = "Tritium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 1
|
||||
energy_production = 5
|
||||
radiation = 0
|
||||
|
||||
//Secondary Production Reactions
|
||||
|
||||
datum/fusion_reaction/deuterium_deuterium
|
||||
primary_reactant = "Deuterium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 1
|
||||
energy_production = 4
|
||||
radiation = 1
|
||||
products = list("Obdurium" = 2)
|
||||
|
||||
datum/fusion_reaction/tritium_tritium
|
||||
primary_reactant = "Tritium"
|
||||
secondary_reactant = "Tritium"
|
||||
energy_consumption = 1
|
||||
energy_production = 4
|
||||
radiation = 1
|
||||
products = list("Solonium" = 2)
|
||||
|
||||
//Cleanup Reactions
|
||||
|
||||
datum/fusion_reaction/rodinium6_obdurium
|
||||
primary_reactant = "Rodinium-6"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 2
|
||||
|
||||
datum/fusion_reaction/rodinium6_solonium
|
||||
primary_reactant = "Rodinium-6"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 2
|
||||
|
||||
//Breeder Reactions
|
||||
|
||||
datum/fusion_reaction/dilithium_obdurium
|
||||
primary_reactant = "Dilithium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 1
|
||||
radiation = 3
|
||||
products = list("Deuterium" = 1, "Dilithium" = 1)
|
||||
|
||||
datum/fusion_reaction/dilithium_solonium
|
||||
primary_reactant = "Dilithium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 1
|
||||
radiation = 3
|
||||
products = list("Tritium" = 1, "Dilithium" = 1)
|
||||
|
||||
//Breeder Inhibitor Reactions
|
||||
|
||||
datum/fusion_reaction/stravium7_dilithium
|
||||
primary_reactant = "Stravium-7"
|
||||
secondary_reactant = "Dilithium"
|
||||
energy_consumption = 2
|
||||
energy_production = 1
|
||||
radiation = 4
|
||||
|
||||
//Enhanced Breeder Reactions
|
||||
|
||||
datum/fusion_reaction/trilithium_obdurium
|
||||
primary_reactant = "Trilithium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 5
|
||||
products = list("Dilithium" = 1, "Trilithium" = 1, "Deuterium" = 1)
|
||||
|
||||
datum/fusion_reaction/trilithium_solonium
|
||||
primary_reactant = "Trilithium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 5
|
||||
products = list("Dilithium" = 1, "Trilithium" = 1, "Tritium" = 1)
|
||||
|
||||
//Control Reactions
|
||||
|
||||
datum/fusion_reaction/pergium_deuterium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_tritium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Tritium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_deuterium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_tritium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
@@ -34,16 +34,16 @@
|
||||
/obj/effect/rust_particle_catcher/proc/UpdateSize()
|
||||
if(parent.size >= mysize)
|
||||
density = 1
|
||||
invisibility = 0
|
||||
//invisibility = 0
|
||||
name = "collector [mysize] ON"
|
||||
else
|
||||
density = 0
|
||||
invisibility = 101
|
||||
//invisibility = 101
|
||||
name = "collector [mysize] OFF"
|
||||
|
||||
/obj/effect/rust_particle_catcher/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && parent)
|
||||
parent.AddEnergy(Proj.damage, 0, 1)
|
||||
parent.AddEnergy(Proj.damage * 20, 0, 1)
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -150,11 +150,10 @@
|
||||
var/strength_change = target_field_strength - E.strength
|
||||
if(strength_change > stored_renwicks)
|
||||
strength_change = stored_renwicks
|
||||
if(E.strength >= 1)
|
||||
E.Strengthen(strength_change)
|
||||
else if(E.strength < 0)
|
||||
if(E.strength < 0)
|
||||
E.strength = 0
|
||||
E.Strengthen(0.1)
|
||||
else
|
||||
E.Strengthen(strength_change)
|
||||
|
||||
stored_renwicks -= strength_change
|
||||
|
||||
|
||||
@@ -206,10 +206,12 @@ log transactions
|
||||
switch(href_list["choice"])
|
||||
if("transfer")
|
||||
if(authenticated_account && linked_db)
|
||||
var/target_account_number = text2num(href_list["target_acc_number"])
|
||||
var/transfer_amount = text2num(href_list["funds_amount"])
|
||||
var/transfer_purpose = href_list["purpose"]
|
||||
if(transfer_amount <= authenticated_account.money)
|
||||
if(transfer_amount <= 0)
|
||||
alert("That is not a valid amount.")
|
||||
else if(transfer_amount <= authenticated_account.money)
|
||||
var/target_account_number = text2num(href_list["target_acc_number"])
|
||||
var/transfer_purpose = href_list["purpose"]
|
||||
if(linked_db.charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
|
||||
usr << "\icon[src]<span class='info'>Funds transfer successful.</span>"
|
||||
authenticated_account.money -= transfer_amount
|
||||
@@ -284,7 +286,9 @@ log transactions
|
||||
previous_account_number = tried_account_num
|
||||
if("withdrawal")
|
||||
var/amount = max(text2num(href_list["funds_amount"]),0)
|
||||
if(authenticated_account && amount > 0)
|
||||
if(amount <= 0)
|
||||
alert("That is not a valid amount.")
|
||||
else if(authenticated_account && amount > 0)
|
||||
if(amount <= authenticated_account.money)
|
||||
playsound(src, 'chime.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -13,9 +13,19 @@
|
||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||
req_access = list(access_ce)
|
||||
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob)
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
if(allowed(user))
|
||||
overridden = 1
|
||||
@@ -29,9 +39,9 @@
|
||||
dat += "<a href='?src=\ref[src]&alarm=\ref[alarm]'>"
|
||||
switch(max(alarm.danger_level, alarm.alarm_area.atmosalm))
|
||||
if (0)
|
||||
dat += "<font color=blue>"
|
||||
dat += "<font color=green>"
|
||||
if (1)
|
||||
dat += "<font color=yellow>"
|
||||
dat += "<font color=blue>"
|
||||
if (2)
|
||||
dat += "<font color=red>"
|
||||
dat += "[alarm]</font></a><br/>"
|
||||
@@ -62,7 +72,6 @@
|
||||
return
|
||||
if(href_list["reset"])
|
||||
current = null
|
||||
src.updateUsrDialog()
|
||||
if(href_list["alarm"])
|
||||
current = locate(href_list["alarm"])
|
||||
if(href_list["command"])
|
||||
@@ -129,6 +138,11 @@
|
||||
selected[2] = selected[4]
|
||||
if(selected[3] > selected[4])
|
||||
selected[3] = selected[4]
|
||||
|
||||
//Sets the temperature the built-in heater/cooler tries to maintain.
|
||||
if(env == "temperature")
|
||||
current.target_temperature = (selected[2] + selected[3])/2
|
||||
|
||||
spawn(1)
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -167,7 +181,7 @@
|
||||
spawn(5)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
//copypasta from alarm code, changed to work with this without derping hard
|
||||
//---START COPYPASTA----
|
||||
@@ -185,7 +199,7 @@
|
||||
output += {"
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MODE]'>Set envirenomentals mode</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MODE]'>Set environmental mode</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SENSORS]'>Sensor Control</a><br>
|
||||
<HR>
|
||||
"}
|
||||
@@ -288,8 +302,8 @@ Nitrous Oxide
|
||||
AALARM_MODE_REPLACEMENT = "<font color='red'>REPLACE AIR</font>",
|
||||
AALARM_MODE_PANIC = "<font color='red'>PANIC</font>",
|
||||
AALARM_MODE_CYCLE = "<font color='red'>CYCLE</font>",
|
||||
AALARM_MODE_FILL = "<font color='red'>FILL</font>",
|
||||
)
|
||||
AALARM_MODE_FILL = "<font color='red'>FILL</font>",\
|
||||
AALARM_MODE_OFF = "<font color='blue'>OFFF</font>",)
|
||||
for (var/m=1,m<=modes.len,m++)
|
||||
if (current.mode==m)
|
||||
output += {"<li><A href='?src=\ref[src];alarm=\ref[current];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// Reference: http://www.teuse.net/personal/harrington/hh_bible.htm
|
||||
// http://www.trmn.org/portal/images/uniforms/rmn/rmn_officer_srv_dress_lrg.png
|
||||
|
||||
/obj/item/clothing/head/beret/centcom/officer
|
||||
name = "officers beret"
|
||||
desc = "A black beret adorned with the shield—a silver kite shield with an engraved sword—of the NanoTrasen security forces, announcing to the world that the wearer is a defender of NanoTrasen."
|
||||
icon_state = "centcomofficerberet"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/beret/centcom/captain
|
||||
name = "captains beret"
|
||||
desc = "A white beret adorned with the shield—a cobalt kite shield with an engraved sword—of the NanoTrasen security forces, worn only by those captaining a vessel of the NanoTrasen Navy."
|
||||
icon_state = "centcomcaptain"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/shoes/centcom
|
||||
name = "dress shoes"
|
||||
desc = "They appear impeccably polished."
|
||||
icon_state = "laceups"
|
||||
|
||||
/obj/item/clothing/under/rank/centcom/representative
|
||||
desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Ensign\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
|
||||
name = "\improper NanoTrasen Navy Uniform"
|
||||
icon_state = "officer"
|
||||
item_state = "g_suit"
|
||||
color = "officer"
|
||||
displays_id = 0
|
||||
|
||||
/obj/item/clothing/under/rank/centcom/officer
|
||||
desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Lieutenant Commander\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
|
||||
name = "\improper NanoTrasen Officers Uniform"
|
||||
icon_state = "officer"
|
||||
item_state = "g_suit"
|
||||
color = "officer"
|
||||
displays_id = 0
|
||||
|
||||
/obj/item/clothing/under/rank/centcom/captain
|
||||
desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Captain\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
|
||||
name = "\improper NanoTrasen Captains Uniform"
|
||||
icon_state = "centcom"
|
||||
item_state = "dg_suit"
|
||||
color = "centcom"
|
||||
displays_id = 0
|
||||
@@ -0,0 +1,117 @@
|
||||
// This system defines news that will be displayed in the course of a round.
|
||||
// Uses BYOND's type system to put everything into a nice format
|
||||
|
||||
/datum/news_announcement
|
||||
var
|
||||
round_time // time of the round at which this should be announced, in seconds
|
||||
message // body of the message
|
||||
author = "NanoTrasen Editor"
|
||||
channel_name = "Tau Ceti Daily"
|
||||
can_be_redacted = 0
|
||||
|
||||
revolution_inciting_event
|
||||
|
||||
paycuts_suspicion
|
||||
round_time = 60*10
|
||||
message = "Reports have leaked that Nanotrasen Inc. is planning to put paycuts into effect on many of its Research Stations in Tau Ceti. Apparently these research stations haven't been able to yield the expected revenue, and thus adjustments have to be made."
|
||||
author = "Unauthorized"
|
||||
|
||||
paycuts_confirmation
|
||||
round_time = 60*40
|
||||
message = "Earlier rumours about paycuts on Research Stations in the Tau Ceti system have been confirmed. Shockingly, however, the cuts will only affect lower tier personnel. Heads of Staff will, according to our sources, not be affected."
|
||||
author = "Unauthorized"
|
||||
|
||||
human_experiments
|
||||
round_time = 60*90
|
||||
message = "Unbelievable reports about human experimentation have reached our ears. According to a refugee from one of the Tau Ceti Research Stations, their station, in order to increase revenue, has refactored several of their facilities to perform experiments on live humans, including virology research, genetic manipulation, and \"feeding them to the slimes to see what happens\". Allegedly, these test subjects were neither humanified monkeys nor volunteers, but rather unqualified staff that were forced into the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc."
|
||||
author = "Unauthorized"
|
||||
|
||||
bluespace_research
|
||||
|
||||
announcement
|
||||
round_time = 60*20
|
||||
message = "The new field of research trying to explain several interesting spacetime oddities, also known as \"Bluespace Research\", has reached new heights. Of the several hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped to experiment with and research Bluespace effects. Rumours have it some of these stations even sport functional \"travel gates\" that can instantly move a whole research team to an alternate reality."
|
||||
|
||||
random_junk
|
||||
cheesy_honkers
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazzette"
|
||||
message = "Do cheesy honkers increase risk of having a miscarriage? Several health administrations say so!"
|
||||
round_time = 60 * 15
|
||||
|
||||
net_block
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazzette"
|
||||
message = "Several corporations banding together to block access to 'wetskrell.nt', site administrators claiming violation of net laws."
|
||||
round_time = 60 * 50
|
||||
|
||||
found_ssd
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Doctor Eric Hanfield"
|
||||
|
||||
message = "Several people have been found unconscious at their terminals. It is thought that it was due to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage reveals that many of them were playing games instead of working and their pay has been docked accordingly."
|
||||
round_time = 60 * 90
|
||||
|
||||
lotus_tree
|
||||
explosions
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Leland H. Howards"
|
||||
|
||||
message = "The newly-christened civillian transport Lotus Tree suffered two very large explosions near the bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of the explosions remain unknown, but there is speculation that it might have something to do with the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L announced that they were officially acknowledging inter-species marriage and providing couples with marriage tax-benefits."
|
||||
round_time = 60 * 30
|
||||
|
||||
food_riots
|
||||
breaking_news
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = "Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to continue. NanoTrasen officials have not given any details about said factions. More on that at the top of the hour."
|
||||
round_time = 60 * 10
|
||||
|
||||
more
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = "More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Plasma deposits have been completely mined out. We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them \"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell the riots. More on this at 6."
|
||||
round_time = 60 * 60
|
||||
|
||||
|
||||
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/lotus_tree)
|
||||
|
||||
proc/process_newscaster()
|
||||
check_for_newscaster_updates(ticker.mode.newscaster_announcements)
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in typesof(type)-type)
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
announce_newscaster_news(news)
|
||||
|
||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = news.author
|
||||
newMsg.is_admin_message = !news.can_be_redacted
|
||||
|
||||
newMsg.body = news.message
|
||||
|
||||
var/datum/feed_channel/sendto
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == news.channel_name)
|
||||
sendto = FC
|
||||
break
|
||||
|
||||
if(!sendto)
|
||||
sendto = new /datum/feed_channel
|
||||
sendto.channel_name = news.channel_name
|
||||
sendto.author = news.author
|
||||
sendto.locked = 1
|
||||
sendto.is_admin_channel = 1
|
||||
news_network.network_channels += sendto
|
||||
|
||||
sendto.messages += newMsg
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(news.channel_name)
|
||||
+229
-228
@@ -17,10 +17,11 @@ connection
|
||||
zone_B
|
||||
ref_A
|
||||
ref_B
|
||||
indirect = 0 //If the connection is purely indirect, the zones should not join.
|
||||
indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
|
||||
last_updated //The tick at which this was last updated.
|
||||
no_zone_count = 0
|
||||
|
||||
|
||||
New(turf/T,turf/O)
|
||||
A = T
|
||||
B = O
|
||||
@@ -47,29 +48,25 @@ connection
|
||||
else
|
||||
air_master.turfs_with_connections[ref_B] = list(src)
|
||||
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
if(!B.zone.connected_zones)
|
||||
B.zone.connected_zones = list()
|
||||
if(A.CanPass(null, B, 0, 0))
|
||||
|
||||
if(B.zone in A.zone.connected_zones)
|
||||
A.zone.connected_zones[B.zone]++
|
||||
else
|
||||
A.zone.connected_zones += B.zone
|
||||
A.zone.connected_zones[B.zone] = 1
|
||||
ConnectZones(A.zone, B.zone, 1)
|
||||
|
||||
if(A.HasDoor(B) || B.HasDoor(A))
|
||||
indirect = CONNECTION_INDIRECT
|
||||
|
||||
if(A.zone in B.zone.connected_zones)
|
||||
B.zone.connected_zones[A.zone]++
|
||||
else
|
||||
B.zone.connected_zones += A.zone
|
||||
B.zone.connected_zones[A.zone] = 1
|
||||
if(A.HasDoor(B) || B.HasDoor(A))
|
||||
indirect = 1
|
||||
ConnectZones(A.zone, B.zone)
|
||||
indirect = CONNECTION_CLOSED
|
||||
|
||||
|
||||
else
|
||||
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
|
||||
world.log << "Attempted to create connection object for non-zone tiles: [T] ([T.x],[T.y],[T.z]) -> [O] ([O.x],[O.y],[O.z])"
|
||||
del(src)
|
||||
|
||||
|
||||
Del()
|
||||
//remove connections from master lists.
|
||||
if(ref_B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[ref_B]
|
||||
connections.Remove(src)
|
||||
@@ -78,170 +75,203 @@ connection
|
||||
var/list/connections = air_master.turfs_with_connections[ref_A]
|
||||
connections.Remove(src)
|
||||
|
||||
//Ensure we delete the right values by sanity checkign right before deletion.
|
||||
Sanitize()
|
||||
|
||||
//Remove connection from current zones.
|
||||
if(A)
|
||||
if(A.zone && A.zone.connections)
|
||||
A.zone.connections.Remove(src)
|
||||
if(!A.zone.connections.len)
|
||||
del A.zone.connections
|
||||
A.zone.connections = null
|
||||
if(B)
|
||||
if(B.zone && B.zone.connections)
|
||||
B.zone.connections.Remove(src)
|
||||
if(!B.zone.connections.len)
|
||||
del B.zone.connections
|
||||
if(zone_A)
|
||||
if(zone_A && zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
if(!zone_A.connections.len)
|
||||
del zone_A.connections
|
||||
if(zone_B)
|
||||
if(zone_B && zone_B.connections)
|
||||
zone_B.connections.Remove(src)
|
||||
if(!zone_B.connections.len)
|
||||
del zone_B.connections
|
||||
B.zone.connections = null
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(A && A.zone)
|
||||
if(B && B.zone)
|
||||
if(B.zone in A.zone.connected_zones)
|
||||
if(A.zone.connected_zones[B.zone] > 1)
|
||||
A.zone.connected_zones[B.zone]--
|
||||
else
|
||||
A.zone.connected_zones -= B.zone
|
||||
if(A.zone.connected_zones && !A.zone.connected_zones.len)
|
||||
A.zone.connected_zones = null
|
||||
if( zone_B && (!B.zone || zone_B != B.zone) )
|
||||
if(zone_B in A.zone.connected_zones)
|
||||
if(A.zone.connected_zones[zone_B] > 1)
|
||||
A.zone.connected_zones[zone_B]--
|
||||
else
|
||||
A.zone.connected_zones -= zone_B
|
||||
if(A.zone.connected_zones && !A.zone.connected_zones.len)
|
||||
A.zone.connected_zones = null
|
||||
if(zone_A && (!A.zone || zone_A != A.zone))
|
||||
if(B && B.zone)
|
||||
if(B.zone in zone_A.connected_zones)
|
||||
if(zone_A.connected_zones[B.zone] > 1)
|
||||
zone_A.connected_zones[B.zone]--
|
||||
else
|
||||
zone_A.connected_zones -= B.zone
|
||||
if(zone_A.connected_zones && !zone_A.connected_zones.len)
|
||||
zone_A.connected_zones = null
|
||||
if( zone_B && (!B.zone || zone_B != B.zone) )
|
||||
if(zone_B in zone_A.connected_zones)
|
||||
if(zone_A.connected_zones[zone_B] > 1)
|
||||
zone_A.connected_zones[zone_B]--
|
||||
else
|
||||
zone_A.connected_zones -= zone_B
|
||||
if(zone_A.connected_zones && !zone_A.connected_zones.len)
|
||||
zone_A.connected_zones = null
|
||||
if(B && B.zone)
|
||||
if(A && A.zone)
|
||||
if(A.zone in B.zone.connected_zones)
|
||||
if(B.zone.connected_zones[A.zone] > 1)
|
||||
B.zone.connected_zones[A.zone]--
|
||||
else
|
||||
B.zone.connected_zones -= A.zone
|
||||
if(B.zone.connected_zones && !B.zone.connected_zones.len)
|
||||
B.zone.connected_zones = null
|
||||
if( zone_A && (!A.zone || zone_A != A.zone) )
|
||||
if(zone_A in B.zone.connected_zones)
|
||||
if(B.zone.connected_zones[zone_A] > 1)
|
||||
B.zone.connected_zones[zone_A]--
|
||||
else
|
||||
B.zone.connected_zones -= zone_A
|
||||
if(B.zone.connected_zones && !B.zone.connected_zones.len)
|
||||
B.zone.connected_zones = null
|
||||
if(zone_B && (!B.zone || zone_B != B.zone))
|
||||
if(A && A.zone)
|
||||
if(A.zone in zone_B.connected_zones)
|
||||
if(zone_B.connected_zones[A.zone] > 1)
|
||||
zone_B.connected_zones[A.zone]--
|
||||
else
|
||||
zone_B.connected_zones -= A.zone
|
||||
if(zone_B.connected_zones && !zone_B.connected_zones.len)
|
||||
zone_B.connected_zones = null
|
||||
if( zone_A && (!A.zone || zone_A != A.zone) )
|
||||
if(zone_A in zone_B.connected_zones)
|
||||
if(zone_B.connected_zones[zone_A] > 1)
|
||||
zone_B.connected_zones[zone_A]--
|
||||
else
|
||||
zone_B.connected_zones -= zone_A
|
||||
if(zone_B.connected_zones && !zone_B.connected_zones.len)
|
||||
zone_B.connected_zones = null
|
||||
//Disconnect zones while handling unusual conditions.
|
||||
// e.g. loss of a zone on a turf
|
||||
if(A && A.zone && B && B.zone)
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
|
||||
//Finally, preform actual deletion.
|
||||
. = ..()
|
||||
|
||||
|
||||
proc/ConnectZones(var/zone/zone_1, var/zone/zone_2, open = 0)
|
||||
|
||||
//Sanity checking
|
||||
if(!istype(zone_1) || !istype(zone_2))
|
||||
return
|
||||
|
||||
//Handle zones connecting indirectly/directly.
|
||||
if(open)
|
||||
|
||||
//Create the lists if necessary.
|
||||
if(!zone_1.connected_zones)
|
||||
zone_1.connected_zones = list()
|
||||
|
||||
if(!zone_2.connected_zones)
|
||||
zone_2.connected_zones = list()
|
||||
|
||||
//Increase the number of connections between zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
zone_1.connected_zones[zone_2]++
|
||||
else
|
||||
zone_1.connected_zones += zone_2
|
||||
zone_1.connected_zones[zone_2] = 1
|
||||
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
zone_2.connected_zones[zone_1]++
|
||||
else
|
||||
zone_2.connected_zones += zone_1
|
||||
zone_2.connected_zones[zone_1] = 1
|
||||
|
||||
//Handle closed connections.
|
||||
else
|
||||
|
||||
//Create the lists
|
||||
if(!zone_1.closed_connection_zones)
|
||||
zone_1.closed_connection_zones = list()
|
||||
|
||||
if(!zone_2.closed_connection_zones)
|
||||
zone_2.closed_connection_zones = list()
|
||||
|
||||
//Increment the connections.
|
||||
if(zone_2 in zone_1.closed_connection_zones)
|
||||
zone_1.closed_connection_zones[zone_2]++
|
||||
else
|
||||
zone_1.closed_connection_zones += zone_2
|
||||
zone_1.closed_connection_zones[zone_2] = 1
|
||||
|
||||
if(zone_1 in zone_2.closed_connection_zones)
|
||||
zone_2.closed_connection_zones[zone_1]++
|
||||
else
|
||||
zone_2.closed_connection_zones += zone_1
|
||||
zone_2.closed_connection_zones[zone_1] = 1
|
||||
|
||||
|
||||
proc/DisconnectZones(var/zone/zone_1, var/zone/zone_2)
|
||||
|
||||
//Sanity checking
|
||||
if(!istype(zone_1) || !istype(zone_2))
|
||||
return
|
||||
|
||||
//Handle disconnection of indirectly or directly connected zones.
|
||||
if( (zone_1 in zone_2.connected_zones) || (zone_2 in zone_1.connected_zones) )
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_1.connected_zones[zone_2] > 1)
|
||||
zone_1.connected_zones[zone_2]--
|
||||
else
|
||||
zone_1.connected_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.connected_zones.len)
|
||||
zone_1.connected_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_2.connected_zones[zone_1] > 1)
|
||||
zone_2.connected_zones[zone_1]--
|
||||
else
|
||||
zone_2.connected_zones -= zone_1
|
||||
if(!zone_2.connected_zones.len)
|
||||
zone_2.connected_zones = null
|
||||
|
||||
//Handle disconnection of closed zones.
|
||||
if( (zone_1 in zone_2.closed_connection_zones) || (zone_2 in zone_1.closed_connection_zones) )
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_1.closed_connection_zones[zone_2] > 1)
|
||||
zone_1.closed_connection_zones[zone_2]--
|
||||
else
|
||||
zone_1.closed_connection_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.closed_connection_zones.len)
|
||||
zone_1.closed_connection_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_2.closed_connection_zones[zone_1] > 1)
|
||||
zone_2.closed_connection_zones[zone_1]--
|
||||
else
|
||||
zone_2.closed_connection_zones -= zone_1
|
||||
if(!zone_2.closed_connection_zones.len)
|
||||
zone_2.closed_connection_zones = null
|
||||
|
||||
|
||||
proc/Cleanup()
|
||||
|
||||
//Check sanity: existance of turfs
|
||||
if(!A || !B)
|
||||
//world.log << "Connection removed: [A] or [B] missing entirely."
|
||||
del src
|
||||
|
||||
//Check sanity: zones are different
|
||||
if(A.zone == B.zone)
|
||||
//world.log << "Connection removed: Zones now merged."
|
||||
del src
|
||||
|
||||
//Check sanity: same turfs as before.
|
||||
if(ref_A != "\ref[A]" || ref_B != "\ref[B]")
|
||||
del src
|
||||
|
||||
//Handle zones changing on a turf.
|
||||
if((A.zone && A.zone != zone_A) || (B.zone && B.zone != zone_B))
|
||||
Sanitize()
|
||||
|
||||
//Manage sudden loss of a turfs zone. (e.g. a wall being built)
|
||||
if(!A.zone || !B.zone)
|
||||
no_zone_count++
|
||||
if(no_zone_count >= 5)
|
||||
//world.log << "Connection removed: [A] or [B] missing a zone."
|
||||
del src
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
proc/CheckPassSanity()
|
||||
Cleanup()
|
||||
if(A.zone && B.zone)
|
||||
if(A.ZAirPass(B))
|
||||
var/door_pass = A.CanPass(null,B,1.5,1)
|
||||
if(door_pass || A.CanPass(null,B,0,0))
|
||||
if(indirect == CONNECTION_CLOSED)
|
||||
//ADJUST FOR CAN CONNECT
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
if(B.zone in A.zone.connected_zones)
|
||||
A.zone.connected_zones[B.zone]++
|
||||
else
|
||||
A.zone.connected_zones += B.zone
|
||||
A.zone.connected_zones[B.zone] = 1
|
||||
|
||||
if(!B.zone.connected_zones)
|
||||
B.zone.connected_zones = list()
|
||||
if(A.zone in B.zone.connected_zones)
|
||||
B.zone.connected_zones[A.zone]++
|
||||
else
|
||||
B.zone.connected_zones += A.zone
|
||||
B.zone.connected_zones[A.zone] = 1
|
||||
proc/CheckPassSanity()
|
||||
//Sanity check, first.
|
||||
Cleanup()
|
||||
|
||||
if(A.zone && B.zone)
|
||||
|
||||
//If no walls are blocking us...
|
||||
if(A.ZAirPass(B))
|
||||
//...we check to see if there is a door in the way...
|
||||
var/door_pass = A.CanPass(null,B,1.5,1)
|
||||
//...and if it is opened.
|
||||
if(door_pass || A.CanPass(null,B,0,0))
|
||||
|
||||
//Make and remove connections to let air pass.
|
||||
if(indirect == CONNECTION_CLOSED)
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
ConnectZones(A.zone, B.zone, 1)
|
||||
|
||||
if(door_pass)
|
||||
indirect = CONNECTION_DIRECT
|
||||
else if(!door_pass)
|
||||
indirect = CONNECTION_INDIRECT
|
||||
|
||||
//The door is instead closed.
|
||||
else if(indirect > CONNECTION_CLOSED)
|
||||
indirect = CONNECTION_CLOSED
|
||||
//ADJUST FOR CANNOT CONNECT
|
||||
if(A.zone.connected_zones)
|
||||
if(A.zone.connected_zones[B.zone] > 1)
|
||||
A.zone.connected_zones[B.zone]--
|
||||
else
|
||||
A.zone.connected_zones.Remove(B.zone)
|
||||
if(A.zone.connected_zones && !A.zone.connected_zones.len)
|
||||
A.zone.connected_zones = null
|
||||
if(B.zone.connected_zones)
|
||||
if(B.zone.connected_zones[A.zone] > 1)
|
||||
B.zone.connected_zones[A.zone]--
|
||||
else
|
||||
B.zone.connected_zones.Remove(A.zone)
|
||||
if(B.zone.connected_zones && !B.zone.connected_zones.len)
|
||||
B.zone.connected_zones = null
|
||||
else //If I can no longer pass air, better delete
|
||||
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
ConnectZones(A.zone, B.zone)
|
||||
|
||||
//If I can no longer pass air, better delete
|
||||
else
|
||||
del src
|
||||
|
||||
proc/Sanitize()
|
||||
//If the zones change on connected turfs, update it.
|
||||
if(A.zone && A.zone != zone_A && B.zone && B.zone != zone_B)
|
||||
if(!A.zone || !B.zone)
|
||||
del src
|
||||
|
||||
//Both zones changed (wat)
|
||||
if(A.zone && A.zone != zone_A && B.zone && B.zone != zone_B)
|
||||
|
||||
//If the zones have gotten swapped
|
||||
// (do not ask me how, I am just being anal retentive about sanity)
|
||||
if(A.zone == zone_B && B.zone == zone_A)
|
||||
var/turf/temp = B
|
||||
B = A
|
||||
@@ -253,130 +283,101 @@ connection
|
||||
ref_B = temp_ref
|
||||
return
|
||||
|
||||
if(zone_A)
|
||||
if(zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
if(!zone_A.connections.len)
|
||||
del zone_A.connections
|
||||
//Handle removal of connections from archived zones.
|
||||
if(zone_A && zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
if(!zone_A.connections.len)
|
||||
zone_A.connections = null
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(zone_A.connected_zones)
|
||||
if(zone_A.connected_zones[zone_B] > 1)
|
||||
zone_A.connected_zones[zone_B]--
|
||||
else
|
||||
zone_A.connected_zones.Remove(zone_B)
|
||||
if(zone_A.connected_zones && !zone_A.connected_zones.len)
|
||||
zone_A.connected_zones = null
|
||||
if(zone_B && zone_B.connections)
|
||||
zone_B.connections.Remove(src)
|
||||
if(!zone_B.connections.len)
|
||||
zone_B.connections = null
|
||||
|
||||
if(zone_B)
|
||||
if(zone_B.connections)
|
||||
zone_B.connections.Remove(src)
|
||||
if(!zone_B.connections.len)
|
||||
del zone_B.connections
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(zone_B.connected_zones)
|
||||
if(zone_B.connected_zones[zone_A] > 1)
|
||||
zone_B.connected_zones[zone_A]--
|
||||
else
|
||||
zone_B.connected_zones.Remove(zone_A)
|
||||
if(zone_B.connected_zones && !zone_B.connected_zones.len)
|
||||
zone_B.connected_zones = null
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(A.zone)
|
||||
if(!A.zone.connections)
|
||||
A.zone.connections = list()
|
||||
A.zone.connections |= src
|
||||
|
||||
if(B.zone)
|
||||
if(!B.zone.connections)
|
||||
B.zone.connections = list()
|
||||
B.zone.connections |= src
|
||||
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
if(B.zone in A.zone.connected_zones)
|
||||
A.zone.connected_zones[B.zone]++
|
||||
else
|
||||
A.zone.connected_zones += B.zone
|
||||
A.zone.connected_zones[B.zone] = 1
|
||||
//If either zone is null, we disconnect the archived ones after cleaning up the connections.
|
||||
if(!A.zone || !B.zone)
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_B, zone_A)
|
||||
|
||||
if(!B.zone.connected_zones)
|
||||
B.zone.connected_zones = list()
|
||||
if(A.zone in B.zone.connected_zones)
|
||||
B.zone.connected_zones[A.zone]++
|
||||
else
|
||||
B.zone.connected_zones += A.zone
|
||||
B.zone.connected_zones[A.zone] = 1
|
||||
if(!A.zone)
|
||||
zone_A = A.zone
|
||||
|
||||
if(!B.zone)
|
||||
zone_B = B.zone
|
||||
return
|
||||
|
||||
//Handle diconnection and reconnection of zones.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
|
||||
//resetting values of archived values.
|
||||
zone_B = B.zone
|
||||
|
||||
zone_A = A.zone
|
||||
|
||||
|
||||
//The "A" zone changed.
|
||||
else if(A.zone && A.zone != zone_A)
|
||||
if(zone_A)
|
||||
|
||||
//Handle connection cleanup
|
||||
if(zone_A)
|
||||
if(zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
if(!zone_A.connections.len)
|
||||
del zone_A.connections
|
||||
zone_A.connections = null
|
||||
|
||||
if(A.zone)
|
||||
if(!A.zone.connections)
|
||||
A.zone.connections = list()
|
||||
A.zone.connections |= src
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(zone_A.connected_zones)
|
||||
if(zone_A.connected_zones[zone_B] > 1)
|
||||
zone_A.connected_zones[zone_B]--
|
||||
else
|
||||
zone_A.connected_zones.Remove(zone_B)
|
||||
if(zone_A.connected_zones && !zone_A.connected_zones.len)
|
||||
zone_A.connected_zones = null
|
||||
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
if(!(zone_B in A.zone.connected_zones))
|
||||
A.zone.connected_zones += zone_B
|
||||
A.zone.connected_zones[zone_B] = 1
|
||||
else
|
||||
A.zone.connected_zones[zone_B]++
|
||||
|
||||
//If the "A" zone is null, we disconnect the archived ones after cleaning up the connections.
|
||||
if(!A.zone)
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
zone_A = A.zone
|
||||
return
|
||||
|
||||
else
|
||||
del src
|
||||
//Handle diconnection and reconnection of zones.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
|
||||
//The "B" zone changed.
|
||||
else if(B.zone && B.zone != zone_B)
|
||||
if(zone_B)
|
||||
|
||||
//Handle connection cleanup
|
||||
if(zone_B)
|
||||
if(zone_B.connections)
|
||||
zone_B.connections.Remove(src)
|
||||
if(!zone_B.connections.len)
|
||||
del zone_B.connections
|
||||
zone_B.connections = null
|
||||
|
||||
if(B.zone)
|
||||
if(!B.zone.connections)
|
||||
B.zone.connections = list()
|
||||
B.zone.connections |= src
|
||||
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
if(zone_B.connected_zones)
|
||||
if(zone_B.connected_zones[zone_A] > 1)
|
||||
zone_B.connected_zones[zone_A]--
|
||||
else
|
||||
zone_B.connected_zones.Remove(zone_A)
|
||||
if(zone_B.connected_zones && !zone_B.connected_zones.len)
|
||||
zone_B.connected_zones = null
|
||||
|
||||
if(!B.zone.connected_zones)
|
||||
B.zone.connected_zones = list()
|
||||
if(!(zone_A in B.zone.connected_zones))
|
||||
B.zone.connected_zones += zone_A
|
||||
B.zone.connected_zones[zone_A] = 1
|
||||
else
|
||||
B.zone.connected_zones[zone_A]++
|
||||
|
||||
//If the "B" zone is null, we disconnect the archived ones after cleaning up the connections.
|
||||
if(!B.zone)
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
zone_B = B.zone
|
||||
return
|
||||
|
||||
else
|
||||
del src
|
||||
//Handle diconnection and reconnection of zones.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
|
||||
|
||||
#undef CONNECTION_DIRECT
|
||||
|
||||
+4
-7
@@ -1,5 +1,5 @@
|
||||
|
||||
client/verb/Zone_Info(turf/T as null|turf)
|
||||
client/proc/Zone_Info(turf/T as null|turf)
|
||||
set category = "Debug"
|
||||
if(T)
|
||||
if(T.zone)
|
||||
@@ -14,7 +14,7 @@ client/verb/Zone_Info(turf/T as null|turf)
|
||||
|
||||
|
||||
|
||||
client/verb/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
set category = "Debug"
|
||||
if(!istype(T))
|
||||
return
|
||||
@@ -40,7 +40,7 @@ client/verb/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
if(!istype(other_turf))
|
||||
return
|
||||
|
||||
var/pass_directions = T.CanPass(null, other_turf, 0, 0) + 2*other_turf.CanPass(null, T, 0, 0)
|
||||
var/pass_directions = T.CanPass(null, other_turf, 0, 0) + 2 * other_turf.CanPass(null, T, 0, 0)
|
||||
|
||||
switch(pass_directions)
|
||||
if(0)
|
||||
@@ -80,12 +80,9 @@ zone/proc
|
||||
M << "<u>Connections: [length(connections)]</u>"
|
||||
|
||||
for(var/connection/C in connections)
|
||||
M << "[C.A] --> [C.B] [(C.indirect?"Indirect":"Direct")]"
|
||||
M << "[C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
||||
C.A.overlays += 'debug_connect.dmi'
|
||||
C.B.overlays += 'debug_connect.dmi'
|
||||
spawn(50)
|
||||
C.A.overlays -= 'debug_connect.dmi'
|
||||
C.B.overlays -= 'debug_connect.dmi'
|
||||
for(var/C in connections)
|
||||
if(!istype(C,/connection))
|
||||
M << "[C] (Not Connection!)"
|
||||
|
||||
+18
-178
@@ -101,12 +101,10 @@ datum
|
||||
//Geometry updates lists
|
||||
var/list/tiles_to_update = list()
|
||||
var/list/connections_to_check = list()
|
||||
var/list/rebuilds_to_consider = list()
|
||||
|
||||
var/current_cycle = 0
|
||||
var/update_delay = 5 //How long between check should it try to process atmos again.
|
||||
var/failed_ticks = 0 //How many ticks have runtimed?
|
||||
var/next_stat_check = 10
|
||||
|
||||
var/tick_progress = 0
|
||||
|
||||
@@ -137,7 +135,10 @@ datum
|
||||
|
||||
var/start_time = world.timeofday
|
||||
|
||||
var/simulated_turf_count = 0
|
||||
|
||||
for(var/turf/simulated/S in world)
|
||||
simulated_turf_count++
|
||||
if(!S.zone && !S.blocks_air)
|
||||
if(S.CanPass(null, S, 0, 0))
|
||||
new/zone(S)
|
||||
@@ -145,8 +146,12 @@ datum
|
||||
for(var/turf/simulated/S in world)
|
||||
S.update_air_properties()
|
||||
|
||||
world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!"
|
||||
// spawn start()
|
||||
world << {"<font color='red'><b>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b>
|
||||
Total Simulated Turfs: [simulated_turf_count]
|
||||
Total Zones: [zones.len]
|
||||
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>"}
|
||||
/*
|
||||
spawn start()
|
||||
|
||||
proc/start()
|
||||
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
|
||||
@@ -154,7 +159,7 @@ datum
|
||||
//Inputs: None.
|
||||
//Outputs: None.
|
||||
|
||||
/*
|
||||
|
||||
set background = 1
|
||||
|
||||
while(1)
|
||||
@@ -172,55 +177,30 @@ datum
|
||||
proc/tick()
|
||||
. = 1 //Set the default return value, for runtime detection.
|
||||
|
||||
tick_progress = "next_stat_check (atmos statistics)"
|
||||
if(current_cycle >= next_stat_check)
|
||||
var/zone/z = pick(zones)
|
||||
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY-air.txt")]")
|
||||
log_file << "\"\The [get_area(pick(z.contents))]\",[z.air.oxygen],[z.air.nitrogen],[z.air.carbon_dioxide],[z.air.toxins],[z.air.temperature],[z.air.group_multiplier * z.air.volume]"
|
||||
next_stat_check = current_cycle + (rand(5,7)*60)
|
||||
|
||||
tick_progress = "update_air_properties"
|
||||
if(tiles_to_update.len) //If there are tiles to update, do so.
|
||||
for(var/turf/simulated/T in tiles_to_update)
|
||||
var/output = T.update_air_properties()
|
||||
if(. && T && !output)
|
||||
if(. && T && !T.update_air_properties())
|
||||
. = 0 //If a runtime occured, make sure we can sense it.
|
||||
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
||||
tiles_to_update = list()
|
||||
|
||||
tick_progress = "reconsider_zones"
|
||||
if(rebuilds_to_consider.len)
|
||||
for(var/turf/T in rebuilds_to_consider)
|
||||
if(istype(T, /turf/simulated) && T.zone && !T.zone.rebuild)
|
||||
var/turf/simulated/other_turf = rebuilds_to_consider[T]
|
||||
if(istype(other_turf))
|
||||
ConsiderRebuild(T,other_turf)
|
||||
else if(istype(other_turf, /list))
|
||||
var/list/temp_turfs = other_turf
|
||||
for(var/turf/NT in temp_turfs)
|
||||
ConsiderRebuild(T,NT)
|
||||
else if (istype(T))
|
||||
var/turf/simulated/other_turf = rebuilds_to_consider[T]
|
||||
if(istype(other_turf))
|
||||
ConsiderRebuild(other_turf,T)
|
||||
else if(istype(other_turf, /list))
|
||||
var/list/temp_turfs = other_turf
|
||||
for(var/turf/simulated/NT in temp_turfs)
|
||||
ConsiderRebuild(NT,T)
|
||||
rebuilds_to_consider = list()
|
||||
|
||||
//Check sanity on connection objects.
|
||||
tick_progress = "connections_to_check"
|
||||
if(connections_to_check.len)
|
||||
for(var/connection/C in connections_to_check)
|
||||
C.CheckPassSanity()
|
||||
connections_to_check = list()
|
||||
|
||||
//Ensure tiles still have zones.
|
||||
tick_progress = "tiles_to_reconsider_zones"
|
||||
if(tiles_to_reconsider_zones.len)
|
||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||
if(!T.zone)
|
||||
new /zone(T)
|
||||
tiles_to_reconsider_zones = list()
|
||||
|
||||
//Process zones.
|
||||
tick_progress = "zone/process()"
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.last_update < current_cycle)
|
||||
@@ -229,150 +209,10 @@ datum
|
||||
Z.last_update = current_cycle
|
||||
if(. && Z && !output)
|
||||
. = 0
|
||||
log_admin("ZASALERT: unable run zone/process(), [Z.progress]")
|
||||
message_admins("ZASALERT. ZASALERT: unable run zone/proc/process(), [Z.progress], tell someone about this!")
|
||||
|
||||
//Process fires.
|
||||
tick_progress = "active_hotspots (fire)"
|
||||
for(var/obj/fire/F in active_hotspots)
|
||||
var/output = F.process()
|
||||
if(. && F && !output)
|
||||
if(. && F && !F.process())
|
||||
. = 0
|
||||
//message_admins("ZASALERT: Unable run obj/fire/process()")
|
||||
|
||||
tick_progress = "success"
|
||||
|
||||
proc/AddToConsiderRebuild(var/turf/simulated/T, var/turf/NT)
|
||||
var/turf/existing_test = rebuilds_to_consider[T]
|
||||
var/turf/existing_test_alternate = rebuilds_to_consider[NT]
|
||||
|
||||
if(existing_test)
|
||||
if(NT == existing_test)
|
||||
return
|
||||
else if(islist(existing_test) && existing_test[NT])
|
||||
return
|
||||
|
||||
else if(existing_test_alternate)
|
||||
if(T == existing_test_alternate)
|
||||
return
|
||||
else if(islist(existing_test_alternate) && existing_test_alternate[T])
|
||||
return
|
||||
|
||||
if(istype(T))
|
||||
if(istype(existing_test))
|
||||
var/list/temp_list = list(NT = 1, existing_test = 1)
|
||||
rebuilds_to_consider[T] = temp_list
|
||||
else if(istype(existing_test, /list))
|
||||
existing_test[NT] = 1
|
||||
else
|
||||
rebuilds_to_consider[T] = NT
|
||||
|
||||
else if(istype(NT, /turf/simulated))
|
||||
if(istype(existing_test_alternate))
|
||||
var/list/temp_list = list(T = 1, existing_test_alternate = 1)
|
||||
rebuilds_to_consider[NT] = temp_list
|
||||
else if(istype(existing_test_alternate, /list))
|
||||
existing_test_alternate[T] = 1
|
||||
else
|
||||
rebuilds_to_consider[NT] = T
|
||||
|
||||
proc/ConsiderRebuild(var/turf/simulated/T, var/turf/NT)
|
||||
|
||||
if(!istype(T)) return
|
||||
//zones should naturally spread to these tiles eventually
|
||||
if(!T.zone || !NT.zone)
|
||||
return
|
||||
|
||||
if(istype(NT, /turf/simulated) && NT.zone != T.zone)
|
||||
T.zone.RemoveTurf(NT)
|
||||
if(NT.zone)
|
||||
NT.zone.RemoveTurf(T)
|
||||
return
|
||||
if(T.zone.rebuild)
|
||||
return
|
||||
|
||||
var/zone/zone = T.zone
|
||||
|
||||
var/target_dir = get_dir(T, NT)
|
||||
if(target_dir in list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
T.zone.rebuild = 1
|
||||
return
|
||||
var/test_dir = turn(target_dir, 90)
|
||||
|
||||
var/turf/simulated/current = T
|
||||
var/turf/simulated/next
|
||||
var/stepped_back = 0
|
||||
|
||||
if( !(T.air_check_directions&test_dir || T.air_check_directions&turn(target_dir, 270)) )
|
||||
//Step back, then try to connect.
|
||||
if(!(T.air_check_directions&get_dir(NT, T)))
|
||||
zone.rebuild = 1
|
||||
return
|
||||
current = get_step(T, get_dir(NT, T))
|
||||
if(!istype(current) || !(current.air_check_directions&test_dir || current.air_check_directions&turn(target_dir, 270)) )
|
||||
zone.rebuild = 1
|
||||
return
|
||||
stepped_back = 1
|
||||
|
||||
if ( !(current.air_check_directions&test_dir) && current.air_check_directions&turn(target_dir, 270) )
|
||||
//Try to connect to the right hand side.
|
||||
var/flipped = 0
|
||||
test_dir = turn(target_dir, 270)
|
||||
|
||||
for(var/i = 1, i <= 10, i++)
|
||||
if(get_dir(current, NT) in cardinal)
|
||||
target_dir = get_dir(current, NT)
|
||||
|
||||
if(!istype(current) || !(current.air_check_directions&target_dir || current.air_check_directions&test_dir))
|
||||
if(flipped)
|
||||
zone.rebuild = 1
|
||||
return
|
||||
current = T
|
||||
test_dir = turn(target_dir, 180)
|
||||
i = 0
|
||||
target_dir = get_dir(current, NT)
|
||||
flipped = 1
|
||||
continue
|
||||
|
||||
if(current.air_check_directions&target_dir && !stepped_back)
|
||||
next = get_step(current, target_dir)
|
||||
if(!next.HasDoor())
|
||||
current = next
|
||||
|
||||
if(current.air_check_directions&test_dir && current != next)
|
||||
next = get_step(current, test_dir)
|
||||
if(!next.HasDoor())
|
||||
current = next
|
||||
|
||||
if(current == NT)
|
||||
return //We made it, yaaay~
|
||||
stepped_back = 0
|
||||
zone.rebuild = 1
|
||||
|
||||
else if ( current.air_check_directions&test_dir )
|
||||
//Try to connect to the left hand side.
|
||||
for(var/i = 1, i <= 10, i++)
|
||||
if(get_dir(current, NT) in cardinal)
|
||||
target_dir = get_dir(current, NT)
|
||||
|
||||
if(!istype(current) || !(current.air_check_directions&target_dir || current.air_check_directions&test_dir))
|
||||
zone.rebuild = 1
|
||||
return
|
||||
|
||||
if(current.air_check_directions&target_dir && !stepped_back)
|
||||
next = get_step(current, target_dir)
|
||||
if(!next.HasDoor())
|
||||
current = next
|
||||
|
||||
if(current.air_check_directions&test_dir && current != next)
|
||||
next = get_step(current, test_dir)
|
||||
if(!next.HasDoor())
|
||||
current = next
|
||||
|
||||
if(current == NT)
|
||||
return //We made it, yaaay~
|
||||
stepped_back = 0
|
||||
zone.rebuild = 1
|
||||
|
||||
else
|
||||
//FUCK IT
|
||||
zone.rebuild = 1
|
||||
tick_progress = "success"
|
||||
+42
-109
@@ -1,35 +1,44 @@
|
||||
//Global Functions
|
||||
//Contents: FloodFill, ZMerge, ZConnect
|
||||
|
||||
//Floods outward from an initial turf to fill everywhere it's zone would reach.
|
||||
proc/FloodFill(turf/simulated/start)
|
||||
|
||||
if(!istype(start))
|
||||
return list()
|
||||
var
|
||||
list
|
||||
open = list(start)
|
||||
closed = list()
|
||||
|
||||
//The list of tiles waiting to be evaulated.
|
||||
var/list/open = list(start)
|
||||
//The list of tiles which have been evaulated.
|
||||
var/list/closed = list()
|
||||
|
||||
//Loop through the turfs in the open list in order to find which adjacent turfs should be added to the zone.
|
||||
while(open.len)
|
||||
var/turf/simulated/T = pick(open)
|
||||
|
||||
//sanity!
|
||||
if(!istype(T))
|
||||
open -= T
|
||||
continue
|
||||
|
||||
//Check all cardinal directions
|
||||
for(var/d in cardinal)
|
||||
var/turf/simulated/O = get_step(T,d)
|
||||
|
||||
//Ensure the turf is of proper type, that it is not in either list, and that air can reach it.
|
||||
if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T))
|
||||
|
||||
//Handle connections from a tile with a door.
|
||||
if(T.HasDoor())
|
||||
//If they both have doors, then they are nto able to connect period.
|
||||
//If they both have doors, then they are not able to connect period.
|
||||
if(O.HasDoor())
|
||||
continue
|
||||
|
||||
//connect first to north and west
|
||||
//Connect first to north and west
|
||||
if(d == NORTH || d == WEST)
|
||||
open += O
|
||||
|
||||
//If that fails, and north/west cannot be connected to, see if west or south can be connected instead.
|
||||
else
|
||||
var/turf/simulated/W = get_step(O, WEST)
|
||||
var/turf/simulated/N = get_step(O, NORTH)
|
||||
@@ -38,9 +47,11 @@ proc/FloodFill(turf/simulated/start)
|
||||
//If it cannot connect either to the north or west, connect it!
|
||||
open += O
|
||||
|
||||
//If no doors are involved, add it immediately.
|
||||
else if(!O.HasDoor())
|
||||
open += O
|
||||
|
||||
//Handle connecting to a tile with a door.
|
||||
else
|
||||
if(d == SOUTH || d == EAST)
|
||||
//doors prefer connecting to zones to the north or west
|
||||
@@ -56,19 +67,25 @@ proc/FloodFill(turf/simulated/start)
|
||||
//If it cannot connect either to the north or west, connect it!
|
||||
closed += O
|
||||
|
||||
//This tile is now evaluated, and can be moved to the list of evaluated tiles.
|
||||
open -= T
|
||||
closed += T
|
||||
|
||||
return closed
|
||||
|
||||
|
||||
//Procedure to merge two zones together.
|
||||
proc/ZMerge(zone/A,zone/B)
|
||||
|
||||
//Sanity~
|
||||
if(!istype(A) || !istype(B))
|
||||
return
|
||||
|
||||
//Merges two zones so that they are one.
|
||||
var
|
||||
a_size = A.air.group_multiplier
|
||||
b_size = B.air.group_multiplier
|
||||
c_size = a_size + b_size
|
||||
new_contents = A.contents + B.contents
|
||||
var/a_size = A.air.group_multiplier
|
||||
var/b_size = B.air.group_multiplier
|
||||
var/c_size = a_size + b_size
|
||||
var/new_contents = A.contents + B.contents
|
||||
|
||||
//Set air multipliers to one so air represents gas per tile.
|
||||
A.air.group_multiplier = 1
|
||||
@@ -82,32 +99,28 @@ proc/ZMerge(zone/A,zone/B)
|
||||
A.air.merge(B.air)
|
||||
A.air.group_multiplier = c_size
|
||||
|
||||
//Check for connections to merge into the new zone.
|
||||
for(var/connection/C in B.connections)
|
||||
if((C.A in new_contents) && (C.B in new_contents))
|
||||
del C
|
||||
continue
|
||||
if(!A.connections) A.connections = list()
|
||||
A.connections += C
|
||||
|
||||
//Add space tiles.
|
||||
A.unsimulated_tiles += B.unsimulated_tiles
|
||||
|
||||
//Add contents.
|
||||
A.contents = new_contents
|
||||
|
||||
//Set all the zone vars.
|
||||
for(var/turf/simulated/T in B.contents)
|
||||
T.zone = A
|
||||
|
||||
for(var/connection/C in A.connections)
|
||||
//Check for connections to merge into the new zone.
|
||||
for(var/connection/C in B.connections)
|
||||
//The Cleanup proc will delete the connection if the zones are the same.
|
||||
// It will also set the zone variables correctly.
|
||||
C.Cleanup()
|
||||
|
||||
//Add space tiles.
|
||||
A.unsimulated_tiles |= B.unsimulated_tiles
|
||||
|
||||
//Add contents.
|
||||
A.contents = new_contents
|
||||
|
||||
//Remove the "B" zone, finally.
|
||||
B.SoftDelete()
|
||||
|
||||
|
||||
//Connects two zones by forming a connection object representing turfs A and B.
|
||||
proc/ZConnect(turf/simulated/A,turf/simulated/B)
|
||||
//Connects two zones by forming a connection object representing turfs A and B.
|
||||
|
||||
//Make sure that if it's space, it gets added to unsimulated_tiles instead.
|
||||
if(!istype(B))
|
||||
@@ -126,8 +139,6 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B)
|
||||
if(!A.zone || !B.zone) return
|
||||
if(A.zone == B.zone) return
|
||||
|
||||
if(!A.CanPass(null,B,0,0)) return
|
||||
|
||||
if(A.CanPass(null,B,0,1))
|
||||
return ZMerge(A.zone,B.zone)
|
||||
|
||||
@@ -138,83 +149,5 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B)
|
||||
if(C && (C.B == B || C.A == B))
|
||||
return
|
||||
|
||||
new /connection(A,B)
|
||||
|
||||
/*
|
||||
proc/ZDisconnect(turf/A,turf/B)
|
||||
//Removes a zone connection. Can split zones in the case of a permanent barrier.
|
||||
|
||||
//If one of them doesn't have a zone, it might be space, so check for that.
|
||||
if(A.zone && B.zone)
|
||||
//If the two zones are different, just remove a connection.
|
||||
if(A.zone != B.zone)
|
||||
for(var/connection/C in A.zone.connections)
|
||||
if((C.A == A && C.B == B) || (C.A == B && C.B == A))
|
||||
del C
|
||||
if(C)
|
||||
C.Cleanup()
|
||||
//If they're the same, split the zone at this line.
|
||||
else
|
||||
//Preliminary checks to prevent stupidity.
|
||||
if(A == B) return
|
||||
if(A.CanPass(0,B,0,0)) return
|
||||
if(A.HasDoor(B) || B.HasDoor(A)) return
|
||||
|
||||
//Do a test fill. If turf B is still in the floodfill, then the zone isn't really split.
|
||||
var/zone/oldzone = A.zone
|
||||
var/list/test = FloodFill(A)
|
||||
if(B in test) return
|
||||
|
||||
else
|
||||
var/zone/Z = new(test,oldzone.air) //Create a new zone based on the old air and the test fill.
|
||||
|
||||
//Add connections from the old zone.
|
||||
for(var/connection/C in oldzone.connections)
|
||||
if((C.A in Z.contents) || (C.B in Z.contents))
|
||||
if(!Z.connections) Z.connections = list()
|
||||
Z.connections += C
|
||||
C.Cleanup()
|
||||
|
||||
//Check for space.
|
||||
for(var/turf/T in test)
|
||||
T.check_for_space()
|
||||
|
||||
//Make a new, identical air mixture for the other zone.
|
||||
var/datum/gas_mixture/Y_Air = new
|
||||
Y_Air.copy_from(oldzone.air)
|
||||
|
||||
var/zone/Y = new(B,Y_Air) //Make a new zone starting at B and using Y_Air.
|
||||
|
||||
//Add relevant connections from old zone.
|
||||
for(var/connection/C in oldzone.connections)
|
||||
if((C.A in Y.contents) || (C.B in Y.contents))
|
||||
if(!Y.connections) Y.connections = list()
|
||||
Y.connections += C
|
||||
C.Cleanup()
|
||||
|
||||
//Add the remaining space tiles to this zone.
|
||||
for(var/turf/space/T in oldzone.unsimulated_tiles)
|
||||
if(!(T in Z.unsimulated_tiles))
|
||||
Y.AddSpace(T)
|
||||
|
||||
oldzone.air = null
|
||||
del oldzone
|
||||
else
|
||||
if(B.zone)
|
||||
if(istype(A,/turf/space))
|
||||
B.zone.RemoveSpace(A)
|
||||
else
|
||||
for(var/connection/C in B.zone.connections)
|
||||
if((C.A == A && C.B == B) || (C.A == B && C.B == A))
|
||||
del C
|
||||
if(C)
|
||||
C.Cleanup()
|
||||
if(A.zone)
|
||||
if(istype(B,/turf/space))
|
||||
A.zone.RemoveSpace(B)
|
||||
else
|
||||
for(var/connection/C in A.zone.connections)
|
||||
if((C.A == A && C.B == B) || (C.A == B && C.B == A))
|
||||
del C
|
||||
if(C)
|
||||
C.Cleanup()*/
|
||||
//Make the connection.
|
||||
new /connection(A,B)
|
||||
+5
-2
@@ -68,8 +68,9 @@ obj/item/proc
|
||||
if(!pl_head_protected())
|
||||
if(prob(1)) suit_contamination() //Plasma can sometimes get through such an open suit.
|
||||
|
||||
if(istype(back,/obj/item/weapon/storage/backpack))
|
||||
back.contaminate()
|
||||
//Cannot wash backpacks currently.
|
||||
// if(istype(back,/obj/item/weapon/storage/backpack))
|
||||
// back.contaminate()
|
||||
|
||||
/mob/proc/pl_effects()
|
||||
|
||||
@@ -155,6 +156,8 @@ turf/Entered(obj/item/I)
|
||||
//Items that are in plasma, but not on a mob, can still be contaminated.
|
||||
if(istype(I) && vsc.plc.CLOTH_CONTAMINATION)
|
||||
var/datum/gas_mixture/env = return_air(1)
|
||||
if(!env)
|
||||
return
|
||||
if(env.toxins > MOLES_PLASMA_VISIBLE + 1)
|
||||
if(I.can_contaminate())
|
||||
I.contaminate()
|
||||
+62
-29
@@ -165,27 +165,32 @@ turf
|
||||
if(!zone) //Still no zone, the floodfill determined it is not part of a larger zone. Force a zone on it.
|
||||
new/zone(list(src))
|
||||
|
||||
if("\ref[src]" in air_master.turfs_with_connections) //Check pass sanity of the connections.
|
||||
//Check pass sanity of the connections.
|
||||
if("\ref[src]" in air_master.turfs_with_connections)
|
||||
for(var/connection/C in air_master.turfs_with_connections["\ref[src]"])
|
||||
if(!(C in air_master.connections_to_check))
|
||||
air_master.connections_to_check += C
|
||||
air_master.connections_to_check |= C
|
||||
|
||||
if(zone && !zone.rebuild)
|
||||
for(var/direction in cardinal)
|
||||
if(zone.rebuild)
|
||||
break
|
||||
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
// var/list/zone/adjacent_zones = list()
|
||||
|
||||
if(air_check_directions&direction) //I can connect air in this direction
|
||||
if(!CanPass(null, T, 0, 0)) //If either block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(!T.CanPass(null, T, 0, 0)) //Target blocks air
|
||||
//I can connect to air in this direction
|
||||
if(air_check_directions&direction)
|
||||
|
||||
//If either block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(!CanPass(null, T, 0, 0))
|
||||
|
||||
//Target blocks air
|
||||
if(!T.CanPass(null, T, 0, 0))
|
||||
var/turf/NT = get_step(T, direction)
|
||||
|
||||
//If that turf is in my zone still, rebuild.
|
||||
if(istype(NT,/turf/simulated) && NT in zone.contents)
|
||||
air_master.AddToConsiderRebuild(src,NT)
|
||||
zone.rebuild = 1
|
||||
|
||||
//If that is an unsimulated tile in my zone, see if we need to rebuild or just remove.
|
||||
else if(istype(NT) && NT in zone.unsimulated_tiles)
|
||||
var/consider_rebuild = 0
|
||||
for(var/d in cardinal)
|
||||
@@ -194,14 +199,22 @@ turf
|
||||
consider_rebuild = 1
|
||||
break
|
||||
if(consider_rebuild)
|
||||
air_master.AddToConsiderRebuild(src,NT) //Gotta check if we need to rebuild, dammit
|
||||
zone.rebuild = 1 //Gotta check if we need to rebuild, dammit
|
||||
else
|
||||
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
|
||||
|
||||
if(T.zone && !T.zone.rebuild) //I block air.
|
||||
//To make a closed connection through closed door.
|
||||
ZConnect(T, src)
|
||||
|
||||
//If I block air.
|
||||
else if(T.zone && !T.zone.rebuild)
|
||||
var/turf/NT = get_step(src, reverse_direction(direction))
|
||||
|
||||
//If I am splitting a zone, rebuild.
|
||||
if(istype(NT,/turf/simulated) && (NT in T.zone.contents || (NT.zone && T in NT.zone.contents)))
|
||||
air_master.AddToConsiderRebuild(T,NT)
|
||||
T.zone.rebuild = 1
|
||||
|
||||
//If NT is unsimulated, parse if I should remove it or rebuild.
|
||||
else if(istype(NT) && NT in T.zone.unsimulated_tiles)
|
||||
var/consider_rebuild = 0
|
||||
for(var/d in cardinal)
|
||||
@@ -209,30 +222,48 @@ turf
|
||||
if(istype(UT, /turf/simulated) && UT.zone == T.zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
|
||||
consider_rebuild = 1
|
||||
break
|
||||
|
||||
//Needs rebuilt.
|
||||
if(consider_rebuild)
|
||||
air_master.AddToConsiderRebuild(T,NT) //Gotta check if we need to rebuild, dammit
|
||||
T.zone.rebuild = 1
|
||||
|
||||
//Not adjacent to anything, and unsimulated. Goodbye~
|
||||
else
|
||||
T.zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
|
||||
T.zone.RemoveTurf(NT)
|
||||
|
||||
else
|
||||
//Produce connection through open door.
|
||||
ZConnect(src,T)
|
||||
|
||||
else if(air_directions_archived&direction) //Something like a wall was built, changing the geometry.
|
||||
//Something like a wall was built, changing the geometry.
|
||||
else if(air_directions_archived&direction)
|
||||
var/turf/NT = get_step(T, direction)
|
||||
if(istype(NT,/turf/simulated) && NT in zone.contents)
|
||||
air_master.AddToConsiderRebuild(src,NT)
|
||||
|
||||
else if(istype(NT) && NT in zone.unsimulated_tiles) //Parse if we need to remove the tile, or rebuild the zone.
|
||||
//If the tile is in our own zone, and we cannot connect to it, better rebuild.
|
||||
if(istype(NT,/turf/simulated) && NT in zone.contents)
|
||||
zone.rebuild = 1
|
||||
|
||||
//Parse if we need to remove the tile, or rebuild the zone.
|
||||
else if(istype(NT) && NT in zone.unsimulated_tiles)
|
||||
var/consider_rebuild = 0
|
||||
|
||||
//Loop through all neighboring turfs to see if we should remove the turf or just rebuild.
|
||||
for(var/d in cardinal)
|
||||
var/turf/UT = get_step(NT,d)
|
||||
if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
|
||||
|
||||
//If we find a neighboring tile that is in the same zone, rebuild
|
||||
if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0))
|
||||
consider_rebuild = 1
|
||||
break
|
||||
|
||||
//The unsimulated turf is adjacent to another one of our zone's turfs,
|
||||
// better rebuild to be sure we didn't get cut in twain
|
||||
if(consider_rebuild)
|
||||
air_master.AddToConsiderRebuild(src,NT) //Gotta check if we need to rebuild, dammit
|
||||
NT.zone.rebuild = 1
|
||||
|
||||
//Not adjacent to anything, and unsimulated. Goodbye~
|
||||
else
|
||||
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
|
||||
zone.RemoveTurf(NT)
|
||||
|
||||
if(air_check_directions)
|
||||
processing = 1
|
||||
@@ -251,8 +282,10 @@ turf
|
||||
if(isnum(O) && O)
|
||||
if(!D.density) continue
|
||||
if(istype(D,/obj/machinery/door/window))
|
||||
if(!O) continue
|
||||
if(D.dir == get_dir(D,O)) return 1
|
||||
if(!istype(O))
|
||||
continue
|
||||
if(D.dir == get_dir(D,O))
|
||||
return 1
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -268,13 +301,13 @@ turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
continue
|
||||
if(!obstacle.CanPass(null, T, 1.5, 1))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
continue
|
||||
if(!obstacle.CanPass(null, src, 1.5, 1))
|
||||
return 0
|
||||
@@ -290,13 +323,13 @@ turf/proc/ZAirPass(turf/T)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
continue
|
||||
if(!obstacle.CanPass(null, T, 0, 0))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
continue
|
||||
if(!obstacle.CanPass(null, src, 0, 0))
|
||||
return 0
|
||||
|
||||
+67
-11
@@ -12,6 +12,7 @@ zone
|
||||
list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
|
||||
list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
|
||||
//of points they're connected at.
|
||||
list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
|
||||
list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
|
||||
last_update = 0
|
||||
progress = "nothing"
|
||||
@@ -19,6 +20,7 @@ zone
|
||||
// To make sure you're not spammed to death by airflow sound effects
|
||||
tmp/playsound_cooldown = 0
|
||||
|
||||
|
||||
//CREATION AND DELETION
|
||||
New(turf/start)
|
||||
. = ..()
|
||||
@@ -52,6 +54,7 @@ zone
|
||||
//Add this zone to the global list.
|
||||
zones.Add(src)
|
||||
|
||||
|
||||
//LEGACY, DO NOT USE. Use the SoftDelete proc.
|
||||
Del()
|
||||
//Ensuring the zone list doesn't get clogged with null values.
|
||||
@@ -67,25 +70,27 @@ zone
|
||||
air = null
|
||||
. = ..()
|
||||
|
||||
|
||||
//Handles deletion via garbage collection.
|
||||
proc/SoftDelete()
|
||||
zones.Remove(src)
|
||||
air = null
|
||||
|
||||
//Ensuring the zone list doesn't get clogged with null values.
|
||||
for(var/turf/simulated/T in contents)
|
||||
RemoveTurf(T)
|
||||
air_master.tiles_to_reconsider_zones += T
|
||||
|
||||
//Removing zone connections and scheduling connection cleanup
|
||||
for(var/zone/Z in connected_zones)
|
||||
if(src in Z.connected_zones)
|
||||
Z.connected_zones.Remove(src)
|
||||
for(var/connection/C in connections)
|
||||
if(C.zone_A == src)
|
||||
C.zone_A = null
|
||||
if(C.zone_B == src)
|
||||
C.zone_B = null
|
||||
air_master.connections_to_check += C
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
//ZONE MANAGEMENT FUNCTIONS
|
||||
proc/AddTurf(turf/T)
|
||||
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
|
||||
@@ -244,9 +249,11 @@ zone/proc/process()
|
||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
||||
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||
//up spacing in areas with double-plated windows.
|
||||
if(C && C.indirect == 2 && C.A.zone && C.B.zone) //indirect = 2 is a direct connection.
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
if(C && C.A.zone && C.B.zone)
|
||||
//indirect = 2 is a direct connection.
|
||||
if(C.indirect == 2 )
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
|
||||
progress = "problem with: ShareRatio(), Airflow(), a couple of misc procs"
|
||||
|
||||
@@ -267,7 +274,18 @@ zone/proc/process()
|
||||
if(moles_delta > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
|
||||
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
|
||||
Airflow(src,Z)
|
||||
ShareRatio( air , Z.air , connected_zones[Z] )
|
||||
var/unsimulated_boost = 0
|
||||
if(unsimulated_tiles)
|
||||
unsimulated_boost += unsimulated_tiles.len
|
||||
if(Z.unsimulated_tiles)
|
||||
unsimulated_boost += Z.unsimulated_tiles.len
|
||||
unsimulated_boost = min(3, unsimulated_boost)
|
||||
ShareRatio( air , Z.air , connected_zones[Z] + unsimulated_boost)
|
||||
|
||||
for(var/zone/Z in closed_connection_zones)
|
||||
if(air && Z.air)
|
||||
if( abs(air.temperature - Z.air.temperature) > 10 )
|
||||
ShareHeat(air, Z.air, closed_connection_zones[Z])
|
||||
|
||||
progress = "all components completed successfully, the problem is not here"
|
||||
|
||||
@@ -275,7 +293,7 @@ zone/proc/process()
|
||||
//Air Movement//
|
||||
////////////////
|
||||
|
||||
var/list/sharing_lookup_table = list(0.08, 0.15, 0.21, 0.26, 0.30, 0.33)
|
||||
var/list/sharing_lookup_table = list(0.15, 0.20, 0.24, 0.27, 0.30, 0.33)
|
||||
|
||||
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
||||
@@ -363,7 +381,14 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
unsim_co2 += T.carbon_dioxide
|
||||
unsim_nitrogen += T.nitrogen
|
||||
unsim_plasma += T.toxins
|
||||
unsim_heat_capacity += T.heat_capacity
|
||||
|
||||
// Make sure it actually has gas in it, and use the heat capacity of that.
|
||||
// Space and unsimulated tiles do NOT have a heat capacity. Thus we don't
|
||||
// add them. This means "space is not cold", which turns out just fine in
|
||||
// gameplay terms.
|
||||
if(istype(T, /turf/simulated))
|
||||
unsim_heat_capacity += T:air.heat_capacity()
|
||||
|
||||
unsim_temperature += T.temperature/unsimulated_tiles.len
|
||||
|
||||
var
|
||||
@@ -372,7 +397,14 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
old_pressure = A.return_pressure()
|
||||
|
||||
size = max(1,A.group_multiplier)
|
||||
share_size = max(1,unsimulated_tiles.len)
|
||||
|
||||
// We use the same size for the potentially single space tile
|
||||
// as we use for the entire room. Why is this?
|
||||
// Short answer: We do not want larger rooms to depressurize more
|
||||
// slowly than small rooms, preserving our good old "hollywood-style"
|
||||
// oh-shit effect when large rooms get breached, but still having small
|
||||
// rooms remain pressurized for long enough to make escape possible.
|
||||
share_size = max(1,size - 5 + unsimulated_tiles.len)
|
||||
|
||||
full_oxy = A.oxygen * size
|
||||
full_nitro = A.nitrogen * size
|
||||
@@ -407,6 +439,29 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
|
||||
return abs(old_pressure - A.return_pressure())
|
||||
|
||||
|
||||
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
||||
var
|
||||
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||
ratio = 0.33
|
||||
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||
|
||||
full_heat_capacity = A.heat_capacity()
|
||||
|
||||
s_full_heat_capacity = B.heat_capacity()
|
||||
|
||||
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
|
||||
|
||||
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||
if(sharing_lookup_table.len >= connecting_tiles) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||
ratio = sharing_lookup_table[connecting_tiles]
|
||||
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
|
||||
|
||||
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//
|
||||
///////////////////
|
||||
@@ -487,6 +542,7 @@ zone/proc/Rebuild()
|
||||
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
|
||||
T.zone.AddTurf(S)
|
||||
|
||||
|
||||
proc/play_wind_sound(var/turf/random_border, var/n)
|
||||
if(random_border)
|
||||
var/windsound = 'sound/effects/wind/wind_2_1.ogg'
|
||||
|
||||
@@ -15,6 +15,16 @@
|
||||
if (config.log_admin)
|
||||
diary << "\[[time_stamp()]]ADMIN: [text]"
|
||||
|
||||
|
||||
/proc/log_debug(text)
|
||||
if (config.log_debug)
|
||||
diary << "\[[time_stamp()]]DEBUG: [text]"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.toggles & CHAT_DEBUGLOGS)
|
||||
C << "DEBUG: [text]"
|
||||
|
||||
|
||||
/proc/log_game(text)
|
||||
if (config.log_game)
|
||||
diary << "\[[time_stamp()]]GAME: [text]"
|
||||
|
||||
+18
-1
@@ -140,7 +140,24 @@
|
||||
|
||||
return t_out
|
||||
|
||||
|
||||
//checks text for html tags
|
||||
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
|
||||
//relpaces < with <
|
||||
proc/checkhtml(var/t)
|
||||
t = sanitize_simple(t, list("&#"="."))
|
||||
var/p = findtext(t,"<",1)
|
||||
while (p) //going through all the tags
|
||||
var/start = p++
|
||||
var/tag = copytext(t,p, p+1)
|
||||
if (tag != "/")
|
||||
while (reject_bad_text(copytext(t, p, p+1), 1))
|
||||
tag = copytext(t,start, p)
|
||||
p++
|
||||
tag = copytext(t,start+1, p)
|
||||
if (!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
|
||||
t = copytext(t,1,start-1) + "<" + copytext(t,start+1)
|
||||
p = findtext(t,"<",p)
|
||||
return t
|
||||
/*
|
||||
* Text searches
|
||||
*/
|
||||
|
||||
@@ -1327,7 +1327,9 @@ proc/is_hot(obj/item/W as obj)
|
||||
|
||||
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
|
||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
if(W.sharp) return 1
|
||||
return ( \
|
||||
W.sharp || \
|
||||
istype(W, /obj/item/weapon/screwdriver) || \
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
istype(W, /obj/item/weapon/weldingtool) || \
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/log_access = 0 // log login/logout
|
||||
var/log_say = 0 // log client say
|
||||
var/log_admin = 0 // log admin actions
|
||||
var/log_debug = 1 // log debug output
|
||||
var/log_game = 0 // log game events
|
||||
var/log_vote = 0 // log voting
|
||||
var/log_whisper = 0 // log client whisper
|
||||
@@ -193,6 +194,9 @@
|
||||
if ("log_admin")
|
||||
config.log_admin = 1
|
||||
|
||||
if ("log_debug")
|
||||
config.log_debug = text2num(value)
|
||||
|
||||
if ("log_game")
|
||||
config.log_game = 1
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ datum/controller/game_controller/proc/process()
|
||||
controller_iteration++
|
||||
|
||||
vote.process()
|
||||
process_newscaster()
|
||||
|
||||
//AIR
|
||||
|
||||
@@ -132,11 +133,12 @@ datum/controller/game_controller/proc/process()
|
||||
air_master.current_cycle++
|
||||
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!success) //Runtimed.
|
||||
log_adminwarn("ZASALERT: air_system/tick() failed: [air_master.tick_progress]")
|
||||
air_master.failed_ticks++
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
kill_air = 1
|
||||
message_admins("ZASALERT: unable run [air_master.tick_progress], tell someone about this!")
|
||||
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
air_processing_killed = 1
|
||||
air_master.failed_ticks = 0
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
|
||||
|
||||
@@ -132,6 +132,9 @@ datum/controller/vote
|
||||
restart = 1
|
||||
else
|
||||
master_mode = .
|
||||
if(!going)
|
||||
going = 1
|
||||
world << "<font color='red'><b>The round will start soon.</b></font>"
|
||||
if("crew_transfer")
|
||||
if(. == "Initiate Crew Transfer")
|
||||
init_shift_change(null, 1)
|
||||
@@ -162,7 +165,7 @@ datum/controller/vote
|
||||
|
||||
proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
if(!mode)
|
||||
if(started_time != null)
|
||||
if(started_time != null && !check_rights(R_ADMIN))
|
||||
var/next_allowed_time = (started_time + config.vote_delay)
|
||||
if(next_allowed_time > world.time)
|
||||
return 0
|
||||
@@ -194,8 +197,20 @@ datum/controller/vote
|
||||
var/text = "[capitalize(mode)] vote started by [initiator]."
|
||||
if(mode == "custom")
|
||||
text += "\n[question]"
|
||||
|
||||
log_vote(text)
|
||||
world << "<font color='purple'><b>[text]</b>\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
|
||||
switch(vote_type)
|
||||
if("crew_transfer")
|
||||
world << sound('sound/voice/Serithi/Shuttlehere.ogg')
|
||||
if("gamemode")
|
||||
world << sound('sound/voice/Serithi/pretenddemoc.ogg')
|
||||
if("custom")
|
||||
world << sound('sound/voice/Serithi/weneedvote.ogg')
|
||||
if(mode == "gamemode" && going)
|
||||
going = 0
|
||||
world << "<font color='red'><b>Round start has been delayed.</b></font>"
|
||||
|
||||
time_remaining = round(config.vote_period/10)
|
||||
return 1
|
||||
return 0
|
||||
@@ -296,4 +311,4 @@ datum/controller/vote
|
||||
set name = "Vote"
|
||||
|
||||
if(vote)
|
||||
src << browse(vote.interface(client),"window=vote;can_close=0")
|
||||
src << browse(vote.interface(client),"window=vote;can_close=0")
|
||||
|
||||
+16
-6
@@ -2,14 +2,15 @@
|
||||
var/angle
|
||||
var/dx
|
||||
var/dy
|
||||
var/counter = 50 // to make the vars update during 1st call
|
||||
// var/counter = 50 // to make the vars update during 1st call
|
||||
var/rate
|
||||
var/list/solars // for debugging purposes, references solars_list at the constructor
|
||||
var/nexttime = 3600 // Replacement for var/counter to force the sun to move every X IC minutes
|
||||
|
||||
/datum/sun/New()
|
||||
|
||||
solars = solars_list
|
||||
rate = rand(75,125)/100 // 75% - 125% of standard rotation
|
||||
rate = rand(750,1250)/1000 // 75.0% - 125.0% of standard rotation
|
||||
if(prob(50))
|
||||
rate = -rate
|
||||
|
||||
@@ -17,13 +18,22 @@
|
||||
|
||||
/datum/sun/proc/calc_position()
|
||||
|
||||
counter++
|
||||
/* counter++
|
||||
if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
|
||||
return
|
||||
counter = 0
|
||||
counter = 0 */
|
||||
|
||||
angle = ((rate*world.time/100)%360 + 360)%360
|
||||
/*
|
||||
Yields a 45 - 75 IC minute rotational period
|
||||
Rotation rate can vary from 4.8 deg/min to 8 deg/min (288 to 480 deg/hr)
|
||||
*/
|
||||
|
||||
// To prevent excess server load the server only updates the sun's sight lines every 6 minutes
|
||||
if(nexttime < world.time)
|
||||
return
|
||||
nexttime = nexttime + 3600 // 600 world.time ticks = 1 minute, 3600 = 6 minutes.
|
||||
|
||||
angle = ((rate*world.realtime/100)%360 + 360)%360 // gives about a 60 minute rotation time
|
||||
// now 45 - 75 minutes, depending on rate
|
||||
// now calculate and cache the (dx,dy) increments for line drawing
|
||||
|
||||
var/s = sin(angle)
|
||||
|
||||
@@ -662,6 +662,24 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
access = access_armory
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/shotgunammo
|
||||
name = "Shotgun shells"
|
||||
contains = list(/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_casing/shotgun)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Shotgun shells"
|
||||
access = access_armory
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/expenergy
|
||||
name = "Experimental energy gear crate"
|
||||
contains = list(/obj/item/clothing/suit/armor/laserproof,
|
||||
|
||||
@@ -63,6 +63,24 @@
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/plastiseed
|
||||
name = "plastellium mycelium"
|
||||
desc = "This mycelium grows into Plastellium"
|
||||
icon_state = "mycelium-plast"
|
||||
mypath = "/obj/item/seeds/plastiseed"
|
||||
species = "plastellium"
|
||||
plantname = "Plastellium"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/plastellium"
|
||||
lifespan = 15
|
||||
endurance = 17
|
||||
maturation = 5
|
||||
production = 6
|
||||
yield = 6
|
||||
oneharvest = 1
|
||||
potency = 20
|
||||
plant_type = 2
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/replicapod
|
||||
name = "pack of replica pod seeds"
|
||||
desc = "These seeds grow into replica pods. They say these are used to harvest humans."
|
||||
@@ -413,6 +431,24 @@
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/riceseed
|
||||
name = "pack of rice seeds"
|
||||
desc = "These seeds grow into rice stalks."
|
||||
icon_state = "seed-rice"
|
||||
mypath = "/obj/item/seeds/riceseed"
|
||||
species = "rice"
|
||||
plantname = "Rice Stalks"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/ricestalk"
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 6
|
||||
production = 1
|
||||
yield = 4
|
||||
potency = 5
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/seeds/carrotseed
|
||||
name = "pack of carrot seeds"
|
||||
desc = "These seeds grow into carrots."
|
||||
|
||||
@@ -1139,6 +1139,10 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Vacant Office"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/vacantoffice2
|
||||
name = "\improper Vacant Office"
|
||||
icon_state = "security"
|
||||
|
||||
/area/quartermaster
|
||||
name = "\improper Quartermasters"
|
||||
icon_state = "quart"
|
||||
|
||||
+5
-1
@@ -696,7 +696,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
if (in_range)
|
||||
if (!( human.restrained() || human.lying ))
|
||||
if (W)
|
||||
attackby(W,human)
|
||||
var/was_used = 0
|
||||
if(W)
|
||||
was_used = W.is_used_on(src, human)
|
||||
if(!was_used)
|
||||
attackby(W,human)
|
||||
if (W)
|
||||
W.afterattack(src, human)
|
||||
else
|
||||
|
||||
@@ -112,6 +112,7 @@ var/list/radiochannels = list(
|
||||
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1347)
|
||||
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
|
||||
var/const/SYND_FREQ = 1213
|
||||
var/const/ERT_FREQ = 1439
|
||||
|
||||
#define TRANSMISSION_WIRE 0
|
||||
#define TRANSMISSION_RADIO 1
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@
|
||||
if(!M) return
|
||||
var/num
|
||||
var/newdna
|
||||
num = rand(1,STRUCDNASIZE-1)
|
||||
num = rand(1,UNIDNASIZE)
|
||||
M.dna.check_integrity()
|
||||
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
|
||||
M.dna.uni_identity = newdna
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
traitorcheckloop()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character)
|
||||
..()
|
||||
if(emergency_shuttle.departed)
|
||||
@@ -192,6 +192,5 @@
|
||||
//message_admins("New traitor roll failed. No new traitor.")
|
||||
//else
|
||||
//message_admins("Late Joiner does not have Be Syndicate")
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ var/list/sacrificed = list()
|
||||
M.visible_message("\red [M] writhes in pain as the markings below him glow a bloody red.", \
|
||||
"\red AAAAAAHHHH!.", \
|
||||
"\red You hear an anguished scream.")
|
||||
if(is_convertable_to_cult(M.mind))
|
||||
if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist"))//putting jobban check here because is_convertable uses mind as argument
|
||||
ticker.mode.add_cultist(M.mind)
|
||||
M.mind.special_role = "Cultist"
|
||||
M << "<font color=\"purple\"><b><i>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</b></i></font>"
|
||||
@@ -370,6 +370,8 @@ var/list/sacrificed = list()
|
||||
break
|
||||
if(!ghost)
|
||||
return this_rune.fizzle()
|
||||
if(jobban_isbanned(ghost, "cultist"))
|
||||
return this_rune.fizzle()
|
||||
|
||||
usr.say("Gal'h'rfikk harfrandid mud[pick("'","`")]gib!")
|
||||
var/mob/living/carbon/human/dummy/D = new(this_rune.loc)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
var/required_players_secret = 0 //Minimum number of players for that game mode to be chose in Secret
|
||||
var/required_enemies = 0
|
||||
var/recommended_enemies = 0
|
||||
var/newscaster_announcements = null
|
||||
var/uplink_welcome = "Syndicate Uplink Console:"
|
||||
var/uplink_uses = 10
|
||||
var/uplink_items = {"Highly Visible and Dangerous Weapons;
|
||||
@@ -205,27 +206,42 @@ Implants;
|
||||
|
||||
/datum/game_mode/proc/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested status information:</FONT><HR>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
intercepttext += "<B> In case you have misplaced your copy, attached is a list of personnel whom reliable sources™ suspect may be affiliated with the Syndicate:</B><br>"
|
||||
|
||||
var/list/possible_modes = list()
|
||||
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult")
|
||||
//possible_modes -= "[ticker.mode]"
|
||||
var/number = pick(2, 3)
|
||||
var/i = 0
|
||||
for(i = 0, i < number, i++)
|
||||
possible_modes.Remove(pick(possible_modes))
|
||||
|
||||
if(!intercept_hacked)
|
||||
possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]")
|
||||
var/list/suspects = list()
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind)
|
||||
// NT relation option
|
||||
var/special_role = man.mind.special_role
|
||||
if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
|
||||
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
|
||||
suspects += man
|
||||
// Antags
|
||||
else if(special_role == "traitor" && prob(40) || \
|
||||
special_role == "Changeling" && prob(50) || \
|
||||
special_role == "Cultist" && prob(30) || \
|
||||
special_role == "Head Revolutionary" && prob(30))
|
||||
suspects += man
|
||||
|
||||
shuffle(possible_modes)
|
||||
// If they're a traitor or likewise, give them extra TC in exchange.
|
||||
var/obj/item/device/uplink/hidden/suplink = man.mind.find_syndicate_uplink()
|
||||
if(suplink)
|
||||
var/extra = 4
|
||||
suplink.uses += extra
|
||||
man << "\red We have received notice that enemy intelligence suspects you to be linked with us. We have thus invested significant resources to increase your uplink's capacity."
|
||||
else
|
||||
// Give them a warning!
|
||||
man << "\red They are on to you!"
|
||||
|
||||
var/datum/intercept_text/i_text = new /datum/intercept_text
|
||||
for(var/A in possible_modes)
|
||||
if(modePlayer.len == 0)
|
||||
intercepttext += i_text.build(A)
|
||||
else
|
||||
intercepttext += i_text.build(A, pick(modePlayer))
|
||||
// Some poor people who were just in the wrong place at the wrong time..
|
||||
else if(prob(10))
|
||||
suspects += man
|
||||
for(var/mob/M in suspects)
|
||||
switch(rand(1, 100))
|
||||
if(1 to 50)
|
||||
intercepttext += "Someone with the job of <b>[M.mind.assigned_role]</b> <br>"
|
||||
else
|
||||
intercepttext += "<b>[M.name]</b>, the <b>[M.mind.assigned_role]</b> <br>"
|
||||
|
||||
for (var/obj/machinery/computer/communications/comm in world)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
@@ -275,6 +291,7 @@ Implants;
|
||||
if(player.client.prefs.be_special & role)
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||
log_debug("[player.key] had [roletext] enabled, so drafting them.")
|
||||
|
||||
if(restricted_jobs)
|
||||
for(var/datum/mind/player in candidates)
|
||||
@@ -302,6 +319,7 @@ Implants;
|
||||
applicant = pick(drafted)
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
||||
drafted.Remove(applicant)
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
@@ -327,7 +345,7 @@ Implants;
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
drafted.Remove(applicant)
|
||||
message_admins("[applicant.key] drafted into antagonist role against their preferences.")
|
||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
break
|
||||
@@ -336,9 +354,10 @@ Implants;
|
||||
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
/*
|
||||
|
||||
/datum/game_mode/proc/latespawn(var/mob)
|
||||
|
||||
/*
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
if(player.preferences.be_special & role)
|
||||
return 1
|
||||
@@ -373,6 +392,9 @@ Implants;
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
/datum/game_mode/New()
|
||||
newscaster_announcements = pick(newscaster_standard_feeds)
|
||||
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
|
||||
uplink_welcome = "Revolutionary Uplink Console:"
|
||||
uplink_uses = 5
|
||||
|
||||
newscaster_announcements = /datum/news_announcement/revolution_inciting_event
|
||||
|
||||
var/last_command_report = 0
|
||||
var/list/heads = list()
|
||||
var/tried_to_add_revheads = 0
|
||||
|
||||
@@ -57,7 +63,7 @@
|
||||
var/datum/objective/mutiny/rp/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = head_mind
|
||||
rev_obj.explanation_text = "Assassinate or capture [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
|
||||
update_rev_icons_added(rev_mind)
|
||||
@@ -65,6 +71,8 @@
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
greet_revolutionary(rev_mind)
|
||||
rev_mind.current.verbs += /mob/living/carbon/human/proc/RevConvert
|
||||
equip_traitor(rev_mind.current, 1) //changing how revs get assigned their uplink so they can get PDA uplinks. --NEO
|
||||
|
||||
modePlayer += head_revolutionaries
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
@@ -183,8 +191,7 @@
|
||||
active_revs++
|
||||
|
||||
if(active_revs == 0)
|
||||
log_admin("There are zero active head revolutionists, trying to add some..")
|
||||
message_admins("There are zero active head revolutionists, trying to add some..")
|
||||
log_debug("There are zero active heads of revolution, trying to add some..")
|
||||
var/added_heads = 0
|
||||
for(var/mob/living/carbon/human/H in world) if(H.client && H.mind && H.client.inactivity <= 10*60*20 && H.mind in revolutionaries)
|
||||
head_revolutionaries += H.mind
|
||||
@@ -210,4 +217,38 @@
|
||||
message_admins("Unable to add new heads of revolution.")
|
||||
tried_to_add_revheads = world.time + 6000 // wait 10 minutes
|
||||
|
||||
return ..()
|
||||
if(last_command_report == 0 && world.time >= 10 * 60 * 10)
|
||||
src.command_report("We are regrettably announcing that your performance has been disappointing, and we are thus forced to cut down on financial support to your station. To achieve this, the pay of all personnal, except the Heads of Staff, has been halved.")
|
||||
last_command_report = 1
|
||||
else if(last_command_report == 1 && world.time >= 10 * 60 * 30)
|
||||
src.command_report("Statistics hint that a high amount of leisure time, and associated activities, are responsible for the poor performance of many of our stations. You are to bolt and close down any leisure facilities, such as the holodeck, the theatre and the bar. Food can be distributed through vendors and the kitchen.")
|
||||
last_command_report = 2
|
||||
else if(last_command_report == 2 && world.time >= 10 * 60 * 60)
|
||||
src.command_report("It is reported that merely closing down leisure facilities has not been successful. You and your Heads of Staff are to ensure that all crew are working hard, and not wasting time or energy. Any crew caught off duty without leave from their Head of Staff are to be warned, and on repeated offence, to be brigged until the next transfer shuttle arrives, which will take them to facilities where they can be of more use.")
|
||||
last_command_report = 3
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/revolution/rp_revolution/proc/command_report(message)
|
||||
for (var/obj/machinery/computer/communications/comm in world)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- 'Cent. Com. Announcement'"
|
||||
intercept.info = message
|
||||
|
||||
comm.messagetitle.Add("Cent. Com. Announcement")
|
||||
comm.messagetext.Add(message)
|
||||
world << sound('commandreport.ogg')
|
||||
|
||||
/datum/game_mode/revolution/rp_revolution/latespawn(mob/M)
|
||||
if(M.mind.assigned_role in command_positions)
|
||||
log_debug("Adding head kill/capture/convert objective for [M.name]")
|
||||
heads += M
|
||||
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
var/datum/objective/mutiny/rp/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = M.mind
|
||||
rev_obj.explanation_text = "Assassinate, convert or capture [M.real_name], the [M.mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
rev_mind.current << "\red A new Head of Staff, [M.real_name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."
|
||||
@@ -115,7 +115,7 @@
|
||||
steal_objective.find_target()
|
||||
traitor.objectives += steal_objective
|
||||
switch(rand(1,100))
|
||||
if(1 to 90)
|
||||
if(1 to 100)
|
||||
if (!(locate(/datum/objective/escape) in traitor.objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = traitor
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
escape_objective.owner = wizard
|
||||
wizard.objectives += escape_objective
|
||||
|
||||
if(61 to 85)
|
||||
if(61 to 100)
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = wizard
|
||||
kill_objective.find_target()
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
var/title = "NOPE"
|
||||
|
||||
//Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access
|
||||
var/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
|
||||
var/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
|
||||
var/list/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
|
||||
var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
|
||||
|
||||
//Bitflags for the job
|
||||
var/flag = 0
|
||||
@@ -46,12 +46,12 @@
|
||||
|
||||
/datum/job/proc/get_access()
|
||||
if(!config) //Needed for robots.
|
||||
return src.minimal_access
|
||||
return src.minimal_access.Copy()
|
||||
|
||||
if(config.jobs_have_minimal_access)
|
||||
return src.minimal_access
|
||||
return src.minimal_access.Copy()
|
||||
else
|
||||
return src.access
|
||||
return src.access.Copy()
|
||||
|
||||
//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1
|
||||
/datum/job/proc/player_old_enough(client/C)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
switch(H.mind.role_alt_title)
|
||||
if("Emergency Physician")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/fr_jacket(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/fr_jacket(H), slot_wear_suit)
|
||||
if("Surgeon")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
@@ -215,4 +215,4 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -389,6 +389,13 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
spawnId(H, rank, alt_title)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
|
||||
|
||||
//Gives glasses to the vision impaired
|
||||
if(H.disabilities & NEARSIGHTED)
|
||||
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
|
||||
if(equipped != 1)
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
G.prescription = 1
|
||||
// H.update_icons()
|
||||
return 1
|
||||
|
||||
|
||||
+935
-922
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,14 @@
|
||||
use_power = 0
|
||||
var/release_log = ""
|
||||
|
||||
/obj/machinery/portable_atmospherics/initialize()
|
||||
. = ..()
|
||||
spawn()
|
||||
var/obj/machinery/atmospherics/portables_connector/connector = locate() in loc
|
||||
if(connector)
|
||||
connected_port = connector
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
icon_state = "redws"
|
||||
|
||||
@@ -225,7 +225,6 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
next_dest_loc = closest_loc
|
||||
if (next_dest_loc)
|
||||
src.patrol_path = AStar(src.loc, next_dest_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=null)
|
||||
src.patrol_path = reverselist(src.patrol_path)
|
||||
else
|
||||
patrol_move()
|
||||
|
||||
@@ -235,7 +234,6 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
spawn(0)
|
||||
if(!src || !target) return
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 0, 30)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -615,7 +615,6 @@ Auto Patrol: []"},
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/ed209/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
@@ -357,7 +357,6 @@
|
||||
var/turf/dest = get_step_towards(target,src) //Can't pathfind to a tray, as it is dense, so pathfind to the spot next to the tray
|
||||
|
||||
src.path = AStar(src.loc, dest, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
for ( var/turf/spot in orange(1,target) ) //The closest one is unpathable, try the other spots
|
||||
if ( spot == dest ) //We already tried this spot
|
||||
|
||||
@@ -244,7 +244,6 @@
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
else
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -299,7 +299,6 @@
|
||||
if(src.patient && src.path.len == 0 && (get_dist(src,src.patient) > 1))
|
||||
spawn(0)
|
||||
src.path = AStar(src.loc, get_turf(src.patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldpatient = src.patient
|
||||
src.patient = null
|
||||
|
||||
@@ -706,7 +706,8 @@
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/mulebot/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
if(!src.path)
|
||||
src.path = list()
|
||||
|
||||
|
||||
// sets the current destination
|
||||
|
||||
@@ -583,7 +583,6 @@ Auto Patrol: []"},
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/secbot/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = mrace
|
||||
H.update_mutantrace()
|
||||
H.update_mutantrace_languages()
|
||||
H.suiciding = 0
|
||||
src.attempting = 0
|
||||
return 1
|
||||
|
||||
@@ -1169,7 +1169,7 @@ About the new airlock wires panel:
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
|
||||
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(W.remove_fuel(0,user))
|
||||
if(!src.welded)
|
||||
@@ -1198,7 +1198,7 @@ About the new airlock wires panel:
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
if( beingcrowbarred && (density && welded && !operating && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
|
||||
if( beingcrowbarred && (operating == -1 || density && welded && operating != 1 && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
|
||||
if(do_after(user,40))
|
||||
@@ -1243,6 +1243,9 @@ About the new airlock wires panel:
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
if(operating == -1)
|
||||
ae.icon_state = "door_electronics_smoked"
|
||||
operating = 0
|
||||
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/glass = 0
|
||||
var/normalspeed = 1
|
||||
var/heat_proof = 0 // For glass airlocks/opacity firedoors
|
||||
var/air_properties_vary_with_direction = 0
|
||||
|
||||
/obj/machinery/door/New()
|
||||
..()
|
||||
@@ -218,7 +219,7 @@
|
||||
|
||||
/obj/machinery/door/proc/close()
|
||||
if(density) return 1
|
||||
if(operating) return
|
||||
if(operating > 0) return
|
||||
operating = 1
|
||||
|
||||
animate("closing")
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
glass = 1 //There is a glass window so you can see through the door
|
||||
//This is needed due to BYOND limitations in controlling visibility
|
||||
heat_proof = 1
|
||||
air_properties_vary_with_direction = 1
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
opacity = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
explosion_resistance = 5
|
||||
air_properties_vary_with_direction = 1
|
||||
|
||||
|
||||
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
|
||||
|
||||
@@ -153,6 +153,7 @@ obj/machinery/embedded_controller/radio/access_controller
|
||||
name = "Access Console"
|
||||
density = 0
|
||||
power_channel = ENVIRON
|
||||
unacidable = 1
|
||||
|
||||
frequency = 1449
|
||||
|
||||
|
||||
@@ -262,6 +262,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
|
||||
|
||||
name = "Airlock Console"
|
||||
density = 0
|
||||
unacidable = 1
|
||||
|
||||
frequency = 1449
|
||||
power_channel = ENVIRON
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
name = "Vent Controller"
|
||||
density = 0
|
||||
unacidable = 1
|
||||
|
||||
frequency = 1229
|
||||
power_channel = ENVIRON
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
//States for airlock_control
|
||||
#define AIRLOCK_STATE_WAIT 0
|
||||
#define AIRLOCK_STATE_DEPRESSURIZE 1
|
||||
#define AIRLOCK_STATE_PRESSURIZE 2
|
||||
|
||||
#define AIRLOCK_TARGET_INOPEN -1
|
||||
#define AIRLOCK_TARGET_NONE 0
|
||||
#define AIRLOCK_TARGET_OUTOPEN 1
|
||||
|
||||
datum/computer/file/embedded_program/smart_airlock_controller
|
||||
var/id_tag
|
||||
var/tag_exterior_door
|
||||
var/tag_interior_door
|
||||
var/tag_airpump
|
||||
var/tag_chamber_sensor
|
||||
var/tag_exterior_sensor
|
||||
var/tag_interior_sensor
|
||||
//var/sanitize_external
|
||||
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
var/target_state = AIRLOCK_TARGET_NONE
|
||||
|
||||
datum/computer/file/embedded_program/smart_airlock_controller/New()
|
||||
..()
|
||||
memory["chamber_sensor_pressure"] = ONE_ATMOSPHERE
|
||||
memory["external_sensor_pressure"] = ONE_ATMOSPHERE
|
||||
memory["internal_sensor_pressure"] = ONE_ATMOSPHERE
|
||||
memory["exterior_status"] = "unknown"
|
||||
memory["interior_status"] = "unknown"
|
||||
memory["pump_status"] = "unknown"
|
||||
memory["target_pressure"] = ONE_ATMOSPHERE
|
||||
|
||||
datum/computer/file/embedded_program/smart_airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
var/receive_tag = signal.data["tag"]
|
||||
if(!receive_tag) return
|
||||
|
||||
if(receive_tag==tag_chamber_sensor)
|
||||
if(signal.data["pressure"])
|
||||
memory["chamber_sensor_pressure"] = text2num(signal.data["pressure"])
|
||||
|
||||
else if(receive_tag==tag_exterior_sensor)
|
||||
if(signal.data["pressure"])
|
||||
memory["external_sensor_pressure"] = text2num(signal.data["pressure"])
|
||||
|
||||
else if(receive_tag==tag_interior_sensor)
|
||||
if(signal.data["pressure"])
|
||||
memory["internal_sensor_pressure"] = text2num(signal.data["pressure"])
|
||||
|
||||
else if(receive_tag==tag_exterior_door)
|
||||
memory["exterior_status"] = signal.data["door_status"]
|
||||
|
||||
else if(receive_tag==tag_interior_door)
|
||||
memory["interior_status"] = signal.data["door_status"]
|
||||
|
||||
else if(receive_tag==tag_airpump)
|
||||
if(signal.data["power"])
|
||||
memory["pump_status"] = signal.data["direction"]
|
||||
else
|
||||
memory["pump_status"] = "off"
|
||||
|
||||
else if(receive_tag==id_tag)
|
||||
switch(signal.data["command"])
|
||||
if("cycle_exterior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_OUTOPEN
|
||||
if("cycle_interior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_INOPEN
|
||||
|
||||
master.updateDialog()
|
||||
|
||||
datum/computer/file/embedded_program/smart_airlock_controller/receive_user_command(command)
|
||||
var/shutdown_pump = 0
|
||||
switch(command)
|
||||
if("cycle_closed")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_NONE
|
||||
if(memory["interior_status"] != "closed")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_interior_door
|
||||
signal.data["command"] = "secure_close"
|
||||
post_signal(signal)
|
||||
if(memory["exterior_status"] != "closed")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_exterior_door
|
||||
signal.data["command"] = "secure_close"
|
||||
post_signal(signal)
|
||||
shutdown_pump = 1
|
||||
if("open_interior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_NONE
|
||||
if(memory["interior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_interior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
if("close_interior")
|
||||
if(memory["interior_status"] != "closed")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_interior_door
|
||||
signal.data["command"] = "secure_close"
|
||||
post_signal(signal)
|
||||
shutdown_pump = 1
|
||||
if("close_exterior")
|
||||
if(memory["exterior_status"] != "closed")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_exterior_door
|
||||
signal.data["command"] = "secure_close"
|
||||
post_signal(signal)
|
||||
shutdown_pump = 1
|
||||
if("open_exterior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_NONE
|
||||
if(memory["exterior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_exterior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
if("cycle_exterior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_OUTOPEN
|
||||
if("cycle_interior")
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_INOPEN
|
||||
|
||||
if(shutdown_pump)
|
||||
//send a signal to stop pressurizing
|
||||
if(memory["pump_status"] != "off")
|
||||
var/datum/signal/signal = new
|
||||
signal.data = list(
|
||||
"tag" = tag_airpump,
|
||||
"power" = 0,
|
||||
"sigtype"="command"
|
||||
)
|
||||
post_signal(signal)
|
||||
master.updateDialog()
|
||||
|
||||
datum/computer/file/embedded_program/smart_airlock_controller/process()
|
||||
var/process_again = 1
|
||||
while(process_again)
|
||||
process_again = 0
|
||||
|
||||
if(!state && target_state)
|
||||
//we're ready to do stuff, now what do we want to do?
|
||||
switch(target_state)
|
||||
if(AIRLOCK_TARGET_INOPEN)
|
||||
memory["target_pressure"] = memory["internal_sensor_pressure"]
|
||||
if(AIRLOCK_TARGET_OUTOPEN)
|
||||
memory["target_pressure"] = memory["external_sensor_pressure"]
|
||||
|
||||
//work out whether we need to pressurize or depressurize the chamber (5% leeway with target pressure)
|
||||
var/chamber_pressure = memory["chamber_sensor_pressure"]
|
||||
var/target_pressure = memory["target_pressure"]
|
||||
if(chamber_pressure <= target_pressure)
|
||||
state = AIRLOCK_STATE_PRESSURIZE
|
||||
|
||||
//send a signal to start pressurizing
|
||||
var/datum/signal/signal = new
|
||||
signal.data = list(
|
||||
"tag" = tag_airpump,
|
||||
"sigtype"="command",
|
||||
"power"=1,
|
||||
"direction"=1,
|
||||
"set_external_pressure"=target_pressure
|
||||
)
|
||||
post_signal(signal)
|
||||
|
||||
else if(chamber_pressure > target_pressure)
|
||||
state = AIRLOCK_STATE_DEPRESSURIZE
|
||||
|
||||
//send a signal to start depressurizing
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data = list(
|
||||
"tag" = tag_airpump,
|
||||
"sigtype"="command",
|
||||
"power"=1,
|
||||
"direction"=0,
|
||||
"set_external_pressure"=target_pressure
|
||||
)
|
||||
post_signal(signal)
|
||||
|
||||
//actually do stuff
|
||||
//override commands are handled elsewhere, otherwise everything proceeds automatically
|
||||
switch(state)
|
||||
if(AIRLOCK_STATE_PRESSURIZE)
|
||||
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
|
||||
if(target_state < 0)
|
||||
if(memory["interior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_interior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
else if(target_state > 0)
|
||||
if(memory["exterior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_exterior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_NONE
|
||||
|
||||
//send a signal to stop pumping
|
||||
if(memory["pump_status"] != "off")
|
||||
var/datum/signal/signal = new
|
||||
signal.data = list(
|
||||
"tag" = tag_airpump,
|
||||
"sigtype"="command",
|
||||
"power" = 0
|
||||
)
|
||||
post_signal(signal)
|
||||
master.updateDialog()
|
||||
|
||||
if(AIRLOCK_STATE_DEPRESSURIZE)
|
||||
if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
|
||||
if(target_state > 0)
|
||||
if(memory["exterior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_exterior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
else if(target_state < 0)
|
||||
if(memory["interior_status"] != "open")
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag_interior_door
|
||||
signal.data["command"] = "secure_open"
|
||||
post_signal(signal)
|
||||
state = AIRLOCK_STATE_WAIT
|
||||
target_state = AIRLOCK_TARGET_NONE
|
||||
|
||||
//send a signal to stop pumping
|
||||
if(memory["pump_status"] != "off")
|
||||
var/datum/signal/signal = new
|
||||
signal.data = list(
|
||||
"tag" = tag_airpump,
|
||||
"sigtype"="command",
|
||||
"power" = 0
|
||||
)
|
||||
post_signal(signal)
|
||||
master.updateDialog()
|
||||
|
||||
//memory["sensor_pressure"] = sensor_pressure
|
||||
memory["processing"] = state != target_state
|
||||
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
obj/machinery/embedded_controller/radio/smart_airlock_controller
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "airlock_control_standby"
|
||||
|
||||
name = "Cycling Airlock Console"
|
||||
density = 0
|
||||
unacidable = 1
|
||||
frequency = 1449
|
||||
power_channel = ENVIRON
|
||||
|
||||
// Setup parameters only
|
||||
var/id_tag
|
||||
var/tag_exterior_door
|
||||
var/tag_interior_door
|
||||
var/tag_airpump
|
||||
var/tag_chamber_sensor
|
||||
var/tag_exterior_sensor
|
||||
var/tag_interior_sensor
|
||||
//var/sanitize_external
|
||||
|
||||
initialize()
|
||||
..()
|
||||
|
||||
var/datum/computer/file/embedded_program/smart_airlock_controller/new_prog = new
|
||||
|
||||
new_prog.id_tag = id_tag
|
||||
new_prog.tag_exterior_door = tag_exterior_door
|
||||
new_prog.tag_interior_door = tag_interior_door
|
||||
new_prog.tag_airpump = tag_airpump
|
||||
new_prog.tag_chamber_sensor = tag_chamber_sensor
|
||||
new_prog.tag_exterior_sensor = tag_exterior_sensor
|
||||
new_prog.tag_interior_sensor = tag_interior_sensor
|
||||
//new_prog.sanitize_external = sanitize_external
|
||||
|
||||
new_prog.master = src
|
||||
program = new_prog
|
||||
|
||||
update_icon()
|
||||
if(on && program)
|
||||
if(program.memory["processing"])
|
||||
icon_state = "airlock_control_process"
|
||||
else
|
||||
icon_state = "airlock_control_standby"
|
||||
else
|
||||
icon_state = "airlock_control_off"
|
||||
|
||||
|
||||
return_text()
|
||||
var/state_options = ""
|
||||
|
||||
var/state = 0
|
||||
var/chamber_sensor_pressure = "----"
|
||||
var/external_sensor_pressure = "----"
|
||||
var/internal_sensor_pressure = "----"
|
||||
var/exterior_status = "----"
|
||||
var/interior_status = "----"
|
||||
var/pump_status = "----"
|
||||
var/target_pressure = "----"
|
||||
if(program)
|
||||
state = program.state
|
||||
chamber_sensor_pressure = program.memory["chamber_sensor_pressure"]
|
||||
external_sensor_pressure = program.memory["external_sensor_pressure"]
|
||||
internal_sensor_pressure = program.memory["internal_sensor_pressure"]
|
||||
exterior_status = program.memory["exterior_status"]
|
||||
interior_status = program.memory["interior_status"]
|
||||
pump_status = program.memory["pump_status"]
|
||||
target_pressure = program.memory["target_pressure"]
|
||||
|
||||
var/exterior_closed = 0
|
||||
if(exterior_status == "closed")
|
||||
exterior_closed = 1
|
||||
var/interior_closed = 0
|
||||
if(interior_status == "closed")
|
||||
interior_closed = 1
|
||||
|
||||
state_options += "<B>Exterior status: </B> [exterior_status] ([external_sensor_pressure] kPa)<br>"
|
||||
if(exterior_closed)
|
||||
state_options += "<A href='?src=\ref[src];command=open_exterior'>Open exterior airlock</A> "
|
||||
if(abs(chamber_sensor_pressure - external_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
|
||||
state_options += "<font color='red'><b>WARNING</b></font>"
|
||||
state_options += "<BR>"
|
||||
if(!state && exterior_closed && interior_closed)
|
||||
state_options += "<A href='?src=\ref[src];command=cycle_exterior'>Cycle to Exterior Airlock</A><BR>"
|
||||
else
|
||||
state_options += "<br>"
|
||||
else
|
||||
state_options += "<A href='?src=\ref[src];command=close_exterior'>Close exterior airlock</A><BR>"
|
||||
state_options += "<BR>"
|
||||
|
||||
state_options += "<B>Interior status: </B> [interior_status] ([internal_sensor_pressure] kPa)<br>"
|
||||
if(interior_closed)
|
||||
state_options += "<A href='?src=\ref[src];command=open_interior'>Open interior airlock</A> "
|
||||
if(abs(chamber_sensor_pressure - internal_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
|
||||
state_options += "<font color='red'><b>WARNING</b></font>"
|
||||
state_options += "<BR>"
|
||||
if(!state && exterior_closed && interior_closed)
|
||||
state_options += "<A href='?src=\ref[src];command=cycle_interior'>Cycle to Interior Airlock</A><BR>"
|
||||
else
|
||||
state_options += "<br>"
|
||||
else
|
||||
state_options += "<A href='?src=\ref[src];command=close_interior'>Close interior airlock</A><BR>"
|
||||
state_options += "<BR>"
|
||||
|
||||
state_options += "<br>"
|
||||
state_options += "<B>Chamber Pressure:</B> [chamber_sensor_pressure] kPa<BR>"
|
||||
state_options += "<B>Target Chamber Pressure:</B> [target_pressure] kPa<BR>"
|
||||
state_options += "<B>Control Pump: </B> [pump_status]<BR>"
|
||||
if(state)
|
||||
state_options += "<A href='?src=\ref[src];command=cycle_closed'>Abort Cycling</A><BR>"
|
||||
else
|
||||
state_options += "<br>"
|
||||
|
||||
return state_options
|
||||
|
||||
#undef AIRLOCK_STATE_PRESSURIZE
|
||||
#undef AIRLOCK_STATE_WAIT
|
||||
#undef AIRLOCK_STATE_DEPRESSURIZE
|
||||
|
||||
#undef AIRLOCK_TARGET_INOPEN
|
||||
#undef AIRLOCK_TARGET_CLOSED
|
||||
#undef AIRLOCK_TARGET_OUTOPEN
|
||||
@@ -99,4 +99,32 @@ obj/machinery/recharger/update_icon() //we have an update_icon() in addition to
|
||||
if(charging)
|
||||
icon_state = "recharger1"
|
||||
else
|
||||
icon_state = "recharger0"
|
||||
icon_state = "recharger0"
|
||||
|
||||
obj/machinery/recharger/wallcharger
|
||||
name = "wall recharger"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "wrecharger0"
|
||||
|
||||
obj/machinery/recharger/wallcharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return
|
||||
|
||||
if(charging)
|
||||
if(istype(charging, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/E = charging
|
||||
if(E.power_supply.charge < E.power_supply.maxcharge)
|
||||
E.power_supply.give(100)
|
||||
icon_state = "wrecharger1"
|
||||
use_power(250)
|
||||
else
|
||||
icon_state = "wrecharger2"
|
||||
return
|
||||
if(istype(charging, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
if(B.charges < initial(B.charges))
|
||||
B.charges++
|
||||
icon_state = "wrecharger1"
|
||||
use_power(150)
|
||||
else
|
||||
icon_state = "wrecharger2"
|
||||
@@ -83,6 +83,10 @@
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
interact(mob/user as mob)
|
||||
|
||||
if(open)
|
||||
|
||||
var/dat
|
||||
@@ -127,7 +131,7 @@
|
||||
var/value = text2num(href_list["val"])
|
||||
|
||||
// limit to 20-90 degC
|
||||
set_temperature = dd_range(20, 90, set_temperature + value)
|
||||
set_temperature = dd_range(0, 90, set_temperature + value)
|
||||
|
||||
if("cellremove")
|
||||
if(open && cell && !usr.get_active_hand())
|
||||
@@ -164,7 +168,7 @@
|
||||
var/turf/simulated/L = loc
|
||||
if(istype(L))
|
||||
var/datum/gas_mixture/env = L.return_air()
|
||||
if(env.temperature < (set_temperature+T0C))
|
||||
if(env.temperature != set_temperature + T0C)
|
||||
|
||||
var/transfer_moles = 0.25 * env.total_moles()
|
||||
|
||||
@@ -176,10 +180,12 @@
|
||||
|
||||
var/heat_capacity = removed.heat_capacity()
|
||||
//world << "heating ([heat_capacity])"
|
||||
if(heat_capacity == 0 || heat_capacity == null) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
|
||||
heat_capacity = 1
|
||||
removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
|
||||
cell.use(heating_power/20000)
|
||||
if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
|
||||
if(removed.temperature < set_temperature + T0C)
|
||||
removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
|
||||
else
|
||||
removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB)
|
||||
cell.use(heating_power/20000)
|
||||
|
||||
//world << "now at [removed.temperature]"
|
||||
|
||||
|
||||
@@ -148,6 +148,15 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
|
||||
|
||||
if(connection.frequency == ERT_FREQ)
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
|
||||
|
||||
|
||||
else
|
||||
if(intercept)
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
|
||||
@@ -24,12 +24,18 @@
|
||||
toggled = 0
|
||||
autolinkers = list("r_relay")
|
||||
|
||||
/obj/machinery/telecomms/relay/preset/centcom
|
||||
id = "Centcom Relay"
|
||||
hide = 1
|
||||
toggled = 0
|
||||
autolinkers = list("c_relay")
|
||||
|
||||
//HUB
|
||||
|
||||
/obj/machinery/telecomms/hub/preset
|
||||
id = "Hub"
|
||||
network = "tcommsat"
|
||||
autolinkers = list("hub", "relay", "s_relay", "m_relay", "r_relay", "science", "medical",
|
||||
autolinkers = list("hub", "relay", "c_relay", "s_relay", "m_relay", "r_relay", "science", "medical",
|
||||
"supply", "common", "command", "engineering", "security",
|
||||
"receiverA", "receiverB", "broadcasterA", "broadcasterB")
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@
|
||||
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
|
||||
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
|
||||
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3)
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
|
||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
|
||||
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
|
||||
premium = list(/obj/item/toy/waterflower = 1)
|
||||
|
||||
@@ -110,4 +110,15 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/fluff/sven_fjeltson_1))//this shit broke ripleys
|
||||
src.icon_state = "earth"
|
||||
src.initial_icon = "earth"
|
||||
src.name = "APLU \"Strike the Earth!\""
|
||||
src.desc = "Looks like an over worked, under maintained Ripley with some horrific damage."
|
||||
user << "You pick up your old \"Strike the Earth!\" APLU."
|
||||
user.drop_item()
|
||||
del(W)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -84,3 +84,45 @@
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/item/bodybag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A folded, non-reusable bag designed for the preservation of an occupant's brain by stasis."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
icon_state = "bodybag_folded"
|
||||
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
icon_state = "bodybag_closed"
|
||||
icon_closed = "bodybag_closed"
|
||||
icon_opened = "bodybag_open"
|
||||
density = 0
|
||||
|
||||
var/used = 0
|
||||
|
||||
open()
|
||||
. = ..()
|
||||
if(used)
|
||||
var/obj/item/O = new/obj/item(src.loc)
|
||||
O.name = "used stasis bag"
|
||||
O.icon = src.icon
|
||||
O.icon_state = "bodybag_used"
|
||||
O.desc = "Pretty useless now.."
|
||||
del(src)
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
usr << "\red You can't fold that up anymore.."
|
||||
..()
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/device/debugger
|
||||
icon = 'icons/obj/hacktool.dmi'
|
||||
name = "debugger"
|
||||
desc = "Used to debug electronic equipment."
|
||||
icon_state = "hacktool-g"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
|
||||
if(istype(O, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = O
|
||||
if(A.emagged || A.malfhack)
|
||||
user << "\red There is a software error with the device."
|
||||
else
|
||||
user << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
if(istype(O, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = O
|
||||
if(D.operating == -1)
|
||||
user << "\red There is a software error with the device."
|
||||
else
|
||||
user << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
else if(istype(O, /obj/machinery))
|
||||
var/obj/machinery/A = O
|
||||
if(A.emagged)
|
||||
user << "\red There is a software error with the device."
|
||||
else
|
||||
user << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
@@ -76,9 +76,9 @@
|
||||
|
||||
M.updatehealth()
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "bruise pack"
|
||||
singular_name = "bruise pack"
|
||||
desc = "A pack designed to treat blunt-force trauma."
|
||||
name = "roll of gauze"
|
||||
singular_name = "gauze length"
|
||||
desc = "Some sterile gauze to wrap around bloody stumps."
|
||||
icon_state = "brutepack"
|
||||
heal_brute = 60
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if (R.getBruteLoss() || R.getFireLoss() )
|
||||
R.adjustBruteLoss(-60)
|
||||
R.adjustFireLoss(-60)
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>",\
|
||||
@@ -28,7 +28,7 @@
|
||||
var/datum/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
if (S && (S.status & ORGAN_ROBOT))
|
||||
if(S.get_damage())
|
||||
S.heal_damage(30, 30, robo_repair = 1)
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src].</span>",\
|
||||
|
||||
@@ -114,6 +114,33 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic
|
||||
name = "Plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=3"
|
||||
perunit = 2000
|
||||
sheettype = "plastic"
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/pcrate, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/New(var/loc, var/amount=null)
|
||||
recipes = plastic_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Gold
|
||||
*/
|
||||
|
||||
@@ -556,6 +556,7 @@
|
||||
name = "toy phazon"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 11/11."
|
||||
icon_state = "phazonprize"
|
||||
|
||||
/obj/item/toy/katana
|
||||
name = "replica katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
@@ -575,4 +576,4 @@
|
||||
desc = "This baby looks almost real. Wait, did it just burp?"
|
||||
force = 5
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
slot_flags = SLOT_BACK
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(access_maint_tunnels, access_syndicate)
|
||||
access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
|
||||
@@ -156,7 +156,7 @@
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(access_syndicate)
|
||||
access = list(access_syndicate, access_external_airlocks)
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "captain's spare ID"
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
icon_state = "spoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pspoon
|
||||
name = "plastic spoon"
|
||||
desc = "Super dull action!"
|
||||
icon_state = "pspoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
|
||||
/*
|
||||
* Forks
|
||||
*/
|
||||
@@ -71,6 +77,34 @@
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pfork
|
||||
name = "plastic fork"
|
||||
desc = "Yay, no washing up to do."
|
||||
icon_state = "pfork"
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pfork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
|
||||
return ..()
|
||||
|
||||
if (src.icon_state == "forkloaded") //This is a poor way of handling it, but a proper rewrite of the fork to allow for a more varied foodening can happen when I'm in the mood. --NEO
|
||||
if(M == user)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] eats a delicious forkful of omelette!", user), 1)
|
||||
M.reagents.add_reagent("nutriment", 1)
|
||||
else
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] feeds [] a delicious forkful of omelette!", user, M), 1)
|
||||
M.reagents.add_reagent("nutriment", 1)
|
||||
src.icon_state = "fork"
|
||||
return
|
||||
else
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
@@ -95,6 +129,21 @@
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pknife
|
||||
name = "plastic knife"
|
||||
desc = "The bluntest of blades."
|
||||
icon_state = "pknife"
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You somehow managed to cut yourself with the [src]."
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Kitchen knives
|
||||
*/
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
can_hold = list() // any
|
||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
||||
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "trashbag0"
|
||||
@@ -48,6 +47,24 @@
|
||||
icon_state = "trashbag2"
|
||||
else icon_state = "trashbag3"
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Plastic Bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/plasticbag
|
||||
name = "plastic bag"
|
||||
desc = "It's a very flimsy, very noisy alternative to a bag."
|
||||
icon = 'icons/obj/trash.dmi'
|
||||
icon_state = "plasticbag"
|
||||
item_state = "plasticbag"
|
||||
|
||||
w_class = 4
|
||||
max_w_class = 2
|
||||
storage_slots = 21
|
||||
can_hold = list() // any
|
||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice")
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
storage_slots = 14
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
|
||||
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
else
|
||||
user.take_organ_damage(2*force)
|
||||
return
|
||||
/*this is already called in ..()
|
||||
src.add_fingerprint(user)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
*/
|
||||
if (user.a_intent == "hurt")
|
||||
if(!..()) return
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
@@ -90,13 +90,88 @@
|
||||
M.Stun(8)
|
||||
M.Weaken(8)
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been beaten with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
if (O.client) O.show_message("\red <B>[M] has been beaten with \the [src] by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
else
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
src.add_fingerprint(user)
|
||||
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
if (O.client) O.show_message("\red <B>[M] has been stunned with \the [src] by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
|
||||
//Telescopic baton
|
||||
/obj/item/weapon/melee/telebaton
|
||||
name = "telescopic baton"
|
||||
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "telebaton_0"
|
||||
item_state = "telebaton_0"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 2
|
||||
force = 3
|
||||
var/on = 0
|
||||
|
||||
|
||||
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
|
||||
on = !on
|
||||
if(on)
|
||||
user.visible_message("\red With a flick of their wrist, [user] extends their telescopic baton.",\
|
||||
"\red You extend the baton.",\
|
||||
"You hear an ominous click.")
|
||||
icon_state = "telebaton_1"
|
||||
item_state = "telebaton_1"
|
||||
w_class = 4
|
||||
force = 15//quite robust
|
||||
attack_verb = list("smacked", "struck", "slapped")
|
||||
else
|
||||
user.visible_message("\blue [user] collapses their telescopic baton.",\
|
||||
"\blue You collapse the baton.",\
|
||||
"You hear a click.")
|
||||
icon_state = "telebaton_0"
|
||||
item_state = "telebaton_0"
|
||||
w_class = 2
|
||||
force = 3//not so robust now
|
||||
attack_verb = list("hit", "punched")
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
|
||||
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
|
||||
|
||||
var/icon/I = new /icon(src.icon, src.icon_state)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
|
||||
blood_overlay = I
|
||||
|
||||
overlays += blood_overlay
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
|
||||
if(on)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You club yourself over the head."
|
||||
user.Weaken(3 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
else
|
||||
user.take_organ_damage(2*force)
|
||||
return
|
||||
|
||||
if(!..()) return
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
//target.Stun(4) //naaah
|
||||
target.Weaken(4)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
*Energy Blade
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
|
||||
/obj/item/proc/is_used_on(obj/O, mob/user)
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
new /obj/item/clothing/under/shorts/red(src)
|
||||
new /obj/item/clothing/under/shorts/blue(src)
|
||||
new /obj/item/clothing/under/shorts/green(src)
|
||||
new /obj/item/clothing/under/swimsuit/red(src)
|
||||
new /obj/item/clothing/under/swimsuit/black(src)
|
||||
new /obj/item/clothing/under/swimsuit/blue(src)
|
||||
new /obj/item/clothing/under/swimsuit/green(src)
|
||||
new /obj/item/clothing/under/swimsuit/purple(src)
|
||||
|
||||
|
||||
/obj/structure/closet/boxinggloves
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/hairflower
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/dress/dress_saloon
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
@@ -91,7 +91,10 @@
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/nurse(src)
|
||||
new /obj/item/clothing/under/rank/orderly(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/weapon/cartridge/medical(src)
|
||||
new /obj/item/device/radio/headset/headset_med(src)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
@@ -26,6 +27,8 @@
|
||||
new /obj/item/clothing/gloves/captain(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/suit/armor/captain(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/under/dress/dress_cap(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -43,17 +46,41 @@
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/weapon/storage/box/ids( src )
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/hop2
|
||||
name = "Head of Personnel's Attire"
|
||||
req_access = list(access_hop)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/under/dress/dress_hop(src)
|
||||
new /obj/item/clothing/under/dress/dress_hr(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -75,6 +102,7 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/head/helmet/HoS(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||
@@ -90,6 +118,7 @@
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/tie/holster/waist(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
new /obj/item/clothing/under/rank/security2(src)
|
||||
new /obj/item/clothing/under/rank/security2(src)
|
||||
new /obj/item/clothing/under/rank/security2(src)
|
||||
new /obj/item/clothing/under/rank/dispatch(src)
|
||||
new /obj/item/clothing/under/rank/dispatch(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
@@ -84,6 +86,7 @@
|
||||
new /obj/item/clothing/suit/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/head/chaplain_hood(src)
|
||||
new /obj/item/clothing/suit/holidaypriest(src)
|
||||
new /obj/item/clothing/under/wedding/bride_white(src)
|
||||
new /obj/item/weapon/storage/backpack/cultpack (src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
@@ -104,6 +107,19 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos
|
||||
name = "xenos wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos/New()
|
||||
new /obj/item/clothing/suit/unathi/mantle(src)
|
||||
new /obj/item/clothing/suit/unathi/robe(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
@@ -328,13 +344,18 @@
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/dress/plaid_blue(src)
|
||||
new /obj/item/clothing/under/dress/plaid_red(src)
|
||||
new /obj/item/clothing/under/dress/plaid_purple(src)
|
||||
new /obj/item/clothing/shoes/blue(src)
|
||||
new /obj/item/clothing/shoes/yellow(src)
|
||||
new /obj/item/clothing/shoes/green(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/purple(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
return
|
||||
|
||||
@@ -14,6 +14,20 @@
|
||||
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
|
||||
var/rigged = 0
|
||||
|
||||
/obj/structure/closet/pcrate
|
||||
name = "plastic crate"
|
||||
desc = "A rectangular plastic crate."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "plasticcrate"
|
||||
density = 1
|
||||
icon_opened = "plasticcrateopen"
|
||||
icon_closed = "plasticcrate"
|
||||
req_access = null
|
||||
opened = 0
|
||||
flags = FPRINT
|
||||
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
|
||||
var/rigged = 0
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "A internals crate."
|
||||
name = "Internals crate"
|
||||
|
||||
@@ -349,7 +349,7 @@ obj/structure/door_assembly
|
||||
src.state = 0
|
||||
src.name = "Secured Airlock Assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
|
||||
@@ -89,9 +89,16 @@
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc )
|
||||
A.sterile = 1
|
||||
A.name = "Lamarr"
|
||||
new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr
|
||||
name = "Lamarr"
|
||||
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
|
||||
sterile = 1
|
||||
gender = FEMALE
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
return
|
||||
@@ -150,6 +150,17 @@ obj/structure/ex_act(severity)
|
||||
pod_moving = 1
|
||||
close_animation()
|
||||
sleep(CLOSE_DURATION + 2)
|
||||
|
||||
//reverse directions for automated cycling
|
||||
var/turf/next_loc = get_step(loc, pod.dir)
|
||||
var/obj/structure/transit_tube/nexttube
|
||||
for(var/obj/structure/transit_tube/tube in next_loc)
|
||||
if(tube.has_entrance(pod.dir))
|
||||
nexttube = tube
|
||||
break
|
||||
if(!nexttube)
|
||||
pod.dir = turn(pod.dir, 180)
|
||||
|
||||
if(icon_state == "closed" && pod)
|
||||
pod.follow_tube()
|
||||
|
||||
|
||||
@@ -105,12 +105,12 @@
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
else if (usr.a_intent == "hurt")
|
||||
playsound(src.loc, 'Glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'Glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'glassknock.ogg', 80, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].", \
|
||||
"You knock on the [src.name].", \
|
||||
"You hear a knocking sound.")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
var/rotting = 0
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
@@ -59,9 +60,11 @@
|
||||
P.roll_and_drop(src)
|
||||
else
|
||||
O.loc = src
|
||||
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
/turf/simulated/wall/ex_act(severity)
|
||||
if(rotting) severity = 1.0
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
@@ -84,7 +87,7 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/blob_act()
|
||||
if(prob(50))
|
||||
if(prob(50) || rotting)
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/attack_paw(mob/user as mob)
|
||||
@@ -103,11 +106,11 @@
|
||||
|
||||
/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.wall_smash)
|
||||
if (istype(src, /turf/simulated/wall/r_wall))
|
||||
if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
|
||||
M << text("\blue This wall is far too strong for you to destroy.")
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
if (prob(40) || rotting)
|
||||
M << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
@@ -120,7 +123,7 @@
|
||||
|
||||
/turf/simulated/wall/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(40))
|
||||
if (prob(40) || rotting)
|
||||
usr << text("\blue You smash through the wall.")
|
||||
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
@@ -129,6 +132,11 @@
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
if(rotting)
|
||||
user << "\blue The wall crumbles under your touch."
|
||||
dismantle_wall()
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
@@ -143,6 +151,21 @@
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
if(rotting)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot")
|
||||
del E
|
||||
rotting = 0
|
||||
return
|
||||
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
|
||||
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
|
||||
src.dismantle_wall(1)
|
||||
return
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
@@ -284,6 +307,24 @@
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
// Wall-rot effect, a nasty fungus that destroys walls.
|
||||
/turf/simulated/wall/proc/rot()
|
||||
if(!rotting)
|
||||
rotting = 1
|
||||
|
||||
var/number_rots = rand(2,3)
|
||||
for(var/i=0, i<number_rots, i++)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Wallrot"
|
||||
O.desc = "Ick..."
|
||||
O.icon = 'icons/effects/wallrot.dmi'
|
||||
O.pixel_x += rand(-10, 10)
|
||||
O.pixel_y += rand(-10, 10)
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
O.mouse_opacity = 0
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
|
||||
if(mineral == "diamond")
|
||||
return
|
||||
@@ -307,10 +348,18 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
if (prob(15))
|
||||
if (prob(15) && !rotting)
|
||||
dismantle_wall()
|
||||
else if(prob(70))
|
||||
else if(prob(70) && !rotting)
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
else
|
||||
ReplaceWithLattice()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/turf/simulated/wall/Del()
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/ChangeTurf(var/newtype)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
..(newtype)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(10))
|
||||
if (prob(10) || rotting)
|
||||
usr << text("\blue You smash through the wall.")
|
||||
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
@@ -20,6 +20,10 @@
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
if(rotting)
|
||||
user << "\blue This wall feels rather unstable."
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
@@ -35,6 +39,20 @@
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
if(rotting)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot")
|
||||
del E
|
||||
rotting = 0
|
||||
return
|
||||
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
|
||||
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
|
||||
src.dismantle_wall()
|
||||
return
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
|
||||
@@ -27,6 +27,12 @@ var/global/list/global_map = null
|
||||
|
||||
|
||||
//////////////
|
||||
var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
|
||||
"big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
|
||||
"table","td","th","tr")
|
||||
var/list/paper_blacklist = list("java","onblur","onchange","onclick","ondblclick","onfocus","onkeydown", \
|
||||
"onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \
|
||||
"onmouseup","onreset","onselect","onsubmit","onunload")
|
||||
|
||||
var/BLINDBLOCK = 0
|
||||
var/DEAFBLOCK = 0
|
||||
|
||||
@@ -64,6 +64,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/toggleattacklogs,
|
||||
/client/proc/toggledebuglogs,
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/check_customitem_activity
|
||||
)
|
||||
@@ -133,7 +134,9 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/enable_debug_verbs
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/callproc,
|
||||
/client/proc/toggledebuglogs
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -221,6 +224,7 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/client/proc/toggledebuglogs,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/cmd_mod_say,
|
||||
@@ -720,4 +724,15 @@ var/list/admin_verbs_mod = list(
|
||||
if (prefs.toggles & CHAT_ATTACKLOGS)
|
||||
usr << "You now will get attack log messages"
|
||||
else
|
||||
usr << "You now won't get attack log messages"
|
||||
usr << "You now won't get attack log messages"
|
||||
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
prefs.toggles ^= CHAT_DEBUGLOGS
|
||||
if (prefs.toggles & CHAT_DEBUGLOGS)
|
||||
usr << "You now will get debug log messages"
|
||||
else
|
||||
usr << "You now won't get debug log messages"
|
||||
@@ -10,7 +10,7 @@
|
||||
switch(href_list["makeAntag"])
|
||||
if("1")
|
||||
log_admin("[key_name(usr)] has spawned a traitor.")
|
||||
if(!src.makeTratiors())
|
||||
if(!src.makeTraitors())
|
||||
usr << "\red Unfortunatly there were no candidates available"
|
||||
if("2")
|
||||
log_admin("[key_name(usr)] has spawned a changeling.")
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
var/list/istates = J.IconStates()
|
||||
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
text += "[O.type] is missing left hand icon called \"[O.icon_state]\".\n"
|
||||
if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
text += "[O.type] is missing right hand icon called \"[O.icon_state]\".\n"
|
||||
|
||||
|
||||
if(O.icon_state)
|
||||
if(!istates.Find(O.icon_state))
|
||||
text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n"
|
||||
if(O.item_state)
|
||||
if(!istates.Find(O.item_state))
|
||||
text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
|
||||
text+="\n"
|
||||
text += "[O.type] is missing normal icon called \"[O.icon_state]\" in \"[O.icon]\".\n"
|
||||
//if(O.item_state)
|
||||
// if(!istates.Find(O.item_state))
|
||||
// text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
|
||||
//text+="\n"
|
||||
del(O)
|
||||
if(text)
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
world << "Completely successfully and written to [F]"
|
||||
world << "Completeled successfully and written to [F]"
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ var/inactive_keys = "None<br>"
|
||||
//run a query to get all ckeys inactive for over 2 months
|
||||
var/list/inactive_ckeys = list()
|
||||
if(ckeys_with_customitems.len)
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(),lastseen) > 2")
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60")
|
||||
query_inactive.Execute()
|
||||
while(query_inactive.NextRow())
|
||||
var/cur_ckey = query_inactive.item[1]
|
||||
|
||||
@@ -547,13 +547,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
"assassin",
|
||||
"death commando",
|
||||
"syndicate commando",
|
||||
"centcom official",
|
||||
"centcom commander",
|
||||
"special ops officer",
|
||||
"blue wizard",
|
||||
"red wizard",
|
||||
"marisa wizard",
|
||||
"emergency rescue team",
|
||||
"nanotrasen representative",
|
||||
"nanotrasen officer",
|
||||
"nanotrasen captain"
|
||||
)
|
||||
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
|
||||
if (isnull(dresscode))
|
||||
@@ -742,54 +743,79 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("syndicate commando")
|
||||
M.equip_syndicate_commando()
|
||||
|
||||
if("centcom official")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/pen(M), slot_l_store)
|
||||
if("nanotrasen representative")
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "CentCom Review Official"
|
||||
pda.ownjob = "NanoTrasen Navy Representative"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_to_slot_or_del(pda, slot_r_store)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_l_hand)
|
||||
M.equip_if_possible(pda, slot_r_store)
|
||||
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
|
||||
M.equip_if_possible(new /obj/item/weapon/clipboard(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
W.item_state = "id_inv"
|
||||
W.access = get_all_accesses()
|
||||
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
|
||||
W.assignment = "CentCom Review Official"
|
||||
W.assignment = "NanoTrasen Navy Representative"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
M.equip_if_possible(W, slot_wear_id)
|
||||
|
||||
if("centcom commander")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/bulletproof(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/centhat(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(M), slot_l_store)
|
||||
if("nanotrasen officer")
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "NanoTrasen Navy Officer"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_if_possible(pda, slot_r_store)
|
||||
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
|
||||
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "CentCom Commanding Officer"
|
||||
W.assignment = "NanoTrasen Navy Officer"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
M.equip_if_possible(W, slot_wear_id)
|
||||
|
||||
|
||||
if("nanotrasen captain")
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "NanoTrasen Navy Captain"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
|
||||
M.equip_if_possible(pda, slot_r_store)
|
||||
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
|
||||
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "NanoTrasen Navy Captain"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, slot_wear_id)
|
||||
|
||||
if("emergency rescue team")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
|
||||
|
||||
@@ -159,6 +159,8 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/kill_air_processing
|
||||
src.verbs += /client/proc/disable_communication
|
||||
src.verbs += /client/proc/disable_movement
|
||||
src.verbs += /client/proc/Zone_Info
|
||||
src.verbs += /client/proc/Test_ZAS_Connection
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user