diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index b9ed1b07515..8c5809c2382 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -15,6 +15,7 @@ var/scrubbing = 1 //0 = siphoning, 1 = scrubbing var/scrub_CO2 = 1 var/scrub_Toxins = 0 + var/scrub_N2O = 0 var/volume_rate = 120 var/panic = 0 //is this scrubber panicked? @@ -52,6 +53,7 @@ signal.data["panic"] = panic signal.data["filter_co2"] = scrub_CO2 signal.data["filter_toxins"] = scrub_Toxins + signal.data["filter_n2o"] = scrub_N2O radio_connection.post_signal(src, signal) return 1 @@ -92,6 +94,10 @@ if(istype(trace_gas, /datum/gas/oxygen_agent_b)) removed.trace_gases -= trace_gas filtered_out.trace_gases += trace_gas + else if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O) + removed.trace_gases -= trace_gas + filtered_out.trace_gases += trace_gas + //Remix the resulting gases air_contents.merge(filtered_out) @@ -138,6 +144,8 @@ scrub_CO2 = !scrub_CO2 if("toggle_tox_scrub") scrub_Toxins = !scrub_Toxins + if("toggle_n2o_scrub") + scrub_N2O = !scrub_N2O if("toggle_panic_siphon") panic = !panic if(panic) diff --git a/code/game/asteroid/asteroid.dm b/code/game/asteroid/asteroid.dm index 2430f49eb76..96a7f958272 100644 --- a/code/game/asteroid/asteroid.dm +++ b/code/game/asteroid/asteroid.dm @@ -1,17 +1,20 @@ -proc/spawn_asteroid(var/atom/start_loc,var/type,var/size)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon +proc/spawn_asteroid(var/atom/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon + if(start_loc.x - size < 3 || start_loc.x + size >= world.maxx - 3 || start_loc.y - size < 3 || start_loc.y + size > world.maxy -3) + return 0 if(!size) size = pick(100;2,50;3,35;4,25;6,10;12) if(!type) type = pick(50;1,2,3) + if(!richness) + richness = rand(10,40) // world << "Asteroid size: [size]; Asteroid type: [type]" - if(start_loc.x - size < 3 || start_loc.x + size >= world.maxx - 3 || start_loc.y - size < 3 || start_loc.y + size > world.maxy -3) - return 0 var/list/turfs = circlerange(start_loc,size) + var/area/asteroid/AstAr = new for(var/turf/T in turfs) var/dist = get_dist(start_loc,T) - if(prob(100-(dist*rand(2,4))))//I'm terrible at generating random things. + if(abs(GaussRand(dist)) 1 && prob(25)) + if(type > 1 && prob(richness)) switch(type) if(2) A = new /turf/simulated/wall/asteroid/iron(T) @@ -21,6 +24,7 @@ proc/spawn_asteroid(var/atom/start_loc,var/type,var/size)//type: 0 or null - ran A = new /turf/simulated/wall/asteroid(T) A.opacity = 0 A.sd_NewOpacity(1) + AstAr.contents += A /* if(max_secret_rooms && size == 12) var/x_len = rand(4,12) @@ -114,3 +118,13 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor) var/global/max_secret_rooms = 3 +proc/GaussRand(var/sigma) + var/x,y,rsq + do + x=2*rand()-1 + y=2*rand()-1 + rsq=x*x+y*y + while(rsq>1 || !rsq) + return sigma*y*sqrt((-2*log(rsq))/rsq) + + diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 410d9f19236..f93d96a76cd 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -84,7 +84,7 @@ sensor_part += {"Operating: [(data["on"]?"on":"off")]
Type: [(data["scrubbing"]?"scrubbing":"syphoning")]
"} if(data["scrubbing"]) - sensor_part += "Filtering: Carbon Dioxide ([(data["filter_co2"]?"on":"off")]); Toxins ([data["filter_toxins"]?"on":"off"])
" + sensor_part += "Filtering: Carbon Dioxide ([(data["filter_co2"]?"on":"off")]); Toxins ([data["filter_toxins"]?"on":"off"]); Nitrous Oxide ([data["filter_n2o"]?"on":"off"])
" sensor_part += "Dea":"red'>A")]ctivate panic syphon
" if(data["panic"]) sensor_part += "PANIC SYPHON ACTIVATED" @@ -143,6 +143,9 @@ if(href_list["scr_toggle_tox_scrub"]) send_signal(href_list["scr_toggle_tox_scrub"], "toggle_tox_scrub") + if(href_list["scr_toggle_n2o_scrub"]) + send_signal(href_list["scr_toggle_n2o_scrub"], "toggle_n2o_scrub") + if(href_list["scr_toggle_panic_siphon"]) send_signal(href_list["scr_toggle_panic_siphon"], "toggle_panic_siphon") diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index c300ff9f0ac..9ad140020da 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -52,6 +52,7 @@ /obj/mecha/combat/click_action(target) if(state || !cell || cell.charge<=0) return + if(src == target) return if(get_dist(src,target)<=1) src.mega_punch(target) @@ -94,7 +95,6 @@ playsound(src, 'Laser.ogg', 50, 1) if (targloc == curloc) - src.bullet_act(PROJECTILE_PULSE) return var/obj/beam/a_laser/A = new weapon_type(src.loc) diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index 1c796a6380d..9817f24b8cb 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -4,11 +4,11 @@ icon_state = "gygax" step_in = 8 - weapon_1 = /obj/beam/a_laser/pulse_laser + weapon_1 = "/obj/beam/a_laser/pulse_laser" weapon_1_cooldown = 50 weapon_1_name = "eZ-13 mk2 Heavy pulse rifle" weapon_1_energy_drain = 50 - weapon_2 = /obj/beam/a_laser + weapon_2 = "/obj/beam/a_laser" weapon_2_cooldown = 10 weapon_2_name = "CH-PS \"Immolator\" Laser" weapon_2_energy_drain = 20 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 827750f80ba..49f0ca16731 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -69,21 +69,14 @@ return 0 if(state || !cell || cell.charge<=0) return 0 if(can_move) - if(istype(src.loc, /turf/space)) - var/new_pos = get_step(src,direction) -/* world << "Next pos = [new_pos]" - - var/turf = locate(new_pos) - world << "Turf is [turf]"*/ - if(istype(new_pos, /turf/space)) - if(!src.check_for_support()) - src.inertia_dir = direction - src.inertial_movement() - return 0 if(step(src,direction)) can_move = 0 spawn(step_in) can_move = 1 cell.use(src.step_energy_drain) + if(istype(src.loc, /turf/space)) + if(!src.check_for_support()) + src.inertia_dir = direction + src.inertial_movement() return 1 return 0 @@ -91,9 +84,11 @@ if(check_for_support()) src.inertia_dir = null if(src.inertia_dir) - step(src, src.inertia_dir) - spawn(5) - .() + if(step(src, src.inertia_dir)) + spawn(5) + .() + else + src.inertia_dir = null return /obj/mecha/proc/check_for_support() @@ -103,14 +98,14 @@ return 0 /obj/mecha/Bump(var/atom/obstacle) - src.inertia_dir = null +// src.inertia_dir = null if(src.occupant) if(istype(obstacle , /obj/machinery/door)) var/obj/machinery/door/D = obstacle D.Bumped(src.occupant) return - else - obstacle.Bumped(src) +// else +// obstacle.Bumped(src) return