Removes the panic writer messages.

This commit is contained in:
PJB3005
2015-11-20 03:17:06 +01:00
parent a42bcc700b
commit 3cca5692af
1087 changed files with 0 additions and 6293 deletions

View File

@@ -125,7 +125,6 @@ Pipelines + Other Objects -> Pipe network
// Find a connecting /obj/machinery/atmospherics in specified direction.
/obj/machinery/atmospherics/proc/findConnecting(var/direction, var/given_layer = src.piping_layer)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/findConnecting() called tick#: [world.time]")
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
if(isConnectable(target, direction, given_layer) && target.isConnectable(src, turn(direction, 180), given_layer))
@@ -133,7 +132,6 @@ Pipelines + Other Objects -> Pipe network
// Ditto, but for heat-exchanging pipes.
/obj/machinery/atmospherics/proc/findConnectingHE(var/direction, var/given_layer = src.piping_layer)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/findConnectingHE() called tick#: [world.time]")
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,direction))
if(target.initialize_directions_he & get_dir(target,src))
if(isConnectable(target, direction, given_layer) && target.isConnectable(src, turn(direction, 180), given_layer))
@@ -145,13 +143,11 @@ Pipelines + Other Objects -> Pipe network
return (target.piping_layer == given_layer || target.pipe_flags & ALL_LAYER)
/obj/machinery/atmospherics/proc/getNodeType(var/node_id)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/getNodeType() called tick#: [world.time]")
return PIPE_TYPE_STANDARD
// A bit more flexible.
// @param connect_dirs integer Directions at which we should check for connections.
/obj/machinery/atmospherics/proc/findAllConnections(var/connect_dirs)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/findAllConnections() called tick#: [world.time]")
var/node_id=0
for(var/direction in cardinal)
if(connect_dirs & direction)
@@ -184,19 +180,16 @@ Pipelines + Other Objects -> Pipe network
//testing("[src] called parent process to build_network()")
/obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/network_expand() called tick#: [world.time]")
// Check to see if should be added to network. Add self if so and adjust variables appropriately.
// Note don't forget to have neighbors look as well!
return null
/obj/machinery/atmospherics/proc/build_network()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/build_network() called tick#: [world.time]")
// Called to build a network from this node
return null
/obj/machinery/atmospherics/proc/return_network(obj/machinery/atmospherics/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/return_network() called tick#: [world.time]")
// Returns pipe_network associated with connection to reference
// Notes: should create network if necessary
// Should never return null
@@ -204,23 +197,18 @@ Pipelines + Other Objects -> Pipe network
return null
/obj/machinery/atmospherics/proc/unassign_network(datum/pipe_network/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/unassign_network() called tick#: [world.time]")
/obj/machinery/atmospherics/proc/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/reassign_network() called tick#: [world.time]")
// Used when two pipe_networks are combining
/obj/machinery/atmospherics/proc/return_network_air(datum/network/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/return_network_air() called tick#: [world.time]")
// Return a list of gas_mixture(s) in the object
// associated with reference pipe_network for use in rebuilding the networks gases list
// Is permitted to return null
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/disconnect() called tick#: [world.time]")
/obj/machinery/atmospherics/proc/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/buildFrom() called tick#: [world.time]")
error("[src] does not define a buildFrom!")
return FALSE
@@ -314,5 +302,4 @@ Pipelines + Other Objects -> Pipe network
user.canmove = 1
/obj/machinery/atmospherics/proc/can_crawl_through()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/can_crawl_through() called tick#: [world.time]")
return 1

View File

@@ -28,7 +28,6 @@
// Tell nodes to fix their networks.
/obj/machinery/atmospherics/unary/vent/burstpipe/proc/do_connect()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/vent/burstpipe/proc/do_connect() called tick#: [world.time]")
//var/flip = turn(dir, 180)
initialize_directions = dir
var/turf/T = loc

View File

@@ -145,7 +145,6 @@
set category = "Object"
set name = "Rotate Circulator (Clockwise)"
set src in view(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/circulator/verb/rotate_clockwise() called tick#: [world.time]")
if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return
@@ -156,7 +155,6 @@
set category = "Object"
set name = "Rotate Circulator (Counterclockwise)"
set src in view(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/circulator/verb/rotate_anticlockwise() called tick#: [world.time]")
if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return

View File

@@ -120,14 +120,12 @@
//Radio remote control
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/dp_vent_pump/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -59,14 +59,12 @@
/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -74,14 +74,12 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/pump/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/pump/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/pump/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -34,7 +34,6 @@
/obj/machinery/atmospherics/binary/valve/proc/open()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/valve/proc/open() called tick#: [world.time]")
if(open) return 0
@@ -54,7 +53,6 @@
/obj/machinery/atmospherics/binary/valve/proc/close()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/valve/proc/close() called tick#: [world.time]")
if(!open)
return 0
@@ -74,7 +72,6 @@
return 1
/obj/machinery/atmospherics/binary/valve/proc/normalize_dir()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/valve/proc/normalize_dir() called tick#: [world.time]")
if(dir==3)
dir = 1
else if(dir==12)
@@ -138,7 +135,6 @@
//Radio remote control
/obj/machinery/atmospherics/binary/valve/digital/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/valve/digital/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)

View File

@@ -65,14 +65,12 @@ Thus, the two variables affect pump operation are set in New():
return 1
/obj/machinery/atmospherics/binary/volume_pump/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/volume_pump/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
/obj/machinery/atmospherics/binary/volume_pump/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/binary/volume_pump/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -25,7 +25,6 @@ Filter types:
var/datum/radio_frequency/radio_connection
obj/machinery/atmospherics/trinary/filter/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/trinary/filter/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)

View File

@@ -69,7 +69,6 @@
/obj/machinery/atmospherics/trinary/tvalve/proc/go_to_side()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/trinary/tvalve/proc/go_to_side() called tick#: [world.time]")
if(state) return 0
@@ -95,7 +94,6 @@
/obj/machinery/atmospherics/trinary/tvalve/proc/go_straight()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/trinary/tvalve/proc/go_straight() called tick#: [world.time]")
if(!state)
return 0
@@ -203,7 +201,6 @@
//Radio remote control
/obj/machinery/atmospherics/trinary/tvalve/digital/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/trinary/tvalve/digital/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)

View File

@@ -32,7 +32,6 @@ obj/machinery/atmospherics/trinary/New()
air3.volume = starting_volume
/obj/machinery/atmospherics/trinary/proc/initialize_directions()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/trinary/proc/initialize_directions() called tick#: [world.time]")
switch(dir)
if(NORTH)
initialize_directions = SOUTH|NORTH|EAST

View File

@@ -63,7 +63,6 @@
return 1
/obj/machinery/atmospherics/unary/outlet_injector/proc/inject()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/outlet_injector/proc/inject() called tick#: [world.time]")
if(on || injecting)
return 0
@@ -82,14 +81,12 @@
flick("inject", src)
/obj/machinery/atmospherics/unary/outlet_injector/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/outlet_injector/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -65,7 +65,6 @@
return
/obj/machinery/atmospherics/unary/thermal_plate/proc/radiate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/thermal_plate/proc/radiate() called tick#: [world.time]")
if(network && network.radiate) //Since each member of a network has the same gases each tick
air_contents.copy_from(network.radiate) //We can cut down on processing time by only calculating radiate() once and then applying the result
return

View File

@@ -148,7 +148,6 @@
//Radio remote control
/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
@@ -167,7 +166,6 @@
return 1
/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -72,7 +72,6 @@
return
/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency() called tick#: [world.time]")
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, radio_filter_in)
@@ -90,7 +89,6 @@
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/proc/broadcast_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/unary/vent_scrubber/proc/broadcast_status() called tick#: [world.time]")
if(!radio_connection)
return 0

View File

@@ -32,7 +32,6 @@
line_members = list()
/datum/pipe_network/proc/process()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipe_network/proc/process() called tick#: [world.time]")
//Equalize gases amongst pipe if called for
if(update)
update = 0
@@ -46,7 +45,6 @@
#endif
/datum/pipe_network/proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipe_network/proc/build_network() called tick#: [world.time]")
//Purpose: Generate membership roster
//Notes: Assuming that members will add themselves to appropriate roster in network_expandz()
@@ -66,7 +64,6 @@
return 1
/datum/pipe_network/proc/merge(datum/pipe_network/giver)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipe_network/proc/merge() called tick#: [world.time]")
if(giver==src) return 0
normal_members |= giver.normal_members
@@ -84,7 +81,6 @@
return 1
/datum/pipe_network/proc/update_network_gases()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipe_network/proc/update_network_gases() called tick#: [world.time]")
//Go through membership roster and make sure gases is up to date
gases = list()
@@ -97,7 +93,6 @@
gases += line_member.air
/datum/pipe_network/proc/reconcile_air()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipe_network/proc/reconcile_air() called tick#: [world.time]")
//Perfectly equalize all gases members instantly
//Calculate totals from individual components
@@ -176,7 +171,6 @@
return 1
proc/equalize_gases(datum/gas_mixture/list/gases)
//writepanic("[__FILE__].[__LINE__] \\/proc/equalize_gases() called tick#: [world.time]")
//Perfectly equalize all gases members instantly
//Calculate totals from individual components

View File

@@ -27,7 +27,6 @@
edges = list()
/datum/pipeline/proc/process()//This use to be called called from the pipe networks
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/process() called tick#: [world.time]")
if((world.timeofday - last_pressure_check) / 10 >= PRESSURE_CHECK_DELAY)
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
@@ -43,7 +42,6 @@
//air.react() //Should be handled by pipe_network now
/datum/pipeline/proc/temporarily_store_air()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/temporarily_store_air() called tick#: [world.time]")
//Update individual gas_mixtures by volume ratio
for(var/obj/machinery/atmospherics/pipe/member in members)
@@ -66,7 +64,6 @@
member.air_temporary.update_values()
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/build_pipeline() called tick#: [world.time]")
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
@@ -113,7 +110,6 @@
/datum/pipeline/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/network_expand() called tick#: [world.time]")
if(new_network.line_members.Find(src))
return 0
@@ -130,7 +126,6 @@
return 1
/datum/pipeline/proc/return_network(obj/machinery/atmospherics/reference)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/return_network() called tick#: [world.time]")
if(!network)
network = getFromPool(/datum/pipe_network)
network.build_network(src, null)
@@ -141,7 +136,6 @@
return network
/datum/pipeline/proc/mingle_with_turf(turf/simulated/target, mingle_volume)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/mingle_with_turf() called tick#: [world.time]")
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
@@ -176,7 +170,6 @@
network.update = 1
/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/temperature_interact() called tick#: [world.time]")
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)

View File

@@ -119,7 +119,6 @@
return 1
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/proc/radiate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/heat_exchanging/proc/radiate() called tick#: [world.time]")
var/datum/gas_mixture/internal = return_air()
var/internal_transfer_moles = 0.25 * internal.total_moles()
var/datum/gas_mixture/internal_removed = internal.remove(internal_transfer_moles)

View File

@@ -93,7 +93,6 @@
return
/obj/machinery/space_heater/air_conditioner/proc/chill()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/space_heater/air_conditioner/proc/chill() called tick#: [world.time]")
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()

View File

@@ -1,5 +1,4 @@
client/verb/discon_pipes()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/discon_pipes() called tick#: [world.time]")
set name = "Show Disconnected Pipes"
set category = "Debug"

View File

