Fixed a long-lasting error with vending machine in toxins, fixed/added atmos setting editor in game.

This commit is contained in:
SkyMarshal
2012-06-18 23:39:12 -07:00
parent 57fcff3067
commit dffed10290
5 changed files with 61 additions and 23 deletions
+36 -19
View File
@@ -49,20 +49,39 @@ atom/movable/RepelAirflowDest(n)
*/
vs_control/var
airflow_lightest_pressure = 30
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
airflow_light_pressure = 45
airflow_medium_pressure = 60
airflow_heavy_pressure = 75
airflow_heaviest_pressure = 90
airflow_damage = 0.3
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
airflow_medium_pressure = 90
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
airflow_heavy_pressure = 90
airflow_heavy_pressure_NAME = "Airflow - Dense Movement Threshold %"
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
airflow_heaviest_pressure = 95
airflow_heaviest_pressure_NAME = "Airflow - Human Movement Threshold % (Mob Stunning)"
airflow_heaviest_pressure_DESC = "Percent of 1 Atm. at which mobs will be shifted by airflow. (Mob Stunning)"
airflow_stun_cooldown = 60
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
airflow_stun = 0.15
airflow_speed_decay = 1
airflow_delay = 30 //Time in deciseconds before they can be moved by airflow again.
airflow_mob_slowdown = 1 //Time in tenths of a second to add as a delay to each movement by a mob.\
Only active if they are fighting the pull of the airflow.
airflow_stun_cooldown = 10 //How long, in tenths of a second, to wait before stunning them again.
airflow_stun_NAME = "Airflow Impact - Stunning"
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
airflow_damage = 0.3
airflow_damage_NAME = "Airflow Impact - Damage"
airflow_damage_DESC = "Damage from airflow impacts."
airflow_speed_decay = 1.5
airflow_speed_decay_NAME = "Airflow Speed Decay"
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
airflow_delay = 30
airflow_delay_NAME = "Airflow Retrigger Delay"
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
airflow_mob_slowdown = 1
airflow_mob_slowdown_NAME = "Airflow Slowdown"
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
mob/var/last_airflow_stun = 0
mob/proc/airflow_stun()
@@ -254,7 +273,7 @@ atom/movable
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are sucked away by airflow!"
airflow_speed = min(round(n)/max(sqrt(get_dist(src,airflow_dest)),1),9)
airflow_speed = min(round(n)/max(get_dist(src,airflow_dest)/2,1),9)
var
xo = airflow_dest.x - src.x
yo = airflow_dest.y - src.y
@@ -304,7 +323,7 @@ atom/movable
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are pushed away by airflow!"
airflow_speed = min(round(n)/max(sqrt(get_dist(src,airflow_dest)),1),9)
airflow_speed = min(round(n)/max(get_dist(src,airflow_dest)/2,1),9)
var
xo = -(airflow_dest.x - src.x)
yo = -(airflow_dest.y - src.y)
@@ -348,14 +367,14 @@ atom/movable/proc/airflow_hit(atom/A)
mob/airflow_hit(atom/A)
for(var/mob/M in hearers(src))
M.show_message("\red <B>[src] slams into [A]!</B>",1,"\red You hear a loud slam!",2)
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
playsound(src.loc, "smash.ogg", 25, 1, -1)
weakened = max(weakened, (istype(A,/obj/item) ? A:w_class : rand(1,5))) //Heheheh
. = ..()
obj/airflow_hit(atom/A)
for(var/mob/M in hearers(src))
M.show_message("\red <B>[src] slams into [A]!</B>",1,"\red You hear a loud slam!",2)
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
playsound(src.loc, "smash.ogg", 25, 1, -1)
. = ..()
@@ -390,11 +409,9 @@ mob/living/carbon/human/airflow_hit(atom/A)
stunned += round(airflow_speed * vsc.airflow_stun/2)
. = ..()
var/list/airflow_forbidden = list(/obj/structure/ore_box, /mob/aiEye)
zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
if(!(locate(A) in airflow_forbidden))
. += A
if(istype(A, /mob/aiEye)) continue
. += A
+1
View File
@@ -13,6 +13,7 @@ Attach to transfer valve and open. BOOM.
vs_control/var/IgnitionLevel = 0.5 //Moles of oxygen+plasma - co2 needed to burn.
vs_control/var/IgnitionLeve_DESC = "Moles of oxygen+plasma - co2 needed to burn."
//Some legacy definitions so fires can be started.
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+6 -2
View File
@@ -39,7 +39,7 @@ vs_control
else
vw = vars[ch]
if("[ch]_DESC" in vars) vw_desc = vars["[ch]_DESC"]
if("[ch]_NAME" in plc.vars) vw_name = vars["[ch]_NAME"]
if("[ch]_NAME" in vars) vw_name = vars["[ch]_NAME"]
dat += "<b>[vw_name] = [vw]</b> <A href='?src=\ref[src];changevar=[ch]'>\[Change\]</A><br>"
dat += "<i>[vw_desc]</i><br><br>"
user << browse(dat,"window=settings")
@@ -114,7 +114,11 @@ vs_control
plc.Randomize(V)
////world << "Plasma randomized."
proc/SetDefault(def)
proc/SetDefault(var/mob/user)
var/list/setting_choices = list("Original", "Hazard - Low", "Hazard - High", "Oh Shit!")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
if(!def)
return
switch(def)
if("Original")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.