things with stuff (#6233)

* buncha things from upstream

* datums globals, onclick

* datums

* game folder, holy shit mirror bot why

* modules

* icons

* dme

* compiles cleanly

* tools purge

* updates maps

* double check just because. and wew lad

* incidentally, this needs more work first

* some things

* weh

* sound cleanup and icons

* reeeee

* compile issues

* oh look, fresh code sync

* cleans up some unused icons

* dirty vars

* reeeeeeeeeeeeeeee

* wew lad. fuck off with this already
This commit is contained in:
Poojawa
2018-04-02 03:53:25 -05:00
committed by deathride58
parent 832939d3ac
commit 5fa001c10f
838 changed files with 25446 additions and 23273 deletions
@@ -4218,12 +4218,8 @@
/turf/open/floor/plasteel,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"kZ" = (
/obj/machinery/atmospherics/components/trinary/mixer/flipped{
dir = 4;
node1_concentration = 0.8;
node2_concentration = 0.1;
on = 1;
target_pressure = 4500
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped{
dir = 4
},
/turf/open/floor/plasteel/floorgrime,
/area/ruin/unpowered/syndicate_lava_base/engineering)
@@ -6026,18 +6022,15 @@
icon_state = "1-2"
},
/obj/machinery/igniter{
id = "syndie_lavaland_Incinerator";
luminosity = 2;
on = 0
id = "syndie_lavaland_Incinerator"
},
/turf/open/floor/engine{
initial_gas_mix = "o2=14;n2=23;TEMP=300"
},
/area/ruin/unpowered/syndicate_lava_base/engineering)
"oB" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "syndie_lavaland_inc_in"
},
/obj/structure/sign/warning/vacuum/external{
+10 -26
View File
@@ -2245,12 +2245,8 @@
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
"fy" = (
/obj/machinery/atmospherics/components/trinary/mixer{
dir = 1;
icon_state = "mixer_off";
node1_concentration = 0.2;
node2_concentration = 0.8;
on = 1
/obj/machinery/atmospherics/components/trinary/mixer/airmix/inverse{
dir = 1
},
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
@@ -2276,9 +2272,8 @@
/turf/open/floor/plating,
/area/ruin/space/has_grav/deepstorage/power)
"fC" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 8;
frequency = 1441;
id_tag = "o2_out_bunker";
name = "oxygen out"
},
@@ -2323,7 +2318,6 @@
"fJ" = (
/obj/machinery/computer/atmos_control/tank{
dir = 8;
frequency = 1441;
input_tag = "o2_in_bunker";
name = "Oxygen Supply Control";
output_tag = "o2_out_bunker";
@@ -2338,7 +2332,6 @@
/area/ruin/space/has_grav/deepstorage/power)
"fL" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "o2_sensor_bunker"
},
/turf/open/floor/plating/airless,
@@ -2460,10 +2453,8 @@
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
"ga" = (
/obj/machinery/atmospherics/components/trinary/filter{
dir = 1;
filter_type = "o2";
on = 1
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2{
dir = 1
},
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
@@ -2482,9 +2473,8 @@
/turf/open/floor/plating,
/area/ruin/space/has_grav/deepstorage/power)
"gd" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 8;
frequency = 1441;
id = "n2_in_bunker"
},
/turf/open/floor/plating/airless,
@@ -2607,9 +2597,8 @@
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
"gv" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 8;
frequency = 1441;
id_tag = "n2_out_bunker";
name = "nitrogen out"
},
@@ -2666,7 +2655,6 @@
"gC" = (
/obj/machinery/computer/atmos_control/tank{
dir = 8;
frequency = 1441;
input_tag = "n2_in_bunker";
name = "Nitrogen Supply Control";
output_tag = "n2_out_bunker";
@@ -2676,7 +2664,6 @@
/area/ruin/space/has_grav/deepstorage/power)
"gD" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "n2_sensor_bunker"
},
/turf/open/floor/plating/airless,
@@ -2747,17 +2734,14 @@
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
"gO" = (
/obj/machinery/atmospherics/components/trinary/filter{
dir = 1;
filter_type = "n2";
on = 1
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2{
dir = 1
},
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/deepstorage/power)
"gP" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 8;
frequency = 1441;
id = "o2_in_bunker"
},
/turf/open/floor/plating/airless,
@@ -733,9 +733,8 @@
/turf/open/floor/plating,
/area/ruin/space/has_grav/powered/cat_man)
"cl" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 8;
frequency = 1441;
id_tag = "n2o_out_cat";
name = "n2o out"
},
@@ -768,9 +767,8 @@
/turf/open/floor/plating/airless,
/area/ruin/space/has_grav/powered/cat_man)
"cs" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 1;
frequency = 1441;
id_tag = "o2_out_cat";
name = "freezer vent"
},
+3 -5
View File
@@ -4190,10 +4190,9 @@
/turf/open/floor/plating/airless,
/area/ruin/space/has_grav/ancientstation/atmo)
"kW" = (
/obj/machinery/atmospherics/components/binary/pump{
/obj/machinery/atmospherics/components/binary/pump/on{
dir = 8;
name = "Air Outlet Pump";
on = 1
name = "Air Outlet Pump"
},
/turf/open/floor/plasteel/airless/floorgrime,
/area/ruin/space/has_grav/ancientstation/atmo)
@@ -4206,8 +4205,7 @@
},
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on{
dir = 8;
frequency = 1441;
id_tag = "air_out";
id_tag = "oldstation_air_out";
name = "air output"
},
/turf/open/floor/engine/air,
+2 -2
View File
@@ -1101,7 +1101,7 @@
/turf/open/floor/plasteel/white,
/area/awaymission/academy/classrooms)
"ea" = (
/obj/machinery/igniter,
/obj/machinery/igniter/on,
/turf/open/floor/plating,
/area/awaymission/academy/classrooms)
"eb" = (
@@ -2943,7 +2943,7 @@
/turf/open/space,
/area/space/nearstation)
"jC" = (
/obj/machinery/igniter,
/obj/machinery/igniter/on,
/turf/open/floor/plating,
/area/awaymission/academy/academyaft)
"jD" = (
+1 -5
View File
@@ -458,11 +458,7 @@
/turf/open/floor/plasteel/white,
/area/awaymission/cabin)
"bG" = (
/obj/machinery/atmospherics/components/unary/thermomachine/freezer{
target_temperature = 80;
dir = 2;
on = 1
},
/obj/machinery/atmospherics/components/unary/thermomachine/freezer/on,
/turf/open/floor/plasteel/white,
/area/awaymission/cabin)
"bH" = (
+1 -1
View File
@@ -3209,7 +3209,7 @@
/turf/open/floor/plasteel,
/area/awaymission/centcomAway/thunderdome)
"lK" = (
/obj/machinery/igniter,
/obj/machinery/igniter/on,
/turf/open/floor/plasteel{
icon_state = "floor"
},
+6 -15
View File
@@ -6861,12 +6861,8 @@
/turf/open/floor/plasteel/floorgrime,
/area/awaymission/snowdin/post/engineering)
"qx" = (
/obj/machinery/atmospherics/components/trinary/mixer/flipped{
dir = 4;
node1_concentration = 0.8;
node2_concentration = 0.1;
on = 1;
target_pressure = 4500
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped{
dir = 4
},
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/engineering)
@@ -7367,9 +7363,8 @@
/turf/open/floor/plating,
/area/awaymission/snowdin/post)
"rI" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "syndie_lavaland_inc_in";
pixel_x = 5;
pixel_y = 5
@@ -7710,16 +7705,13 @@
icon_state = "1-2"
},
/obj/machinery/igniter{
id = "snowdin_turbine_ignitor";
luminosity = 2;
on = 0
id = "snowdin_turbine_ignitor"
},
/turf/open/floor/engine/vacuum,
/area/awaymission/snowdin/post/engineering)
"sC" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "snowdin_incin_in"
},
/turf/open/floor/engine/vacuum,
@@ -8714,9 +8706,8 @@
},
/area/awaymission/snowdin/cave/mountain)
"vG" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "snowdin_incin_in"
},
/turf/open/floor/plating/snowed/cavern,
+16 -49
View File
@@ -7455,7 +7455,6 @@
/area/awaymission/undergroundoutpost45/engineering)
"pa" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "UO45_air_sensor"
},
/turf/open/floor/engine/air,
@@ -7765,9 +7764,8 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"pE" = (
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos{
dir = 2;
frequency = 1441;
icon_state = "in";
id_tag = "UO45_air_out";
name = "air out"
@@ -7778,9 +7776,8 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"pF" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 2;
frequency = 1441;
id = "UO45_air_in"
},
/turf/open/floor/engine{
@@ -8060,11 +8057,7 @@
},
/area/awaymission/undergroundoutpost45/research)
"ql" = (
/obj/machinery/atmospherics/components/unary/thermomachine/freezer{
target_temperature = 80;
dir = 2;
on = 1
},
/obj/machinery/atmospherics/components/unary/thermomachine/freezer/on,
/turf/open/floor/plasteel/dark{
heat_capacity = 1e+006
},
@@ -8340,7 +8333,6 @@
"qK" = (
/obj/machinery/atmospherics/pipe/simple/cyan/visible,
/obj/machinery/computer/atmos_control/tank{
frequency = 1441;
input_tag = "UO45_air_in";
name = "Mixed Air Supply Control";
output_tag = "UO45_air_out";
@@ -8352,13 +8344,8 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"qL" = (
/obj/machinery/atmospherics/components/trinary/mixer{
dir = 1;
node1_concentration = 0.8;
node2_concentration = 0.2;
on = 1;
req_access = null;
target_pressure = 4500
/obj/machinery/atmospherics/components/trinary/mixer/airmix{
dir = 1
},
/turf/open/floor/plasteel/arrival{
dir = 5;
@@ -8704,8 +8691,7 @@
/area/awaymission/undergroundoutpost45/engineering)
"rq" = (
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible,
/obj/machinery/meter{
frequency = 1441;
/obj/machinery/meter/atmos{
id_tag = "UO45_distro_meter";
name = "Distribution Loop"
},
@@ -9360,7 +9346,6 @@
"sr" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
dir = 8;
frequency = 1441;
id_tag = "UO45_mix_in";
name = "distro out"
},
@@ -9737,7 +9722,6 @@
"tc" = (
/obj/machinery/computer/atmos_control/tank{
dir = 8;
frequency = 1441;
input_tag = "UO45_mix_in";
name = "Gas Mix Tank Control";
output_tag = "UO45_mix_in";
@@ -9765,16 +9749,14 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"te" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 8;
frequency = 1441;
id = "UO45_mix_in"
},
/turf/open/floor/engine/vacuum,
/area/awaymission/undergroundoutpost45/engineering)
"tf" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "UO45_mix_sensor"
},
/turf/open/floor/engine/vacuum,
@@ -10043,8 +10025,7 @@
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible{
dir = 8
},
/obj/machinery/meter{
frequency = 1441;
/obj/machinery/meter/atmos{
id_tag = "UO45_waste_meter";
name = "Waste Loop"
},
@@ -10389,10 +10370,8 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"um" = (
/obj/machinery/atmospherics/components/trinary/filter{
dir = 4;
filter_type = "n2";
on = 1
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2{
dir = 4
},
/turf/open/floor/plasteel/red/side{
dir = 10;
@@ -10405,7 +10384,6 @@
},
/obj/machinery/computer/atmos_control/tank{
dir = 1;
frequency = 1441;
input_tag = "UO45_n2_in";
name = "Nitrogen Supply Control";
output_tag = "UO45_n2_out";
@@ -10430,10 +10408,8 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"up" = (
/obj/machinery/atmospherics/components/trinary/filter{
dir = 4;
filter_type = "o2";
on = 1
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2{
dir = 4
},
/turf/open/floor/plasteel/blue/side{
dir = 10;
@@ -10447,7 +10423,6 @@
/obj/machinery/atmospherics/pipe/simple/cyan/visible,
/obj/machinery/computer/atmos_control/tank{
dir = 1;
frequency = 1441;
input_tag = "UO45_o2_in";
name = "Oxygen Supply Control";
output_tag = "UO45_o2_out";
@@ -10533,7 +10508,6 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/computer/atmos_control{
dir = 4;
frequency = 1441;
name = "Tank Monitor";
sensors = list("UO45_n2_sensor" = "Nitrogen", "UO45_o2_sensor" = "Oxygen", "UO45_mix_sensor" = "Gas Mix Tank")
},
@@ -10716,7 +10690,6 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/computer/atmos_control{
dir = 4;
frequency = 1441;
level = 3;
name = "Distribution and Waste Monitor";
sensors = list("UO45_air_sensor" = "Mixed Air Supply Tank", "UO45_distro_meter" = "Distribution Loop", "UO45_waste_meter" = "Waste Loop")
@@ -10833,34 +10806,30 @@
},
/area/awaymission/undergroundoutpost45/engineering)
"vd" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "UO45_n2_in"
},
/turf/open/floor/engine/n2,
/area/awaymission/undergroundoutpost45/engineering)
"ve" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 1;
frequency = 1441;
id_tag = "UO45_n2_out";
name = "nitrogen out"
},
/turf/open/floor/engine/n2,
/area/awaymission/undergroundoutpost45/engineering)
"vf" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "UO45_o2_in"
},
/turf/open/floor/engine/o2,
/area/awaymission/undergroundoutpost45/engineering)
"vg" = (
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on{
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos{
dir = 1;
frequency = 1441;
id_tag = "UO45_o2_out";
name = "oxygen out"
},
@@ -11094,7 +11063,6 @@
/area/awaymission/undergroundoutpost45/engineering)
"vD" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "UO45_n2_sensor"
},
/obj/machinery/light/small,
@@ -11106,7 +11074,6 @@
/area/awaymission/undergroundoutpost45/engineering)
"vF" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "UO45_o2_sensor"
},
/obj/machinery/light/small,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+6 -19
View File
@@ -1055,22 +1055,15 @@
/turf/open/floor/plasteel,
/area/shuttle/pirate)
"cv" = (
/obj/machinery/atmospherics/components/binary/pump{
/obj/machinery/atmospherics/components/binary/pump/on{
dir = 4;
name = "N2 Out";
on = 1;
target_pressure = 4500
},
/turf/open/floor/plasteel/floorgrime,
/area/shuttle/pirate)
"cw" = (
/obj/machinery/atmospherics/components/trinary/mixer/flipped{
name = "Air Mixer";
node1_concentration = 0.8;
node2_concentration = 0.2;
on = 1;
target_pressure = 4500
},
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped,
/turf/open/floor/plasteel/floorgrime,
/area/shuttle/pirate)
"cx" = (
@@ -1221,10 +1214,9 @@
/turf/open/floor/plasteel,
/area/shuttle/pirate)
"cK" = (
/obj/machinery/atmospherics/components/binary/pump{
/obj/machinery/atmospherics/components/binary/pump/on{
dir = 4;
name = "O2 Out";
on = 1;
target_pressure = 4500
},
/turf/open/floor/plasteel/floorgrime,
@@ -1596,9 +1588,8 @@
pixel_y = -24
},
/obj/effect/turf_decal/stripes/line,
/obj/machinery/atmospherics/components/binary/pump{
/obj/machinery/atmospherics/components/binary/pump/on{
dir = 2;
on = 1;
target_pressure = 4500
},
/obj/machinery/button/door{
@@ -1720,10 +1711,7 @@
/area/shuttle/pirate)
"dN" = (
/obj/machinery/igniter{
icon_state = "igniter0";
id = "pirateincinerator";
luminosity = 2;
on = 0
id = "pirateincinerator"
},
/turf/open/floor/engine/vacuum,
/area/shuttle/pirate)
@@ -1734,9 +1722,8 @@
/turf/open/floor/engine/vacuum,
/area/shuttle/pirate)
"dP" = (
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos{
dir = 1;
frequency = 1441;
id = "inc_in"
},
/obj/structure/sign/warning/vacuum/external{
+43
View File
@@ -149,6 +149,49 @@
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
//ATMOSIA GAS MONITOR TAGS
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
#define ATMOS_GAS_MONITOR_OUTPUT_O2 "o2_out"
#define ATMOS_GAS_MONITOR_SENSOR_O2 "o2_sensor"
#define ATMOS_GAS_MONITOR_INPUT_TOX "tox_in"
#define ATMOS_GAS_MONITOR_OUTPUT_TOX "tox_out"
#define ATMOS_GAS_MONITOR_SENSOR_TOX "tox_sensor"
#define ATMOS_GAS_MONITOR_INPUT_AIR "air_in"
#define ATMOS_GAS_MONITOR_OUTPUT_AIR "air_out"
#define ATMOS_GAS_MONITOR_SENSOR_AIR "air_sensor"
#define ATMOS_GAS_MONITOR_INPUT_MIX "mix_in"
#define ATMOS_GAS_MONITOR_OUTPUT_MIX "mix_out"
#define ATMOS_GAS_MONITOR_SENSOR_MIX "mix_sensor"
#define ATMOS_GAS_MONITOR_INPUT_N2O "n2o_in"
#define ATMOS_GAS_MONITOR_OUTPUT_N2O "n2o_out"
#define ATMOS_GAS_MONITOR_SENSOR_N2O "n2o_sensor"
#define ATMOS_GAS_MONITOR_INPUT_N2 "n2_in"
#define ATMOS_GAS_MONITOR_OUTPUT_N2 "n2_out"
#define ATMOS_GAS_MONITOR_SENSOR_N2 "n2_sensor"
#define ATMOS_GAS_MONITOR_INPUT_CO2 "co2_in"
#define ATMOS_GAS_MONITOR_OUTPUT_CO2 "co2_out"
#define ATMOS_GAS_MONITOR_SENSOR_CO2 "co2_sensor"
#define ATMOS_GAS_MONITOR_INPUT_INCINERATOR "incinerator_in"
#define ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR "incinerator_out"
#define ATMOS_GAS_MONITOR_SENSOR_INCINERATOR "incinerator_sensor"
#define ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB "toxinslab_in"
#define ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB "toxinslab_out"
#define ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB "toxinslab_sensor"
#define ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION "distro-loop_meter"
#define ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE "atmos-waste_loop_meter"
#define ATMOS_GAS_MONITOR_WASTE_ENGINE "engine-waste_out"
#define ATMOS_GAS_MONITOR_WASTE_ATMOS "atmos-waste_out"
//MULTIPIPES
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
#define PIPING_LAYER_MIN 1
+9 -9
View File
@@ -19,15 +19,15 @@
#define SHAME 16
#define MANUAL_SUICIDE 32 //suicide_act will do the actual killing.
#define STUN "stun"
#define KNOCKDOWN "knockdown"
#define UNCONSCIOUS "unconscious"
#define IRRADIATE "irradiate"
#define STUTTER "stutter"
#define SLUR "slur"
#define EYE_BLUR "eye_blur"
#define DROWSY "drowsy"
#define JITTER "jitter"
#define EFFECT_STUN "stun"
#define EFFECT_KNOCKDOWN "knockdown"
#define EFFECT_UNCONSCIOUS "unconscious"
#define EFFECT_IRRADIATE "irradiate"
#define EFFECT_STUTTER "stutter"
#define EFFECT_SLUR "slur"
#define EFFECT_EYE_BLUR "eye_blur"
#define EFFECT_DROWSY "drowsy"
#define EFFECT_JITTER "jitter"
//Bitflags defining which status effects could be or are inflicted on a mob
#define CANSTUN 1
+23 -2
View File
@@ -30,8 +30,8 @@
#define EXAMINE_POSITION_BEFORE 2
//End positions
#define COMPONENT_EXNAME_CHANGED 1
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (/atom/movable, /atom)
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (/atom/movable)
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
@@ -47,32 +47,53 @@
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_ROTATE "atom_rotate" //from base of atom/shuttleRotate(): (rotation, params)
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
/////////////////
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
/////////////////
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user)
#define COMPONENT_NO_MOUSEDROP 1
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user)
// /area signals
#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M)
#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M)
// /atom/movable signals
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" //from base of atom/movable/Uncrossed(): (/atom/movable)
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (/atom)
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" //from base of mob/living/hitby(): (mob/living/target, hit_zone)
#define COMSIG_MOVABLE_BUCKLE "buckle" //from base of atom/movable/buckle_mob(): (mob, force)
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" //from base of atom/movable/unbuckle_mob(): (mob, force)
#define COMSIG_MOVABLE_THROW "movable_throw" //from base of atom/movable/throw_at(): (datum/thrownthing, spin)
// /obj signals
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
// /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
#define COMPONENT_NO_ATTACK_OBJ 1
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
#define COMPONENT_NO_ATTACK 1
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
#define COMSIG_ITEM_DROPPED "item_drop"
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
+3
View File
@@ -59,6 +59,9 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
// Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
#define NO_MAT_REDEMPTION_2 1024
// LAVA_PROTECT used on the flags_2 variable for both SUIT and HEAD items, and stops lava damage. Must be present in both to stop lava damage.
#define LAVA_PROTECT_2 2048
//turf-only flags
#define NOJAUNT_1 1
#define UNUSED_TRANSIT_TURF_1 2
+22
View File
@@ -0,0 +1,22 @@
#define INTERACT_ATOM_REQUIRES_ANCHORED 1 //whether can_interact() checks for anchored. only works on movables.
#define INTERACT_ATOM_ATTACK_HAND 2 //calls try_interact() on attack_hand() and returns that.
#define INTERACT_ATOM_UI_INTERACT 4 //automatically calls and returns ui_interact() on interact().
#define INTERACT_ATOM_REQUIRES_DEXTERITY 8 //user must be dextrous
#define INTERACT_ATOM_IGNORE_INCAPACITATED 16 //ignores incapacitated check
#define INTERACT_ATOM_IGNORE_RESTRAINED 32 //incapacitated check ignores restrained
#define INTERACT_ATOM_CHECK_GRAB 64 //incapacitated check checks grab
#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND 128//prevents leaving fingerprints automatically on attack_hand
#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT 256 //adds hiddenprints instead of fingerprints on interact
#define INTERACT_ITEM_ATTACK_HAND_PICKUP 1 //attempt pickup on attack_hand for items
#define INTERACT_MACHINE_OPEN 1 //can_interact() while open
#define INTERACT_MACHINE_OFFLINE 2 //can_interact() while offline
#define INTERACT_MACHINE_WIRES_IF_OPEN 4 //try to interact with wires if open
#define INTERACT_MACHINE_ALLOW_SILICON 8 //let silicons interact
#define INTERACT_MACHINE_OPEN_SILICON 16 //let silicons interact while open
#define INTERACT_MACHINE_REQUIRES_SILICON 32 //must be silicon to interact
#define INTERACT_MACHINE_SET_MACHINE 64 //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!--------------------------
//This flag determines if a machine set_machine's the user when the user uses it, making updateUsrDialog make the user re-call interact() on it.
//THIS FLAG IS ON ALL MACHINES BY DEFAULT, NEEDS TO BE RE-EVALUATED LATER!!
+2
View File
@@ -90,6 +90,8 @@
//Silicon mobs
#define issilicon(A) (istype(A, /mob/living/silicon))
#define issiliconoradminghost(A) (istype(A, /mob/living/silicon) || IsAdminGhost(A))
#define iscyborg(A) (istype(A, /mob/living/silicon/robot))
#define isAI(A) (istype(A, /mob/living/silicon/ai))
+3
View File
@@ -133,6 +133,9 @@
//Slime evolution threshold. Controls how fast slimes can split/grow
#define SLIME_EVOLUTION_THRESHOLD 10
//Slime extract crossing. Controls how many extracts is required to feed to a slime to core-cross.
#define SLIME_EXTRACT_CROSSING_REQUIRED 10
//Slime commands defines
#define SLIME_FRIENDSHIP_FOLLOW 3 //Min friendship to order it to follow
#define SLIME_FRIENDSHIP_STOPEAT 5 //Min friendship to order it to stop eating someone
+2 -3
View File
@@ -17,8 +17,7 @@
#define MONKEY_RESIST_PROB 50 // resist out of restraints
// when the monkey is idle
#define MONKEY_PULL_AGGRO_PROB 5 // aggro against the mob pulling it
#define MONKEY_PICKUP_PROB 5 // if not currently getting an item, pickup an item around it
#define MONKEY_STEAL_PROB 5 // if not currently getting an item, steal an item from someone around it
#define MONKEY_SHENANIGAN_PROB 5 // chance of getting into mischief, i.e. finding/stealing items
// when the monkey is hunting
#define MONKEY_ATTACK_DISARM_PROB 50 // disarm an armed attacker
#define MONKEY_WEAPON_PROB 20 // if not currently getting an item, search for a weapon around it
@@ -35,4 +34,4 @@
#define MONKEY_HUNT_FRUSTRATION_LIMIT 8 // Chase after an enemy before giving up
#define MONKEY_DISPOSE_FRUSTRATION_LIMIT 16 // Dispose of a body before giving up
#define MONKEY_AGGRESSIVE_MVM_PROB 0 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting
#define MONKEY_AGGRESSIVE_MVM_PROB 0 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting
+1
View File
@@ -8,6 +8,7 @@
#define DANGEROUS_POSSESSION 16 //Admin possession yes/no
#define ON_BLUEPRINTS 32 //Are we visible on the station blueprints at roundstart?
#define UNIQUE_RENAME 64 // can you customize the description/name of the thing?
#define USES_TGUI 128 //put on things that use tgui on ui_interact instead of custom/old UI.
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
+1
View File
@@ -14,6 +14,7 @@
#define SOUND_ANNOUNCEMENTS 2048
#define DISABLE_DEATHRATTLE 4096
#define DISABLE_ARRIVALRATTLE 8192
#define COMBOHUD_LIGHTING 16384
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
+7
View File
@@ -79,3 +79,10 @@
#define STATUS_EFFECT_CRUSHERDAMAGETRACKING /datum/status_effect/crusher_damage //tracks total kinetic crusher damage on a target
#define STATUS_EFFECT_SYPHONMARK /datum/status_effect/syphon_mark //tracks kills for the KA death syphon module
/////////////
// SLIME //
/////////////
#define STATUS_EFFECT_RAINBOWPROTECTION /datum/status_effect/rainbow_protection //Invulnerable and pacifistic
#define STATUS_EFFECT_SLIMESKIN /datum/status_effect/slimeskin //Increased armor
+3 -1
View File
@@ -23,6 +23,7 @@
#define TRAIT_SHOCKIMMUNE "shock_immunity"
#define TRAIT_STABLEHEART "stable_heart"
#define TRAIT_RESISTHEAT "resist_heat"
#define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue.
#define TRAIT_RESISTCOLD "resist_cold"
#define TRAIT_RESISTHIGHPRESSURE "resist_high_pressure"
#define TRAIT_RESISTLOWPRESSURE "resist_low_pressure"
@@ -42,7 +43,8 @@
#define TRAIT_DEPRESSION "depression"
#define TRAIT_JOLLY "jolly"
#define TRAIT_NOCRITDAMAGE "no_crit"
#define TRAIT_NOSLIPWATER "noslip_water"
#define TRAIT_NOSLIPALL "noslip_all"
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
+5
View File
@@ -1,3 +1,8 @@
//retvals for attempt_wires_interaction
#define WIRE_INTERACTION_FAIL 0
#define WIRE_INTERACTION_SUCCESSFUL 1
#define WIRE_INTERACTION_BLOCK 2 //don't do anything else rather than open wires and whatever else.
#define WIRE_DUD_PREFIX "__dud"
#define WIRE_ACTIVATE "Activate"
#define WIRE_AI "AI Connection"
+1 -1
View File
@@ -15,7 +15,7 @@
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
#define LAZYFIND(L, V) L ? L.Find(V) : 0
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null)
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
+7 -8
View File
@@ -398,18 +398,12 @@ Proc for attack log creation, because really why not
if(holding)
holdingnull = 0 //Users hand started holding something, check to see if it's still holding that
delay *= user.do_after_coefficent()
var/datum/progressbar/progbar
if (progress)
progbar = new(user, delay, target)
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
if(mood)
switch(mood.sanity) //Alters do_after delay based on how sane you are
if(SANITY_INSANE to SANITY_DISTURBED)
delay *= 1.25
if(SANITY_NEUTRAL to SANITY_GREAT)
delay *= 0.90
var/endtime = world.time + delay
var/starttime = world.time
. = 1
@@ -444,6 +438,10 @@ Proc for attack log creation, because really why not
if (progress)
qdel(progbar)
/mob/proc/do_after_coefficent() // This gets added to the delay on a do_after, default 1
. = 1
return
/proc/do_after_mob(mob/user, var/list/targets, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks)
if(!user || !targets)
return 0
@@ -603,6 +601,7 @@ Proc for attack log creation, because really why not
log_adminsay(logmessage)
if(LOGOOC)
log_ooc(logmessage)
log_looc(logmessage) //CITADEL EDIT, logging LOOC because why not
else
warning("Invalid speech logging type detected. [logtype]. Defaulting to say")
log_say(logmessage)
+50 -50
View File
@@ -1,50 +1,50 @@
/proc/mouse_angle_from_client(client/client)
var/list/mouse_control = params2list(client.mouseParams)
if(mouse_control["screen-loc"] && client)
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
var/list/screenview = getviewsize(client.view)
var/screenviewX = screenview[1] * world.icon_size
var/screenviewY = screenview[2] * world.icon_size
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
var/oy = round(screenviewY/2) - client.pixel_y //"origin" y
var/angle = SIMPLIFY_DEGREES(ATAN2(y - oy, x - ox))
return angle
//Wow, specific name!
/proc/mouse_absolute_datum_map_position_from_client(client/client)
if(!isloc(client.mob.loc))
return
var/list/mouse_control = params2list(client.mouseParams)
var/cx = client.mob.x
var/cy = client.mob.y
var/cz = client.mob.z
if(mouse_control["screen-loc"])
var/x = 0
var/y = 0
var/z = 0
var/p_x = 0
var/p_y = 0
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/sx = text2num(screen_loc_X[1])
var/sy = text2num(screen_loc_Y[1])
//Get the resolution of the client's current screen size.
var/list/screenview = getviewsize(client.view)
var/svx = screenview[1]
var/svy = screenview[2]
var/cox = round((svx - 1) / 2)
var/coy = round((svy - 1) / 2)
x = cx + (sx - 1 - cox)
y = cy + (sy - 1 - coy)
z = cz
p_x = text2num(screen_loc_X[2])
p_y = text2num(screen_loc_Y[2])
return new /datum/position(x, y, z, p_x, p_y)
/proc/mouse_angle_from_client(client/client)
var/list/mouse_control = params2list(client.mouseParams)
if(mouse_control["screen-loc"] && client)
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
var/list/screenview = getviewsize(client.view)
var/screenviewX = screenview[1] * world.icon_size
var/screenviewY = screenview[2] * world.icon_size
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
var/oy = round(screenviewY/2) - client.pixel_y //"origin" y
var/angle = SIMPLIFY_DEGREES(ATAN2(y - oy, x - ox))
return angle
//Wow, specific name!
/proc/mouse_absolute_datum_map_position_from_client(client/client)
if(!isloc(client.mob.loc))
return
var/list/mouse_control = params2list(client.mouseParams)
var/cx = client.mob.x
var/cy = client.mob.y
var/cz = client.mob.z
if(mouse_control["screen-loc"])
var/x = 0
var/y = 0
var/z = 0
var/p_x = 0
var/p_y = 0
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/sx = text2num(screen_loc_X[1])
var/sy = text2num(screen_loc_Y[1])
//Get the resolution of the client's current screen size.
var/list/screenview = getviewsize(client.view)
var/svx = screenview[1]
var/svy = screenview[2]
var/cox = round((svx - 1) / 2)
var/coy = round((svy - 1) / 2)
x = cx + (sx - 1 - cox)
y = cy + (sy - 1 - coy)
z = cz
p_x = text2num(screen_loc_X[2])
p_y = text2num(screen_loc_Y[2])
return new /datum/position(x, y, z, p_x, p_y)
+5 -1
View File
@@ -24,4 +24,8 @@ GLOBAL_LIST_EMPTY(whitelisted_species_list)
/proc/log_mentor(text)
GLOB.mentorlog.Add(text)
GLOB.world_game_log << "\[[time_stamp()]]MENTOR: [text]"
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]MENTOR: [text]")
/proc/log_looc(text)
if (CONFIG_GET(flag/log_ooc))
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]LOOC: [text]")
+1 -1
View File
@@ -539,7 +539,7 @@ Turf and target are separate in case you want to teleport some distance from a t
return assembled
/atom/proc/GetAllContentsIgnoring(list/ignore_typecache)
if(!ignore_typecache)
if(!length(ignore_typecache))
return GetAllContents()
var/list/processing = list(src)
var/list/assembled = list()
+39 -39
View File
@@ -1,39 +1,39 @@
/datum/projectile_data
var/src_x
var/src_y
var/time
var/distance
var/power_x
var/power_y
var/dest_x
var/dest_y
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
var/power_x, var/power_y, var/dest_x, var/dest_y)
src.src_x = src_x
src.src_y = src_y
src.time = time
src.distance = distance
src.power_x = power_x
src.power_y = power_y
src.dest_x = dest_x
src.dest_y = dest_y
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
// 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]
// Thanks to VistaPOWA for this function
var/power_x = power * cos(angle)
var/power_y = power * sin(angle)
var/time = 2* power_y / 10 //10 = g
var/distance = time * power_x
var/dest_x = src_x + distance*sin(rotation);
var/dest_y = src_y + distance*cos(rotation);
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
/datum/projectile_data
var/src_x
var/src_y
var/time
var/distance
var/power_x
var/power_y
var/dest_x
var/dest_y
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
var/power_x, var/power_y, var/dest_x, var/dest_y)
src.src_x = src_x
src.src_y = src_y
src.time = time
src.distance = distance
src.power_x = power_x
src.power_y = power_y
src.dest_x = dest_x
src.dest_y = dest_y
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
// 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]
// Thanks to VistaPOWA for this function
var/power_x = power * cos(angle)
var/power_y = power * sin(angle)
var/time = 2* power_y / 10 //10 = g
var/distance = time * power_x
var/dest_x = src_x + distance*sin(rotation);
var/dest_y = src_y + distance*cos(rotation);
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
+7 -1
View File
@@ -9,4 +9,10 @@
var/list/viewrangelist = splittext(view,"x")
viewX = text2num(viewrangelist[1])
viewY = text2num(viewrangelist[2])
return list(viewX, viewY)
return list(viewX, viewY)
/proc/in_view_range(mob/user, atom/A)
var/list/view_range = getviewsize(user.client.view)
var/turf/source = get_turf(user)
var/turf/target = get_turf(A)
return ISINRANGE(target.x, source.x - view_range[1], source.x + view_range[1]) && ISINRANGE(target.y, source.y - view_range[1], source.y + view_range[1])
+4
View File
@@ -1,7 +1,11 @@
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
//uncommented, but not visible in the release version)
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
#ifdef TESTING
#define DATUMVAR_DEBUGGING_MODE
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
//implies FIND_REF_NO_CHECK_TICK
+111
View File
@@ -0,0 +1,111 @@
GLOBAL_LIST_INIT(bitfields, list(
"obj_flags" = list(
"EMAGGED" = EMAGGED,
"IN_USE" = IN_USE,
"CAN_BE_HIT" = CAN_BE_HIT,
"BEING_SHOCKED" = BEING_SHOCKED,
"DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION,
"ON_BLUEPRINTS" = ON_BLUEPRINTS,
"UNIQUE_RENAME" = UNIQUE_RENAME,
"USES_TGUI" = USES_TGUI
),
"datum_flags" = list(
"DF_USE_TAG" = DF_USE_TAG,
"DF_VAR_EDITED" = DF_VAR_EDITED
),
"item_flags" = list(
"BEING_REMOVED" = BEING_REMOVED,
"IN_INVENTORY" = IN_INVENTORY,
"FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE,
"NEEDS_PERMIT" = NEEDS_PERMIT
),
"admin_flags" = list(
"BUILDMODE" = R_BUILDMODE,
"ADMIN" = R_ADMIN,
"BAN" = R_BAN,
"FUN" = R_FUN,
"SERVER" = R_SERVER,
"DEBUG" = R_DEBUG,
"POSSESS" = R_POSSESS,
"PERMISSIONS" = R_PERMISSIONS,
"STEALTH" = R_STEALTH,
"POLL" = R_POLL,
"VAREDIT" = R_VAREDIT,
"SOUNDS" = R_SOUNDS,
"SPAWN" = R_SPAWN,
"AUTOLOGIN" = R_AUTOLOGIN,
"DBRANKS" = R_DBRANKS
),
"interaction_flags_atom" = list(
"INTERACT_ATOM_REQUIRES_ANCHORED" = INTERACT_ATOM_REQUIRES_ANCHORED,
"INTERACT_ATOM_ATTACK_HAND" = INTERACT_ATOM_ATTACK_HAND,
"INTERACT_ATOM_UI_INTERACT" = INTERACT_ATOM_UI_INTERACT,
"INTERACT_ATOM_REQUIRES_DEXTERITY" = INTERACT_ATOM_REQUIRES_DEXTERITY,
"INTERACT_ATOM_IGNORE_INCAPACITATED" = INTERACT_ATOM_IGNORE_INCAPACITATED,
"INTERACT_ATOM_IGNORE_RESTRAINED" = INTERACT_ATOM_IGNORE_RESTRAINED,
"INTERACT_ATOM_CHECK_GRAB" = INTERACT_ATOM_CHECK_GRAB,
"INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND" = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND,
"INTERACT_ATOM_NO_FINGERPRINT_INTERACT" = INTERACT_ATOM_NO_FINGERPRINT_INTERACT
),
"interaction_flags_machine" = list(
"INTERACT_MACHINE_OPEN" = INTERACT_MACHINE_OPEN,
"INTERACT_MACHINE_OFFLINE" = INTERACT_MACHINE_OFFLINE,
"INTERACT_MACHINE_WIRES_IF_OPEN" = INTERACT_MACHINE_WIRES_IF_OPEN,
"INTERACT_MACHINE_ALLOW_SILICON" = INTERACT_MACHINE_ALLOW_SILICON,
"INTERACT_MACHINE_OPEN_SILICON" = INTERACT_MACHINE_OPEN_SILICON,
"INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON
),
"pass_flags" = list(
"PASSTABLE" = PASSTABLE,
"PASSGLASS" = PASSGLASS,
"PASSGRILLE" = PASSGRILLE,
"PASSBLOB" = PASSBLOB,
"PASSMOB" = PASSMOB,
"PASSCLOSEDTURF" = PASSCLOSEDTURF,
"LETPASSTHROW" = LETPASSTHROW
),
"movement_type" = list(
"GROUND" = GROUND,
"FLYING" = FLYING
),
"resistance_flags" = list(
"LAVA_PROOF" = LAVA_PROOF,
"FIRE_PROOF" = FIRE_PROOF,
"FLAMMABLE" = FLAMMABLE,
"ON_FIRE" = ON_FIRE,
"UNACIDABLE" = UNACIDABLE,
"ACID_PROOF" = ACID_PROOF,
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
"FREEZE_PROOF" = FREEZE_PROOF
),
"reagents_holder_flags" = list(
"REAGENT_NOREACT" = REAGENT_NOREACT
),
"flags_1" = list(
"STOPSPRESSUREDMAGE_1 / NOJAUNT_1 (turfs)" = STOPSPRESSUREDMAGE_1,
"NODROP_1 / UNUSED_TRANSIT_TURF_1 (turfs)" = NODROP_1,
"NOBLUDGEON_1 / CAN_BE_DIRTY_1 (turfs)" = NOBLUDGEON_1,
"MASKINTERNALS_1" = MASKINTERNALS_1,
"HEAR_1 / NO_DEATHRATTLE_1 (turfs)" = HEAR_1,
"CHECK_RICOCHET_1 / NO_RUINS_1 (turfs)" = CHECK_RICOCHET_1,
"CONDUCT_1 / NO_LAVA_GEN_1" = CONDUCT_1,
"ABSTRACT_1" = ABSTRACT_1,
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
"NOSLIP_1" = NOSLIP_1
),
"flags_2" = list(
"SLOWS_WHILE_IN_HAND_2" = SLOWS_WHILE_IN_HAND_2,
"NO_EMP_WIRES_2" = NO_EMP_WIRES_2,
"HOLOGRAM_2" = HOLOGRAM_2,
"FRONZE_2" = FROZEN_2,
"STATIONLOVING_2" = STATIONLOVING_2,
"INFORM_ADMINS_ON_RELOCATE_2" = INFORM_ADMINS_ON_RELOCATE_2,
"BANG_PROTECT_2" = BANG_PROTECT_2,
"HEALS_EARS_2" = HEALS_EARS_2,
"OMNITONGUE_2" = OMNITONGUE_2,
"TESLA_IGNORE_2" = TESLA_IGNORE_2,
"NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2,
"LAVA_PROTECT_2" = LAVA_PROTECT_2
)
))
-7
View File
@@ -18,10 +18,3 @@ GLOBAL_LIST_EMPTY(powernets)
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details
GLOBAL_LIST_INIT(bitfields, list(
"obj_flags" = list("EMAGGED" = EMAGGED, "IN_USE" = IN_USE, "CAN_BE_HIT" = CAN_BE_HIT, "BEING_SHOCKED" = BEING_SHOCKED, "DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION, "ON_BLUEPRINTS" = ON_BLUEPRINTS, "UNIQUE_RENAME" = UNIQUE_RENAME),
"datum_flags" = list("DF_USE_TAG" = DF_USE_TAG, "DF_VAR_EDITED" = DF_VAR_EDITED),
"item_flags" = list("BEING_REMOVED" = BEING_REMOVED, "IN_INVENTORY" = IN_INVENTORY, "FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE, "NEEDS_PERMIT" = NEEDS_PERMIT),
"admin_flags" = list("BUILDMODE" = R_BUILDMODE, "ADMIN" = R_ADMIN, "BAN" = R_BAN, "FUN" = R_FUN, "SERVER" = R_SERVER, "DEBUG" = R_DEBUG, "POSSESS" = R_POSSESS, "PERMISSIONS" = R_PERMISSIONS, "STEALTH" = R_STEALTH, "POLL" = R_POLL, "VAREDIT" = R_VAREDIT, "SOUNDS" = R_SOUNDS, "SPAWN" = R_SPAWN, "AUTOLOGIN" = R_AUTOLOGIN, "DBRANKS" = R_DBRANKS)
))
+5
View File
@@ -168,9 +168,14 @@
/* AI Turrets */
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
if(ailock)
return
toggle_lethal()
add_fingerprint(usr)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
if(ailock)
return
toggle_on()
add_fingerprint(usr)
+12 -14
View File
@@ -20,6 +20,14 @@
/mob/proc/changeNext_move(num)
next_move = world.time + ((num+next_move_adjust)*next_move_modifier)
/mob/living/changeNext_move(num)
var/mod = next_move_modifier
var/adj = next_move_adjust
for(var/i in status_effects)
var/datum/status_effect/S = i
mod *= S.nextmove_modifier()
adj += S.nextmove_adjust()
next_move = world.time + ((num + adj)*mod)
/*
Before anything else, defer these calls to a per-mobtype handler. This allows us to
@@ -193,23 +201,13 @@
return FALSE
/atom/movable/proc/DirectAccess(atom/target)
if(target == src)
return TRUE
if(target == loc)
return TRUE
return (target == src || target == loc)
/mob/DirectAccess(atom/target)
if(..())
return TRUE
if(target in contents) //This could probably use moving down and restricting to inventory only
return TRUE
return FALSE
return (..() || (target in contents))
/mob/living/DirectAccess(atom/target)
if(..()) //Lightweight checks first
return TRUE
if(target in GetAllContents())
return TRUE
return (..() || (target in GetAllContents()))
/atom/proc/AllowClick()
return FALSE
@@ -501,7 +499,7 @@
if(client && client.click_intercept)
if(call(client.click_intercept, "InterceptClickOn")(src, params, A))
return TRUE
//Mob level intercept
if(click_intercept)
if(call(click_intercept, "InterceptClickOn")(src, params, A))
+28 -28
View File
@@ -55,35 +55,35 @@
var/obj/item/W = get_active_held_item()
if(!W && get_dist(src,A) <= remote_range)
if(!W && get_dist(src,A) <= interaction_range)
A.attack_robot(src)
return
// buckled cannot prevent machine interlinking but stops arm movement
if( buckled || incapacitated())
return
if(W)
// buckled cannot prevent machine interlinking but stops arm movement
if( buckled || incapacitated())
return
if(W == A)
W.attack_self(src)
return
if(W == A)
W.attack_self(src)
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
if(A == loc || (A in loc) || (A in contents))
W.melee_attack_chain(src, A, params)
return
if(!isturf(loc))
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
if(A.Adjacent(src)) // see adjacent.dm
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
if(A == loc || (A in loc) || (A in contents))
W.melee_attack_chain(src, A, params)
return
else
W.afterattack(A, src, 0, params)
if(!isturf(loc))
return
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
if(A.Adjacent(src)) // see adjacent.dm
W.melee_attack_chain(src, A, params)
return
else
W.afterattack(A, src, 0, params)
return
//Middle click cycles through selected modules.
/mob/living/silicon/robot/MiddleClickOn(atom/A)
@@ -105,7 +105,7 @@
CtrlShiftClick(user)
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AICtrlShiftClick()
else
..()
@@ -115,7 +115,7 @@
ShiftClick(user)
/obj/machinery/door/airlock/BorgShiftClick(mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AIShiftClick()
else
..()
@@ -125,19 +125,19 @@
CtrlClick(user)
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AICtrlClick()
else
..()
/obj/machinery/power/apc/BorgCtrlClick(mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AICtrlClick()
else
..()
/obj/machinery/turretid/BorgCtrlClick(mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AICtrlClick()
else
..()
@@ -147,13 +147,13 @@
return
/obj/machinery/door/airlock/BorgAltClick(mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AIAltClick()
else
..()
/obj/machinery/turretid/BorgAltClick(mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code.
if(get_dist(src,user) <= user.remote_range)
if(get_dist(src,user) <= user.interaction_range)
AIAltClick()
else
..()
+3
View File
@@ -8,6 +8,8 @@
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
if(!usr || !over)
return
if(SendSignal(COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is recieving will verify themselves for adjacency.
return
if(over == src)
return usr.client.Click(src, src_location, src_control, params)
if(!Adjacent(usr) || !over.Adjacent(usr))
@@ -18,6 +20,7 @@
// recieve a mousedrop
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
SendSignal(COMSIG_MOUSEDROPPED_ONTO, dropping, user)
return
+1 -2
View File
@@ -92,7 +92,6 @@
var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
widescreenlayout = TRUE // CIT CHANGE - ditto
var/obj/screen/using
var/obj/screen/inventory/inv_box
@@ -321,7 +320,7 @@
staminabuffer = new /obj/screen/staminabuffer()
infodisplay += staminabuffer
//END OF CIT CHANGES
healthdoll = new /obj/screen/healthdoll()
infodisplay += healthdoll
+6 -3
View File
@@ -1,6 +1,6 @@
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
if(!tool_attack_chain(user, target) && pre_attackby(target, user, params))
if(!tool_attack_chain(user, target) && pre_attack(target, user, params))
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = target.attackby(src, user, params)
if(!resolved && target && !QDELETED(src))
@@ -20,7 +20,9 @@
SendSignal(COMSIG_ITEM_ATTACK_SELF, user)
interact(user)
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
if(SendSignal(COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
return FALSE
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
// No comment
@@ -80,7 +82,8 @@
//the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user)
if(SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
return
if(flags_1 & NOBLUDGEON_1)
return
if(user.staminaloss >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
+7 -6
View File
@@ -48,17 +48,19 @@
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user)
if(SendSignal(COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
return TRUE
if(user.client)
if(IsAdminGhost(user))
attack_ai(user)
else if(user.client.prefs.inquisitive_ghost)
user.examinate(src)
return FALSE
/mob/living/attack_ghost(mob/dead/observer/user)
if(user.client && user.health_scan)
healthscan(user, src, 1, TRUE)
return
..()
return ..()
// ---------------------------------------
// And here are some good things for free:
@@ -69,17 +71,16 @@
user.forceMove(awaygate.loc)
else
to_chat(user, "[src] has no destination.")
return ..()
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
if(stationgate)
user.forceMove(stationgate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/item/storage/attack_ghost(mob/user)
orient2hud(user)
show_to(user)
return ..()
/obj/machinery/teleport/hub/attack_ghost(mob/user)
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
user.forceMove(get_turf(power_station.teleporter_console.target))
return ..()
+47 -5
View File
@@ -27,13 +27,50 @@
SendSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
A.attack_hand(src)
SendSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY, src)
//Return TRUE to cancel other attack hand effects that respect it.
/atom/proc/attack_hand(mob/user)
return
. = FALSE
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
add_fingerprint(user)
if(SendSignal(COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
. = TRUE
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
. = _try_interact(user)
//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
/atom/proc/_try_interact(mob/user)
if(IsAdminGhost(user)) //admin abuse
return interact(user)
if(can_interact(user))
return interact(user)
return FALSE
/atom/proc/can_interact(mob/user)
if(!user.can_interact_with(src))
return FALSE
if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
return FALSE
return TRUE
/atom/movable/can_interact(mob/user)
. = ..()
if(!.)
return
if(!anchored && (interaction_flags_atom & INTERACT_ATOM_REQUIRES_ANCHORED))
return FALSE
/atom/proc/interact(mob/user)
return
if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT)
add_hiddenprint(user)
else
add_fingerprint(user)
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
return ui_interact(user)
return FALSE
/*
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this
@@ -72,8 +109,11 @@
*/
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
A.attack_paw(src)
/atom/proc/attack_paw(mob/user)
return
if(SendSignal(COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
return TRUE
return FALSE
/*
Monkey RestrainedClickOn() was apparently the
@@ -115,9 +155,11 @@
*/
/mob/living/carbon/alien/UnarmedAttack(atom/A)
A.attack_alien(src)
/atom/proc/attack_alien(mob/living/carbon/alien/user)
attack_paw(user)
return
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
return
@@ -194,7 +236,7 @@
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
target = A
if(dextrous && !is_type_in_typecache(A, environment_target_typecache) && !ismob(A))
if(dextrous && !ismob(A))
..()
else
AttackingTarget()
-3
View File
@@ -104,9 +104,6 @@
qdel(src)
return
/obj/item/tk_grab/attack_hand(mob/user)
return
/obj/item/tk_grab/attack_self(mob/user)
if(!focus)
return
@@ -47,10 +47,10 @@
/datum/config_entry/flag/force_random_names
/datum/config_entry/flag/humans_need_surnames
/datum/config_entry/flag/allow_ai // allow ai job
/datum/config_entry/flag/disable_human_mood
/datum/config_entry/flag/disable_human_mood
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
@@ -199,7 +199,9 @@
/datum/config_entry/number/slime_delay
/datum/config_entry/number/animal_delay
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour.
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
config_entry_value = 18000
min_val = 0
@@ -259,23 +261,6 @@
config_entry_value = 14
min_val = 4
//Cit changes - Adds config options for crew objectives and miscreants
/datum/config_entry/flag/allow_crew_objectives
/datum/config_entry/flag/allow_miscreants
/datum/config_entry/flag/allow_extended_miscreants
/datum/config_entry/flag/nightshift_enabled
/datum/config_entry/number/nightshift_start
config_entry_value = 20
/datum/config_entry/number/nightshift_finish
config_entry_value = 6
//End of Cit changes
/datum/config_entry/number/bombcap/ValidateAndSet(str_val)
. = ..()
if(.)
@@ -299,3 +284,21 @@
/datum/config_entry/flag/randomize_shift_time
/datum/config_entry/flag/shift_time_realtime
//Cit changes - Adds config options for crew objectives and miscreants
/datum/config_entry/flag/allow_crew_objectives
/datum/config_entry/flag/allow_miscreants
/datum/config_entry/flag/allow_extended_miscreants
/datum/config_entry/flag/nightshift_enabled
/datum/config_entry/number/nightshift_start
config_entry_value = 20
/datum/config_entry/number/nightshift_finish
config_entry_value = 6
//End of Cit changes
+1 -1
View File
@@ -283,7 +283,7 @@ Versioning
var/suicide = sanitizeSQL(L.suiciding)
var/map = sanitizeSQL(SSmapping.config.map_name)
if(!L.suiciding && !first_death.len)
first_death["name"] = L.real_name
first_death["name"] = "[(L.real_name == L.name) ? L.real_name : "[L.real_name] as [L.name]"]"
first_death["role"] = null
if(L.mind.assigned_role)
first_death["role"] = L.mind.assigned_role
+1 -1
View File
@@ -277,7 +277,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
if(istext(column))
column = columns.Find(column)
if(!conversions)
conversions = list(column)
conversions = new /list(column)
else if(conversions.len < column)
conversions.len = column
conversions[column] = conversion
+5 -4
View File
@@ -61,7 +61,8 @@ SUBSYSTEM_DEF(mapping)
transit = add_new_zlevel("Transit", list(ZTRAIT_TRANSIT = TRUE))
// Pick a random away mission.
createRandomZlevel()
if(CONFIG_GET(flag/roundstart_away))
createRandomZlevel()
// Generate mining ruins
loading_ruins = TRUE
@@ -366,14 +367,14 @@ GLOBAL_LIST_EMPTY(the_station_areas)
away_level = template.load_new_z()
else
return
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
if(!away_level)
message_admins("Loading [away_name] failed!")
return
if(GLOB.the_gateway)
//Link any found away gate with station gate
var/obj/machinery/gateway/centeraway/new_gate
+1 -1
View File
@@ -31,4 +31,4 @@ SUBSYSTEM_DEF(npcpool)
if(SA.stat != DEAD)
SA.handle_automated_speech()
if (MC_TICK_CHECK)
return
return
+2 -2
View File
@@ -171,7 +171,7 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
if (T.showpiece)
if (T.showpiece)
continue
T.added_roundstart = TRUE
@@ -275,7 +275,7 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/CollectAntagReputation()
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
for(var/p_ckey in antag_rep_change)
// var/start = antag_rep[p_ckey]
antag_rep[p_ckey] = max(0, min(antag_rep[p_ckey]+antag_rep_change[p_ckey], ANTAG_REP_MAXIMUM))
-1
View File
@@ -439,7 +439,6 @@
var/num = ionnum()
data += "[show_numbers ? "[num]:" : ""] <font color='#547DFE'>[law]</font>"
var/number = 1
for(var/law in inherent)
if (length(law) > 0)
+1
View File
@@ -95,6 +95,7 @@
. = ..()
QDEL_IN(src, 300)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/effect/hallucination/simple/bluespace_stream/attack_hand(mob/user)
if(user != seer || !linked_to)
return
+243 -243
View File
@@ -1,243 +1,243 @@
#define LOCKON_AIMING_MAX_CURSOR_RADIUS 7
#define LOCKON_IGNORE_RESULT "ignore_my_result"
#define LOCKON_RANGING_BREAK_CHECK if(current_ranging_id != this_id){return LOCKON_IGNORE_RESULT}
/datum/component/lockon_aiming
dupe_mode = COMPONENT_DUPE_ALLOWED
var/lock_icon = 'icons/mob/blob.dmi'
var/lock_icon_state = "marker"
var/mutable_appearance/lock_appearance
var/list/image/lock_images
var/list/target_typecache
var/list/immune_weakrefs //list(weakref = TRUE)
var/mob_stat_check = TRUE //if a potential target is a mob make sure it's conscious!
var/lock_amount = 1
var/lock_cursor_range = 5
var/list/locked_weakrefs
var/update_disabled = FALSE
var/current_ranging_id = 0
var/list/last_location
var/datum/callback/on_lock
var/datum/callback/can_target_callback
/datum/component/lockon_aiming/Initialize(range, list/typecache, amount, list/immune, datum/callback/when_locked, icon, icon_state, datum/callback/target_callback)
if(!ismob(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("Lockon aiming component attempted to be added to a non mob!")
if(target_callback)
can_target_callback = target_callback
else
can_target_callback = CALLBACK(src, .proc/can_target)
if(range)
lock_cursor_range = range
if(typecache)
target_typecache = typecache
if(amount)
lock_amount = amount
immune_weakrefs = list(WEAKREF(parent) = TRUE) //Manually take this out if you want..
if(immune)
for(var/i in immune)
if(isweakref(i))
immune_weakrefs[i] = TRUE
else if(isatom(i))
immune_weakrefs[WEAKREF(i)] = TRUE
if(when_locked)
on_lock = when_locked
if(icon)
lock_icon = icon
if(icon_state)
lock_icon_state = icon_state
generate_lock_visuals()
var/mob/M = parent
LAZYOR(M.mousemove_intercept_objects, src)
START_PROCESSING(SSfastprocess, src)
/datum/component/lockon_aiming/Destroy()
var/mob/M = parent
clear_visuals()
LAZYREMOVE(M.mousemove_intercept_objects, src)
STOP_PROCESSING(SSfastprocess, src)
return ..()
/datum/component/lockon_aiming/proc/show_visuals()
LAZYINITLIST(lock_images)
var/mob/M = parent
if(!M.client)
return
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
var/atom/A = R.resolve()
if(!A)
continue //It'll be cleared by processing.
var/image/I = new
I.appearance = lock_appearance
I.loc = A
M.client.images |= I
lock_images |= I
/datum/component/lockon_aiming/proc/clear_visuals()
var/mob/M = parent
if(!M.client)
return
if(!lock_images)
return
for(var/i in lock_images)
M.client.images -= i
qdel(i)
lock_images.Cut()
/datum/component/lockon_aiming/proc/refresh_visuals()
clear_visuals()
show_visuals()
/datum/component/lockon_aiming/proc/generate_lock_visuals()
lock_appearance = mutable_appearance(icon = lock_icon, icon_state = lock_icon_state, layer = FLOAT_LAYER)
/datum/component/lockon_aiming/proc/unlock_all(refresh_vis = TRUE)
LAZYCLEARLIST(locked_weakrefs)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/unlock(atom/A, refresh_vis = TRUE)
if(!A.weak_reference)
return
LAZYREMOVE(locked_weakrefs, A.weak_reference)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/lock(atom/A, refresh_vis = TRUE)
LAZYOR(locked_weakrefs, WEAKREF(A))
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/add_immune_atom(atom/A)
var/datum/weakref/R = WEAKREF(A)
if(immune_weakrefs && (immune_weakrefs[R]))
return
LAZYSET(immune_weakrefs, R, TRUE)
/datum/component/lockon_aiming/proc/remove_immune_atom(atom/A)
if(!A.weak_reference || !immune_weakrefs) //if A doesn't have a weakref how did it get on the immunity list?
return
LAZYREMOVE(immune_weakrefs, A.weak_reference)
/datum/component/lockon_aiming/onMouseMove(object,location,control,params)
var/mob/M = parent
if(!istype(M) || !M.client)
return
var/datum/position/P = mouse_absolute_datum_map_position_from_client(M.client)
if(!P)
return
var/turf/T = P.return_turf()
LAZYINITLIST(last_location)
if(length(last_location) == 3 && last_location[1] == T.x && last_location[2] == T.y && last_location[3] == T.z)
return //Same turf, don't bother.
if(last_location)
last_location.Cut()
else
last_location = list()
last_location.len = 3
last_location[1] = T.x
last_location[2] = T.y
last_location[3] = T.z
autolock()
/datum/component/lockon_aiming/process()
if(update_disabled)
return
if(!last_location)
return
var/changed = FALSE
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
if(istype(R))
var/atom/thing = R.resolve()
if(!istype(thing) || (get_dist(thing, locate(last_location[1], last_location[2], last_location[3])) > lock_cursor_range))
unlock(R)
changed = TRUE
else
unlock(R)
changed = TRUE
if(changed)
autolock()
/datum/component/lockon_aiming/proc/autolock()
var/mob/M = parent
if(!M.client)
return FALSE
var/datum/position/current = mouse_absolute_datum_map_position_from_client(M.client)
var/turf/target = current.return_turf()
var/list/atom/targets = get_nearest(target, target_typecache, lock_amount, lock_cursor_range)
if(targets == LOCKON_IGNORE_RESULT)
return
unlock_all(FALSE)
for(var/i in targets)
if(immune_weakrefs[WEAKREF(i)])
continue
lock(i, FALSE)
refresh_visuals()
on_lock.Invoke(locked_weakrefs)
/datum/component/lockon_aiming/proc/can_target(atom/A)
var/mob/M = A
return is_type_in_typecache(A, target_typecache) && !(ismob(A) && mob_stat_check && M.stat != CONSCIOUS) && !immune_weakrefs[WEAKREF(A)]
/datum/component/lockon_aiming/proc/get_nearest(turf/T, list/typecache, amount, range)
current_ranging_id++
var/this_id = current_ranging_id
var/list/L = list()
var/turf/center = get_turf(T)
if(amount < 1 || range < 0 || !istype(center) || !islist(typecache))
return
if(range == 0)
return typecache_filter_list(T.contents + T, typecache)
var/x = 0
var/y = 0
var/cd = 0
while(cd <= range)
x = center.x - cd + 1
y = center.y + cd
LOCKON_RANGING_BREAK_CHECK
for(x in x to center.x + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y + cd - 1
x = center.x + cd
for(y in center.y - cd to y)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd
x = center.x + cd - 1
for(x in center.x - cd to x)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd + 1
x = center.x - cd
for(y in y to center.y + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
cd++
CHECK_TICK
/datum/component/lockon_aiming/OnTransfer(datum/new_parent)
CRASH("Warning: Lockon aiming component transfer attempted, but transfer behavior is not implemented!")
#define LOCKON_AIMING_MAX_CURSOR_RADIUS 7
#define LOCKON_IGNORE_RESULT "ignore_my_result"
#define LOCKON_RANGING_BREAK_CHECK if(current_ranging_id != this_id){return LOCKON_IGNORE_RESULT}
/datum/component/lockon_aiming
dupe_mode = COMPONENT_DUPE_ALLOWED
var/lock_icon = 'icons/mob/blob.dmi'
var/lock_icon_state = "marker"
var/mutable_appearance/lock_appearance
var/list/image/lock_images
var/list/target_typecache
var/list/immune_weakrefs //list(weakref = TRUE)
var/mob_stat_check = TRUE //if a potential target is a mob make sure it's conscious!
var/lock_amount = 1
var/lock_cursor_range = 5
var/list/locked_weakrefs
var/update_disabled = FALSE
var/current_ranging_id = 0
var/list/last_location
var/datum/callback/on_lock
var/datum/callback/can_target_callback
/datum/component/lockon_aiming/Initialize(range, list/typecache, amount, list/immune, datum/callback/when_locked, icon, icon_state, datum/callback/target_callback)
if(!ismob(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("Lockon aiming component attempted to be added to a non mob!")
if(target_callback)
can_target_callback = target_callback
else
can_target_callback = CALLBACK(src, .proc/can_target)
if(range)
lock_cursor_range = range
if(typecache)
target_typecache = typecache
if(amount)
lock_amount = amount
immune_weakrefs = list(WEAKREF(parent) = TRUE) //Manually take this out if you want..
if(immune)
for(var/i in immune)
if(isweakref(i))
immune_weakrefs[i] = TRUE
else if(isatom(i))
immune_weakrefs[WEAKREF(i)] = TRUE
if(when_locked)
on_lock = when_locked
if(icon)
lock_icon = icon
if(icon_state)
lock_icon_state = icon_state
generate_lock_visuals()
var/mob/M = parent
LAZYOR(M.mousemove_intercept_objects, src)
START_PROCESSING(SSfastprocess, src)
/datum/component/lockon_aiming/Destroy()
var/mob/M = parent
clear_visuals()
LAZYREMOVE(M.mousemove_intercept_objects, src)
STOP_PROCESSING(SSfastprocess, src)
return ..()
/datum/component/lockon_aiming/proc/show_visuals()
LAZYINITLIST(lock_images)
var/mob/M = parent
if(!M.client)
return
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
var/atom/A = R.resolve()
if(!A)
continue //It'll be cleared by processing.
var/image/I = new
I.appearance = lock_appearance
I.loc = A
M.client.images |= I
lock_images |= I
/datum/component/lockon_aiming/proc/clear_visuals()
var/mob/M = parent
if(!M.client)
return
if(!lock_images)
return
for(var/i in lock_images)
M.client.images -= i
qdel(i)
lock_images.Cut()
/datum/component/lockon_aiming/proc/refresh_visuals()
clear_visuals()
show_visuals()
/datum/component/lockon_aiming/proc/generate_lock_visuals()
lock_appearance = mutable_appearance(icon = lock_icon, icon_state = lock_icon_state, layer = FLOAT_LAYER)
/datum/component/lockon_aiming/proc/unlock_all(refresh_vis = TRUE)
LAZYCLEARLIST(locked_weakrefs)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/unlock(atom/A, refresh_vis = TRUE)
if(!A.weak_reference)
return
LAZYREMOVE(locked_weakrefs, A.weak_reference)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/lock(atom/A, refresh_vis = TRUE)
LAZYOR(locked_weakrefs, WEAKREF(A))
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/add_immune_atom(atom/A)
var/datum/weakref/R = WEAKREF(A)
if(immune_weakrefs && (immune_weakrefs[R]))
return
LAZYSET(immune_weakrefs, R, TRUE)
/datum/component/lockon_aiming/proc/remove_immune_atom(atom/A)
if(!A.weak_reference || !immune_weakrefs) //if A doesn't have a weakref how did it get on the immunity list?
return
LAZYREMOVE(immune_weakrefs, A.weak_reference)
/datum/component/lockon_aiming/onMouseMove(object,location,control,params)
var/mob/M = parent
if(!istype(M) || !M.client)
return
var/datum/position/P = mouse_absolute_datum_map_position_from_client(M.client)
if(!P)
return
var/turf/T = P.return_turf()
LAZYINITLIST(last_location)
if(length(last_location) == 3 && last_location[1] == T.x && last_location[2] == T.y && last_location[3] == T.z)
return //Same turf, don't bother.
if(last_location)
last_location.Cut()
else
last_location = list()
last_location.len = 3
last_location[1] = T.x
last_location[2] = T.y
last_location[3] = T.z
autolock()
/datum/component/lockon_aiming/process()
if(update_disabled)
return
if(!last_location)
return
var/changed = FALSE
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
if(istype(R))
var/atom/thing = R.resolve()
if(!istype(thing) || (get_dist(thing, locate(last_location[1], last_location[2], last_location[3])) > lock_cursor_range))
unlock(R)
changed = TRUE
else
unlock(R)
changed = TRUE
if(changed)
autolock()
/datum/component/lockon_aiming/proc/autolock()
var/mob/M = parent
if(!M.client)
return FALSE
var/datum/position/current = mouse_absolute_datum_map_position_from_client(M.client)
var/turf/target = current.return_turf()
var/list/atom/targets = get_nearest(target, target_typecache, lock_amount, lock_cursor_range)
if(targets == LOCKON_IGNORE_RESULT)
return
unlock_all(FALSE)
for(var/i in targets)
if(immune_weakrefs[WEAKREF(i)])
continue
lock(i, FALSE)
refresh_visuals()
on_lock.Invoke(locked_weakrefs)
/datum/component/lockon_aiming/proc/can_target(atom/A)
var/mob/M = A
return is_type_in_typecache(A, target_typecache) && !(ismob(A) && mob_stat_check && M.stat != CONSCIOUS) && !immune_weakrefs[WEAKREF(A)]
/datum/component/lockon_aiming/proc/get_nearest(turf/T, list/typecache, amount, range)
current_ranging_id++
var/this_id = current_ranging_id
var/list/L = list()
var/turf/center = get_turf(T)
if(amount < 1 || range < 0 || !istype(center) || !islist(typecache))
return
if(range == 0)
return typecache_filter_list(T.contents + T, typecache)
var/x = 0
var/y = 0
var/cd = 0
while(cd <= range)
x = center.x - cd + 1
y = center.y + cd
LOCKON_RANGING_BREAK_CHECK
for(x in x to center.x + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y + cd - 1
x = center.x + cd
for(y in center.y - cd to y)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd
x = center.x + cd - 1
for(x in center.x - cd to x)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd + 1
x = center.x - cd
for(y in y to center.y + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
cd++
CHECK_TICK
/datum/component/lockon_aiming/OnTransfer(datum/new_parent)
CRASH("Warning: Lockon aiming component transfer attempted, but transfer behavior is not implemented!")
+44
View File
@@ -0,0 +1,44 @@
/datum/component/swarming
var/offset_x = 0
var/offset_y = 0
var/is_swarming = FALSE
var/list/swarm_members = list()
/datum/component/swarming/Initialize(max_x = 24, max_y = 24)
offset_x = rand(-max_x, max_x)
offset_y = rand(-max_y, max_y)
RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/join_swarm)
RegisterSignal(COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
/datum/component/swarming/proc/join_swarm(atom/movable/AM)
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
if(!other_swarm)
return
swarm()
swarm_members |= other_swarm
other_swarm.swarm()
other_swarm.swarm_members |= src
/datum/component/swarming/proc/leave_swarm(atom/movable/AM)
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
if(!other_swarm || !other_swarm in swarm_members)
return
swarm_members -= other_swarm
if(!swarm_members.len)
unswarm()
other_swarm.swarm_members -= src
if(!other_swarm.swarm_members.len)
other_swarm.unswarm()
/datum/component/swarming/proc/swarm()
var/atom/movable/owner = parent
if(!is_swarming)
is_swarming = TRUE
animate(owner, pixel_x = owner.pixel_x + offset_x, pixel_y = owner.pixel_y + offset_y, time = 2)
/datum/component/swarming/proc/unswarm()
var/atom/movable/owner = parent
if(is_swarming)
animate(owner, pixel_x = owner.pixel_x - offset_x, pixel_y = owner.pixel_y - offset_y, time = 2)
is_swarming = FALSE
+31
View File
@@ -10,6 +10,10 @@
var/last_find_references = 0
#endif
#ifdef DATUMVAR_DEBUGGING_MODE
var/list/cached_vars
#endif
// Default implementation of clean-up code.
// This should be overridden to remove all references pointing to the object being destroyed.
// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE.
@@ -38,3 +42,30 @@
dc.Cut()
return QDEL_HINT_QUEUE
#ifdef DATUMVAR_DEBUGGING_MODE
/datum/proc/save_vars()
cached_vars = list()
for(var/i in vars)
if(i == "cached_vars")
continue
cached_vars[i] = vars[i]
/datum/proc/check_changed_vars()
. = list()
for(var/i in vars)
if(i == "cached_vars")
continue
if(cached_vars[i] != vars[i])
.[i] = list(cached_vars[i], vars[i])
/datum/proc/txt_changed_vars()
var/list/l = check_changed_vars()
var/t = "[src]([REF(src)]) changed vars:"
for(var/i in l)
t += "\"[i]\" \[[l[i][1]]\] --> \[[l[i][2]]\] "
t += "."
/datum/proc/to_chat_check_changed_vars(target = world)
to_chat(target, txt_changed_vars())
#endif
+1 -1
View File
@@ -69,7 +69,7 @@
if((D.stat != DEAD) && damage >= A.dna.species.punchstunthreshold)
D.visible_message("<span class='danger'>[A] has knocked [D] down!!</span>", \
"<span class='userdanger'>[A] has knocked [D] down!</span>")
D.apply_effect(40, KNOCKDOWN, armor_block)
D.apply_effect(40, EFFECT_KNOCKDOWN, armor_block)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
D.forcesay(GLOB.hit_appends)
+1 -1
View File
@@ -39,7 +39,7 @@
if((D.stat != DEAD) && prob(knockout_prob))
D.visible_message("<span class='danger'>[A] has knocked [D] out with a haymaker!</span>", \
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.apply_effect(200,KNOCKDOWN,armor_block)
D.apply_effect(200,EFFECT_KNOCKDOWN,armor_block)
D.SetSleeping(100)
D.forcesay(GLOB.hit_appends)
add_logs(A, D, "knocked out (boxing) ")
+1 -1
View File
@@ -87,7 +87,7 @@
var/number = backpack_contents[path]
if(!isnum(number))//Default to 1
number = 1
for(var/i=0,i<number,i++)
for(var/i in 1 to number)
H.equip_to_slot_or_del(new path(H),slot_in_backpack)
if(!H.head && toggle_helmet && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit))
+3 -3
View File
@@ -30,7 +30,7 @@
id = "knockdown"
/datum/status_effect/incapacitating/knockdown/tick()
if(owner.staminaloss)
if(owner.getStaminaLoss())
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
@@ -40,7 +40,7 @@
needs_update_stat = TRUE
/datum/status_effect/incapacitating/unconscious/tick()
if(owner.staminaloss)
if(owner.getStaminaLoss())
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
//SLEEPING
@@ -65,7 +65,7 @@
return ..()
/datum/status_effect/incapacitating/sleeping/tick()
if(owner.staminaloss)
if(owner.getStaminaLoss())
owner.adjustStaminaLoss(-0.5) //reduce stamina loss by 0.5 per tick, 10 per 2 seconds
if(human_owner && human_owner.drunkenness)
human_owner.drunkenness *= 0.997 //reduce drunkenness by 0.3% per tick, 6% per 2 seconds
@@ -63,6 +63,13 @@
owner = null
qdel(src)
//clickdelay/nextmove modifiers!
/datum/status_effect/proc/nextmove_modifier()
return 1
/datum/status_effect/proc/nextmove_adjust()
return 0
////////////////
// ALERT HOOK //
////////////////
@@ -1,286 +1,294 @@
#define MAXIMUM_EMP_WIRES 3
/proc/is_wire_tool(obj/item/I)
if(!I)
return
if(I.tool_behaviour == TOOL_WIRECUTTER || I.tool_behaviour == TOOL_MULTITOOL)
return TRUE
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
return TRUE
/atom
var/datum/wires/wires = null
/datum/wires
var/atom/holder = null // The holder (atom that contains these wires).
var/holder_type = null // The holder's typepath (used to make wire colors common to all holders).
var/proper_name = "Unknown" // The display name for the wire set shown in station blueprints. Not used if randomize is true or it's an item NT wouldn't know about (Explosives/Nuke)
var/list/wires = list() // List of wires.
var/list/cut_wires = list() // List of wires that have been cut.
var/list/colors = list() // Dictionary of colors to wire.
var/list/assemblies = list() // List of attached assemblies.
var/randomize = 0 // If every instance of these wires should be random.
// Prevents wires from showing up in station blueprints
/datum/wires/New(atom/holder)
..()
if(!istype(holder, holder_type))
CRASH("Wire holder is not of the expected type!")
return
src.holder = holder
if(randomize)
randomize()
else
if(!GLOB.wire_color_directory[holder_type])
randomize()
GLOB.wire_color_directory[holder_type] = colors
GLOB.wire_name_directory[holder_type] = proper_name
else
colors = GLOB.wire_color_directory[holder_type]
/datum/wires/Destroy()
holder = null
assemblies = list()
return ..()
/datum/wires/proc/add_duds(duds)
while(duds)
var/dud = WIRE_DUD_PREFIX + "[--duds]"
if(dud in wires)
continue
wires += dud
/datum/wires/proc/randomize()
var/static/list/possible_colors = list(
"blue",
"brown",
"crimson",
"cyan",
"gold",
"grey",
"green",
"magenta",
"orange",
"pink",
"purple",
"red",
"silver",
"violet",
"white",
"yellow"
)
var/list/my_possible_colors = possible_colors.Copy()
for(var/wire in shuffle(wires))
colors[pick_n_take(my_possible_colors)] = wire
/datum/wires/proc/shuffle_wires()
colors.Cut()
randomize()
/datum/wires/proc/repair()
cut_wires.Cut()
/datum/wires/proc/get_wire(color)
return colors[color]
/datum/wires/proc/get_attached(color)
if(assemblies[color])
return assemblies[color]
return null
/datum/wires/proc/is_attached(color)
if(assemblies[color])
return TRUE
/datum/wires/proc/is_cut(wire)
return (wire in cut_wires)
/datum/wires/proc/is_color_cut(color)
return is_cut(get_wire(color))
/datum/wires/proc/is_all_cut()
if(cut_wires.len == wires.len)
return TRUE
/datum/wires/proc/is_dud(wire)
return dd_hasprefix(wire, WIRE_DUD_PREFIX)
/datum/wires/proc/is_dud_color(color)
return is_dud(get_wire(color))
/datum/wires/proc/cut(wire)
if(is_cut(wire))
cut_wires -= wire
on_cut(wire, mend = TRUE)
else
cut_wires += wire
on_cut(wire, mend = FALSE)
/datum/wires/proc/cut_color(color)
cut(get_wire(color))
/datum/wires/proc/cut_random()
cut(wires[rand(1, wires.len)])
/datum/wires/proc/cut_all()
for(var/wire in wires)
cut(wire)
/datum/wires/proc/pulse(wire, user)
if(is_cut(wire))
return
on_pulse(wire, user)
/datum/wires/proc/pulse_color(color, mob/living/user)
pulse(get_wire(color), user)
/datum/wires/proc/pulse_assembly(obj/item/device/assembly/S)
for(var/color in assemblies)
if(S == assemblies[color])
pulse_color(color)
return TRUE
/datum/wires/proc/attach_assembly(color, obj/item/device/assembly/S)
if(S && istype(S) && S.attachable && !is_attached(color))
assemblies[color] = S
S.forceMove(holder)
S.connected = src
return S
/datum/wires/proc/detach_assembly(color)
var/obj/item/device/assembly/S = get_attached(color)
if(S && istype(S))
assemblies -= color
S.connected = null
S.forceMove(holder.drop_location())
return S
/datum/wires/proc/emp_pulse()
var/list/possible_wires = shuffle(wires)
var/remaining_pulses = MAXIMUM_EMP_WIRES
for(var/wire in possible_wires)
if(prob(33))
pulse(wire)
remaining_pulses--
if(!remaining_pulses)
break
// Overridable Procs
/datum/wires/proc/interactable(mob/user)
return TRUE
/datum/wires/proc/get_status()
return list()
/datum/wires/proc/on_cut(wire, mend = FALSE)
return
/datum/wires/proc/on_pulse(wire, user)
return
// End Overridable Procs
/datum/wires/proc/interact(mob/user)
if(!interactable(user))
return
ui_interact(user)
for(var/A in assemblies)
var/obj/item/I = assemblies[A]
if(istype(I) && I.on_found(user))
return
/datum/wires/ui_host()
return holder
/datum/wires/ui_status(mob/user)
if(interactable(user))
return ..()
return UI_CLOSE
/datum/wires/ui_interact(mob/user, ui_key = "wires", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if (!ui)
ui = new(user, src, ui_key, "wires", "[holder.name] wires", 350, 150 + wires.len * 30, master_ui, state)
ui.open()
/datum/wires/ui_data(mob/user)
var/list/data = list()
var/list/payload = list()
var/reveal_wires = FALSE
// Admin ghost can see a purpose of each wire.
if(IsAdminGhost(user))
reveal_wires = TRUE
// Same for anyone with an abductor multitool.
else if(user.is_holding_item_of_type(/obj/item/device/multitool/abductor))
reveal_wires = TRUE
// Station blueprints do that too, but only if the wires are not randomized.
else if(user.is_holding_item_of_type(/obj/item/areaeditor/blueprints) && !randomize)
reveal_wires = TRUE
for(var/color in colors)
payload.Add(list(list(
"color" = color,
"wire" = ((reveal_wires && !is_dud_color(color)) ? get_wire(color) : null),
"cut" = is_color_cut(color),
"attached" = is_attached(color)
)))
data["wires"] = payload
data["status"] = get_status()
return data
/datum/wires/ui_act(action, params)
if(..() || !interactable(usr))
return
var/target_wire = params["wire"]
var/mob/living/L = usr
var/obj/item/I
switch(action)
if("cut")
I = L.is_holding_tool_quality(TOOL_WIRECUTTER)
if(I || IsAdminGhost(usr))
if(I)
I.play_tool_sound(src, 20)
cut_color(target_wire)
. = TRUE
else
to_chat(L, "<span class='warning'>You need wirecutters!</span>")
if("pulse")
I = L.is_holding_tool_quality(TOOL_MULTITOOL)
if(I || IsAdminGhost(usr))
if(I)
I.play_tool_sound(src, 20)
pulse_color(target_wire, L)
. = TRUE
else
to_chat(L, "<span class='warning'>You need a multitool!</span>")
if("attach")
if(is_attached(target_wire))
I = detach_assembly(target_wire)
if(I)
L.put_in_hands(I)
. = TRUE
else
I = L.get_active_held_item()
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
if(!L.temporarilyRemoveItemFromInventory(A))
return
if(!attach_assembly(target_wire, A))
A.forceMove(L.drop_location())
. = TRUE
else
to_chat(L, "<span class='warning'>You need an attachable assembly!</span>")
#undef MAXIMUM_EMP_WIRES
#define MAXIMUM_EMP_WIRES 3
/proc/is_wire_tool(obj/item/I)
if(!I)
return
if(I.tool_behaviour == TOOL_WIRECUTTER || I.tool_behaviour == TOOL_MULTITOOL)
return TRUE
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
return TRUE
/atom
var/datum/wires/wires = null
/atom/proc/attempt_wire_interaction(mob/user)
if(!wires)
return WIRE_INTERACTION_FAIL
if(!user.CanReach(src))
return WIRE_INTERACTION_FAIL
wires.interact(user)
return WIRE_INTERACTION_BLOCK
/datum/wires
var/atom/holder = null // The holder (atom that contains these wires).
var/holder_type = null // The holder's typepath (used to make wire colors common to all holders).
var/proper_name = "Unknown" // The display name for the wire set shown in station blueprints. Not used if randomize is true or it's an item NT wouldn't know about (Explosives/Nuke)
var/list/wires = list() // List of wires.
var/list/cut_wires = list() // List of wires that have been cut.
var/list/colors = list() // Dictionary of colors to wire.
var/list/assemblies = list() // List of attached assemblies.
var/randomize = 0 // If every instance of these wires should be random.
// Prevents wires from showing up in station blueprints
/datum/wires/New(atom/holder)
..()
if(!istype(holder, holder_type))
CRASH("Wire holder is not of the expected type!")
return
src.holder = holder
if(randomize)
randomize()
else
if(!GLOB.wire_color_directory[holder_type])
randomize()
GLOB.wire_color_directory[holder_type] = colors
GLOB.wire_name_directory[holder_type] = proper_name
else
colors = GLOB.wire_color_directory[holder_type]
/datum/wires/Destroy()
holder = null
assemblies = list()
return ..()
/datum/wires/proc/add_duds(duds)
while(duds)
var/dud = WIRE_DUD_PREFIX + "[--duds]"
if(dud in wires)
continue
wires += dud
/datum/wires/proc/randomize()
var/static/list/possible_colors = list(
"blue",
"brown",
"crimson",
"cyan",
"gold",
"grey",
"green",
"magenta",
"orange",
"pink",
"purple",
"red",
"silver",
"violet",
"white",
"yellow"
)
var/list/my_possible_colors = possible_colors.Copy()
for(var/wire in shuffle(wires))
colors[pick_n_take(my_possible_colors)] = wire
/datum/wires/proc/shuffle_wires()
colors.Cut()
randomize()
/datum/wires/proc/repair()
cut_wires.Cut()
/datum/wires/proc/get_wire(color)
return colors[color]
/datum/wires/proc/get_attached(color)
if(assemblies[color])
return assemblies[color]
return null
/datum/wires/proc/is_attached(color)
if(assemblies[color])
return TRUE
/datum/wires/proc/is_cut(wire)
return (wire in cut_wires)
/datum/wires/proc/is_color_cut(color)
return is_cut(get_wire(color))
/datum/wires/proc/is_all_cut()
if(cut_wires.len == wires.len)
return TRUE
/datum/wires/proc/is_dud(wire)
return dd_hasprefix(wire, WIRE_DUD_PREFIX)
/datum/wires/proc/is_dud_color(color)
return is_dud(get_wire(color))
/datum/wires/proc/cut(wire)
if(is_cut(wire))
cut_wires -= wire
on_cut(wire, mend = TRUE)
else
cut_wires += wire
on_cut(wire, mend = FALSE)
/datum/wires/proc/cut_color(color)
cut(get_wire(color))
/datum/wires/proc/cut_random()
cut(wires[rand(1, wires.len)])
/datum/wires/proc/cut_all()
for(var/wire in wires)
cut(wire)
/datum/wires/proc/pulse(wire, user)
if(is_cut(wire))
return
on_pulse(wire, user)
/datum/wires/proc/pulse_color(color, mob/living/user)
pulse(get_wire(color), user)
/datum/wires/proc/pulse_assembly(obj/item/device/assembly/S)
for(var/color in assemblies)
if(S == assemblies[color])
pulse_color(color)
return TRUE
/datum/wires/proc/attach_assembly(color, obj/item/device/assembly/S)
if(S && istype(S) && S.attachable && !is_attached(color))
assemblies[color] = S
S.forceMove(holder)
S.connected = src
return S
/datum/wires/proc/detach_assembly(color)
var/obj/item/device/assembly/S = get_attached(color)
if(S && istype(S))
assemblies -= color
S.connected = null
S.forceMove(holder.drop_location())
return S
/datum/wires/proc/emp_pulse()
var/list/possible_wires = shuffle(wires)
var/remaining_pulses = MAXIMUM_EMP_WIRES
for(var/wire in possible_wires)
if(prob(33))
pulse(wire)
remaining_pulses--
if(!remaining_pulses)
break
// Overridable Procs
/datum/wires/proc/interactable(mob/user)
return TRUE
/datum/wires/proc/get_status()
return list()
/datum/wires/proc/on_cut(wire, mend = FALSE)
return
/datum/wires/proc/on_pulse(wire, user)
return
// End Overridable Procs
/datum/wires/proc/interact(mob/user)
if(!interactable(user))
return
ui_interact(user)
for(var/A in assemblies)
var/obj/item/I = assemblies[A]
if(istype(I) && I.on_found(user))
return
/datum/wires/ui_host()
return holder
/datum/wires/ui_status(mob/user)
if(interactable(user))
return ..()
return UI_CLOSE
/datum/wires/ui_interact(mob/user, ui_key = "wires", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if (!ui)
ui = new(user, src, ui_key, "wires", "[holder.name] wires", 350, 150 + wires.len * 30, master_ui, state)
ui.open()
/datum/wires/ui_data(mob/user)
var/list/data = list()
var/list/payload = list()
var/reveal_wires = FALSE
// Admin ghost can see a purpose of each wire.
if(IsAdminGhost(user))
reveal_wires = TRUE
// Same for anyone with an abductor multitool.
else if(user.is_holding_item_of_type(/obj/item/device/multitool/abductor))
reveal_wires = TRUE
// Station blueprints do that too, but only if the wires are not randomized.
else if(user.is_holding_item_of_type(/obj/item/areaeditor/blueprints) && !randomize)
reveal_wires = TRUE
for(var/color in colors)
payload.Add(list(list(
"color" = color,
"wire" = ((reveal_wires && !is_dud_color(color)) ? get_wire(color) : null),
"cut" = is_color_cut(color),
"attached" = is_attached(color)
)))
data["wires"] = payload
data["status"] = get_status()
return data
/datum/wires/ui_act(action, params)
if(..() || !interactable(usr))
return
var/target_wire = params["wire"]
var/mob/living/L = usr
var/obj/item/I
switch(action)
if("cut")
I = L.is_holding_tool_quality(TOOL_WIRECUTTER)
if(I || IsAdminGhost(usr))
if(I)
I.play_tool_sound(src, 20)
cut_color(target_wire)
. = TRUE
else
to_chat(L, "<span class='warning'>You need wirecutters!</span>")
if("pulse")
I = L.is_holding_tool_quality(TOOL_MULTITOOL)
if(I || IsAdminGhost(usr))
if(I)
I.play_tool_sound(src, 20)
pulse_color(target_wire, L)
. = TRUE
else
to_chat(L, "<span class='warning'>You need a multitool!</span>")
if("attach")
if(is_attached(target_wire))
I = detach_assembly(target_wire)
if(I)
L.put_in_hands(I)
. = TRUE
else
I = L.get_active_held_item()
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
if(!L.temporarilyRemoveItemFromInventory(A))
return
if(!attach_assembly(target_wire, A))
A.forceMove(L.drop_location())
. = TRUE
else
to_chat(L, "<span class='warning'>You need an attachable assembly!</span>")
#undef MAXIMUM_EMP_WIRES
-9
View File
@@ -19,7 +19,6 @@
var/obj/machinery/rnd/R = holder
var/list/status = list()
status += "The red light is [R.disabled ? "off" : "on"]."
status += "The green light is [R.shocked ? "off" : "on"]."
status += "The blue light is [R.hacked ? "off" : "on"]."
return status
@@ -31,12 +30,6 @@
R.hacked = !R.hacked
if(WIRE_DISABLE)
R.disabled = !R.disabled
if(WIRE_SHOCK)
R.shocked = TRUE
sleep(100)
if(R)
R.shocked = FALSE
/datum/wires/rnd/on_cut(wire, mend)
var/obj/machinery/rnd/R = holder
switch(wire)
@@ -44,5 +37,3 @@
R.hacked = !mend
if(WIRE_DISABLE)
R.disabled = !mend
if(WIRE_SHOCK)
R.shocked = !mend
+3 -2
View File
@@ -3,8 +3,9 @@
plane = GAME_PLANE
var/level = 2
var/flags_1 = 0
var/flags_2 = 0
var/flags_1 = NONE
var/flags_2 = NONE
var/interaction_flags_atom = NONE
var/container_type = NONE
var/admin_spawned = 0 //was this spawned by an admin? used for stat tracking stuff.
var/datum/reagents/reagents = null
+5 -10
View File
@@ -292,6 +292,8 @@
/atom/movable/Crossed(atom/movable/AM, oldloc)
SendSignal(COMSIG_MOVABLE_CROSSED, AM)
/atom/movable/Uncrossed(atom/movable/AM)
SendSignal(COMSIG_MOVABLE_UNCROSSED, AM)
//This is tg's equivalent to the byond bump, it used to be called bump with a second arg
//to differentiate it, naturally everyone forgot about this immediately and so some things
@@ -530,9 +532,8 @@
/atom/movable/proc/relay_container_resist(mob/living/user, obj/O)
return
// CITADEL CHANGE - adds final_pixel_y and final_pixel_x to do_attack_animation args
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y, final_pixel_y, final_pixel_x)
// CITADEL CHANGE - adds final_pixel_y and final_pixel_x to do_attack_animation args // maybe not needed anymore we'll try it
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect && (visual_effect_icon || used_item))
do_item_attack_animation(A, visual_effect_icon, used_item)
@@ -540,11 +541,6 @@
return //don't do an animation if attacking self
var/pixel_x_diff = 0
var/pixel_y_diff = 0
if(!final_pixel_y)// CITADEL CHANGE DOGBORG OFFSET
final_pixel_y = initial(pixel_y)
if(!final_pixel_x)
final_pixel_x = initial(pixel_x) //lol copypasta
var/direction = get_dir(src, A)
if(direction & NORTH)
@@ -558,8 +554,7 @@
pixel_x_diff = -8
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
//animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2) //CITADEL CHANGE, DOGBORG OFFSET
animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = final_pixel_y, time = 2)
animate(src, pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, time = 2)
/atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item)
var/image/I
+2 -3
View File
@@ -94,10 +94,9 @@
main_cult = C.cult_team
..()
/datum/game_mode/proc/add_cultist(datum/mind/cult_mind, stun , equip = FALSE) //BASE
if (!istype(cult_mind))
return 0
return FALSE
var/datum/antagonist/cult/new_cultist = new()
new_cultist.give_equipment = equip
@@ -105,7 +104,7 @@
if(cult_mind.add_antag_datum(new_cultist))
if(stun)
cult_mind.current.Unconscious(100)
return 1
return TRUE
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, silent, stun)
if(cult_mind.current)
+3 -1
View File
@@ -8,7 +8,9 @@
var/datum/airlock_maker/maker = null
/obj/structure/door_assembly/attack_hand()
..()
. = ..()
if(.)
return
if(maker)
maker.interact()
+17 -16
View File
@@ -105,24 +105,25 @@
update_icon()
/obj/machinery/pdapainter/attack_hand(mob/user)
if(!..())
add_fingerprint(user)
. = ..()
if(.)
return
if(storedpda)
var/obj/item/device/pda/P
P = input(user, "Select your color!", "PDA Painting") as null|anything in colorlist
if(!P)
return
if(!in_range(src, user))
return
if(!storedpda)//is the pda still there?
return
storedpda.icon_state = P.icon_state
storedpda.desc = P.desc
ejectpda()
if(storedpda)
var/obj/item/device/pda/P
P = input(user, "Select your color!", "PDA Painting") as null|anything in colorlist
if(!P)
return
if(!in_range(src, user))
return
if(!storedpda)//is the pda still there?
return
storedpda.icon_state = P.icon_state
storedpda.desc = P.desc
ejectpda()
else
to_chat(user, "<span class='notice'>[src] is empty.</span>")
else
to_chat(user, "<span class='notice'>[src] is empty.</span>")
/obj/machinery/pdapainter/verb/ejectpda()
+34 -40
View File
@@ -92,6 +92,8 @@ Class Procs:
pressure_resistance = 15
max_integrity = 200
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
var/stat = 0
var/use_power = IDLE_POWER_USE
//0 = dont run the auto
@@ -107,11 +109,11 @@ Class Procs:
var/critical_machine = FALSE //If this machine is critical to station operation and should have the area be excempted from power failures.
var/list/occupant_typecache //if set, turned into typecache in Initialize, other wise, defaults to mob/living typecache
var/atom/movable/occupant = null
var/interact_open = FALSE // Can the machine be interacted with when in maint/when the panel is open.
var/interact_offline = FALSE // Can the machine be interacted with while de-powered.
var/speed_process = FALSE // Process as fast as possible?
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
/obj/machinery/Initialize()
if(!armor)
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
@@ -156,7 +158,7 @@ Class Procs:
new /obj/effect/temp_visual/emp(loc)
..()
/obj/machinery/proc/open_machine(drop = 1)
/obj/machinery/proc/open_machine(drop = TRUE)
state_open = TRUE
density = FALSE
if(drop)
@@ -208,25 +210,29 @@ Class Procs:
/obj/machinery/proc/is_operational()
return !(stat & (NOPOWER|BROKEN|MAINT))
/obj/machinery/proc/is_interactable()
if((stat & (NOPOWER|BROKEN)) && !interact_offline)
/obj/machinery/can_interact(mob/user)
var/silicon = issiliconoradminghost(user)
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
return FALSE
if(panel_open && !interact_open)
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
if(!silicon || !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
return FALSE
if(!silicon && (interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SILICON))
return FALSE
else if(silicon && !(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON))
return FALSE
return TRUE
////////////////////////////////////////////////////////////////////////////////////////////
//Return a non FALSE value to interrupt attack_hand propagation to subtypes.
/obj/machinery/interact(mob/user, special_state)
add_fingerprint(user)
if(special_state)
ui_interact(user, state = special_state)
else
ui_interact(user)
if(interaction_flags_machine & INTERACT_MACHINE_SET_MACHINE)
user.set_machine(src)
. = ..()
/obj/machinery/ui_status(mob/user)
if(is_interactable())
if(can_interact(user))
return ..()
return UI_CLOSE
@@ -236,18 +242,15 @@ Class Procs:
/obj/machinery/Topic(href, href_list)
..()
if(!is_interactable())
if(!can_interact(usr))
return 1
if(!usr.canUseTopic(src))
return 1
add_fingerprint(usr)
return 0
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_paw(mob/living/user)
if(user.a_intent != INTENT_HARM)
return attack_hand(user)
@@ -257,32 +260,23 @@ Class Procs:
user.visible_message("<span class='danger'>[user.name] smashes against \the [src.name] with its paws.</span>", null, null, COMBAT_MESSAGE_RANGE)
take_damage(4, BRUTE, "melee", 1)
/obj/machinery/attack_robot(mob/user)
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
return _try_interact(user)
/obj/machinery/attack_ai(mob/user)
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
if(iscyborg(user))// For some reason attack_robot doesn't work
var/mob/living/silicon/robot/R = user
if(R.client && R.client.eye == R && !R.low_power_mode)// This is to stop robots from using cameras to remotely control machines; and from using machines when the borg has no power.
return attack_hand(user)
return attack_robot(user)
else
return attack_hand(user)
return _try_interact(user)
//set_machine must be 0 if clicking the machinery doesn't bring up a dialog
/obj/machinery/attack_hand(mob/user, check_power = 1, set_machine = 1)
if(..())// unbuckling etc
return 1
if((user.lying || user.stat) && !IsAdminGhost(user))
return 1
if(!user.IsAdvancedToolUser() && !IsAdminGhost(user))
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 1
if(!is_interactable())
return 1
if(set_machine)
user.set_machine(src)
interact(user)
add_fingerprint(user)
return 0
/obj/machinery/_try_interact(mob/user)
if((interaction_flags_machine & INTERACT_MACHINE_WIRES_IF_OPEN) && panel_open && (attempt_wire_interaction(user) == WIRE_INTERACTION_BLOCK))
return TRUE
return ..()
/obj/machinery/CheckParts(list/parts_list)
..()
@@ -432,8 +426,8 @@ Class Procs:
display_parts(user)
if(shouldplaysound)
W.play_rped_sound()
return 1
return 0
return TRUE
return FALSE
/obj/machinery/proc/display_parts(mob/user)
to_chat(user, "<span class='notice'>It contains the following parts:</span>")
+1 -6
View File
@@ -30,12 +30,7 @@
else
icon_state = "ai-slipper1"
/obj/machinery/ai_slipper/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/ai_slipper/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return
/obj/machinery/ai_slipper/interact(mob/user)
if(!allowed(user))
to_chat(user, "<span class='danger'>Access denied.</span>")
return
+3
View File
@@ -113,6 +113,9 @@
icon_state = "airlock_sensor_off"
/obj/machinery/airlock_sensor/attack_hand(mob/user)
. = ..()
if(.)
return
var/datum/signal/signal = new(list(
"tag" = master_tag,
"command" = "cycle"
+4 -1
View File
@@ -104,7 +104,8 @@ GLOBAL_LIST_EMPTY(announcement_systems)
//config stuff
/obj/machinery/announcement_system/interact(mob/user)
/obj/machinery/announcement_system/ui_interact(mob/user)
. = ..()
if(!user.canUseTopic(src, !issilicon(user)))
return
if(stat & BROKEN)
@@ -121,6 +122,8 @@ GLOBAL_LIST_EMPTY(announcement_systems)
popup.open()
/obj/machinery/announcement_system/Topic(href, href_list)
if(..())
return
if(!usr.canUseTopic(src, !issilicon(usr)))
return
if(stat & BROKEN)
+16 -14
View File
@@ -101,22 +101,24 @@
update_icon()
/obj/machinery/aug_manipulator/attack_hand(mob/user)
if(!..())
add_fingerprint(user)
. = ..()
if(.)
return
add_fingerprint(user)
if(storedpart)
var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons
if(!augstyle)
return
if(!in_range(src, user))
return
if(!storedpart)
return
storedpart.icon = style_list_icons[augstyle]
eject_part(user)
if(storedpart)
var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons
if(!augstyle)
return
if(!in_range(src, user))
return
if(!storedpart)
return
storedpart.icon = style_list_icons[augstyle]
eject_part(user)
else
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
else
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
/obj/machinery/aug_manipulator/proc/eject_part(mob/living/user)
if(storedpart)
+4 -2
View File
@@ -12,7 +12,8 @@
idle_power_usage = 10
active_power_usage = 100
circuit = /obj/item/circuitboard/machine/autolathe
layer = BELOW_OBJ_LAYER
var/operating = FALSE
var/list/L = list()
var/list/LL = list()
@@ -57,7 +58,8 @@
QDEL_NULL(wires)
return ..()
/obj/machinery/autolathe/interact(mob/user)
/obj/machinery/autolathe/ui_interact(mob/user)
. = ..()
if(!is_operational())
return
+2 -4
View File
@@ -55,10 +55,8 @@
/obj/machinery/computer/bank_machine/get_spans()
. = ..() | SPAN_ROBOT
/obj/machinery/computer/bank_machine/attack_hand(mob/user)
if(..())
return
src.add_fingerprint(usr)
/obj/machinery/computer/bank_machine/ui_interact(mob/user)
. = ..()
var/dat = "[station_name()] secure vault. Authorized personnel only.<br>"
dat += "Current Balance: [SSshuttle.points] credits.<br>"
if(!siphoning)
+8 -3
View File
@@ -16,7 +16,6 @@
idle_power_usage = 2
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/machinery/button/Initialize(mapload, ndir = 0, built = 0)
. = ..()
if(built)
@@ -98,7 +97,7 @@
return
if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1))
return src.attack_hand(user)
return attack_hand(user)
else
return ..()
@@ -114,6 +113,9 @@
if(!panel_open)
return attack_hand(user)
/obj/machinery/button/attack_robot(mob/user)
return attack_ai(user)
/obj/machinery/button/proc/setup_device()
if(id && istype(device, /obj/item/device/assembly/control))
var/obj/item/device/assembly/control/A = device
@@ -121,9 +123,12 @@
initialized_button = 1
/obj/machinery/button/attack_hand(mob/user)
. = ..()
if(.)
return
if(!initialized_button)
setup_device()
src.add_fingerprint(user)
add_fingerprint(user)
if(panel_open)
if(device || board)
if(device)
+3
View File
@@ -79,6 +79,9 @@
updateicon()
/obj/machinery/cell_charger/attack_hand(mob/user)
. = ..()
if(.)
return
if(!charging)
return
+3 -6
View File
@@ -18,12 +18,8 @@
else
return ..()
/obj/machinery/computer/aifixer/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/aifixer/interact(mob/user)
/obj/machinery/computer/aifixer/ui_interact(mob/user)
. = ..()
var/dat = ""
@@ -105,6 +101,7 @@
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
active = TRUE
add_fingerprint(usr)
updateUsrDialog()
/obj/machinery/computer/aifixer/update_icon()
..()
+3 -2
View File
@@ -46,7 +46,8 @@
/obj/machinery/computer/apc_control/proc/check_apc(obj/machinery/power/apc/APC)
return APC.z == z && !APC.malfhack && !APC.aidisabled && !(APC.obj_flags & EMAGGED) && !APC.stat && !istype(APC.area, /area/ai_monitored) && !APC.area.outdoors
/obj/machinery/computer/apc_control/interact(mob/living/user)
/obj/machinery/computer/apc_control/ui_interact(mob/living/user)
. = ..()
var/dat
if(authenticated)
if(!checking_logs)
@@ -184,7 +185,7 @@
log_activity("checked APCs")
if(href_list["clear_logs"])
logs = list()
interact(usr) //Refresh the UI after a filter changes
ui_interact(usr) //Refresh the UI after a filter changes
/obj/machinery/computer/apc_control/emag_act(mob/user)
if(!authenticated)
+4 -8
View File
@@ -134,10 +134,8 @@
enemy_name = replacetext((name_part1 + name_part2), "the ", "")
name = (name_action + name_part1 + name_part2)
/obj/machinery/computer/arcade/battle/attack_hand(mob/user)
if(..())
return
user.set_machine(src)
/obj/machinery/computer/arcade/battle/ui_interact(mob/user)
. = ..()
var/dat = "<a href='byond://?src=[REF(src)];close=1'>Close</a>"
dat += "<center><h4>[enemy_name]</h4></center>"
@@ -404,13 +402,11 @@
spaceport_freebie = 0
last_spaceport_action = ""
/obj/machinery/computer/arcade/orion_trail/attack_hand(mob/user)
if(..())
return
/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user)
. = ..()
if(fuel <= 0 || food <=0 || settlers.len == 0)
gameStatus = ORION_STATUS_GAMEOVER
event = null
user.set_machine(src)
var/dat = ""
if(gameStatus == ORION_STATUS_GAMEOVER)
dat = "<center><h1>Game Over</h1></center>"
+90 -9
View File
@@ -14,6 +14,34 @@
var/frequency = FREQ_ATMOS_STORAGE
var/datum/radio_frequency/radio_connection
/obj/machinery/air_sensor/atmos/toxin_tank
name = "plasma tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_TOX
/obj/machinery/air_sensor/atmos/toxins_mixing_tank
name = "toxins mixing gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB
/obj/machinery/air_sensor/atmos/oxygen_tank
name = "oxygen tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_O2
/obj/machinery/air_sensor/atmos/nitrogen_tank
name = "nitrogen tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_N2
/obj/machinery/air_sensor/atmos/mix_tank
name = "mix tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_MIX
/obj/machinery/air_sensor/atmos/nitrous_tank
name = "nitrous oxide tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_N2O
/obj/machinery/air_sensor/atmos/air_tank
name = "air mix tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_AIR
/obj/machinery/air_sensor/atmos/carbon_tank
name = "carbon dioxide tank gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_CO2
/obj/machinery/air_sensor/atmos/incinerator_tank
name = "incinerator chamber gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
/obj/machinery/air_sensor/update_icon()
icon_state = "gsensor[on]"
@@ -56,6 +84,7 @@
/////////////////////////////////////////////////////////////
// GENERAL AIR CONTROL (a.k.a atmos computer)
/////////////////////////////////////////////////////////////
GLOBAL_LIST_EMPTY(atmos_air_controllers)
/obj/machinery/computer/atmos_control
name = "atmospherics monitoring"
@@ -66,15 +95,17 @@
var/frequency = FREQ_ATMOS_STORAGE
var/list/sensors = list(
"n2_sensor" = "Nitrogen Tank",
"o2_sensor" = "Oxygen Tank",
"co2_sensor" = "Carbon Dioxide Tank",
"tox_sensor" = "Plasma Tank",
"n2o_sensor" = "Nitrous Oxide Tank",
"air_sensor" = "Mixed Air Tank",
"mix_sensor" = "Mix Tank",
"distro_meter" = "Distribution Loop",
"waste_meter" = "Waste Loop",
ATMOS_GAS_MONITOR_SENSOR_N2 = "Nitrogen Tank",
ATMOS_GAS_MONITOR_SENSOR_O2 = "Oxygen Tank",
ATMOS_GAS_MONITOR_SENSOR_CO2 = "Carbon Dioxide Tank",
ATMOS_GAS_MONITOR_SENSOR_TOX = "Plasma Tank",
ATMOS_GAS_MONITOR_SENSOR_N2O = "Nitrous Oxide Tank",
ATMOS_GAS_MONITOR_SENSOR_AIR = "Mixed Air Tank",
ATMOS_GAS_MONITOR_SENSOR_MIX = "Mix Tank",
ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION = "Distribution Loop",
ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE = "Atmos Waste Loop",
ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber",
ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB = "Toxins Mixing Chamber"
)
var/list/sensor_information = list()
var/datum/radio_frequency/radio_connection
@@ -83,9 +114,11 @@
/obj/machinery/computer/atmos_control/Initialize()
. = ..()
GLOB.atmos_air_controllers += src
set_frequency(frequency)
/obj/machinery/computer/atmos_control/Destroy()
GLOB.atmos_air_controllers -= src
SSradio.remove_object(src, frequency)
return ..()
@@ -142,6 +175,54 @@
var/list/input_info
var/list/output_info
/obj/machinery/computer/atmos_control/tank/oxygen_tank
name = "Oxygen Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_O2
output_tag = ATMOS_GAS_MONITOR_OUTPUT_O2
sensors = list(ATMOS_GAS_MONITOR_SENSOR_O2 = "Oxygen Tank")
/obj/machinery/computer/atmos_control/tank/toxin_tank
name = "Plasma Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_TOX
output_tag = ATMOS_GAS_MONITOR_OUTPUT_TOX
sensors = list(ATMOS_GAS_MONITOR_SENSOR_TOX = "Plasma Tank")
/obj/machinery/computer/atmos_control/tank/air_tank
name = "Mixed Air Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_AIR
output_tag = ATMOS_GAS_MONITOR_OUTPUT_AIR
sensors = list(ATMOS_GAS_MONITOR_SENSOR_AIR = "Air Mix Tank")
/obj/machinery/computer/atmos_control/tank/mix_tank
name = "Gas Mix Tank Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_MIX
output_tag = ATMOS_GAS_MONITOR_OUTPUT_MIX
sensors = list(ATMOS_GAS_MONITOR_SENSOR_MIX = "Gas Mix Tank")
/obj/machinery/computer/atmos_control/tank/nitrous_tank
name = "Nitrous Oxide Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_N2O
output_tag = ATMOS_GAS_MONITOR_OUTPUT_N2O
sensors = list(ATMOS_GAS_MONITOR_SENSOR_N2O = "Nitrous Oxide Tank")
/obj/machinery/computer/atmos_control/tank/nitrogen_tank
name = "Nitrogen Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_N2
output_tag = ATMOS_GAS_MONITOR_OUTPUT_N2
sensors = list(ATMOS_GAS_MONITOR_SENSOR_N2 = "Nitrogen Tank")
/obj/machinery/computer/atmos_control/tank/carbon_tank
name = "Carbon Dioxide Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_CO2
output_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
sensors = list(ATMOS_GAS_MONITOR_SENSOR_CO2 = "Carbon Dioxide Tank")
/obj/machinery/computer/atmos_control/tank/incinerator
name = "Incinerator Air Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
output_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this
/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user)
var/list/IO = list()
+3
View File
@@ -51,6 +51,9 @@
return ..()
/obj/machinery/computer/security/attack_hand(mob/user)
. = ..()
if(.)
return
if(stat)
return
if (!network)
@@ -80,14 +80,25 @@
if(M == current_user)
remove_eye_control(M)
/obj/machinery/computer/camera_advanced/proc/can_use(mob/living/user)
return TRUE
/obj/machinery/computer/camera_advanced/abductor/can_use(mob/user)
if(!isabductor(user))
return FALSE
return ..()
/obj/machinery/computer/camera_advanced/attack_hand(mob/user)
. = ..()
if(.)
return
if(current_user)
to_chat(user, "The console is already in use!")
return
if(..())
return
var/mob/living/L = user
if(!can_use(user))
return
if(!eyeobj)
CreateEye()
@@ -126,7 +137,6 @@
/obj/machinery/computer/camera_advanced/attack_ai(mob/user)
return //AIs would need to disable their own camera procs to use the console safely. Bugs happen otherwise.
/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user)
GrantActions(user)
current_user = user
@@ -289,7 +299,7 @@
warp_action.target = src
actions += warp_action
/obj/machinery/computer/camera_advanced/ratvar/attack_hand(mob/living/user)
/obj/machinery/computer/camera_advanced/ratvar/can_use(mob/living/user)
if(!is_servant_of_ratvar(user))
to_chat(user, "<span class='warning'>[src]'s keys are in a language foreign to you, and you don't understand anything on its screen.</span>")
return
+11 -7
View File
@@ -133,11 +133,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
return -1
return 0
/obj/machinery/computer/card/attack_hand(mob/user)
if(..())
return
/obj/machinery/computer/card/ui_interact(mob/user)
. = ..()
user.set_machine(src)
var/dat
if(!SSticker)
return
@@ -346,8 +344,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/machinery/computer/card/Topic(href, href_list)
if(..())
@@ -426,9 +422,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/J = new jobtype
if(ckey(J.title) == ckey(t1))
jobdatum = J
updateUsrDialog()
break
if(!jobdatum)
to_chat(usr, "<span class='error'>No log exists for this job.</span>")
updateUsrDialog()
return
modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
@@ -451,6 +449,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
else
to_chat(usr, "<span class='error'>Invalid name entered.</span>")
updateUsrDialog()
return
if ("mode")
mode = text2num(href_list["mode_target"])
@@ -466,8 +465,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
return 0
if(can_open_job(j) != 1)
updateUsrDialog()
return 0
if(opened_positions[edit_job_target] >= 0)
GLOB.time_last_changed_position = world.time / 10
@@ -481,8 +482,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
return 0
if(can_close_job(j) != 1)
updateUsrDialog()
return 0
//Allow instant closing without cooldown if a position has been opened before
if(opened_positions[edit_job_target] <= 0)
@@ -497,6 +500,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/priority_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(priority_target)
if(!j)
updateUsrDialog()
return 0
var/priority = TRUE
if(j in SSjob.prioritized_jobs)
@@ -504,6 +508,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
priority = FALSE
else if(j.total_positions <= j.current_positions)
to_chat(usr, "<span class='notice'>[j.title] has had all positions filled. Open up more slots before prioritizing it.</span>")
updateUsrDialog()
return
else
SSjob.prioritized_jobs += j
@@ -525,7 +530,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if (modify)
modify.update_label()
updateUsrDialog()
return
/obj/machinery/computer/card/AltClick(mob/user)
if(user.canUseTopic(src))
+2 -11
View File
@@ -143,17 +143,8 @@
else
return ..()
/obj/machinery/computer/cloning/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/cloning/interact(mob/user)
user.set_machine(src)
add_fingerprint(user)
if(..())
return
/obj/machinery/computer/cloning/ui_interact(mob/user)
. = ..()
updatemodules(TRUE)
@@ -427,14 +427,12 @@
to_chat(user, "<span class='danger'>You scramble the communication routing circuits!</span>")
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
/obj/machinery/computer/communications/attack_hand(mob/user)
if(..())
return
/obj/machinery/computer/communications/ui_interact(mob/user)
. = ..()
if (z > 6)
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
return
user.set_machine(src)
var/dat = ""
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
var/timeleft = SSshuttle.emergency.timeLeft()
@@ -516,7 +514,7 @@
else
aistate = STATE_MESSAGELIST
attack_hand(user)
return null
return
if(STATE_DELMESSAGE)
if (currmsg)
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=[REF(src)];operation=delmessage2'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
+3 -12
View File
@@ -15,16 +15,7 @@
/obj/machinery/computer/crew/syndie
icon_keyboard = "syndie_key"
/obj/machinery/computer/crew/attack_ai(mob/user)
if(stat & (BROKEN|NOPOWER))
return
GLOB.crewmonitor.show(user,src)
/obj/machinery/computer/crew/attack_hand(mob/user)
if(..())
return
if(stat & (BROKEN|NOPOWER))
return
/obj/machinery/computer/crew/interact(mob/user)
GLOB.crewmonitor.show(user,src)
GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
@@ -181,10 +172,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
pos_y = null
results[++results.len] = list("name" = name, "assignment" = assignment, "ijob" = ijob, "life_status" = life_status, "oxydam" = oxydam, "toxdam" = toxdam, "burndam" = burndam, "brutedam" = brutedam, "area" = area, "pos_x" = pos_x, "pos_y" = pos_y, "can_track" = H.can_track(null))
data_by_z["[z]"] = results
last_update["[z]"] = world.time
return results
/datum/crewmonitor/ui_act(action,params)
+4 -8
View File
@@ -60,12 +60,8 @@
break
injectorready = world.time + INJECTOR_TIMEOUT
/obj/machinery/computer/scan_consolenew/attack_hand(mob/user)
if(..())
return
ShowInterface(user)
/obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change)
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, last_change)
. = ..()
if(!user)
return
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
@@ -461,7 +457,7 @@
connected.locked = TRUE
current_screen = "working"
ShowInterface(usr)
ui_interact(usr)
sleep(radduration*10)
current_screen = "mainmenu"
@@ -507,7 +503,7 @@
if(connected)
connected.locked = locked_state
ShowInterface(usr,last_change)
ui_interact(usr,last_change)
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd)
var/length = length(input)
@@ -30,14 +30,6 @@
else
return ..()
/obj/machinery/computer/launchpad/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/computer/launchpad/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/launchpad/proc/pad_exists(number)
var/obj/machinery/launchpad/pad = launchpads[number]
if(QDELETED(pad))
@@ -48,7 +40,8 @@
var/obj/machinery/launchpad/pad = launchpads[number]
return pad
/obj/machinery/computer/launchpad/interact(mob/user)
/obj/machinery/computer/launchpad/ui_interact(mob/user)
. = ..()
var/list/t = list()
if(!LAZYLEN(launchpads))
obj_flags &= ~IN_USE //Yeah so if you deconstruct teleporter while its in the process of shooting it wont disable the console
+4 -2
View File
@@ -36,7 +36,8 @@
circuit = /obj/item/circuitboard/computer/aiupload
/obj/machinery/computer/upload/ai/attack_hand(mob/user)
if(..())
. = ..()
if(.)
return
src.current = select_active_ai(user)
@@ -60,7 +61,8 @@
circuit = /obj/item/circuitboard/computer/borgupload
/obj/machinery/computer/upload/borg/attack_hand(mob/user)
if(..())
. = ..()
if(.)
return
src.current = select_active_free_borg(user)
-1
View File
@@ -191,7 +191,6 @@
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/machinery/computer/med_data/Topic(href, href_list)
. = ..()
+4 -14
View File
@@ -39,12 +39,13 @@
if(M.id == id)
M.close()
/obj/machinery/computer/pod/attack_hand(mob/user)
if(..())
/obj/machinery/computer/pod/ui_interact(mob/user)
. = ..()
if(!allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return
var/dat = ""
user.set_machine(src)
if(connected)
var/d2
if(timing) //door controls do not need timers.
@@ -69,7 +70,6 @@
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open()
/obj/machinery/computer/pod/process()
if(!..())
return
@@ -115,7 +115,6 @@
M.drive()
updateUsrDialog()
/obj/machinery/computer/pod/old
name = "\improper DoorMex control console"
title = "Door Controls"
@@ -123,21 +122,12 @@
icon_screen = "library"
icon_keyboard = null
/obj/machinery/computer/pod/old/syndicate
name = "\improper ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
title = "External Airlock Controls"
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/pod/old/syndicate/attack_hand(mob/user)
if(!allowed(user))
to_chat(user, "<span class='notice'>Access denied.</span>")
return
else
..()
/obj/machinery/computer/pod/old/swf
name = "\improper Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition."
+2 -4
View File
@@ -15,10 +15,8 @@
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/prisoner/attack_hand(mob/user)
if(..())
return
user.set_machine(src)
/obj/machinery/computer/prisoner/ui_interact(mob/user)
. = ..()
var/dat = ""
if(screen == 0)
dat += "<HR><A href='?src=[REF(src)];lock=1'>Unlock Console</A>"
+2 -6
View File
@@ -22,12 +22,8 @@
return 0
return 1
/obj/machinery/computer/robotics/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/robotics/interact(mob/user)
/obj/machinery/computer/robotics/ui_interact(mob/user)
. = ..()
if (src.z > 6)
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
return

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