@@ -278,7 +278,6 @@ var/global/list/nlist = list( \
)
/obj/item/pipe/proc/update()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/update() called tick#: [world.time]")
name = nlist[pipe_type+1] + " fitting"
if(pipe_type == PIPE_LAYER_ADAPTER)
@@ -297,7 +296,6 @@ var/global/list/nlist = list( \
set category = "Object"
set name = "Rotate Pipe"
set src in view(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/verb/rotate() called tick#: [world.time]")
if ( usr.stat || usr.restrained() || (usr.status_flags & FAKEDEATH))
return
@@ -323,7 +321,6 @@ var/global/list/nlist = list( \
// returns all pipe's endpoints
/obj/item/pipe/proc/get_pipe_dir()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_pipe_dir() called tick#: [world.time]")
if (!dir)
return 0
var/flip = turn(dir, 180)
@@ -361,7 +358,6 @@ var/global/list/nlist = list( \
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_pdir() called tick#: [world.time]")
var/flip = turn(dir, 180)
// var/cw = turn(dir, -90)
@@ -379,7 +375,6 @@ var/global/list/nlist = list( \
// return the h_dir (heat-exchange pipes) from the type and the dir
/obj/item/pipe/proc/get_hdir() //endpoints for h/e pipes
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_hdir() called tick#: [world.time]")
// var/flip = turn(dir, 180)
// var/cw = turn(dir, -90)

View File

@@ -40,12 +40,10 @@
/obj/machinery/atmospherics/pipe/singularity_pull(/obj/machinery/singularity/S, size)
return
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/proc/pipeline_expansion() called tick#: [world.time]")
return null
/obj/machinery/atmospherics/pipe/proc/check_pressure(pressure)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/proc/check_pressure() called tick#: [world.time]")
//Return 1 if parent should continue checking other pipes
//Return null if parent should stop checking other pipes. Recall: del(src) will by default return null
return 1
@@ -230,7 +228,6 @@
user << "<span class='info'>This [src.name] is rated up to [format_num(alert_pressure)] kPa.</span>"
/obj/machinery/atmospherics/pipe/simple/proc/groan()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/groan() called tick#: [world.time]")
src.visible_message("<span class='warning'>\The [src] groans from the pressure!</span>");
// Need SFX for groaning metal.
@@ -238,7 +235,6 @@
/obj/machinery/atmospherics/pipe/simple/proc/burst()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/burst() called tick#: [world.time]")
src.visible_message("<span class='danger'>\The [src] bursts!</span>");
var/turf/T=get_turf(src)
@@ -288,7 +284,6 @@
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir() called tick#: [world.time]")
if(dir==3)
dir = 1
else if(dir==12)

View File

@@ -12,7 +12,6 @@
// For straight pipes
/proc/rotate_pipe_straight(var/newdir)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/rotate_pipe_straight() called tick#: [world.time]")
switch(newdir)
if(SOUTH) // 2->1
return NORTH

View File

@@ -5,7 +5,6 @@ var/minZ = 2
// (such as mining base => admin station)
// Note that this assumes the ship's top is at z=1 and bottom at z=4
/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/tank/jetpack/proc/move_z() called tick#: [world.time]")
if (user.z > 1)
user << "<span class='warning'>There is nothing of interest in that direction.</span>"
return

View File

@@ -76,7 +76,6 @@ atom/movable/Move() //Hackish
return //nothing
proc/set_up() //Update the overlays to make the openspace turf show what's down a level
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/set_up() called tick#: [world.time]")
if(!overlay_references)
overlay_references = list()
if(!floorbelow) return
@@ -87,13 +86,11 @@ atom/movable/Move() //Hackish
overlay_references[o] = o_img
proc/AddImage(var/atom/movable/o)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/AddImage() called tick#: [world.time]")
var/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)
overlays += o_img
overlay_references[o] = o_img
proc/RemoveImage(var/atom/movable/o)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RemoveImage() called tick#: [world.time]")
var/o_img = overlay_references[o]
overlays -= o_img
overlay_references -= o

View File

@@ -47,7 +47,6 @@
return
/obj/effect/landmark/zcontroller/proc/add(var/list/L, var/I, var/transfer)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/landmark/zcontroller/proc/add() called tick#: [world.time]")
while (L.len)
var/turf/T = pick(L)
@@ -114,7 +113,6 @@ atom/movable/Move() //Hackish
controller.add(temp,3,1)
/obj/effect/landmark/zcontroller/proc/calc(var/list/L)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/landmark/zcontroller/proc/calc() called tick#: [world.time]")
var/list/slowholder = list()
var/list/normalholder = list()
var/list/fastholder = list()

View File

@@ -60,7 +60,6 @@ var/list/reagent_effects = list("toxin","anti_toxin","stoxin","space_drugs","min
var/jungle_plants_init = 0
/proc/init_jungle_plants()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/proc/init_jungle_plants() called tick#: [world.time]")
jungle_plants_init = 1
fruit_icon_states = shuffle(fruit_icon_states)
reagent_effects = shuffle(reagent_effects)

View File

@@ -158,7 +158,6 @@
//Returns 1 if the machine can be interacted with via this console.
/obj/machinery/computer/rust_core_control/proc/check_core_status(var/obj/machinery/power/rust_core/C)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_core_control/proc/check_core_status() called tick#: [world.time]")
if(isnull(C))
return

View File

@@ -211,7 +211,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
return 1
/obj/effect/rust_em_field/proc/ChangeFieldStrength(var/new_strength)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/ChangeFieldStrength() called tick#: [world.time]")
var/calc_size = 1
emp_overload = 0
if(new_strength <= 50)
@@ -229,11 +228,9 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
change_size(calc_size)
/obj/effect/rust_em_field/proc/ChangeFieldFrequency(var/new_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/ChangeFieldFrequency() called tick#: [world.time]")
frequency = new_frequency
/obj/effect/rust_em_field/proc/AddEnergy(var/a_energy, var/a_mega_energy, var/a_frequency)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/AddEnergy() called tick#: [world.time]")
var/energy_loss_ratio = 0
if(a_frequency != src.frequency)
energy_loss_ratio = 1 / abs(a_frequency - src.frequency)
@@ -245,7 +242,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
mega_energy += 0.1
/obj/effect/rust_em_field/proc/AddParticles(var/name, var/quantity = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/AddParticles() called tick#: [world.time]")
if(name in dormant_reactant_quantities)
dormant_reactant_quantities[name] += quantity
else if(name != "proton" && name != "electron" && name != "neutron")
@@ -253,7 +249,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
dormant_reactant_quantities[name] = quantity
/obj/effect/rust_em_field/proc/RadiateAll(var/ratio_lost = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/RadiateAll() called tick#: [world.time]")
for(var/particle in dormant_reactant_quantities)
radiation += dormant_reactant_quantities[particle]
dormant_reactant_quantities.Remove(particle)
@@ -265,7 +260,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
environment.merge(held_plasma)
/obj/effect/rust_em_field/proc/change_size(var/newsize = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/change_size() called tick#: [world.time]")
//
var/changed = 0
switch(newsize)
@@ -308,7 +302,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//the !!fun!! part
/obj/effect/rust_em_field/proc/React()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/React() called tick#: [world.time]")
//loop through the reactants in random order
var/list/reactants_reacting_pool = dormant_reactant_quantities.Copy()
/*

View File

@@ -112,7 +112,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
owned_field.ChangeFieldFrequency(field_frequency)
/obj/machinery/power/rust_core/proc/Startup()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/Startup() called tick#: [world.time]")
if(owned_field)
return
@@ -125,7 +124,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
. = 1
/obj/machinery/power/rust_core/proc/Shutdown()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/Shutdown() called tick#: [world.time]")
//todo: safety checks for field status
if(owned_field)
icon_state = "core0"
@@ -134,7 +132,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
set_light(0)
/obj/machinery/power/rust_core/proc/AddParticles(var/name, var/quantity = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/AddParticles() called tick#: [world.time]")
if(owned_field)
owned_field.AddParticles(name, quantity)
. = 1
@@ -151,7 +148,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
"}
/obj/machinery/power/rust_core/proc/set_strength(var/value)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/set_strength() called tick#: [world.time]")
value = Clamp(value, MIN_FIELD_STR, MAX_FIELD_STR)
field_strength = value
active_power_usage = RUST_CORE_STR_COST * value
@@ -159,7 +155,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
owned_field.ChangeFieldStrength(value)
/obj/machinery/power/rust_core/proc/set_frequency(var/value)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/set_frequency() called tick#: [world.time]")
value = Clamp(value, MIN_FIELD_FREQ, MAX_FIELD_FREQ)
field_frequency = value
if(owned_field)

View File

@@ -68,7 +68,6 @@
//Returns 1 if the linked core is accesible.
/obj/machinery/computer/rust_core_monitor/proc/check_core_status()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_core_monitor/proc/check_core_status() called tick#: [world.time]")
if(!istype(linked_core))
return

View File

@@ -41,7 +41,6 @@
user << "<span class='warning'>\icon[src] [src] was unable to draw a fuel rod assembly from an injector.</span>"
/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly() called tick#: [world.time]")
var/success = 0
if(cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
@@ -63,7 +62,6 @@
return success
/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly() called tick#: [world.time]")
if(cur_assembly)
cur_assembly.loc = src.loc//get_step(get_turf(src), src.dir)
cur_assembly = null
@@ -71,7 +69,6 @@
return 1
/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly() called tick#: [world.time]")
var/success = 0
if(!cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
@@ -99,7 +96,6 @@
set name = "Eject assembly from port"
set category = "Object"
set src in oview(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb() called tick#: [world.time]")
eject_assembly()

View File

@@ -195,7 +195,6 @@
updateDialog()
/obj/machinery/computer/rust_fuel_control/proc/check_injector_status(var/obj/machinery/power/rust_fuel_injector/I)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_fuel_control/proc/check_injector_status() called tick#: [world.time]")
if(!I)
return 0

View File

@@ -183,21 +183,18 @@
updateDialog()
/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting() called tick#: [world.time]")
if(!injecting && cur_assembly)
icon_state = "injector1"
injecting = 1
use_power = 1
/obj/machinery/power/rust_fuel_injector/proc/StopInjecting()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/StopInjecting() called tick#: [world.time]")
if(injecting)
injecting = 0
icon_state = "injector0"
use_power = 0
/obj/machinery/power/rust_fuel_injector/proc/Inject()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/Inject() called tick#: [world.time]")
if(!injecting)
return
if(cur_assembly)
@@ -228,7 +225,6 @@
StopInjecting()
/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap() called tick#: [world.time]")
var/rev_dir = reverse_direction(dir)
var/turf/mid = get_step(src, rev_dir)
var/success = 0
@@ -259,7 +255,6 @@
set category = "Object"
set name = "Rotate Generator (Clockwise)"
set src in view(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/verb/rotate_clock() called tick#: [world.time]")
if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return
@@ -270,7 +265,6 @@
set category = "Object"
set name = "Rotate Generator (Counter-clockwise)"
set src in view(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock() called tick#: [world.time]")
if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return

View File

@@ -9,7 +9,6 @@ datum/fusion_reaction
/datum/controller/game_controller/var/list/fusion_reactions
proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
//writepanic("[__FILE__].[__LINE__] \\/proc/get_fusion_reaction() called tick#: [world.time]")
if(!master_controller.fusion_reactions)
populate_fusion_reactions()
if(master_controller.fusion_reactions.Find(primary_reactant))
@@ -18,7 +17,6 @@ proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
return master_controller.fusion_reactions[primary_reactant][secondary_reactant]
proc/populate_fusion_reactions()
//writepanic("[__FILE__].[__LINE__] \\/proc/populate_fusion_reactions() called tick#: [world.time]")
if(!master_controller.fusion_reactions)
master_controller.fusion_reactions = list()
for(var/cur_reaction_type in typesof(/datum/fusion_reaction) - /datum/fusion_reaction)

View File

@@ -34,13 +34,11 @@
initialize()
/obj/machinery/rust/gyrotron/proc/stop_emitting()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/stop_emitting() called tick#: [world.time]")
emitting = 0
use_power = 1
update_icon()
/obj/machinery/rust/gyrotron/proc/start_emitting()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/start_emitting() called tick#: [world.time]")
if(stat & (NOPOWER | BROKEN) || emitting && state == 2) //Sanity.
return
@@ -55,7 +53,6 @@
sleep(rate)
/obj/machinery/rust/gyrotron/proc/emit()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/emit() called tick#: [world.time]")
var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
A.frequency = frequency
A.damage = mega_energy * 1500
@@ -98,7 +95,6 @@
set name = "Rotate (Clockwise)"
set src in oview(1)
set category = "Object"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/verb/rotate_cw() called tick#: [world.time]")
if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || !Adjacent(usr))
return
@@ -113,7 +109,6 @@
set name = "Rotate (Counter-Clockwise)"
set src in oview(1)
set category = "Object"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/verb/rotate_ccw() called tick#: [world.time]")
if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || !Adjacent(usr))
return

View File

@@ -21,7 +21,6 @@
/*
/obj/machinery/rust
proc/RadiateParticle(var/energy, var/ionizing, var/dir = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RadiateParticle() called tick#: [world.time]")
if(!dir)
RadiateParticleRand(energy, ionizing)
var/obj/effect/accelerated_particle/particle = getFromPool(/obj/effect/accelerated_particle/particle, get_turf(src))
@@ -36,7 +35,6 @@
return particle
proc/RadiateParticleRand(var/energy, var/ionizing)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RadiateParticleRand() called tick#: [world.time]")
var/turf/target
var/particle_range = 3 * round(energy) + rand(3,20)
if(energy > 1)

View File

@@ -16,20 +16,17 @@
parent = null
/obj/effect/rust_particle_catcher/proc/SetSize(var/newsize)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/SetSize() called tick#: [world.time]")
name = "collector [newsize]"
mysize = newsize
UpdateSize()
/obj/effect/rust_particle_catcher/proc/AddParticles(var/name, var/quantity = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/AddParticles() called tick#: [world.time]")
if(parent && parent.size >= mysize)
parent.AddParticles(name, quantity)
return 1
return 0
/obj/effect/rust_particle_catcher/proc/UpdateSize()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/UpdateSize() called tick#: [world.time]")
if(parent.size >= mysize)
density = 1
//invisibility = 0

View File

@@ -19,7 +19,6 @@
Stress(Proj.damage / 10)
/obj/effect/energy_field/proc/Stress(var/severity)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/energy_field/proc/Stress() called tick#: [world.time]")
strength -= severity
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
@@ -31,7 +30,6 @@
density = 1
/obj/effect/energy_field/proc/Strengthen(var/severity)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/energy_field/proc/Strengthen() called tick#: [world.time]")
strength += severity
//if we take too much damage, drop out - the generator will bring us back up if we have enough power

View File

@@ -176,7 +176,6 @@
set name = "Rotate capacitor clockwise"
set category = "Object"
set src in oview(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_capacitor/verb/rotate() called tick#: [world.time]")
if (src.anchored)
usr << "It is fastened to the floor!"

View File

@@ -242,7 +242,6 @@
/*
/obj/machinery/shield_gen/proc/check_powered()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/check_powered() called tick#: [world.time]")
check_powered = 1
if(!anchored)
powered = 0
@@ -274,7 +273,6 @@
*/
/obj/machinery/shield_gen/proc/toggle()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/toggle() called tick#: [world.time]")
active = !active
power_change()
if(active)
@@ -299,7 +297,6 @@
//grab the border tiles in a circle around this machine
/obj/machinery/shield_gen/proc/get_shielded_turfs()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/get_shielded_turfs() called tick#: [world.time]")
var/list/out = list()
for(var/turf/T in range(field_radius, src))
if(get_dist(src,T) == field_radius)

View File

@@ -37,7 +37,6 @@
del first*/
/obj/machinery/computer/laser/proc/setpower(var/powera)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/laser/proc/setpower() called tick#: [world.time]")
/*src.power = powera
if(first)
first.setpower(src.power)*/
@@ -59,7 +58,6 @@
sd_SetLuminosity(1, 1, 4)
/obj/beam/e_beam/proc/updatebeam()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/updatebeam() called tick#: [world.time]")
if(!next)
if(get_step(src.loc,src.dir))
var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
@@ -88,7 +86,6 @@
next.updatebeam()
/atom/proc/laser_act(var/obj/beam/e_beam/b)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/laser_act() called tick#: [world.time]")
return
/mob/living/carbon/laser_act(var/obj/beam/e_beam/b)
@@ -106,7 +103,6 @@
/obj/beam/e_beam/proc/setpower(var/powera)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/setpower() called tick#: [world.time]")
src.power = powera
if(src.next)
src.next.setpower(powera)
@@ -131,7 +127,6 @@
return
/obj/beam/e_beam/proc/hit()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/hit() called tick#: [world.time]")
del src
return
*/

View File

@@ -38,7 +38,6 @@
/*
/obj/machinery/computer/lasercon/proc/interact(mob/user)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/lasercon/proc/interact() called tick#: [world.time]")
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))

View File

@@ -31,7 +31,6 @@
set name = "Rotate"
set category = "Object"
set src in oview(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/zero_point_emitter/verb/rotate() called tick#: [world.time]")
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"

View File

@@ -31,7 +31,6 @@
return
/obj/item/projectile/missile/proc/explode()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/projectile/missile/proc/explode() called tick#: [world.time]")
explosion(src.loc, 1, 1, 2, 7, 0)
playsound(src.loc, "explosion", 50, 1)
del(src)
@@ -82,7 +81,6 @@
return
/obj/machinery/meteor_battery/proc/isPopping()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/isPopping() called tick#: [world.time]")
return (popping!=0)
/obj/machinery/meteor_battery/power_change()
@@ -101,12 +99,10 @@
stat |= NOPOWER
/obj/machinery/meteor_battery/proc/setState(var/enabled)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/setState() called tick#: [world.time]")
src.enabled = enabled
src.power_change()
/obj/machinery/meteor_battery/proc/get_new_target()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/get_new_target() called tick#: [world.time]")
var/list/new_targets = new
var/new_target
for(var/obj/effect/meteor/M in view(protect_range, get_turf(src)))
@@ -174,7 +170,6 @@
return
/obj/machinery/meteor_battery/proc/target()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/target() called tick#: [world.time]")
while(src && enabled && !stat)
src.dir = get_dir(src, cur_target)
shootAt(cur_target)
@@ -182,7 +177,6 @@
return
/obj/machinery/meteor_battery/proc/shootAt(var/atom/movable/target)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/shootAt() called tick#: [world.time]")
var/turf/T = get_turf(src)
var/turf/U = get_turf(target)
if (!T || !U)
@@ -197,11 +191,9 @@
/obj/machinery/meteor_battery/proc/isDown()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/isDown() called tick#: [world.time]")
return (invisibility!=0)
/obj/machinery/meteor_battery/proc/popUp()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/popUp() called tick#: [world.time]")
if ((!isPopping()) || src.popping==-1)
invisibility = 0
popping = 1
@@ -212,7 +204,6 @@
if (popping==1) popping = 0
/obj/machinery/meteor_battery/proc/popDown()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/popDown() called tick#: [world.time]")
if ((!isPopping()) || src.popping==1)
popping = -1
if (src.cover!=null)
@@ -252,7 +243,6 @@
src.die()
/obj/machinery/meteor_battery/proc/die()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/die() called tick#: [world.time]")
src.health = 0
src.density = 0
src.stat |= BROKEN

View File

@@ -24,7 +24,6 @@
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent //Graciously stolen from spider code
/mob/living/simple_animal/sculpture/proc/GrabMob(var/mob/living/target)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/sculpture/proc/GrabMob() called tick#: [world.time]")
if(target && target != src && ishuman(target) && !observed)
G = getFromPool(/obj/item/weapon/grab,src,target)
target.Stun(1)

View File

@@ -62,7 +62,6 @@
return ..()
/obj/item/ashtray/proc/die()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/ashtray/proc/die() called tick#: [world.time]")
src.visible_message("<span class='warning'>[src] shatters spilling its contents!</span>")
for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O

View File

@@ -3,17 +3,14 @@
/datum/medical_effect/var/name = "None"
/datum/medical_effect/var/strength = 0
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/medical_effect/proc/on_life() called tick#: [world.time]")
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datum/medical_effect/proc/cure() called tick#: [world.time]")
// MOB HELPERS
// ===========
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
/mob/proc/add_side_effect(name, strength = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/add_side_effect() called tick#: [world.time]")
/mob/living/carbon/human/add_side_effect(name, strength = 0)
for(var/datum/medical_effect/M in src.side_effects) if(M.name == name)
M.strength = max(M.strength, 10)
@@ -28,7 +25,6 @@
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/handle_medical_side_effects() called tick#: [world.time]")
if(src.reagents.has_reagent("cryoxadone") || src.reagents.get_reagent_amount("bicaridine") >= 15 || src.reagents.get_reagent_amount("tricordrazine") >= 15)
src.add_side_effect("Headache")

View File

@@ -467,7 +467,6 @@ log transactions
//create the most effective combination of notes to make up the requested amount
/obj/machinery/atm/proc/withdraw_arbitrary_sum(var/mob/user,var/arbitrary_sum)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atm/proc/withdraw_arbitrary_sum() called tick#: [world.time]")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(istype(H.wear_id,/obj/item/weapon/storage/wallet))
@@ -478,7 +477,6 @@ log transactions
//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atm/proc/scan_user() called tick#: [world.time]")
if(!authenticated_account && linked_db)
if(human_user.wear_id)
var/obj/item/weapon/card/id/I

View File

@@ -139,7 +139,6 @@ var/global/list/atmos_controllers = list()
/obj/machinery/computer/atmoscontrol/proc/is_in_filter(var/typepath)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/atmoscontrol/proc/is_in_filter() called tick#: [world.time]")
if(!filter) return 1 // YEP. TOTALLY.
return typepath in filter

View File

@@ -173,7 +173,6 @@
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/tape/proc/breaktape() called tick#: [world.time]")
if(user.a_intent == I_HELP && (!W || !W.is_sharp()) && !src.allowed(user))
user << "<span class='notice'>You can't break [src] [W ? "with \the [W] " : ""]unless you use force.</span>"
return

View File

@@ -40,7 +40,6 @@ var/list/ul_IconCache = list()
proc/ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src))
//writepanic("[__FILE__].[__LINE__] \\/proc/ul_UnblankLocal() called tick#: [world.time]")
for(var/atom/Light in ReApply)
if(ul_IsLuminous(Light))
Light.ul_Illuminate()
@@ -55,7 +54,6 @@ atom/var/ul_Extinguished = UL_I_ONZERO
atom/proc/ul_SetLuminosity(var/Red = 0, var/Green = Red, var/Blue = Red)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_SetLuminosity() called tick#: [world.time]")
if(ul_Extinguished == UL_I_CHANGING) //Changing state, just supress any changes, to prevent glitches.
return
@@ -85,7 +83,6 @@ atom/proc/ul_SetLuminosity(var/Red = 0, var/Green = Red, var/Blue = Red)
return
atom/proc/ul_Illuminate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_Illuminate() called tick#: [world.time]")
if (ul_Extinguished == UL_I_LIT)
return
@@ -134,7 +131,6 @@ atom/proc/ul_Illuminate()
atom/proc/ul_Extinguish()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_Extinguish() called tick#: [world.time]")
if (ul_Extinguished != UL_I_LIT)
return
@@ -200,7 +196,6 @@ atom/proc/ul_Extinguish()
to avoid the cost of the square root function.
*/
atom/proc/ul_FalloffAmount(var/atom/ref)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_FalloffAmount() called tick#: [world.time]")
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
var/delta_x = (ref.x - src.x)
var/delta_y = (ref.y - src.y)
@@ -225,7 +220,6 @@ atom/proc/ul_FalloffAmount(var/atom/ref)
return 0
atom/proc/ul_SetOpacity(var/NewOpacity)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_SetOpacity() called tick#: [world.time]")
if(opacity != NewOpacity)
var/list/Blanked = ul_BlankLocal()
@@ -237,7 +231,6 @@ atom/proc/ul_SetOpacity(var/NewOpacity)
return
atom/proc/ul_BlankLocal()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_BlankLocal() called tick#: [world.time]")
var/list/Blanked = list( )
var/TurfAdjust = isturf(src) ? 1 : 0
@@ -249,7 +242,6 @@ atom/proc/ul_BlankLocal()
return Blanked
atom/proc/ul_LightLevelChanged()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_LightLevelChanged() called tick#: [world.time]")
//Designed for client projects to use. Called on items when the turf they are in has its light level changed
return
@@ -278,23 +270,19 @@ turf/var/list/MaxGreen
turf/var/list/MaxBlue
turf/proc/ul_GetRed()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetRed() called tick#: [world.time]")
if(MaxRed)
return ul_Clamp(max(MaxRed))
return 0
turf/proc/ul_GetGreen()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetGreen() called tick#: [world.time]")
if(MaxGreen)
return ul_Clamp(max(MaxGreen))
return 0
turf/proc/ul_GetBlue()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetBlue() called tick#: [world.time]")
if(MaxBlue)
return ul_Clamp(max(MaxBlue))
return 0
turf/proc/ul_UpdateLight()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_UpdateLight() called tick#: [world.time]")
var/area/CurrentArea = loc
if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting)
@@ -324,7 +312,6 @@ turf/proc/ul_UpdateLight()
turf/proc/ul_Recalculate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_Recalculate() called tick#: [world.time]")
ul_SuppressLightLevelChanges++
@@ -346,7 +333,6 @@ area/var/list/LightLevels
area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\darea/proc/ul_Light() called tick#: [world.time]")
if(!src || !src.ul_Lighting)
return
@@ -379,7 +365,6 @@ area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blu
area/proc/ul_Prep()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\darea/proc/ul_Prep() called tick#: [world.time]")
if(!tag)
tag = "[type]"

View File

@@ -8,7 +8,6 @@ var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4
7, 7)
atom/proc/ul_FalloffAmount(var/atom/ref)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_FalloffAmount() called tick#: [world.time]")
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
var/delta_x = (ref.x - src.x)
var/delta_y = (ref.y - src.y)

View File

@@ -30,7 +30,6 @@
var/time_inflicted = 0
proc/copy()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/copy() called tick#: [world.time]")
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
@@ -40,7 +39,6 @@
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/datum/organ/external/O)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/autopsy_scanner/proc/add_data() called tick#: [world.time]")
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
for(var/V in O.autopsy_data)
@@ -82,7 +80,6 @@
set category = "Object"
set src in view(usr, 1)
set name = "Print Data"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/autopsy_scanner/verb/print_data() called tick#: [world.time]")
if(usr.stat || !(istype(usr,/mob/living/carbon/human)) || (usr.status_flags & FAKEDEATH))
usr << "No."
return

View File

@@ -5,7 +5,6 @@
/proc/togglebuildmode(mob/M as mob in player_list)
set name = "Toggle Build Mode"
set category = "Special Verbs"
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/togglebuildmode() called tick#: [world.time]")
if(M.client)
if(M.client.buildmode)
@@ -364,7 +363,6 @@ obj/effect/bmode/buildholder/New()
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/build_click() called tick#: [world.time]")
var/obj/effect/bmode/buildholder/holder = null
for(var/obj/effect/bmode/buildholder/H in buildmodeholders)
if(H.cl == user.client)
@@ -622,7 +620,6 @@ obj/effect/bmode/buildholder/New()
log_admin("[key_name(usr)] is throwing a [holder.throw_atom] at [object] - [formatJumpTo(RT)]")
/proc/easyTypeSelector()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/easyTypeSelector() called tick#: [world.time]")
var/chosen = null
var/list/matches = new()

View File

@@ -22,13 +22,11 @@
var/total_particles = 0
/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/expl_particles/proc/set_up() called tick#: [world.time]")
number = n
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/expl_particles/proc/start()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/expl_particles/proc/start() called tick#: [world.time]")
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
@@ -58,12 +56,10 @@
var/turf/location
/datum/effect/system/explosion/proc/set_up(loca)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/explosion/proc/set_up() called tick#: [world.time]")
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/explosion/proc/start()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/explosion/proc/start() called tick#: [world.time]")
new/obj/effect/explosion( location )
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)

View File

@@ -203,7 +203,6 @@ var/list/alldepartments = list("Central Command")
/proc/Centcomm_fax(var/obj/item/weapon/paper/sent, var/sentname, var/mob/Sender)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/Centcomm_fax() called tick#: [world.time]")
var/msg = "<span class='notice'><b><font color='orange'>CENTCOMM FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;CentcommFaxReply=\ref[Sender]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a></span>"
admins << msg
@@ -212,7 +211,6 @@ var/list/alldepartments = list("Central Command")
proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt)
//writepanic("[__FILE__].[__LINE__] \\/proc/SendFax() called tick#: [world.time]")
for(var/obj/machinery/faxmachine/F in allfaxes)

View File

@@ -117,12 +117,10 @@
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/food_riots)
proc/process_newscaster()
//writepanic("[__FILE__].[__LINE__] \\/proc/process_newscaster() called tick#: [world.time]")
check_for_newscaster_updates(ticker.mode.newscaster_announcements)
var/global/tmp/announced_news_types = list()
proc/check_for_newscaster_updates(type)
//writepanic("[__FILE__].[__LINE__] \\/proc/check_for_newscaster_updates() called tick#: [world.time]")
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))
@@ -131,7 +129,6 @@ proc/check_for_newscaster_updates(type)
proc/announce_newscaster_news(datum/news_announcement/news)
//writepanic("[__FILE__].[__LINE__] \\/proc/announce_newscaster_news() called tick#: [world.time]")
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author

View File

@@ -1,6 +1,5 @@
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons() called tick#: [world.time]")
if(my_atom.next_firetime > world.time)
usr << "<span class='warning'>Your weapons are recharging.</span>"
@@ -118,6 +117,5 @@
//set name = SPE.verb_name
//set desc = SPE.verb_desc
set src = usr.loc
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapon_system() called tick#: [world.time]")
SPE.fire_weapons()

View File

@@ -20,7 +20,6 @@
var/link_angle = 0
/obj/item/pod_parts/pod_frame/proc/find_square()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pod_parts/pod_frame/proc/find_square() called tick#: [world.time]")
/*
each part, in essence, stores the relative position of another part
you can find where this part should be by looking at the current direction of the current part and applying the link_angle
@@ -86,7 +85,6 @@
set name = "Rotate Frame"
set category = "Object"
set src in oview(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pod_parts/pod_frame/verb/rotate() called tick#: [world.time]")
if(anchored)
usr << "\The [src] is securely bolted!"
return 0

View File

@@ -49,7 +49,6 @@
equipment_system = new(src)
/obj/spacepod/proc/update_icons()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/update_icons() called tick#: [world.time]")
if(!pod_overlays)
pod_overlays = new/list(2)
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
@@ -69,7 +68,6 @@
deal_damage(P.damage)
/obj/spacepod/proc/deal_damage(var/damage)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/deal_damage() called tick#: [world.time]")
var/oldhealth = health
health = max(0, health - damage)
var/percentage = (health / initial(health)) * 100
@@ -225,7 +223,6 @@
set category = "Spacepod"
set src = usr.loc
set popup_menu = 0
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/toggle_internal_tank() called tick#: [world.time]")
if(usr!=src.occupant)
return
src.use_internal_tank = !src.use_internal_tank
@@ -233,7 +230,6 @@
return
/obj/spacepod/proc/add_cabin()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/add_cabin() called tick#: [world.time]")
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
@@ -242,12 +238,10 @@
return cabin_air
/obj/spacepod/proc/add_airtank()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/add_airtank() called tick#: [world.time]")
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank
/obj/spacepod/proc/get_turf_air()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/get_turf_air() called tick#: [world.time]")
var/turf/T = get_turf(src)
if(T)
. = T.return_air()
@@ -268,7 +262,6 @@
return get_turf_air()
/obj/spacepod/proc/return_pressure()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/return_pressure() called tick#: [world.time]")
. = 0
if(use_internal_tank)
. = cabin_air.return_pressure()
@@ -279,7 +272,6 @@
return
/obj/spacepod/proc/return_temperature()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/return_temperature() called tick#: [world.time]")
. = 0
if(use_internal_tank)
. = cabin_air.return_temperature()
@@ -290,7 +282,6 @@
return
/obj/spacepod/proc/moved_inside(var/mob/living/carbon/human/H as mob)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/moved_inside() called tick#: [world.time]")
if(H && H.client && H in range(1))
H.reset_view(src)
/*
@@ -317,7 +308,6 @@
set category = "Object"
set name = "Enter Pod"
set src in oview(1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/move_inside() called tick#: [world.time]")
if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || (usr.status_flags & FAKEDEATH)) //are you cuffed, dying, lying, stunned or other
return
@@ -352,7 +342,6 @@
set name = "Exit pod"
set category = "Spacepod"
set src = usr.loc
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/exit_pod() called tick#: [world.time]")
if(usr != src.occupant)
return
@@ -363,7 +352,6 @@
return
/obj/spacepod/proc/enter_after(delay as num, var/mob/user as mob, var/numticks = 5)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/enter_after() called tick#: [world.time]")
var/delayfraction = delay/numticks
var/turf/T = user.loc
@@ -423,7 +411,6 @@
if(dir && (oldloc != NewLoc))
src.loc.Entered(src, oldloc)
/obj/spacepod/proc/Process_Spacemove(var/check_drift = 0, mob/user)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/Process_Spacemove() called tick#: [world.time]")
var/dense_object = 0
if(!user)
for(var/direction in list(NORTH, NORTHEAST, EAST))

View File

@@ -50,7 +50,6 @@ atom/movable/RepelAirflowDest(n)
mob/var/tmp/last_airflow_stun = 0
mob/proc/airflow_stun()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\mob/proc/airflow_stun() called tick#: [world.time]")
if(stat == 2 || (flags & INVULNERABLE))
return 0
if(last_airflow_stun > world.time - zas_settings.Get(/datum/ZAS_Setting/airflow_stun_cooldown)) return 0
@@ -84,7 +83,6 @@ mob/living/carbon/human/airflow_stun()
return
atom/movable/proc/check_airflow_movable(n)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/movable/proc/check_airflow_movable() called tick#: [world.time]")
if(anchored && !ismob(src))
return 0
if(!istype(src,/obj/item) && n < zas_settings.Get(/datum/ZAS_Setting/airflow_dense_pressure))
@@ -122,7 +120,6 @@ obj/item/check_airflow_movable(n)
//Zones A and B are air zones. n represents the amount of air moved.
proc/Airflow(zone/A, zone/B)
//writepanic("[__FILE__].[__LINE__] \\/proc/Airflow() called tick#: [world.time]")
set background = 1
var/n = B.air.return_pressure() - A.air.return_pressure()
@@ -202,7 +199,6 @@ proc/Airflow(zone/A, zone/B)
spawn M.RepelAirflowDest(abs(n)/5)
proc/AirflowSpace(zone/A)
//writepanic("[__FILE__].[__LINE__] \\/proc/AirflowSpace() called tick#: [world.time]")
spawn()
//The space version of the Airflow(A,B,n) proc.
@@ -245,7 +241,6 @@ proc/AirflowSpace(zone/A)
// Mainly for bustanuts.
/atom/movable/proc/AirflowCanPush()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/AirflowCanPush() called tick#: [world.time]")
return 1
/mob/AirflowCanPush()
@@ -254,7 +249,6 @@ proc/AirflowSpace(zone/A)
return 1
/atom/movable/proc/GotoAirflowDest(n)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/GotoAirflowDest() called tick#: [world.time]")
last_airflow = world.time
if(airflow_dest == loc)
return
@@ -316,7 +310,6 @@ proc/AirflowSpace(zone/A)
/atom/movable/proc/RepelAirflowDest(n)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/RepelAirflowDest() called tick#: [world.time]")
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
@@ -380,7 +373,6 @@ proc/AirflowSpace(zone/A)
sound_override = 0
atom/movable/proc/airflow_hit(atom/A)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/movable/proc/airflow_hit() called tick#: [world.time]")
airflow_speed = 0
airflow_dest = null
@@ -432,7 +424,6 @@ mob/living/carbon/human/airflow_hit(atom/A)
. = ..()
zone/proc/movables()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/movables() called tick#: [world.time]")
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)

View File

@@ -1,5 +1,4 @@
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/CanPass() called tick#: [world.time]")
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
@@ -34,7 +33,6 @@
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
atom/proc/c_airblock(turf/other)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/c_airblock() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(other))
#endif

View File

@@ -76,35 +76,28 @@ Class Procs:
edge.add_connection(src)
/connection/proc/mark_direct()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_direct() called tick#: [world.time]")
state |= CONNECTION_DIRECT
//world << "Marked direct."
/connection/proc/mark_indirect()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_indirect() called tick#: [world.time]")
state &= ~CONNECTION_DIRECT
//world << "Marked indirect."
/connection/proc/mark_space()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_space() called tick#: [world.time]")
state |= CONNECTION_SPACE
/connection/proc/direct()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/direct() called tick#: [world.time]")
return (state & CONNECTION_DIRECT)
/connection/proc/valid()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/valid() called tick#: [world.time]")
return !(state & CONNECTION_INVALID)
/connection/proc/erase()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/erase() called tick#: [world.time]")
edge.remove_connection(src)
state |= CONNECTION_INVALID
//world << "Connection Erased: [state]"
/connection/proc/update()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/update() called tick#: [world.time]")
//world << "Updated, \..."
if(!istype(A,/turf/simulated))
//world << "Invalid A."

View File

@@ -68,30 +68,24 @@ Class Procs:
CRASH("Cannot make connection edge without specifications.")
/connection_edge/proc/add_connection(connection/c)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/add_connection() called tick#: [world.time]")
coefficient++
//world << "Connection added: [type] Coefficient: [coefficient]"
/connection_edge/proc/remove_connection(connection/c)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/remove_connection() called tick#: [world.time]")
//world << "Connection removed: [type] Coefficient: [coefficient-1]"
coefficient--
if(coefficient <= 0)
erase()
/connection_edge/proc/contains_zone(zone/Z)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/contains_zone() called tick#: [world.time]")
/connection_edge/proc/erase()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/erase() called tick#: [world.time]")
air_master.remove_edge(src)
//world << "[type] Erased."
/connection_edge/proc/tick()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/tick() called tick#: [world.time]")
/connection_edge/proc/flow(list/movable, differential, repelled, flipped = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/flow() called tick#: [world.time]")
//Flipped tells us if we are going from A to B or from B to A.
if(!zas_settings.Get(/datum/ZAS_Setting/airflow_push))
return
@@ -207,7 +201,6 @@ Class Procs:
//Helper proc to get connections for a zone.
/connection_edge/zone/proc/get_connected_zone(zone/from)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/zone/proc/get_connected_zone() called tick#: [world.time]")
if(A == from) return B
else return A
@@ -257,7 +250,6 @@ Class Procs:
var/list/sharing_lookup_table = list(0.30, 0.40, 0.48, 0.54, 0.60, 0.66)
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareRatio() called tick#: [world.time]")
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -337,7 +329,6 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
else return 0
proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareSpace() called tick#: [world.time]")
//A modified version of ShareRatio for spacing gas at the same rate as if it were going into a large airless room.
if(!unsimulated_tiles)
return 0
@@ -447,7 +438,6 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareHeat() called tick#: [world.time]")
//This implements a simplistic version of the Stefan-Boltzmann law.
var/energy_delta = ((A.temperature - B.temperature) ** 4) * 5.6704e-8 * connecting_tiles * 2.5
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))

View File

@@ -43,7 +43,6 @@ Class Procs:
#endif
/connection_manager/proc/get(d)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/get() called tick#: [world.time]")
switch(d)
if(NORTH)
if(check(N)) return N
@@ -68,7 +67,6 @@ Class Procs:
#endif
/connection_manager/proc/place(connection/c, d)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/place() called tick#: [world.time]")
switch(d)
if(NORTH) N = c
if(SOUTH) S = c
@@ -81,7 +79,6 @@ Class Procs:
#endif
/connection_manager/proc/update_all()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/update_all() called tick#: [world.time]")
if(check(N)) N.update()
if(check(S)) S.update()
if(check(E)) E.update()
@@ -92,7 +89,6 @@ Class Procs:
#endif
/connection_manager/proc/erase_all()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/erase_all() called tick#: [world.time]")
if(check(N)) N.erase()
if(check(S)) S.erase()
if(check(E)) E.erase()
@@ -103,5 +99,4 @@ Class Procs:
#endif
/connection_manager/proc/check(connection/c)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/check() called tick#: [world.time]")
return c && c.valid()

View File

@@ -95,7 +95,6 @@ Class Procs:
#ifndef ZASDBG
set background = 1
#endif
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Setup() called tick#: [world.time]")
world << "<span class='danger'>Processing Geometry...</span>"
sleep(-1)
@@ -125,7 +124,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifndef ZASDBG
set background = 1
#endif
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Start() called tick#: [world.time]")
while(1)
Tick()
@@ -133,7 +131,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
/datum/controller/air_system/proc/Tick()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Tick() called tick#: [world.time]")
. = 1 //Set the default return value, for runtime detection.
current_cycle++
@@ -202,17 +199,14 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
tick_progress = "success"
/datum/controller/air_system/proc/add_zone(zone/z)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/add_zone() called tick#: [world.time]")
zones.Add(z)
z.name = "Zone [next_id++]"
mark_zone_update(z)
/datum/controller/air_system/proc/remove_zone(zone/z)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/remove_zone() called tick#: [world.time]")
zones.Remove(z)
/datum/controller/air_system/proc/air_blocked(turf/A, turf/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/air_blocked() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(A))
ASSERT(isturf(B))
@@ -222,14 +216,12 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return ablock | B.c_airblock(A)
/datum/controller/air_system/proc/has_valid_zone(turf/simulated/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/has_valid_zone() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(T))
#endif
return istype(T) && T.zone && !T.zone.invalid
/datum/controller/air_system/proc/merge(zone/A, zone/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/merge() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(A))
ASSERT(istype(B))
@@ -245,7 +237,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
mark_zone_update(A)
/datum/controller/air_system/proc/connect(turf/simulated/A, turf/simulated/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/connect() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(A))
ASSERT(isturf(B))
@@ -287,7 +278,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
if(direct) c.mark_direct()
/datum/controller/air_system/proc/mark_for_update(turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/mark_for_update() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(T))
#endif
@@ -299,7 +289,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
T.needs_air_update = 1
/datum/controller/air_system/proc/mark_zone_update(zone/Z)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/mark_zone_update() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(Z))
#endif
@@ -308,12 +297,10 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
Z.needs_update = 1
/datum/controller/air_system/proc/equivalent_pressure(zone/A, zone/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/equivalent_pressure() called tick#: [world.time]")
return A.air.compare(B.air)
/datum/controller/air_system/proc/get_edge(zone/A, zone/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/get_edge() called tick#: [world.time]")
if(istype(B))
for(var/connection_edge/zone/edge in A.edges)
@@ -329,7 +316,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return edge
/datum/controller/air_system/proc/has_same_air(turf/A, turf/B)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/has_same_air() called tick#: [world.time]")
if(A.oxygen != B.oxygen) return 0
if(A.nitrogen != B.nitrogen) return 0
if(A.toxins != B.toxins) return 0
@@ -338,5 +324,4 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return 1
/datum/controller/air_system/proc/remove_edge(connection/c)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/remove_edge() called tick#: [world.time]")
edges.Remove(c)

View File

@@ -11,12 +11,10 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")
/turf/var/tmp/dbg_img
/turf/proc/dbg(image/img, d = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/dbg() called tick#: [world.time]")
if(d > 0) img.dir = d
overlays -= dbg_img
overlays += img
dbg_img = img
proc/soft_assert(thing,fail)
//writepanic("[__FILE__].[__LINE__] \\/proc/soft_assert() called tick#: [world.time]")
if(!thing) message_admins(fail)

View File

@@ -1,7 +1,6 @@
client/proc/ZoneTick()
set category = "Debug"
set name = "Process Atmos"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/ZoneTick() called tick#: [world.time]")
var/result = air_master.Tick()
if(result)
@@ -13,7 +12,6 @@ client/proc/ZoneTick()
client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/Zone_Info() called tick#: [world.time]")
if(T)
if(istype(T,/turf/simulated) && T:zone)
T:zone:dbg_data(src)
@@ -32,7 +30,6 @@ client/var/list/zone_debug_images
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/Test_ZAS_Connection() called tick#: [world.time]")
if(!istype(T))
return
@@ -89,7 +86,6 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
/*zone/proc/DebugDisplay(client/client)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/DebugDisplay() called tick#: [world.time]")
if(!istype(client))
return
@@ -156,7 +152,6 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
/*client/proc/TestZASRebuild()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/client/proc/TestZASRebuild() called tick#: [world.time]")
set category = "Debug"
// var/turf/turf = get_turf(mob)
var/zone/current_zone = mob.loc:zone
@@ -238,7 +233,6 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
/* VG - We rolled our own.
client/proc/ZASSettings()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/ZASSettings() called tick#: [world.time]")
set category = "Debug"
vsc.SetDefault(mob)

View File

@@ -24,31 +24,26 @@ Attach to transfer valve and open. BOOM.
var/volatility = BASE_ZAS_FUEL_REQ //the lower this is, the easier it burns with low fuel in it. Starts at the define value
/atom/proc/getFireFuel()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/getFireFuel() called tick#: [world.time]")
return fire_fuel
/atom/proc/burnFireFuel(var/used_fuel_ratio,var/used_reactants_ratio)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/burnFireFuel() called tick#: [world.time]")
fire_fuel -= (fire_fuel * used_fuel_ratio * used_reactants_ratio) //* 5
if(fire_fuel<=0.1)
//testing("[src] ashifying (BFF)!")
ashify()
/atom/proc/ashify()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/ashify() called tick#: [world.time]")
if(!on_fire)
return
new ashtype(src.loc)
qdel(src)
/atom/proc/extinguish()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/extinguish() called tick#: [world.time]")
on_fire=0
if(fire_overlay)
overlays -= fire_overlay
/atom/proc/ignite(var/temperature)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/ignite() called tick#: [world.time]")
on_fire=1
//visible_message("\The [src] bursts into flame!")
if(fire_dmi && fire_sprite)
@@ -56,15 +51,12 @@ Attach to transfer valve and open. BOOM.
overlays += fire_overlay
/atom/proc/melt()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/melt() called tick#: [world.time]")
return //lolidk
/atom/proc/solidify()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/solidify() called tick#: [world.time]")
return //lolidk
/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/fire_act() called tick#: [world.time]")
if(autoignition_temperature && !on_fire && exposed_temperature > autoignition_temperature)
ignite(exposed_temperature)
return 1
@@ -89,7 +81,6 @@ Attach to transfer valve and open. BOOM.
return 0
/turf/proc/hotspot_expose(var/exposed_temperature, var/exposed_volume, var/soh = 0, var/surfaces=0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/hotspot_expose() called tick#: [world.time]")
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh, surfaces)
var/obj/effect/effect/foam/fire/W = locate() in contents
@@ -114,7 +105,6 @@ Attach to transfer valve and open. BOOM.
// ignite_temp: 0 = Don't check, just get fuel.
/turf/simulated/proc/getAmtFuel(var/ignite_temp=0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/getAmtFuel() called tick#: [world.time]")
var/fuel_found=0
if(!ignite_temp || src.autoignition_temperature<ignite_temp)
fuel_found += src.getFireFuel()
@@ -139,7 +129,6 @@ Attach to transfer valve and open. BOOM.
light_color = LIGHT_COLOR_FIRE
/obj/fire/proc/Extinguish()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/fire/proc/Extinguish() called tick#: [world.time]")
var/turf/simulated/S=loc
if(istype(S))
@@ -265,13 +254,11 @@ Attach to transfer valve and open. BOOM.
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
turf/proc/apply_fire_protection()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/apply_fire_protection() called tick#: [world.time]")
turf/simulated/apply_fire_protection()
fire_protection = world.time
datum/gas_mixture/proc/zburn(var/turf/T, force_burn)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datum/gas_mixture/proc/zburn() called tick#: [world.time]")
// NOTE: zburn is also called from canisters and in tanks/pipes (via react()). Do NOT assume T is always a turf.
// In the aforementioned cases, it's null. - N3X.
var/value = 0
@@ -343,7 +330,6 @@ datum/gas_mixture/proc/zburn(var/turf/T, force_burn)
return value
/datum/gas_mixture/proc/check_recombustability(var/turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_recombustability() called tick#: [world.time]")
//this is a copy proc to continue a fire after its been started.
var/datum/gas/volatile_fuel/fuel = locate() in trace_gases
@@ -383,7 +369,6 @@ datum/gas_mixture/proc/zburn(var/turf/T, force_burn)
return still_burning
datum/gas_mixture/proc/check_combustability(var/turf/T, var/objects)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datum/gas_mixture/proc/check_combustability() called tick#: [world.time]")
//this check comes up very often and is thus centralized here to ease adding stuff
// zburn is used in tank fires, as well. This check, among others, broke tankbombs. - N3X
/*
@@ -410,7 +395,6 @@ datum/gas_mixture/proc/check_combustability(var/turf/T, var/objects)
return 0
datum/gas_mixture/proc/calculate_firelevel(var/turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datum/gas_mixture/proc/calculate_firelevel() called tick#: [world.time]")
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
var/datum/gas/volatile_fuel/fuel = locate() in trace_gases
@@ -446,7 +430,6 @@ datum/gas_mixture/proc/calculate_firelevel(var/turf/T)
/mob/living/proc/FireBurn(var/firelevel, var/last_temperature, var/pressure)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/proc/FireBurn() called tick#: [world.time]")
var/mx = 5 * firelevel/zas_settings.Get(/datum/ZAS_Setting/fire_firelevel_multiplier) * min(pressure / ONE_ATMOSPHERE, 1)
apply_damage(2.5*mx, BURN)

View File

@@ -4,7 +4,6 @@
//Floods outward from an initial turf to fill everywhere it's zone would reach.
proc/FloodFill(turf/simulated/start)
//writepanic("[__FILE__].[__LINE__] \\/proc/FloodFill() called tick#: [world.time]")
if(!istype(start))
return list()
@@ -79,7 +78,6 @@ proc/FloodFill(turf/simulated/start)
//Procedure to merge two zones together.
proc/ZMerge(zone/A,zone/B)
//writepanic("[__FILE__].[__LINE__] \\/proc/ZMerge() called tick#: [world.time]")
//Sanity~
if(!istype(A) || !istype(B))
@@ -144,7 +142,6 @@ proc/ZMerge(zone/A,zone/B)
//Connects two zones by forming a connection object representing turfs A and B.
proc/ZConnect(turf/simulated/A,turf/simulated/B)
//writepanic("[__FILE__].[__LINE__] \\/proc/ZConnect() called tick#: [world.time]")
//Make sure that if it's space, it gets added to unsimulated_tiles instead.
if(!istype(B) || iscatwalk(B))

View File

@@ -247,7 +247,6 @@ var/global/ZAS_Settings/zas_settings = new
Load()
/ZAS_Settings/proc/Save()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/Save() called tick#: [world.time]")
var/F = file("config/ZAS.txt")
fdel(F)
for(var/id in src.settings)
@@ -258,7 +257,6 @@ var/global/ZAS_Settings/zas_settings = new
F << ""
/ZAS_Settings/proc/Load()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/Load() called tick#: [world.time]")
for(var/t in file2list("config/ZAS.txt"))
if(!t) continue
@@ -285,12 +283,10 @@ var/global/ZAS_Settings/zas_settings = new
// INTERNAL USE ONLY
/ZAS_Settings/proc/idfrompath(const/path)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/idfrompath() called tick#: [world.time]")
return copytext(path, rfindtext(path, "/") + 1)
// INTERNAL USE ONLY
/ZAS_Settings/proc/ChangeSetting(var/user,var/id)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/ChangeSetting() called tick#: [world.time]")
var/datum/ZAS_Setting/setting = src.settings["[id]"]
var/displayedValue=""
switch(setting.valtype)
@@ -330,13 +326,11 @@ var/global/ZAS_Settings/zas_settings = new
* @param value The value that the setting should be set to.
*/
/ZAS_Settings/proc/Set(var/id, var/value)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/Set() called tick#: [world.time]")
var/datum/ZAS_Setting/setting = src.settings["[id]"]
setting.value=value
// INTERNAL USE ONLY
/ZAS_Settings/proc/SetFromConfig(var/id, var/value)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/SetFromConfig() called tick#: [world.time]")
var/datum/ZAS_Setting/setting = src.settings["[id]"]
switch(setting.valtype)
if(ZAS_TYPE_NUMERIC)
@@ -367,7 +361,6 @@ var/global/ZAS_Settings/zas_settings = new
* @returns Value of the desired setting
*/
/ZAS_Settings/proc/Get(var/id)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/Get() called tick#: [world.time]")
if(ispath(id))
id="[id]"
var/datum/ZAS_Setting/setting = src.settings[id]
@@ -376,7 +369,6 @@ var/global/ZAS_Settings/zas_settings = new
return setting.value
/ZAS_Settings/proc/ChangeSettingsDialog(mob/user)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/ChangeSettingsDialog() called tick#: [world.time]")
var/dat = {"
<html>
<head>
@@ -422,7 +414,6 @@ a { color: white; }
message_admins("[key_name(usr)] reloaded ZAS settings from disk.")
/ZAS_Settings/proc/SetDefault(var/mob/user)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/ZAS_Settings/proc/SetDefault() called tick#: [world.time]")
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!", "ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
if(!def)

View File

@@ -4,7 +4,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
var/contaminated = 0
/obj/item/proc/can_contaminate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/proc/can_contaminate() called tick#: [world.time]")
// clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD)
return 0
@@ -14,7 +13,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
return 1
/obj/item/proc/contaminate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/proc/contaminate() called tick#: [world.time]")
// do a contamination overlay?
// temporary measure to keep contamination less deadly than it was.
if(!contaminated)
@@ -22,12 +20,10 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
overlays.Add(contamination_overlay)
/obj/item/proc/decontaminate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/proc/decontaminate() called tick#: [world.time]")
contaminated = 0
overlays.Remove(contamination_overlay)
/mob/proc/contaminate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/contaminate() called tick#: [world.time]")
/mob/living/carbon/human/contaminate()
//See if anything can be contaminated.
@@ -43,7 +39,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
// back.contaminate()
/mob/proc/pl_effects()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/pl_effects() called tick#: [world.time]")
/mob/living/carbon/human/pl_effects()
//Handles all the bad things plasma can do.
@@ -82,7 +77,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
/mob/living/carbon/human/proc/burn_eyes()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/burn_eyes() called tick#: [world.time]")
//The proc that handles eye burning.
if(!species.has_organ["eyes"])
return
@@ -96,7 +90,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
eye_blind += 20
/mob/living/carbon/human/proc/pl_head_protected()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/pl_head_protected() called tick#: [world.time]")
//Checks if the head is adequately sealed.
if(head)
if(zas_settings.Get(/datum/ZAS_Setting/PLASMAGUARD_ONLY))
@@ -107,7 +100,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
return 0
/mob/living/carbon/human/proc/pl_suit_protected()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/pl_suit_protected() called tick#: [world.time]")
//Checks if the suit is adequately sealed.
if(wear_suit)
if(zas_settings.Get(/datum/ZAS_Setting/PLASMAGUARD_ONLY))
@@ -117,7 +109,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
return 0
/mob/living/carbon/human/proc/suit_contamination()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/suit_contamination() called tick#: [world.time]")
//Runs over the things that can be contaminated and does so.
if(w_uniform) w_uniform.contaminate()
if(shoes) shoes.contaminate()

View File

@@ -6,7 +6,6 @@
/turf/var/datum/gas_mixture/air
/turf/simulated/proc/set_graphic(const/newGraphics)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/set_graphic() called tick#: [world.time]")
if (!isnum(newGraphics))
return
@@ -34,7 +33,6 @@
gasGraphics = overlayGraphics.Copy()
/turf/proc/update_air_properties()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/update_air_properties() called tick#: [world.time]")
var/block = c_airblock(src)
if(block & AIR_BLOCKED)
//dbg(blocked)
@@ -199,7 +197,6 @@
air_master.connect(src, T)
/turf/proc/post_update_air_properties()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/post_update_air_properties() called tick#: [world.time]")
if(connections) connections.update_all()
/turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
@@ -258,7 +255,6 @@
return air
/turf/proc/make_air()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/make_air() called tick#: [world.time]")
air = new/datum/gas_mixture
air.temperature = temperature
air.adjust(oxygen, carbon_dioxide, nitrogen, toxins)
@@ -266,7 +262,6 @@
air.volume = CELL_VOLUME
/turf/simulated/proc/c_copy_air()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/c_copy_air() called tick#: [world.time]")
if(!air) air = new/datum/gas_mixture
air.copy_from(zone.air)
air.group_multiplier = 1

View File

@@ -100,7 +100,6 @@ vs_control
settings -= "plc"
proc/ChangeSettingsDialog(mob/user,list/L)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/ChangeSettingsDialog() called tick#: [world.time]")
//var/which = input(user,"Choose a setting:") in L
var/dat = ""
for(var/ch in L)
@@ -123,7 +122,6 @@ vs_control
if("changevar" in href_list)
ChangeSetting(usr,href_list["changevar"])
proc/ChangeSetting(mob/user,ch)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/ChangeSetting() called tick#: [world.time]")
var/vw
var/how = "Text"
var/display_description = ch
@@ -179,7 +177,6 @@ vs_control
else
ChangeSettingsDialog(user,settings)
proc/RandomizeWithProbability()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RandomizeWithProbability() called tick#: [world.time]")
for(var/V in settings)
var/newvalue
if("[V]_RANDOM" in vars)
@@ -192,12 +189,10 @@ vs_control
V = newvalue
proc/ChangePlasma()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/ChangePlasma() called tick#: [world.time]")
for(var/V in plc.settings)
plc.Randomize(V)
proc/SetDefault(var/mob/user)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/SetDefault() called tick#: [world.time]")
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
@@ -319,7 +314,6 @@ pl_control
settings -= "settings"
proc/Randomize(V)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/Randomize() called tick#: [world.time]")
var/newvalue
if("[V]_RANDOM" in vars)
if(isnum(vars["[V]_RANDOM"]))

View File

@@ -22,7 +22,6 @@
// For new turfs
/turf/proc/copy_air_from(var/turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/copy_air_from() called tick#: [world.time]")
oxygen = T.oxygen
carbon_dioxide = T.carbon_dioxide
nitrogen = T.nitrogen
@@ -53,7 +52,6 @@
/turf/simulated/var/tmp/was_icy=0
/turf/simulated/proc/update_visuals()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/update_visuals() called tick#: [world.time]")
overlays = 0
if(decals.len)
@@ -189,7 +187,6 @@
return ..()
/turf/simulated/proc/update_air_properties()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/update_air_properties() called tick#: [world.time]")
if(iscatwalk(src))
return ..()
var/air_directions_archived = air_check_directions
@@ -331,7 +328,6 @@
return 1
/turf/proc/HasDoor(turf/O)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/HasDoor() called tick#: [world.time]")
//Checks for the presence of doors, used for zone spreading and connection.
//A positive numerical argument checks only for closed doors.
//Another turf as an argument checks for windoors between here and there.
@@ -347,7 +343,6 @@
return 1
/turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/ZCanPass() called tick#: [world.time]")
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(!istype(T))
return 0
@@ -373,7 +368,6 @@
return 1
/turf/proc/ZAirPass(turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/ZAirPass() called tick#: [world.time]")
//Fairly standard pass checks for turfs, objects and directional windows.
if(!istype(T))
return 0
@@ -397,7 +391,6 @@
/*UNUSED
/turf/proc/check_connections()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/check_connections() called tick#: [world.time]")
//Checks for new connections that can be made.
for(var/d in cardinal)
var/turf/simulated/T = get_step(src,d)
@@ -407,7 +400,6 @@
ZConnect(src,T)
/turf/proc/check_for_space()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/check_for_space() called tick#: [world.time]")
//Checks for space around the turf.
for(var/d in cardinal)
var/turf/T = get_step(src,d)

View File

@@ -67,7 +67,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
//Handles deletion via garbage collection.
/zone/proc/SoftDelete()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/SoftDelete() called tick#: [world.time]")
zones.Remove(src)
air = null
@@ -91,7 +90,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
//ZONE MANAGEMENT FUNCTIONS
/zone/proc/AddTurf(turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/AddTurf() called tick#: [world.time]")
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
if(istype(T, /turf/simulated) && !iscatwalk(T))
if(T in contents)
@@ -111,7 +109,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
contents -= T
/zone/proc/RemoveTurf(turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/RemoveTurf() called tick#: [world.time]")
//Same, but in reverse.
if(istype(T, /turf/simulated))
if(!(T in contents))
@@ -133,7 +130,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
#define QUANTIZE(variable) (round(variable,0.0001))
/zone/proc/process()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/process() called tick#: [world.time]")
. = 1
progress = "problem with: SoftDelete()"
@@ -289,7 +285,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
var/list/sharing_lookup_table = list(0.30, 0.40, 0.48, 0.54, 0.60, 0.66)
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareRatio() called tick#: [world.time]")
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -359,7 +354,6 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
else return 0
proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareSpace() called tick#: [world.time]")
//A modified version of ShareRatio for spacing gas at the same rate as if it were going into a large airless room.
if(!unsimulated_tiles || !unsimulated_tiles.len)
return 0
@@ -439,7 +433,6 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//writepanic("[__FILE__].[__LINE__] \\/proc/ShareHeat() called tick#: [world.time]")
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -469,7 +462,6 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
///////////////////
zone/proc/Rebuild()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/Rebuild() called tick#: [world.time]")
//Choose a random turf and regenerate the zone from it.
var
turf/simulated/sample = locate() in contents
@@ -548,7 +540,6 @@ zone/proc/Rebuild()
//UNUSED
/*
zone/proc/connected_zones()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/connected_zones() called tick#: [world.time]")
//A legacy proc for getting connected zones.
. = list()
for(var/connection/C in connections)

View File

@@ -55,7 +55,6 @@ Class Procs:
air.volume = CELL_VOLUME
/zone/proc/add(turf/simulated/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/add() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(!invalid)
ASSERT(istype(T))
@@ -69,7 +68,6 @@ Class Procs:
T.set_graphic(air.graphics)
/zone/proc/remove(turf/simulated/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/remove() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(!invalid)
ASSERT(istype(T))
@@ -85,7 +83,6 @@ Class Procs:
c_invalidate()
/zone/proc/c_merge(zone/into)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/c_merge() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(!invalid)
ASSERT(istype(into))
@@ -100,7 +97,6 @@ Class Procs:
#endif
/zone/proc/c_invalidate()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/c_invalidate() called tick#: [world.time]")
invalid = 1
air_master.remove_zone(src)
#ifdef ZASDBG
@@ -109,7 +105,6 @@ Class Procs:
#endif
/zone/proc/rebuild()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/rebuild() called tick#: [world.time]")
if(invalid) return //Short circuit for explosions where rebuild is called many times over.
c_invalidate()
for(var/turf/simulated/T in contents)
@@ -118,7 +113,6 @@ Class Procs:
air_master.mark_for_update(T)
/zone/proc/add_tile_air(datum/gas_mixture/tile_air)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/add_tile_air() called tick#: [world.time]")
//air.volume += CELL_VOLUME
air.group_multiplier = 1
air.multiply(contents.len)
@@ -127,14 +121,12 @@ Class Procs:
air.group_multiplier = contents.len+1
/zone/proc/tick()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/tick() called tick#: [world.time]")
air.archive()
if(air.check_tile_graphic())
for(var/turf/simulated/T in contents)
T.set_graphic(air.graphics)
/zone/proc/dbg_data(mob/M)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/dbg_data() called tick#: [world.time]")
M << name
M << "O2: [air.oxygen] N2: [air.nitrogen] CO2: [air.carbon_dioxide] P: [air.toxins]"
M << "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]<5D>K ([air.temperature - T0C]<5D>C)"

View File

@@ -25,7 +25,6 @@ What are the archived variables for?
// END VGSHIT
/hook/startup/proc/createGasOverlays()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/hook/startup/proc/createGasOverlays() called tick#: [world.time]")
plmaster = new /obj/effect/overlay()
plmaster.icon = 'icons/effects/tile_effects.dmi'
plmaster.icon_state = "plasma"
@@ -94,7 +93,6 @@ What are the archived variables for?
//Call it with negative numbers to remove gases.
/datum/gas_mixture/proc/adjust(o2 = 0, co2 = 0, n2 = 0, tx = 0, list/datum/gas/traces = list())
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/adjust() called tick#: [world.time]")
//Purpose: Adjusting the gases within a airmix
//Called by: Nothing, yet!
//Inputs: The values of the gases to adjust
@@ -117,7 +115,6 @@ What are the archived variables for?
//Takes a gas string, and the amount of moles to adjust by. Calls update_values() if update isn't 0.
/datum/gas_mixture/proc/adjust_gas(gasid, moles, update = 1)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/adjust_gas() called tick#: [world.time]")
if(moles == 0)
return
switch(gasid)
@@ -148,24 +145,20 @@ What are the archived variables for?
/*
/datum/gas_mixture/proc/create_reagents(var/max_vol)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/create_reagents() called tick#: [world.time]")
aerosols = new /datum/reagents(max_vol)
aerosols.my_atom = src
*/
//tg seems to like using these a lot
/datum/gas_mixture/proc/return_temperature()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/return_temperature() called tick#: [world.time]")
return temperature
/datum/gas_mixture/proc/return_volume()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/return_volume() called tick#: [world.time]")
return max(0, volume)
/datum/gas_mixture/proc/thermal_energy()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/thermal_energy() called tick#: [world.time]")
return temperature*heat_capacity()
///////////////////////////////
@@ -173,7 +166,6 @@ What are the archived variables for?
///////////////////////////////
/datum/gas_mixture/proc/heat_capacity()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/heat_capacity() called tick#: [world.time]")
//Purpose: Returning the heat capacity of the gas mix
//Called by: UNKNOWN
//Inputs: None
@@ -188,7 +180,6 @@ What are the archived variables for?
return max(MINIMUM_HEAT_CAPACITY,heat_capacity)
/datum/gas_mixture/proc/heat_capacity_archived()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/heat_capacity_archived() called tick#: [world.time]")
//Purpose: Returning the archived heat capacity of the gas mix
//Called by: UNKNOWN
//Inputs: None
@@ -203,7 +194,6 @@ What are the archived variables for?
return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived)
/datum/gas_mixture/proc/total_moles()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/total_moles() called tick#: [world.time]")
return total_moles
/*var/moles = oxygen + carbon_dioxide + nitrogen + toxins
@@ -213,7 +203,6 @@ What are the archived variables for?
return moles*/
/datum/gas_mixture/proc/return_pressure()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/return_pressure() called tick#: [world.time]")
//Purpose: Calculating Current Pressure
//Called by:
//Inputs: None
@@ -221,7 +210,6 @@ What are the archived variables for?
return pressure
// proc/return_temperature()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\// proc/return_temperature() called tick#: [world.time]")
//Purpose:
//Inputs:
//Outputs:
@@ -229,7 +217,6 @@ What are the archived variables for?
// return temperature
// proc/return_volume()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\// proc/return_volume() called tick#: [world.time]")
//Purpose:
//Inputs:
//Outputs:
@@ -237,7 +224,6 @@ What are the archived variables for?
// return max(0, volume)
// proc/thermal_energy()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\// proc/thermal_energy() called tick#: [world.time]")
//Purpose:
//Inputs:
//Outputs:
@@ -245,7 +231,6 @@ What are the archived variables for?
// return temperature*heat_capacity()
/datum/gas_mixture/proc/update_values()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/update_values() called tick#: [world.time]")
//Purpose: Calculating and storing values which were normally called CONSTANTLY
//Called by: Anything that changes values within a gas mix.
//Inputs: None
@@ -274,7 +259,6 @@ What are the archived variables for?
////////////////////////////////////////////
/datum/gas_mixture/proc/check_tile_graphic()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_tile_graphic() called tick#: [world.time]")
//Purpose: Calculating the graphic for a tile
//Called by: Turfs updating
//Inputs: None
@@ -305,7 +289,6 @@ What are the archived variables for?
return graphics != graphics_archived
/datum/gas_mixture/proc/react(atom/dump_location)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/react() called tick#: [world.time]")
//Purpose: Calculating if it is possible for a fire to occur in the airmix
//Called by: Air mixes updating?
//Inputs: None
@@ -316,7 +299,6 @@ What are the archived variables for?
return zburn(null) // ? (was: return reacting)
/datum/gas_mixture/proc/fire()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/fire() called tick#: [world.time]")
//Purpose: Calculating any fire reactions.
//Called by: react() (See above)
//Inputs: None
@@ -383,7 +365,6 @@ What are the archived variables for?
/datum/gas_mixture/proc/archive()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/archive() called tick#: [world.time]")
//Purpose: Archives the current gas values
//Called by: UNKNOWN
//Inputs: None
@@ -405,7 +386,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/check_then_merge(datum/gas_mixture/giver)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_then_merge() called tick#: [world.time]")
//Purpose: Similar to merge(...) but first checks to see if the amount of air assumed is small enough
// that group processing is still accurate for source (aborts if not)
//Called by: airgroups/machinery expelling air, ?
@@ -431,7 +411,6 @@ What are the archived variables for?
return merge(giver)
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/merge() called tick#: [world.time]")
//Purpose: Merges all air from giver into self. Deletes giver.
//Called by: Machinery expelling air, check_then_merge, ?
//Inputs: The gas to merge.
@@ -476,7 +455,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/remove(amount)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/remove() called tick#: [world.time]")
//Purpose: Removes a certain number of moles from the air.
//Called by: ?
//Inputs: How many moles to remove.
@@ -523,7 +501,6 @@ What are the archived variables for?
return removed
/datum/gas_mixture/proc/remove_ratio(ratio)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/remove_ratio() called tick#: [world.time]")
//Purpose: Removes a certain ratio of the air.
//Called by: ?
//Inputs: Percentage to remove.
@@ -561,7 +538,6 @@ What are the archived variables for?
return removed
/datum/gas_mixture/proc/check_then_remove(amount)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_then_remove() called tick#: [world.time]")
//Purpose: Similar to remove(...) but first checks to see if the amount of air removed is small enough
// that group processing is still accurate for source (aborts if not)
//Called by: ?
@@ -576,7 +552,6 @@ What are the archived variables for?
return remove(amount)
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/copy_from() called tick#: [world.time]")
//Purpose: Duplicates the sample air mixture.
//Called by: airgroups splitting, ?
//Inputs: Gas to copy
@@ -601,7 +576,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/check_gas_mixture(datum/gas_mixture/sharer)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_gas_mixture() called tick#: [world.time]")
//Purpose: Telling if one or both airgroups needs to disable group processing.
//Called by: Airgroups sharing air, checking if group processing needs disabled.
//Inputs: Gas to compare from other airgroup
@@ -662,7 +636,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/check_turf(turf/model)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_turf() called tick#: [world.time]")
//Purpose: Used to compare the gases in an unsimulated turf with the gas in a simulated one.
//Called by: Sharing air (mimicing) with adjacent unsimulated turfs
//Inputs: Unsimulated turf
@@ -691,7 +664,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/share() called tick#: [world.time]")
//Purpose: Used to transfer gas from a more pressurised tile to a less presurised tile
// (Two directional, if the other tile is more pressurised, air travels to current tile)
//Called by: Sharing air with adjacent simulated turfs
@@ -843,7 +815,6 @@ What are the archived variables for?
return 0
/datum/gas_mixture/proc/mimic(turf/model, border_multiplier)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/mimic() called tick#: [world.time]")
//Purpose: Used transfer gas from a more pressurised tile to a less presurised unsimulated tile.
//Called by: "sharing" from unsimulated to simulated turfs.
//Inputs: Unsimulated turf, Multiplier for gas transfer (optional)
@@ -927,7 +898,6 @@ What are the archived variables for?
return 0
/datum/gas_mixture/proc/check_both_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_both_then_temperature_share() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
var/self_heat_capacity = heat_capacity_archived()
@@ -960,7 +930,6 @@ What are the archived variables for?
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
/datum/gas_mixture/proc/check_me_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_me_then_temperature_share() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
var/self_heat_capacity = heat_capacity_archived()
@@ -989,7 +958,6 @@ What are the archived variables for?
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
/datum/gas_mixture/proc/check_me_then_temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_me_then_temperature_turf_share() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature)
var/self_temperature_delta = 0
@@ -1018,7 +986,6 @@ What are the archived variables for?
//Logic integrated from: temperature_turf_share(sharer, conduction_coefficient) for efficiency
/datum/gas_mixture/proc/check_me_then_temperature_mimic(turf/model, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/check_me_then_temperature_mimic() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - model.temperature)
var/self_temperature_delta = 0
@@ -1041,7 +1008,6 @@ What are the archived variables for?
//Logic integrated from: temperature_mimic(model, conduction_coefficient) for efficiency
/datum/gas_mixture/proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/temperature_share() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity_archived()
@@ -1058,7 +1024,6 @@ What are the archived variables for?
sharer.temperature += heat/(sharer_heat_capacity*sharer.group_multiplier)
/datum/gas_mixture/proc/temperature_mimic(turf/model, conduction_coefficient, border_multiplier)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/temperature_mimic() called tick#: [world.time]")
var/delta_temperature = (temperature - model.temperature)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity()//_archived()
@@ -1076,7 +1041,6 @@ What are the archived variables for?
temperature -= heat/(self_heat_capacity*group_multiplier)
/datum/gas_mixture/proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/temperature_turf_share() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity()
@@ -1089,7 +1053,6 @@ What are the archived variables for?
sharer.temperature += heat/sharer.heat_capacity
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/compare() called tick#: [world.time]")
//Purpose: Compares sample to self to see if within acceptable ranges that group processing may be enabled
//Called by: Airgroups trying to rebuild
//Inputs: Gas mix to compare
@@ -1142,7 +1105,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/add(datum/gas_mixture/right_side)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/add() called tick#: [world.time]")
if(!right_side)
return 0
oxygen += right_side.oxygen
@@ -1162,7 +1124,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/subtract(datum/gas_mixture/right_side)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/subtract() called tick#: [world.time]")
//Purpose: Subtracts right_side from air_mixture. Used to help turfs mingle
//Called by: Pipelines ending in a break (or something)
//Inputs: Gas mix to remove
@@ -1183,7 +1144,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/multiply(factor)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/multiply() called tick#: [world.time]")
oxygen *= factor
carbon_dioxide *= factor
nitrogen *= factor
@@ -1197,7 +1157,6 @@ What are the archived variables for?
return 1
/datum/gas_mixture/proc/divide(factor)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/gas_mixture/proc/divide() called tick#: [world.time]")
oxygen /= factor
carbon_dioxide /= factor
nitrogen /= factor

View File

@@ -1,40 +1,30 @@
/proc/cmp_numeric_dsc(a,b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_numeric_dsc() called tick#: [world.time]")
return b - a
/proc/cmp_numeric_asc(a,b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_numeric_asc() called tick#: [world.time]")
return a - b
/proc/cmp_text_asc(a,b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_text_asc() called tick#: [world.time]")
return sorttext(b,a)
/proc/cmp_text_dsc(a,b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_text_dsc() called tick#: [world.time]")
return sorttext(a,b)
/proc/cmp_name_asc(atom/a, atom/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_name_asc() called tick#: [world.time]")
return sorttext(b.name, a.name)
/proc/cmp_name_dsc(atom/a, atom/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_name_dsc() called tick#: [world.time]")
return sorttext(a.name, b.name)
var/cmp_field = "name"
/proc/cmp_records_asc(datum/data/record/a, datum/data/record/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_records_asc() called tick#: [world.time]")
return sorttext((b ? b.fields[cmp_field] : ""), (a ? a.fields[cmp_field] : a))
/proc/cmp_records_dsc(datum/data/record/a, datum/data/record/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_records_dsc() called tick#: [world.time]")
return sorttext(a.fields[cmp_field], b.fields[cmp_field])
/proc/cmp_ckey_asc(client/a, client/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_ckey_asc() called tick#: [world.time]")
return sorttext(b.ckey, a.ckey)
/proc/cmp_ckey_dsc(client/a, client/b)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/cmp_ckey_dsc() called tick#: [world.time]")
return sorttext(a.ckey, b.ckey)

View File

@@ -1,7 +1,6 @@
//checks if a file exists and contains text
//returns text as a string if these conditions are met
/proc/return_file_text(filename)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/return_file_text() called tick#: [world.time]")
if(fexists(filename) == 0)
error("File not found ([filename])")
return
@@ -14,7 +13,6 @@
return text
/proc/get_maps(root="maps/voting/")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_maps() called tick#: [world.time]")
var/list/maps = list()
var/recursion_limit = 20 //lots of maps waiting to be played, feels like TF2
//Get our potential maps
@@ -42,12 +40,10 @@
//Sends resource files to client cache
/client/proc/getFiles()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/proc/getFiles() called tick#: [world.time]")
for(var/file in args)
src << browse_rsc(file)
/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list(".txt",".log",".htm", ".csv"))
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/proc/browse_files() called tick#: [world.time]")
var/path = root
for(var/i=0, i<max_iterations, i++)
@@ -81,7 +77,6 @@
PLEASE USE RESPONSIBLY, Some log files canr each sizes of 4MB! */
/client/proc/file_spam_check()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/proc/file_spam_check() called tick#: [world.time]")
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
src << "<font color='red'>Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.</font>"

View File

@@ -1,5 +1,4 @@
/proc/dopage(src,target)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dopage() called tick#: [world.time]")
var/href_list
var/href
href_list = params2list("src=\ref[src]&[target]=1")
@@ -9,7 +8,6 @@
return null
/proc/get_area(const/atom/O)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area() called tick#: [world.time]")
if (isnull(O))
return
@@ -25,21 +23,18 @@
return
/proc/get_area_master(const/O)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_master() called tick#: [world.time]")
var/area/A = get_area(O)
if(isarea(A))
return A
/proc/get_area_name(N) //get area by its name
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_name() called tick#: [world.time]")
for(var/area/A in areas)
if(A.name == N)
return A
return 0
/proc/in_range(source, user)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/in_range() called tick#: [world.time]")
if(get_dist(source, user) <= 1)
return 1
@@ -48,7 +43,6 @@
// Like view but bypasses luminosity check
/proc/get_hear(var/range, var/atom/source)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_hear() called tick#: [world.time]")
var/lum = source.luminosity
source.luminosity = 6
@@ -60,7 +54,6 @@
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/alone_in_area() called tick#: [world.time]")
var/area/our_area = get_area_master(the_area)
for(var/C in living_mob_list)
if(!istype(C, check_type))
@@ -73,7 +66,6 @@
/proc/circlerange(center=usr,radius=3)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/circlerange() called tick#: [world.time]")
var/turf/centerturf = get_turf(center)
var/list/turfs = new/list()
@@ -90,7 +82,6 @@
/proc/circleview(center=usr,radius=3)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/circleview() called tick#: [world.time]")
var/turf/centerturf = get_turf(center)
var/list/atoms = new/list()
@@ -106,7 +97,6 @@
return atoms
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_dist_euclidian() called tick#: [world.time]")
var/dx = Loc1.x - Loc2.x
var/dy = Loc1.y - Loc2.y
@@ -116,7 +106,6 @@
/proc/circlerangeturfs(center=usr,radius=3)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/circlerangeturfs() called tick#: [world.time]")
var/turf/centerturf = get_turf(center)
if(!centerturf)
@@ -135,7 +124,6 @@
/proc/circleviewturfs(center=usr,radius=3) //Is there even a diffrence between this proc and circlerangeturfs()?
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/circleviewturfs() called tick#: [world.time]")
var/turf/centerturf = get_turf(center)
var/list/turfs = new/list()
@@ -149,7 +137,6 @@
return turfs
/proc/recursive_type_check(atom/O, type = /atom)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/recursive_type_check() called tick#: [world.time]")
var/list/processing_list = list(O)
var/list/processed_list = new/list()
var/found_atoms = new/list()
@@ -172,7 +159,6 @@
//var/debug_mob = 0
/proc/get_contents_in_object(atom/O, type_path = /atom/movable)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_contents_in_object() called tick#: [world.time]")
if (O)
return recursive_type_check(O, type_path) - O
else
@@ -213,7 +199,6 @@ proc
#undef SIGN
proc/isInSight(var/atom/A, var/atom/B)
//writepanic("[__FILE__].[__LINE__] \\/proc/isInSight() called tick#: [world.time]")
var/turf/Aturf = get_turf(A)
var/turf/Bturf = get_turf(B)
@@ -227,7 +212,6 @@ proc/isInSight(var/atom/A, var/atom/B)
return 0
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_cardinal_step_away() called tick#: [world.time]")
//returns only NORTH, SOUTH, EAST, or WEST
var/dx = finish.x - start.x
var/dy = finish.y - start.y
@@ -243,14 +227,12 @@ proc/isInSight(var/atom/A, var/atom/B)
return get_step(start, EAST)
/proc/try_move_adjacent(atom/movable/AM)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/try_move_adjacent() called tick#: [world.time]")
var/turf/T = get_turf(AM)
for(var/direction in cardinal)
if(AM.Move(get_step(T, direction)))
break
/proc/get_mob_by_key(var/key)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_mob_by_key() called tick#: [world.time]")
for(var/mob/M in mob_list)
if(M.ckey == lowertext(key))
return M
@@ -258,7 +240,6 @@ proc/isInSight(var/atom/A, var/atom/B)
//i think this is used soley by verb/give(), cael
proc/check_can_reach(atom/user, atom/target)
//writepanic("[__FILE__].[__LINE__] \\/proc/check_can_reach() called tick#: [world.time]")
if(!in_range(user,target))
return 0
return CanReachThrough(get_turf(user), get_turf(target), target)
@@ -268,7 +249,6 @@ var/list/DummyCache = list()
/proc/CanReachThrough(turf/srcturf, turf/targetturf, atom/target, var/pass_flags=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/CanReachThrough() called tick#: [world.time]")
var/obj/item/weapon/dummy/D = locate() in DummyCache
if(!D)
@@ -317,7 +297,6 @@ var/list/DummyCache = list()
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
/proc/get_active_candidates(var/role_id=null, var/buffer=ROLE_SELECT_AFK_BUFFER, var/poll=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_active_candidates() called tick#: [world.time]")
var/list/candidates = list() //List of candidate mobs to assume control of the new larva ~fuck you
var/i = 0
while(candidates.len <= 0 && i < 5)
@@ -341,7 +320,6 @@ var/list/DummyCache = list()
return candidates
/proc/get_candidates(var/role_id=null)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_candidates() called tick#: [world.time]")
. = list()
for(var/mob/dead/observer/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
@@ -349,7 +327,6 @@ var/list/DummyCache = list()
. += G.client
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/ScreenText() called tick#: [world.time]")
if(!isobj(O)) O = new /obj/screen/text()
O.maptext = maptext
O.maptext_height = maptext_height
@@ -358,7 +335,6 @@ var/list/DummyCache = list()
return O
/proc/Show2Group4Delay(obj/O, list/group, delay=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/Show2Group4Delay() called tick#: [world.time]")
if(!isobj(O)) return
if(!group) group = clients
for(var/client/C in group)
@@ -369,7 +345,6 @@ var/list/DummyCache = list()
C.screen -= O
/proc/flick_overlay(image/I, list/show_to, duration)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/flick_overlay() called tick#: [world.time]")
for(var/client/C in show_to)
C.images += I
sleep(duration)
@@ -377,7 +352,6 @@ var/list/DummyCache = list()
C.images -= I
/proc/get_active_player_count()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_active_player_count() called tick#: [world.time]")
// Get active players who are playing in the round
var/active_players = 0
for(var/i = 1; i <= player_list.len; i++)
@@ -415,7 +389,6 @@ var/list/DummyCache = list()
/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/projectile_trajectory() called tick#: [world.time]")
// returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle],
// rotated at [rotation] and with the power of [power]
@@ -434,7 +407,6 @@ var/list/DummyCache = list()
/proc/mobs_in_area(var/area/the_area, var/client_needed=0, var/moblist=mob_list)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/mobs_in_area() called tick#: [world.time]")
var/list/mobs_found[0]
var/area/our_area = get_area_master(the_area)
for(var/mob/M in moblist)
@@ -446,19 +418,15 @@ var/list/DummyCache = list()
return mobs_found
/proc/GetRedPart(const/hexa)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/GetRedPart() called tick#: [world.time]")
return hex2num(copytext(hexa, 2, 4))
/proc/GetGreenPart(const/hexa)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/GetGreenPart() called tick#: [world.time]")
return hex2num(copytext(hexa, 4, 6))
/proc/GetBluePart(const/hexa)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/GetBluePart() called tick#: [world.time]")
return hex2num(copytext(hexa, 6, 8))
/proc/GetHexColors(const/hexa)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/GetHexColors() called tick#: [world.time]")
return list(\
GetRedPart(hexa),\
GetGreenPart(hexa),\
@@ -466,7 +434,6 @@ var/list/DummyCache = list()
)
/proc/MixColors(const/list/colors)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/MixColors() called tick#: [world.time]")
var/list/reds = new
var/list/blues = new
var/list/greens = new
@@ -484,7 +451,6 @@ var/list/DummyCache = list()
return rgb(r,g,b)
/proc/mixOneColor(var/list/weight, var/list/color)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/mixOneColor() called tick#: [world.time]")
if(!weight || !color || length(weight) != length(color))
return 0

View File

@@ -58,35 +58,30 @@ var/global/list/genders=list(
_complex=complex
/datum/gender/proc/getHim()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/getHim() called tick#: [world.time]")
if(_complex)
warning("getHim() unsupported for gender [name]}")
return ""
return objective
/datum/gender/proc/getHis()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/getHis() called tick#: [world.time]")
if(_complex)
warning("getHis() unsupported for gender [name]}")
return ""
return possessive
/datum/gender/proc/getHimself()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/getHimself() called tick#: [world.time]")
if(_complex)
warning("getHimself() unsupported for gender [name]}")
return ""
return reflexive
/datum/gender/proc/getHers()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/getHers() called tick#: [world.time]")
if(_complex)
warning("getHers() unsupported for gender [name]}")
return ""
return possessivePronoun
/datum/gender/proc/getHe()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/getHe() called tick#: [world.time]")
if(_complex)
warning("getHe() unsupported for gender [name]}")
return ""
@@ -108,7 +103,6 @@ var/global/list/genders=list(
* SO HERE'S WHAT YOU GET:
*/
/datum/gender/proc/replace(var/s)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/gender/proc/replace() called tick#: [world.time]")
// I
if(findtext(s,"$sub"))
s=replacetextEx(s,"$sub",subject)
@@ -180,7 +174,6 @@ var/global/list/genders=list(
return s
/proc/gender_replace(var/gender,var/text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/gender_replace() called tick#: [world.time]")
var/datum/gender/G = genders[gender]
if(!G)
warning("Invalid gender \"[gender]\" given to gender_replace().")

View File

@@ -42,7 +42,6 @@ var/global/list/sec_hud_users = list() //list of all entities using a security H
//////////////////////////
/proc/make_datum_references_lists()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/make_datum_references_lists() called tick#: [world.time]")
var/list/paths
//Surgery Steps - Initialize all /datum/surgery_step into a list
paths = typesof(/datum/surgery_step)-/datum/surgery_step
@@ -55,7 +54,6 @@ var/global/list/sec_hud_users = list() //list of all entities using a security H
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/verb/debug_chemical_list() called tick#: [world.time]")
for (var/reaction in chemical_reactions_list)
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"

View File

@@ -9,7 +9,6 @@ proc
return alpha_mask//And now return the mask.
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/mob/proc/AddCamoOverlay() called tick#: [world.time]")
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
//var/icon/alpha_mask = getFlatIcon(src)//Accurate but SLOW. Not designed for running each tick. Could have other uses I guess.
@@ -26,7 +25,6 @@ proc
overlays += I//And finally add the overlay.
/proc/getHologramIcon(icon/A, safety=1)//If safety is on, a new icon is not created.
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getHologramIcon() called tick#: [world.time]")
var/icon/flat_icon = safety ? A : new(A)//Has to be a new icon to not constantly change the same icon.
flat_icon.ColorTone(rgb(125,180,225))//Let's make it bluish.
flat_icon.ChangeOpacity(0.5)//Make it half transparent.
@@ -35,7 +33,6 @@ proc
return flat_icon
/proc/getStaticIcon(icon/A, safety=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getStaticIcon() called tick#: [world.time]")
var/icon/flat_icon = safety ? A : new(A)
flat_icon.Blend(rgb(255, 255, 255))
flat_icon.BecomeAlphaMask()
@@ -44,7 +41,6 @@ proc
return static_icon
/proc/getBlankIcon(icon/A, safety=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getBlankIcon() called tick#: [world.time]")
var/icon/flat_icon = safety ? A : new(A)
flat_icon.Blend(rgb(255, 255, 255))
flat_icon.BecomeAlphaMask()
@@ -53,7 +49,6 @@ proc
return blank_icon
/proc/getLetterImage(atom/A, letter = "", uppercase = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getLetterImage() called tick#: [world.time]")
if(!A)
return
@@ -76,7 +71,6 @@ proc
//For photo camera.
/proc/build_composite_icon(atom/A)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/build_composite_icon() called tick#: [world.time]")
var/icon/composite = icon(A.icon, A.icon_state, A.dir, 1)
for(var/O in A.overlays)
var/image/I = O
@@ -86,7 +80,6 @@ proc
return composite
proc/adjust_brightness(var/color, var/value)
//writepanic("[__FILE__].[__LINE__] \\/proc/adjust_brightness() called tick#: [world.time]")
if (!color) return "#FFFFFF"
if (!value) return color
@@ -97,7 +90,6 @@ proc/adjust_brightness(var/color, var/value)
return rgb(RGB[1],RGB[2],RGB[3])
/proc/ListColors(var/icon/I, var/ignoreGreyscale = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/ListColors() called tick#: [world.time]")
var/list/colors = list()
for(var/x_pixel = 1 to I.Width())
for(var/y_pixel = 1 to I.Height())
@@ -109,7 +101,6 @@ proc/adjust_brightness(var/color, var/value)
return colors
/proc/AverageColor(var/icon/I, var/accurate = 0, var/ignoreGreyscale = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/AverageColor() called tick#: [world.time]")
//Accurate: Use more accurate color averaging, usually has better results and prevents muddied or overly dark colors. Mad thanks to wwjnc.
//ignoreGreyscale: Excempts greyscale colors from the color list, useful for filtering outlines or plate overlays.
var/list/colors = ListColors(I, ignoreGreyscale)
@@ -138,7 +129,6 @@ proc/adjust_brightness(var/color, var/value)
return final_average
/proc/empty_Y_space(var/icon/I) //Returns the amount of lines containing only transparent pixels in an icon, starting from the bottom
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/empty_Y_space() called tick#: [world.time]")
for(var/y_pixel = 1 to I.Height())
for(var/x_pixel = 1 to I.Width())
if (I.GetPixel(x_pixel, y_pixel))

View File

@@ -11,7 +11,6 @@
//Returns a list in plain english as a string
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/english_list() called tick#: [world.time]")
var/total = input.len
if (!total)
return "[nothing_text]"
@@ -33,7 +32,6 @@
//Returns list element or null. Should prevent "index out of bounds" error.
/proc/listgetindex(list/L, index)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/listgetindex() called tick#: [world.time]")
if(istype(L))
if(isnum(index))
if(IsInRange(index,1,L.len))
@@ -43,27 +41,23 @@
return
/proc/islist(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/islist() called tick#: [world.time]")
if(istype(L))
return 1
return 0
//Return either pick(list) or null if list is not of type /list or is empty
/proc/safepick(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/safepick() called tick#: [world.time]")
if(istype(L) && L.len)
return pick(L)
//Checks if the list is empty
/proc/isemptylist(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/isemptylist() called tick#: [world.time]")
if(!L.len)
return 1
return 0
//Checks for specific types in a list
/proc/is_type_in_list(var/atom/A, var/list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/is_type_in_list() called tick#: [world.time]")
for(var/type in L)
if(istype(A, type))
return 1
@@ -71,14 +65,12 @@
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
/proc/clearlist(list/list)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/clearlist() called tick#: [world.time]")
if(istype(list))
list.len = 0
return
//Removes any null entries from the list
/proc/listclearnulls(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/listclearnulls() called tick#: [world.time]")
if(istype(L))
var/i=1
for(var/thing in L)
@@ -93,7 +85,6 @@
* If either of arguments is not a list, returns null
*/
/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/difflist() called tick#: [world.time]")
if(!islist(first) || !islist(second))
return
var/list/result = new
@@ -111,7 +102,6 @@
* If either of arguments is not a list, returns null
*/
/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/uniquemergelist() called tick#: [world.time]")
if(!islist(first) || !islist(second))
return
var/list/result = new
@@ -123,7 +113,6 @@
//Pretends to pick an element based on its weight but really just seems to pick a random element.
/proc/pickweight(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/pickweight() called tick#: [world.time]")
var/total = 0
var/item
for (item in L)
@@ -141,7 +130,6 @@
//Pick a random element from the list and remove it from the list.
/proc/pick_n_take(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/pick_n_take() called tick#: [world.time]")
if(L.len)
var/picked = rand(1,L.len)
. = L[picked]
@@ -149,13 +137,11 @@
//Returns the top(last) element from the list and removes it from the list (typical stack function)
/proc/pop(list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/pop() called tick#: [world.time]")
if(L.len)
. = L[L.len]
L.len--
/proc/sorted_insert(list/L, thing, comparator)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sorted_insert() called tick#: [world.time]")
var/pos = L.len
while(pos > 0 && call(comparator)(thing, L[pos]) > 0)
pos--
@@ -163,7 +149,6 @@
// Returns the next item in a list
/proc/next_list_item(var/item, var/list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/next_list_item() called tick#: [world.time]")
var/i
i = L.Find(item)
if(i == L.len)
@@ -174,7 +159,6 @@
// Returns the previous item in a list
/proc/previous_list_item(var/item, var/list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/previous_list_item() called tick#: [world.time]")
var/i
i = L.Find(item)
if(i == 1)
@@ -192,7 +176,6 @@
/*
//Reverses the order of items in the list
/proc/reverselist(var/list/input)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reverselist() called tick#: [world.time]")
var/list/output = list()
for(var/i = input.len; i >= 1; i--)
output += input[i]
@@ -201,7 +184,6 @@
//Randomize: Return the list in a random order
/proc/shuffle(var/list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/shuffle() called tick#: [world.time]")
if(!L)
return
L = L.Copy()
@@ -213,7 +195,6 @@
//Return a list with no duplicate entries
/proc/uniquelist(var/list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/uniquelist() called tick#: [world.time]")
var/list/K = list()
for(var/item in L)
if(!(item in K))
@@ -222,29 +203,24 @@
//for sorting clients or mobs by ckey
/proc/sortKey(list/L, order=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortKey() called tick#: [world.time]")
return sortTim(L, order >= 0 ? /proc/cmp_ckey_asc : /proc/cmp_ckey_dsc)
//Specifically for record datums in a list.
/proc/sortRecord(list/L, field = "name", order = 1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortRecord() called tick#: [world.time]")
cmp_field = field
return sortTim(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)
//any value in a list
/proc/sortList(var/list/L, cmp=/proc/cmp_text_asc)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortList() called tick#: [world.time]")
return sortTim(L.Copy(), cmp)
//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
/proc/sortNames(var/list/L, order=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortNames() called tick#: [world.time]")
return sortTim(L, order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
//Converts a bitfield to a list of numbers (or words if a wordlist is provided)
/proc/bitfield2list(bitfield = 0, list/wordlist)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/bitfield2list() called tick#: [world.time]")
var/list/r = list()
if(istype(wordlist,/list))
var/max = min(wordlist.len,16)
@@ -262,7 +238,6 @@
// Returns the key based on the index
/proc/get_key_by_index(var/list/L, var/index)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_key_by_index() called tick#: [world.time]")
var/i = 1
for(var/key in L)
if(index == i)
@@ -271,7 +246,6 @@
return null
/proc/count_by_type(var/list/L, type)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/count_by_type() called tick#: [world.time]")
var/i = 0
for(var/T in L)
if(istype(T, type))
@@ -279,7 +253,6 @@
return i
/proc/find_record(field, value, list/L)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/find_record() called tick#: [world.time]")
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
@@ -292,7 +265,6 @@
//fromIndex and toIndex must be in the range [1,L.len+1]
//This will preserve associations ~Carnie
/proc/moveElement(list/L, fromIndex, toIndex)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/moveElement() called tick#: [world.time]")
if(fromIndex == toIndex || fromIndex+1 == toIndex) //no need to move
return
if(fromIndex > toIndex)
@@ -307,7 +279,6 @@
//Same as moveElement but for ranges of elements
//This will preserve associations ~Carnie
/proc/moveRange(list/L, fromIndex, toIndex, len=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/moveRange() called tick#: [world.time]")
var/distance = abs(toIndex - fromIndex)
if(len >= distance) //there are more elements to be moved than the distance to be moved. Therefore the same result can be achieved (with fewer operations) by moving elements between where we are and where we are going. The result being, our range we are moving is shifted left or right by dist elements
if(fromIndex <= toIndex)
@@ -331,7 +302,6 @@
//Move any elements being overwritten by the move to the now-empty elements, preserving order
//Note: if the two ranges overlap, only the destination order will be preserved fully, since some elements will be within both ranges ~Carnie
/proc/swapRange(list/L, fromIndex, toIndex, len=1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/swapRange() called tick#: [world.time]")
var/distance = abs(toIndex - fromIndex)
if(len > distance) //there is an overlap, therefore swapping each element will require more swaps than inserting new elements
if(fromIndex < toIndex)
@@ -354,7 +324,6 @@
//replaces reverseList ~Carnie
/proc/reverseRange(list/L, start=1, end=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reverseRange() called tick#: [world.time]")
if(L.len)
start = start % L.len
end = end % (L.len+1)

View File

@@ -1,6 +1,5 @@
//print an error message to world.log
/proc/error(msg)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/error() called tick#: [world.time]")
world.log << "## ERROR: [msg]"
/*
@@ -37,7 +36,6 @@
*/
/proc/log_admin(raw_text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/log_admin() called tick#: [world.time]")
var/text_to_log = "\[[time_stamp()]]ADMIN: [raw_text]"
admin_log.Add(text_to_log)
@@ -49,7 +47,6 @@
admin_diary << html_decode(text_to_log)
/proc/log_debug(text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/log_debug() called tick#: [world.time]")
if (config.log_debug)
diary << html_decode("\[[time_stamp()]]DEBUG: [text]")
@@ -61,13 +58,11 @@
/proc/log_adminghost(text)
// //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/log_adminghost() called tick#: [world.time]")
if (config.log_adminghost)
diary << html_decode("\[[time_stamp()]]ADMINGHOST: [text]")
message_admins("\[ADMINGHOST\] [text]")
/proc/log_ghost(text)
// //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/log_ghost() called tick#: [world.time]")
if (config.log_adminghost)
diary << html_decode("\[[time_stamp()]]GHOST: [text]")
message_admins("\[GHOST\] [text]")
@@ -77,7 +72,6 @@
* Helper proc to log attacks or similar events between two mobs.
*/
/proc/add_attacklogs(var/mob/user, var/mob/target, var/what_done, var/object = null, var/addition = null, var/admin_warn = TRUE)
// //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/add_attacklogs() called tick#: [world.time]")
var/user_txt = (user ? "[user][user.ckey ? " ([user.ckey])" : ""]" : "\<NULL USER\>")
var/target_txt = (target ? "[target][target.ckey ? " ([target.ckey])" : ""]" : "\<NULL TARGET\>")
var/object_txt = (object ? " with \the [object]" : "")
@@ -107,7 +101,6 @@
* @param span_class What CSS class to use for the message.
*/
/proc/add_gamelogs(var/mob/user, var/what_done, var/admin = 1, var/tp_link = FALSE, var/tp_link_short = TRUE, var/span_class = "notice")
// //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/add_gamelogs() called tick#: [world.time]")
var/user_text = (ismob(user) ? "[user] ([user.ckey])" : "<NULL USER>")
var/link = (tp_link ? " ([formatJumpTo(user, (tp_link_short ? "JMP" : ""))])" : "")
@@ -126,7 +119,6 @@
* @param reagent_names List of reagent names to log
*/
/proc/log_reagents(var/mob/user, var/source, var/target, var/amount, var/list/reagent_names)
// //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/log_reagents() called tick#: [world.time]")
if (amount == 0)
return

View File

@@ -18,7 +18,6 @@ proc/random_hair_style(gender, species = "Human")
return h_style
/proc/GetOppositeDir(var/dir)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/GetOppositeDir() called tick#: [world.time]")
switch(dir)
if(NORTH) return SOUTH
if(SOUTH) return NORTH
@@ -31,7 +30,6 @@ proc/random_hair_style(gender, species = "Human")
return 0
proc/random_facial_hair_style(gender, species = "Human")
//writepanic("[__FILE__].[__LINE__] \\/proc/random_facial_hair_style() called tick#: [world.time]")
var/f_style = "Shaved"
var/list/valid_facialhairstyles = list()
@@ -52,7 +50,6 @@ proc/random_facial_hair_style(gender, species = "Human")
return f_style
proc/random_name(gender, speciesName = "Human")
//writepanic("[__FILE__].[__LINE__] \\/proc/random_name() called tick#: [world.time]")
var/datum/species/S = all_species[speciesName]
if(S)
return S.makeName(gender)
@@ -63,7 +60,6 @@ proc/random_name(gender, speciesName = "Human")
proc/random_skin_tone()
//writepanic("[__FILE__].[__LINE__] \\/proc/random_skin_tone() called tick#: [world.time]")
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
if("caucasian") . = -10
if("afroamerican") . = -115
@@ -74,7 +70,6 @@ proc/random_skin_tone()
return min(max( .+rand(-25, 25), -185),34)
proc/skintone2racedescription(tone)
//writepanic("[__FILE__].[__LINE__] \\/proc/skintone2racedescription() called tick#: [world.time]")
switch (tone)
if(30 to INFINITY) return "albino"
if(20 to 30) return "pale"
@@ -87,7 +82,6 @@ proc/skintone2racedescription(tone)
else return "unknown"
proc/age2agedescription(age)
//writepanic("[__FILE__].[__LINE__] \\/proc/age2agedescription() called tick#: [world.time]")
switch(age)
if(0 to 1) return "infant"
if(1 to 3) return "toddler"
@@ -101,7 +95,6 @@ proc/age2agedescription(age)
else return "unknown"
proc/RoundHealth(health)
//writepanic("[__FILE__].[__LINE__] \\/proc/RoundHealth() called tick#: [world.time]")
switch(health)
if(100 to INFINITY)
return "health100"
@@ -134,7 +127,6 @@ Proc for attack log creation, because really why not
*/
proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
//writepanic("[__FILE__].[__LINE__] \\/proc/add_logs() called tick#: [world.time]")
if(user && ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(target && ismob(target))
@@ -147,7 +139,6 @@ proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
proc/add_ghostlogs(var/mob/user, var/obj/target, var/what_done, var/admin=1, var/addition=null)
//writepanic("[__FILE__].[__LINE__] \\/proc/add_ghostlogs() called tick#: [world.time]")
var/target_text = "NON-EXISTENT TARGET"
var/subject_text = "NON-EXISTENT SUBJECT"
if(target)
@@ -175,5 +166,4 @@ proc/add_ghostlogs(var/mob/user, var/obj/target, var/what_done, var/admin=1, var
log_ghost("[subject_text] [what_done] [target_text] [addition]")
/mob/proc/isVentCrawling()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/mob/proc/isVentCrawling() called tick#: [world.time]")
return (istype(loc, /obj/machinery/atmospherics)) // Crude but no other situation would put them inside of this

View File

@@ -1,6 +1,5 @@
var/church_name = null
/proc/church_name()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/church_name() called tick#: [world.time]")
if (church_name)
return church_name
@@ -16,7 +15,6 @@ var/church_name = null
var/command_name = null
/proc/command_name()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/command_name() called tick#: [world.time]")
if (command_name)
return command_name
@@ -43,7 +41,6 @@ var/command_name = null
/proc/change_command_name(var/name)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/change_command_name() called tick#: [world.time]")
command_name = name
@@ -51,7 +48,6 @@ var/command_name = null
var/religion_name = null
/proc/religion_name()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/religion_name() called tick#: [world.time]")
if (religion_name)
return religion_name
@@ -63,7 +59,6 @@ var/religion_name = null
return capitalize(name)
/proc/station_name()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/station_name() called tick#: [world.time]")
if(station_name)
return station_name
var/random = rand(1,5)
@@ -122,7 +117,6 @@ var/religion_name = null
/proc/world_name(var/name)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/world_name() called tick#: [world.time]")
station_name = name
@@ -135,7 +129,6 @@ var/religion_name = null
var/syndicate_name = null
/proc/syndicate_name()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/syndicate_name() called tick#: [world.time]")
if (syndicate_name)
return syndicate_name
@@ -185,7 +178,6 @@ var/syndicate_code_response//Code response for traitors.
/proc/generate_code_phrase()//Proc is used for phrase and response in master_controller.dm
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/generate_code_phrase() called tick#: [world.time]")
var/code_phrase = ""//What is returned when the proc finishes.
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
@@ -251,7 +243,6 @@ var/syndicate_code_response//Code response for traitors.
/*
//This proc tests the gen above.
/client/verb/test_code_phrase()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/verb/test_code_phrase() called tick#: [world.time]")
set name = "Generate Code Phrase"
set category = "Debug"

View File

@@ -1,6 +1,5 @@
//general stuff
/proc/sanitize_integer(number, min=0, max=1, default=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_integer() called tick#: [world.time]")
if(isnum(number))
number = round(number)
if(min <= number && number <= max)
@@ -8,13 +7,11 @@
return default
/proc/sanitize_text(text, default="")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_text() called tick#: [world.time]")
if(istext(text))
return text
return default
/proc/sanitize_inlist(value, list/List, default)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_inlist() called tick#: [world.time]")
if(value in List) return value
if(default) return default
if(List && List.len)return List[1]
@@ -23,7 +20,6 @@
//more specialised stuff
/proc/sanitize_gender(gender,neuter=0,plural=0, default="male")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_gender() called tick#: [world.time]")
switch(gender)
if(MALE, FEMALE)return gender
if(NEUTER)
@@ -35,7 +31,6 @@
return default
/proc/sanitize_hexcolor(color, default="#000000")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_hexcolor() called tick#: [world.time]")
if(!istext(color)) return default
var/len = length(color)
if(len != 7 && len !=4) return default

View File

@@ -1,6 +1,5 @@
//simple insertion sort - generally faster than merge for runs of 7 or smaller
/proc/sortInsert(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortInsert() called tick#: [world.time]")
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)

View File

@@ -1,6 +1,5 @@
//merge-sort - gernerally faster than insert sort, for runs of 7 or larger
/proc/sortMerge(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortMerge() called tick#: [world.time]")
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)

View File

@@ -1,6 +1,5 @@
//TimSort interface
/proc/sortTim(list/L, cmp=/proc/cmp_numeric_asc, associative, fromIndex=1, toIndex=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortTim() called tick#: [world.time]")
if(L && L.len >= 2)
fromIndex = fromIndex % L.len
toIndex = toIndex % (L.len+1)

View File

@@ -33,7 +33,6 @@ var/datum/sortInstance/sortInstance = new()
proc/timSort(start, end)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/timSort() called tick#: [world.time]")
runBases.Cut()
runLens.Cut()
@@ -99,7 +98,6 @@ var/datum/sortInstance/sortInstance = new()
start the index of the first element in the range that is not already known to be sorted
*/
proc/binarySort(lo, hi, start)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/binarySort() called tick#: [world.time]")
//ASSERT(lo <= start && start <= hi)
if(start <= lo)
start = lo + 1
@@ -137,7 +135,6 @@ var/datum/sortInstance/sortInstance = new()
reverse a descending sequence without violating stability.
*/
proc/countRunAndMakeAscending(lo, hi)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/countRunAndMakeAscending() called tick#: [world.time]")
//ASSERT(lo < hi)
var/runHi = lo + 1
@@ -168,7 +165,6 @@ var/datum/sortInstance/sortInstance = new()
//Returns the minimum acceptable run length for an array of the specified length.
//Natural runs shorter than this will be extended with binarySort
proc/minRunLength(n)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/minRunLength() called tick#: [world.time]")
//ASSERT(n >= 0)
var/r = 0 //becomes 1 if any bits are shifted off
while(n >= MIN_MERGE)
@@ -182,7 +178,6 @@ var/datum/sortInstance/sortInstance = new()
//This method is called each time a new run is pushed onto the stack.
//So the invariants are guaranteed to hold for i<stackSize upon entry to the method
proc/mergeCollapse()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeCollapse() called tick#: [world.time]")
while(runBases.len >= 2)
var/n = runBases.len - 1
if(n > 1 && runLens[n-1] <= runLens[n] + runLens[n+1])
@@ -198,7 +193,6 @@ var/datum/sortInstance/sortInstance = new()
//Merges all runs on the stack until only one remains.
//Called only once, to finalise the sort
proc/mergeForceCollapse()
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeForceCollapse() called tick#: [world.time]")
while(runBases.len >= 2)
var/n = runBases.len - 1
if(n > 1 && runLens[n-1] < runLens[n+1])
@@ -210,7 +204,6 @@ var/datum/sortInstance/sortInstance = new()
//Run i must be the penultimate or antepenultimate run on the stack
//In other words, i must be equal to stackSize-2 or stackSize-3
proc/mergeAt(i)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeAt() called tick#: [world.time]")
//ASSERT(runBases.len >= 2)
//ASSERT(i >= 1)
//ASSERT(i == runBases.len - 1 || i == runBases.len - 2)
@@ -265,7 +258,6 @@ var/datum/sortInstance/sortInstance = new()
Returns the index at which to insert element 'key'
*/
proc/gallopLeft(key, base, len, hint)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/gallopLeft() called tick#: [world.time]")
//ASSERT(len > 0 && hint >= 0 && hint < len)
var/lastOffset = 0
@@ -325,7 +317,6 @@ var/datum/sortInstance/sortInstance = new()
* @return the int k, 0 <= k <= n such that a[b + k - 1] <= key < a[b + k]
*/
proc/gallopRight(key, base, len, hint)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/gallopRight() called tick#: [world.time]")
//ASSERT(len > 0 && hint >= 0 && hint < len)
var/offset = 1
@@ -378,7 +369,6 @@ var/datum/sortInstance/sortInstance = new()
//Merges two adjacent runs in-place in a stable fashion.
//For performance this method should only be called when len1 <= len2!
proc/mergeLo(base1, len1, base2, len2)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeLo() called tick#: [world.time]")
//ASSERT(len1 > 0 && len2 > 0 && base1 + len1 == base2)
var/cursor1 = base1
@@ -481,7 +471,6 @@ var/datum/sortInstance/sortInstance = new()
proc/mergeHi(base1, len1, base2, len2)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeHi() called tick#: [world.time]")
//ASSERT(len1 > 0 && len2 > 0 && base1 + len1 == base2)
var/cursor1 = base1 + len1 - 1 //start at end of sublists
@@ -582,7 +571,6 @@ var/datum/sortInstance/sortInstance = new()
proc/mergeSort(start, end)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeSort() called tick#: [world.time]")
var/remaining = end - start
//If array is small, do an insertion sort
@@ -628,7 +616,6 @@ var/datum/sortInstance/sortInstance = new()
return L
proc/mergeAt2(i)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mergeAt2() called tick#: [world.time]")
var/cursor1 = runBases[i]
var/cursor2 = runBases[i+1]

View File

@@ -15,7 +15,6 @@
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(var/t as text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitizeSQL() called tick#: [world.time]")
//var/sanitized_text = replacetext(t, "'", "\\'")
//sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
@@ -27,7 +26,6 @@
/*
/mob/verb/SanitizeTest(var/t as text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/mob/verb/SanitizeTest() called tick#: [world.time]")
src << "IN: [t]"
src << "OUT: [sanitizeSQL(t)]"
*/
@@ -37,7 +35,6 @@
//Simply removes < and > and limits the length of the message
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/strip_html_simple() called tick#: [world.time]")
var/list/strip_chars = list("<",">")
t = copytext(t,1,limit)
for(var/char in strip_chars)
@@ -48,7 +45,6 @@
return t
/proc/strip_html_properly(input = "")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/strip_html_properly() called tick#: [world.time]")
// these store the position of < and > respectively
var/opentag = 0
var/closetag = 0
@@ -65,7 +61,6 @@
return input
/proc/rfindtext(Haystack, Needle, Start = 1, End = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/rfindtext() called tick#: [world.time]")
var/i = findtext(Haystack, Needle, Start, End)
while (i)
@@ -74,7 +69,6 @@
//Removes a few problematic characters
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#","<22>"="<22>"))
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_simple() called tick#: [world.time]")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
@@ -84,23 +78,19 @@
//Runs byond's sanitization proc along-side sanitize_simple
/proc/sanitize(var/t,var/list/repl_chars = null)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize() called tick#: [world.time]")
return html_encode(sanitize_simple(t,repl_chars))
//Runs sanitize and strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' after sanitize() calls byond's html_encode()
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/strip_html() called tick#: [world.time]")
return copytext((sanitize(strip_html_simple(t))),1,limit)
//Runs byond's sanitization proc along-side strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' that html_encode() would cause
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/adminscrub() called tick#: [world.time]")
return copytext((html_encode(strip_html_simple(t))),1,limit)
/proc/reverse_text(txt)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reverse_text() called tick#: [world.time]")
var/i = length(txt)+1
. = ""
while(--i)
@@ -110,7 +100,6 @@
* returns null if there is any bad text in the string
*/
/proc/reject_bad_text(const/text, var/max_length = 512)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reject_bad_text() called tick#: [world.time]")
var/text_length = length(text)
if(text_length > max_length)
@@ -136,13 +125,11 @@
// Used to get a sanitized input.
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/stripped_input() called tick#: [world.time]")
var/name = input(user, message, title, default)
return strip_html_simple(name, max_length)
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reject_bad_name() called tick#: [world.time]")
if(!t_in || length(t_in) > max_length)
return //Rejects the input if it is null or if it is longer then the max length allowed
@@ -209,7 +196,6 @@
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
//relpaces < with &lt;
proc/checkhtml(var/t)
//writepanic("[__FILE__].[__LINE__] \\/proc/checkhtml() called tick#: [world.time]")
t = sanitize_simple(t, list("&#"="."))
var/p = findtext(t,"<",1)
while (p) //going through all the tags
@@ -231,7 +217,6 @@ proc/checkhtml(var/t)
//Checks the beginning of a string for a specified sub-string
//Returns the position of the substring or 0 if it was not found
/proc/dd_hasprefix(text, prefix)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_hasprefix() called tick#: [world.time]")
var/start = 1
var/end = length(prefix) + 1
return findtext(text, prefix, start, end)
@@ -239,7 +224,6 @@ proc/checkhtml(var/t)
//Checks the beginning of a string for a specified sub-string. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hasprefix_case(text, prefix)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_hasprefix_case() called tick#: [world.time]")
var/start = 1
var/end = length(prefix) + 1
return findtextEx(text, prefix, start, end)
@@ -247,7 +231,6 @@ proc/checkhtml(var/t)
//Checks the end of a string for a specified substring.
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix(text, suffix)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_hassuffix() called tick#: [world.time]")
var/start = length(text) - length(suffix)
if(start)
return findtext(text, suffix, start, null)
@@ -256,7 +239,6 @@ proc/checkhtml(var/t)
//Checks the end of a string for a specified substring. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix_case(text, suffix)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_hassuffix_case() called tick#: [world.time]")
var/start = length(text) - length(suffix)
if(start)
return findtextEx(text, suffix, start, null)
@@ -265,37 +247,31 @@ proc/checkhtml(var/t)
* Text modification
*/
/proc/replacetext(text, find, replacement)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/replacetext() called tick#: [world.time]")
return list2text(text2list(text, find), replacement)
/proc/replacetextEx(text, find, replacement)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/replacetextEx() called tick#: [world.time]")
return list2text(text2listEx(text, find), replacement)
//Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/add_zero() called tick#: [world.time]")
while (length(t) < u)
t = "0[t]"
return t
//Adds 'u' number of spaces ahead of the text 't'
/proc/add_lspace(t, u)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/add_lspace() called tick#: [world.time]")
while(length(t) < u)
t = " [t]"
return t
//Adds 'u' number of spaces behind the text 't'
/proc/add_tspace(t, u)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/add_tspace() called tick#: [world.time]")
while(length(t) < u)
t = "[t] "
return t
//Returns a string with reserved characters and spaces before the first letter removed
/proc/trim_left(text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/trim_left() called tick#: [world.time]")
for (var/i = 1 to length(text))
if (text2ascii(text, i) > 32)
return copytext(text, i)
@@ -303,7 +279,6 @@ proc/checkhtml(var/t)
//Returns a string with reserved characters and spaces after the last letter removed
/proc/trim_right(text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/trim_right() called tick#: [world.time]")
for (var/i = length(text), i > 0, i--)
if (text2ascii(text, i) > 32)
return copytext(text, 1, i + 1)
@@ -312,17 +287,14 @@ proc/checkhtml(var/t)
//Returns a string with reserved characters and spaces before the first word and after the last word removed.
/proc/trim(text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/trim() called tick#: [world.time]")
return trim_left(trim_right(text))
//Returns a string with the first element of the string capitalized.
/proc/capitalize(var/t as text)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/capitalize() called tick#: [world.time]")
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
//Centers text by adding spaces to either side of the string.
/proc/dd_centertext(message, length)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_centertext() called tick#: [world.time]")
var/new_message = message
var/size = length(message)
var/delta = length - size
@@ -340,14 +312,12 @@ proc/checkhtml(var/t)
//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose
/proc/dd_limittext(message, length)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dd_limittext() called tick#: [world.time]")
var/size = length(message)
if(size <= length)
return message
return copytext(message, 1, length + 1)
/proc/stringmerge(var/text,var/compare,replace = "*")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/stringmerge() called tick#: [world.time]")
//This proc fills in all spaces with the "replace" var (* by default) with whatever
//is in the other string at the same spot (assuming it is not a replace char).
//This is used for fingerprints
@@ -369,7 +339,6 @@ proc/checkhtml(var/t)
return newtext
/proc/stringpercent(var/text,character = "*")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/stringpercent() called tick#: [world.time]")
//This proc returns the number of chars of the string that is the character
//This is used for detective work to determine fingerprint completion.
if(!text || !character)
@@ -387,7 +356,6 @@ proc/checkhtml(var/t)
* @param sep seperator to use
*/
/proc/format_num(var/number, var/sep=",")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/format_num() called tick#: [world.time]")
var/c="" // Current char
var/list/parts = text2list("[number]",".")
var/origtext = "[parts[1]]"
@@ -403,7 +371,6 @@ proc/checkhtml(var/t)
var/global/list/watt_suffixes = list("W", "KW", "MW", "GW", "TW", "PW", "EW", "ZW", "YW")
/proc/format_watts(var/number)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/format_watts() called tick#: [world.time]")
if(number<0) return "-[format_watts(number)]"
if(number==0) return "0 W"

View File

@@ -49,7 +49,6 @@
/* Returns 1 if it is the selected month and day */
/proc/isDay(var/month, var/day)
//writepanic("[__FILE__].[__LINE__] \\/proc/isDay() called tick#: [world.time]")
if(isnum(month) && isnum(day))
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day

View File

@@ -1,7 +1,6 @@
/client/var/timed_alert/timed_alert
/client/proc/timed_alert(time = 300,target,message,title,button1,button2,button3)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/client/proc/timed_alert() called tick#: [world.time]")
if(timed_alert) return ""
timed_alert = new(target,message,title,button1,button2,button3)
@@ -9,7 +8,6 @@
del(timed_alert)
/mob/proc/timed_alert(time,message,title,button1,button2,button3)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/timed_alert() called tick#: [world.time]")
var/selected_button = ""
if(client)

View File

@@ -96,7 +96,6 @@
//slower then list2text, but correctly processes associative lists.
proc/tg_list2text(list/list, glue = ",")
//writepanic("[__FILE__].[__LINE__] \\/proc/tg_list2text() called tick#: [world.time]")
if(!istype(list) || !list.len)
return
for(var/i=1 to list.len)
@@ -122,7 +121,6 @@ proc/tg_list2text(list/list, glue = ",")
// HTTP GET URL query builder thing.
// list("a"="b","c"="d") -> ?a=b&c=d
/proc/buildurlquery(list/list,sep="&")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/buildurlquery() called tick#: [world.time]")
if(!istype(list) || !list.len)
return
var/output
@@ -137,7 +135,6 @@ proc/tg_list2text(list/list, glue = ",")
//Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
/proc/text2list(text, delimiter = "\n")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/text2list() called tick#: [world.time]")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list()
@@ -151,7 +148,6 @@ proc/tg_list2text(list/list, glue = ",")
//Case Sensitive!
/proc/text2listEx(text, delimiter="\n")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/text2listEx() called tick#: [world.time]")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list()
@@ -165,14 +161,12 @@ proc/tg_list2text(list/list, glue = ",")
//Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/file2list() called tick#: [world.time]")
return text2list(return_file_text(filename),seperator)
//Turns a direction into text
/proc/dir2text(direction)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dir2text() called tick#: [world.time]")
switch(direction)
if(1.0)
return "north"
@@ -195,7 +189,6 @@ proc/tg_list2text(list/list, glue = ",")
//Turns text into proper directions
/proc/text2dir(direction)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/text2dir() called tick#: [world.time]")
switch(uppertext(direction))
if("NORTH")
return 1
@@ -218,7 +211,6 @@ proc/tg_list2text(list/list, glue = ",")
//Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(var/degree)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/angle2dir() called tick#: [world.time]")
degree = ((degree+22.5)%365)
if(degree < 45) return NORTH
if(degree < 90) return NORTHEAST
@@ -232,7 +224,6 @@ proc/tg_list2text(list/list, glue = ",")
//returns the north-zero clockwise angle in degrees, given a direction
/proc/dir2angle(var/D)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dir2angle() called tick#: [world.time]")
switch(D)
if(NORTH) return 0
if(SOUTH) return 180
@@ -246,12 +237,10 @@ proc/tg_list2text(list/list, glue = ",")
//Returns the angle in english
/proc/angle2text(var/degree)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/angle2text() called tick#: [world.time]")
return dir2text(angle2dir(degree))
//Converts a blend_mode constant to one acceptable to icon.Blend()
/proc/blendMode2iconMode(blend_mode)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/blendMode2iconMode() called tick#: [world.time]")
switch(blend_mode)
if(BLEND_MULTIPLY) return ICON_MULTIPLY
if(BLEND_ADD) return ICON_ADD
@@ -260,7 +249,6 @@ proc/tg_list2text(list/list, glue = ",")
//Converts a rights bitfield into a string
/proc/rights2text(rights,seperator="")
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/rights2text() called tick#: [world.time]")
if(rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
if(rights & R_ADMIN) . += "[seperator]+ADMIN"
if(rights & R_BAN) . += "[seperator]+BAN"
@@ -279,14 +267,12 @@ proc/tg_list2text(list/list, glue = ",")
return .
/proc/ui_style2icon(ui_style)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/ui_style2icon() called tick#: [world.time]")
switch(ui_style)
if("old") return 'icons/mob/screen1_old.dmi'
if("Orange") return 'icons/mob/screen1_Orange.dmi'
else return 'icons/mob/screen1_Midnight.dmi'
/proc/num2septext(var/theNum, var/sigFig = 7,var/sep=",") // default sigFig (1,000,000)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/num2septext() called tick#: [world.time]")
var/finalNum = num2text(theNum, sigFig)
// Start from the end, or from the decimal point

View File

@@ -5,7 +5,6 @@
*/
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/Get_Angle() called tick#: [world.time]")
if(!start || !end) return 0
var/dy
var/dx
@@ -21,7 +20,6 @@
//Returns location. Returns null if no location was found.
/proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = 0, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_teleport_loc() called tick#: [world.time]")
/*
Location where the teleport begins, target that will teleport, distance to go, density checking 0/1(yes/no).
Random error in tile placement x, error in tile placement y, and block offset.
@@ -114,11 +112,9 @@ Turf and target are seperate in case you want to teleport some distance from a t
return destination
/proc/sign(x)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sign() called tick#: [world.time]")
return x!=0?x/abs(x):0
/proc/getline(atom/M,atom/N)//Ultra-Fast Bresenham Line-Drawing Algorithm
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getline() called tick#: [world.time]")
var/px=M.x //starting x
var/py=M.y
var/line[] = list(locate(px,py,M.z))
@@ -151,7 +147,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns whether or not a player is a guest using their ckey as an input
/proc/IsGuestKey(key)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/IsGuestKey() called tick#: [world.time]")
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
@@ -165,7 +160,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Ensure the frequency is within bounds of what it should be sending/recieving at
/proc/sanitize_frequency(var/f)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sanitize_frequency() called tick#: [world.time]")
f = Clamp(round(f), 1201, 1599) // 120.1, 159.9
if ((f % 2) == 0) //Ensure the last digit is an odd number
@@ -175,7 +169,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Turns 1479 into 147.9
/proc/format_frequency(var/f)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/format_frequency() called tick#: [world.time]")
f = text2num(f)
return "[round(f / 10)].[f % 10]"
@@ -186,7 +179,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
* Calling this proc without an oldname will only update the mob and skip updating the pda, id and records. ~Carn
*/
/mob/proc/fully_replace_character_name(oldname, newname)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/mob/proc/fully_replace_character_name() called tick#: [world.time]")
if (!newname)
return 0
@@ -258,7 +250,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
//Last modified by Carn
/mob/proc/rename_self(var/role, var/allow_numbers=0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/mob/proc/rename_self() called tick#: [world.time]")
spawn(0)
var/oldname = real_name
@@ -306,12 +297,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Picks a string of symbols to display as the law number for hacked or ion laws
/proc/ionnum()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/ionnum() called tick#: [world.time]")
return "[pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
/proc/freeborg()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/freeborg() called tick#: [world.time]")
var/select = null
var/list/borgs = list()
@@ -328,7 +317,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/active_ais() called tick#: [world.time]")
. = list()
for(var/mob/living/silicon/ai/A in living_mob_list)
if(A.stat == DEAD)
@@ -340,7 +328,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Find an active ai with the least borgs. VERBOSE PROCNAME HUH!
/proc/select_active_ai_with_fewest_borgs()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/select_active_ai_with_fewest_borgs() called tick#: [world.time]")
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
for(var/mob/living/silicon/ai/A in active)
@@ -350,7 +337,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
return selected
/proc/select_active_ai(var/mob/user)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/select_active_ai() called tick#: [world.time]")
var/list/ais = active_ais()
if(ais.len)
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
@@ -358,7 +344,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
return .
/proc/get_sorted_mobs()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_sorted_mobs() called tick#: [world.time]")
var/list/old_list = getmobs()
var/list/AI_list = list()
var/list/Dead_list = list()
@@ -389,7 +374,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns a list of all mobs with their name
/proc/getmobs()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/getmobs() called tick#: [world.time]")
var/list/mobs = sortmobs()
var/list/names = list()
@@ -416,7 +400,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Orders mobs by type then by name
/proc/sortmobs()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/sortmobs() called tick#: [world.time]")
var/list/moblist = list()
var/list/sortmob = sortNames(mob_list)
for(var/mob/living/silicon/ai/M in sortmob)
@@ -451,18 +434,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
//E = MC^2
/proc/convert2energy(var/M)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/convert2energy() called tick#: [world.time]")
var/E = M*(SPEED_OF_LIGHT_SQ)
return E
//M = E/C^2
/proc/convert2mass(var/E)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/convert2mass() called tick#: [world.time]")
var/M = E/(SPEED_OF_LIGHT_SQ)
return M
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/key_name() called tick#: [world.time]")
var/mob/M
var/client/C
var/key
@@ -508,13 +488,11 @@ Turf and target are seperate in case you want to teleport some distance from a t
return .
/proc/key_name_admin(var/whom, var/include_name = 1)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/key_name_admin() called tick#: [world.time]")
return key_name(whom, 1, include_name)
// Returns the atom sitting on the turf.
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_atom_on_turf(var/atom/movable/M)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_atom_on_turf() called tick#: [world.time]")
var/atom/loc = M
while(loc && loc.loc && !istype(loc.loc, /turf/))
loc = loc.loc
@@ -536,7 +514,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, var/atom/ref=null)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/onclose() called tick#: [world.time]")
if(!user.client) return
var/param = "null"
if(ref)
@@ -556,7 +533,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/client/verb/windowclose() called tick#: [world.time]")
//world << "windowclose: [atomref]"
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
@@ -578,7 +554,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
// used for mass driver
/proc/get_edge_target_turf(var/atom/A, var/direction)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_edge_target_turf() called tick#: [world.time]")
var/turf/target = locate(A.x, A.y, A.z)
if(!A || !target)
@@ -604,7 +579,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
// used for disposal system
/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_ranged_target_turf() called tick#: [world.time]")
var/x = A.x
var/y = A.y
@@ -623,7 +597,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
// returns turf relative to A offset in dx and dy tiles
// bound to map limits
/proc/get_offset_target_turf(atom/A, dx, dy)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_offset_target_turf() called tick#: [world.time]")
var/x = Clamp(A.x + dx, 1, world.maxx)
var/y = Clamp(A.y + dy, 1, world.maxy)
@@ -631,7 +604,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
//returns random gauss number
proc/GaussRand(var/sigma)
//writepanic("[__FILE__].[__LINE__] \\/proc/GaussRand() called tick#: [world.time]")
var/x,y,rsq
do
x=2*rand()-1
@@ -642,12 +614,10 @@ proc/GaussRand(var/sigma)
//returns random gauss number, rounded to 'roundto'
proc/GaussRandRound(var/sigma,var/roundto)
//writepanic("[__FILE__].[__LINE__] \\/proc/GaussRandRound() called tick#: [world.time]")
return round(GaussRand(sigma),roundto)
//Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/can_see() called tick#: [world.time]")
var/turf/current = get_turf(source)
var/turf/target_turf = get_turf(target)
var/steps = 0
@@ -663,7 +633,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
return 1
/proc/is_blocked_turf(var/turf/T)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/is_blocked_turf() called tick#: [world.time]")
var/cant_pass = 0
if(T.density) cant_pass = 1
for(var/atom/A in T)
@@ -672,7 +641,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
return cant_pass
/proc/get_step_towards2(var/atom/ref , var/atom/trg)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_step_towards2() called tick#: [world.time]")
var/base_dir = get_dir(ref, get_step_towards(ref,trg))
var/turf/temp = get_step_towards(ref,trg)
@@ -701,7 +669,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
else return get_step(ref, base_dir)
/proc/do_mob(var/mob/user , var/mob/target, var/delay = 30, var/numticks = 10) //This is quite an ugly solution but i refuse to use the old request system.
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/do_mob() called tick#: [world.time]")
if(!user || !target) return 0
var/user_loc = user.loc
var/target_loc = target.loc
@@ -741,7 +708,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
return 1
/proc/do_after(var/mob/user as mob, var/atom/target, var/delay as num, var/numticks = 10, var/needhand = TRUE)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/do_after() called tick#: [world.time]")
if(!user || isnull(user))
return 0
if(numticks == 0)
@@ -791,28 +757,24 @@ proc/GaussRandRound(var/sigma,var/roundto)
//Takes: Anything that could possibly have variables and a varname to check.
//Returns: 1 if found, 0 if not.
/proc/hasvar(var/datum/A, var/varname)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/hasvar() called tick#: [world.time]")
if(A.vars.Find(lowertext(varname))) return 1
else return 0
//Returns sortedAreas list if populated
//else populates the list first before returning it
/proc/SortAreas()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/SortAreas() called tick#: [world.time]")
for(var/area/A in areas)
sortedAreas.Add(A)
sortTim(sortedAreas, /proc/cmp_name_asc)
/area/proc/addSorted()
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/area/proc/addSorted() called tick#: [world.time]")
sortedAreas.Add(src)
sortTim(sortedAreas, /proc/cmp_name_asc)
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all areas of that type in the world.
/proc/get_areas(var/areatype)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_areas() called tick#: [world.time]")
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -827,7 +789,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all turfs in areas of that type of that type in the world.
/proc/get_area_turfs(var/areatype)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_turfs() called tick#: [world.time]")
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -843,7 +804,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world.
/proc/get_area_all_atoms(var/areatype)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_all_atoms() called tick#: [world.time]")
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -882,7 +842,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
return CR
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
//writepanic("[__FILE__].[__LINE__] \\/proc/DuplicateObject() called tick#: [world.time]")
if(!original)
return null
@@ -902,7 +861,6 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/area/proc/copy_contents_to() called tick#: [world.time]")
//Takes: Area. Optional: If it should copy to areas that don't have plating
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
@@ -1045,18 +1003,15 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
proc/get_cardinal_dir(atom/A, atom/B)
//writepanic("[__FILE__].[__LINE__] \\/proc/get_cardinal_dir() called tick#: [world.time]")
var/dx = abs(B.x - A.x)
var/dy = abs(B.y - A.y)
return get_dir(A, B) & (rand() * (dx+dy) < dy ? 3 : 12)
//chances are 1:value. anyprob(1) will always return true
proc/anyprob(value)
//writepanic("[__FILE__].[__LINE__] \\/proc/anyprob() called tick#: [world.time]")
return (rand(1,value)==value)
proc/view_or_range(distance = world.view , center = usr , type)
//writepanic("[__FILE__].[__LINE__] \\/proc/view_or_range() called tick#: [world.time]")
switch(type)
if("view")
. = view(distance,center)
@@ -1065,7 +1020,6 @@ proc/view_or_range(distance = world.view , center = usr , type)
return
proc/oview_or_orange(distance = world.view , center = usr , type)
//writepanic("[__FILE__].[__LINE__] \\/proc/oview_or_orange() called tick#: [world.time]")
switch(type)
if("view")
. = oview(distance,center)
@@ -1074,7 +1028,6 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
return
proc/get_mob_with_client_list()
//writepanic("[__FILE__].[__LINE__] \\/proc/get_mob_with_client_list() called tick#: [world.time]")
var/list/mobs = list()
for(var/mob/M in mob_list)
if (M.client)
@@ -1083,7 +1036,6 @@ proc/get_mob_with_client_list()
/proc/parse_zone(zone)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/parse_zone() called tick#: [world.time]")
switch(zone)
if ("r_hand")
return "right hand"
@@ -1105,7 +1057,6 @@ proc/get_mob_with_client_list()
return zone
/proc/get_turf(const/atom/O)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_turf() called tick#: [world.time]")
if (isnull(O) || isarea(O) || !istype(O))
return
var/atom/A
@@ -1113,7 +1064,6 @@ proc/get_mob_with_client_list()
return A
/proc/get(atom/loc, type)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get() called tick#: [world.time]")
while(loc)
if(istype(loc, type))
return loc
@@ -1131,7 +1081,6 @@ var/global/list/common_tools = list(
/obj/item/weapon/crowbar)
/proc/is_surgery_tool(obj/item/W as obj)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/is_surgery_tool() called tick#: [world.time]")
return ( \
istype(W, /obj/item/weapon/scalpel) || \
istype(W, /obj/item/weapon/hemostat) || \
@@ -1143,14 +1092,12 @@ var/global/list/common_tools = list(
//check if mob is lying down on something we can operate him on.
/proc/can_operate(mob/living/carbon/M)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/can_operate() called tick#: [world.time]")
return (ishuman(M) && M.lying && \
locate(/obj/machinery/optable, M.loc) || \
(locate(/obj/structure/bed/roller, M.loc) && prob(75)) || \
(locate(/obj/structure/table/, M.loc) && prob(66)))
/proc/reverse_direction(var/dir)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/reverse_direction() called tick#: [world.time]")
switch(dir)
if(NORTH)
return SOUTH
@@ -1182,7 +1129,6 @@ var/list/WALLITEMS = list(
"/obj/structure/mirror", "/obj/structure/closet/fireaxecabinet", "obj/structure/sign", "obj/structure/painting"
)
/proc/gotwallitem(loc, dir)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/gotwallitem() called tick#: [world.time]")
for(var/obj/O in loc)
for(var/item in WALLITEMS)
if(istype(O, text2path(item)))
@@ -1216,11 +1162,9 @@ var/list/WALLITEMS = list(
proc/get_angle(atom/a, atom/b)
//writepanic("[__FILE__].[__LINE__] \\/proc/get_angle() called tick#: [world.time]")
return Atan2(b.y - a.y, b.x - a.x)
proc/rotate_icon(file, state, step = 1, aa = FALSE)
//writepanic("[__FILE__].[__LINE__] \\/proc/rotate_icon() called tick#: [world.time]")
var icon/base = icon(file, state)
var w, h, w2, h2
@@ -1246,13 +1190,11 @@ proc/rotate_icon(file, state, step = 1, aa = FALSE)
return result
/proc/has_edge(obj/O as obj)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/has_edge() called tick#: [world.time]")
if (!O) return 0
if(O.edge) return 1
return 0
proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first object holder of the type you specified
//writepanic("[__FILE__].[__LINE__] \\/proc/find_holder_of_type() called tick#: [world.time]")
var/atom/location = reference.loc //ie /mob to find the first mob holding it
while(!istype(location,/turf) && !istype(location,null))
if(istype(location,typepath))
@@ -1261,7 +1203,6 @@ proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first ob
return 0
/proc/get_distant_turf(var/turf/T,var/direction,var/distance)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_distant_turf() called tick#: [world.time]")
if(!T || !direction || !distance) return
var/dest_x = T.x
@@ -1283,7 +1224,6 @@ proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first ob
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dview() called tick#: [world.time]")
if(!center)
return
@@ -1303,7 +1243,6 @@ proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first ob
//Gets the Z level datum for this atom's Z level
/proc/get_z_level(var/atom/A)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_z_level() called tick#: [world.time]")
var/z
if(istype(A, /atom/movable))
var/turf/T = get_turf(A)
@@ -1349,7 +1288,6 @@ proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first ob
return null
/proc/adjustAngle(angle)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/adjustAngle() called tick#: [world.time]")
angle = round(angle) + 45
if(angle > 180)
angle -= 180

View File

@@ -20,17 +20,14 @@
holder = owner
/event/proc/Add(var/objectRef,var/procName)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/event/proc/Add() called tick#: [world.time]")
var/key="\ref[objectRef]:[procName]"
handlers[key]=list("o"=objectRef,"p"=procName)
return key
/event/proc/Remove(var/key)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/event/proc/Remove() called tick#: [world.time]")
return handlers.Remove(key)
/event/proc/Invoke(var/list/args)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/event/proc/Invoke() called tick#: [world.time]")
if(handlers.len==0)
return
for(var/key in handlers)

Some files were not shown because too many files have changed in this diff Show More