mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 11:41:14 +00:00
Refactors Atmos Air Current Pushing
This commit is contained in:
@@ -152,7 +152,7 @@
|
||||
|
||||
if(pressure_delta > 0.5)
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION) / 5
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
if(pressure_delta > 0.5)
|
||||
if(environment.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION) / 5
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
if(isnull(removed)) //in space
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
if(scrubbing)
|
||||
if((scrub_O2 && environment.oxygen>0.001) || (scrub_N2 && environment.nitrogen>0.001) || (scrub_CO2 && environment.carbon_dioxide>0.001) || (scrub_Toxins && environment.toxins>0.001) || (environment.trace_gases.len>0))
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() / 5
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
@@ -269,7 +269,7 @@
|
||||
if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
return
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) / 5
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
|
||||
|
||||
@@ -298,63 +298,30 @@
|
||||
excited_group.reset_cooldowns()
|
||||
|
||||
/turf/proc/high_pressure_movements()
|
||||
for(var/atom/movable/M in src)
|
||||
var/atom/movable/M
|
||||
for(var/thing in src)
|
||||
M = thing
|
||||
if(!M.anchored && !M.pulledby && M.last_high_pressure_movement_air_cycle < SSair.times_fired)
|
||||
M.experience_pressure_difference(pressure_difference, pressure_direction)
|
||||
|
||||
|
||||
|
||||
|
||||
/atom/movable/var/pressure_resistance = 5
|
||||
/atom/movable/var/throw_pressure_limit = 15
|
||||
/atom/movable/var/last_forced_movement = 0
|
||||
/atom/movable/var/pressure_resistance = 10
|
||||
/atom/movable/var/last_high_pressure_movement_air_cycle = 0
|
||||
|
||||
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
if(last_forced_movement >= SSair.times_fired)
|
||||
return 0
|
||||
if(anchored || move_resist == INFINITY)
|
||||
return 0
|
||||
else if(!pulledby)
|
||||
var/turf/target = get_turf(src)
|
||||
var/datum/gas_mixture/target_air = target.return_air()
|
||||
if(isspaceturf(target) || isunsimulatedturf(target) || pressure_resistance > target_air.return_pressure())
|
||||
return 0
|
||||
if(pressure_difference >= throw_pressure_limit)
|
||||
var/general_direction = get_edge_target_turf(src, direction)
|
||||
if(last_forced_movement + 10 < SSair.times_fired && is_valid_tochat_target(src)) //the first check prevents spamming throw to_chat
|
||||
to_chat(src, "<span class='userdanger'>The pressure sends you flying!</span>")
|
||||
spawn()
|
||||
var/max_distance = 14 // reduce by one each calculation to prevent infinate loops.
|
||||
var/min_observed_pressure = INFINITY
|
||||
var/turf/possible_target = get_turf(src)
|
||||
while(!isspaceturf(target) && !isunsimulatedturf(target) && max_distance > 0)
|
||||
max_distance--
|
||||
target_air = target.return_air()
|
||||
min_observed_pressure = target_air.return_pressure()
|
||||
possible_target = get_step_towards(target,general_direction)
|
||||
if(istype(possible_target, /turf/space))
|
||||
target = possible_target
|
||||
break
|
||||
if(!CanAtmosPass(possible_target))
|
||||
target = possible_target
|
||||
max_distance = 0
|
||||
break
|
||||
var/datum/gas_mixture/possible_target_air = possible_target.return_air()
|
||||
if(possible_target_air.return_pressure() > min_observed_pressure)
|
||||
target = possible_target
|
||||
break
|
||||
target = possible_target
|
||||
if(max_distance)
|
||||
throw_at(target, get_dist(src, target), pressure_difference / 200, null, 0, 0, null)
|
||||
else
|
||||
throw_at(target, pressure_difference / 10, pressure_difference / 200, null, 0, 0, null)
|
||||
last_forced_movement = SSair.times_fired
|
||||
return 1
|
||||
else if(pressure_difference > pressure_resistance)
|
||||
spawn()
|
||||
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
|
||||
var/const/PROBABILITY_OFFSET = 25
|
||||
var/const/PROBABILITY_BASE_PRECENT = 75
|
||||
var/max_force = sqrt(pressure_difference) * (MOVE_FORCE_DEFAULT / 5)
|
||||
set waitfor = 0
|
||||
var/move_prob = 100
|
||||
if(pressure_resistance > 0)
|
||||
move_prob = (pressure_difference / pressure_resistance * PROBABILITY_BASE_PRECENT) - PROBABILITY_OFFSET
|
||||
move_prob += pressure_resistance_prob_delta
|
||||
if(move_prob > PROBABILITY_OFFSET && prob(move_prob) && (move_resist != INFINITY) && (!anchored && (max_force >= (move_resist * MOVE_FORCE_PUSH_RATIO))) || (anchored && (max_force >= (move_resist * MOVE_FORCE_FORCEPUSH_RATIO))))
|
||||
step(src, direction)
|
||||
last_forced_movement = SSair.times_fired
|
||||
return 1
|
||||
return 0
|
||||
last_high_pressure_movement_air_cycle = SSair.times_fired
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1169,6 +1169,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
reference = "CHAM"
|
||||
item = /obj/item/storage/box/syndie_kit/chameleon
|
||||
cost = 2
|
||||
excludefrom = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_tools/chameleon_proj
|
||||
name = "Chameleon-Projector"
|
||||
@@ -1209,6 +1210,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
cost = 2
|
||||
surplus = 30
|
||||
|
||||
/datum/uplink_item/stealthy_tools/syndigaloshes
|
||||
name = "No-Slip Chameleon Shoes"
|
||||
desc = "These shoes will allow the wearer to run on wet floors and slippery objects without falling down. They do not work on heavily lubricated surfaces."
|
||||
reference = "NOCS"
|
||||
item = /obj/item/clothing/shoes/chameleon/noslip
|
||||
cost = 2
|
||||
excludefrom = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_tools/syndigaloshes/nuke
|
||||
reference = "NOCSN"
|
||||
item = /obj/item/clothing/shoes/chameleon/noslip
|
||||
cost = 4
|
||||
excludefrom = list()
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_tools/cutouts
|
||||
name = "Adaptive Cardboard Cutouts"
|
||||
desc = "These cardboard cutouts are coated with a thin material that prevents discoloration and makes the images on them appear more lifelike. This pack contains three as well as a \
|
||||
@@ -1373,16 +1389,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
These reverse-engineered knockoffs of Nanotrasen's 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety."
|
||||
reference = "BRMB"
|
||||
item = /obj/item/clothing/shoes/magboots/syndie
|
||||
cost = 3
|
||||
excludefrom = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/device_tools/magboots/advance
|
||||
name = "Advanced Blood-Red Magboots"
|
||||
desc = "Reverse-engineered magboots that appear to be based on an advanced model, as they have a lighter magnetic pull. Property of Gorlex Marauders."
|
||||
reference = "ABRMB"
|
||||
item = /obj/item/clothing/shoes/magboots/syndie/advance
|
||||
cost = 3
|
||||
excludefrom = list()
|
||||
cost = 2
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/device_tools/powersink
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
var/obj/structure/blob/factory/factory = null
|
||||
var/list/human_overlays = list()
|
||||
var/is_zombie = 0
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
@@ -97,8 +95,6 @@
|
||||
human_overlays = H.overlays
|
||||
update_icons()
|
||||
H.forceMove(src)
|
||||
pressure_resistance = 20 //5 kPa difference required to push lowered
|
||||
throw_pressure_limit = 30 //15 kPa difference required to throw lowered
|
||||
visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
|
||||
@@ -176,8 +172,7 @@
|
||||
force_threshold = 10
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
pressure_resistance = 50
|
||||
see_in_dark = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
/datum/spellbook_entry/item/armor/Buy(var/mob/living/carbon/human/user,var/obj/item/spellbook/book)
|
||||
. = ..()
|
||||
if(.)
|
||||
new /obj/item/clothing/shoes/magboots/wizard(get_turf(user))
|
||||
new /obj/item/clothing/shoes/sandal(get_turf(user)) //In case they've lost them.
|
||||
new /obj/item/clothing/gloves/color/purple(get_turf(user)) // To complete the outfit
|
||||
|
||||
/datum/spellbook_entry/item/mjolnir
|
||||
|
||||
@@ -119,8 +119,6 @@
|
||||
|
||||
var/report_danger_level = TRUE
|
||||
|
||||
var/automatic_emergency = TRUE //Does the alarm automaticly respond to an emergency condition
|
||||
|
||||
/obj/machinery/alarm/monitor
|
||||
report_danger_level = FALSE
|
||||
|
||||
@@ -315,12 +313,6 @@
|
||||
|
||||
if(old_danger_level!=danger_level)
|
||||
apply_danger_level()
|
||||
if(automatic_emergency && mode == AALARM_MODE_SCRUBBING && danger_level == ATMOS_ALARM_DANGER)
|
||||
if(pressure_dangerlevel == ATMOS_ALARM_DANGER)
|
||||
mode = AALARM_MODE_OFF
|
||||
if(temperature_dangerlevel == ATMOS_ALARM_DANGER && cur_tlv.max2 <= environment.temperature)
|
||||
mode = AALARM_MODE_PANIC
|
||||
apply_mode()
|
||||
|
||||
if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05)
|
||||
mode = AALARM_MODE_SCRUBBING
|
||||
|
||||
@@ -71,7 +71,7 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
pressure_resistance = 7 * ONE_ATMOSPHERE
|
||||
var/temperature_resistance = 1000 + T0C
|
||||
volume = 1000
|
||||
use_power = NO_POWER_USE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
volume = 750
|
||||
|
||||
var/minrate = 0//probably useless, but whatever
|
||||
var/maxrate = 10 * ONE_ATMOSPHERE / 4
|
||||
var/maxrate = 10 * ONE_ATMOSPHERE
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -96,7 +96,7 @@ Class Procs:
|
||||
/obj/machinery
|
||||
name = "machinery"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
pressure_resistance = 10
|
||||
pressure_resistance = 15
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/stat = 0
|
||||
var/emagged = 0
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
name = "security suit storage unit"
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/security
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
magboots_type = /obj/item/clothing/shoes/magboots
|
||||
req_access = list(access_security)
|
||||
|
||||
/obj/machinery/suit_storage_unit/security/secure
|
||||
@@ -130,7 +129,6 @@
|
||||
/obj/machinery/suit_storage_unit/cmo/secure/sec_storage
|
||||
name = "medical suit storage unit"
|
||||
mask_type = /obj/item/clothing/mask/gas
|
||||
magboots_type = /obj/item/clothing/shoes/magboots
|
||||
|
||||
/obj/machinery/suit_storage_unit/clown
|
||||
name = "clown suit storage unit"
|
||||
@@ -154,7 +152,6 @@
|
||||
name = "syndicate suit storage unit"
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
mask_type = /obj/item/clothing/mask/gas/syndicate
|
||||
magboots_type = /obj/item/clothing/shoes/magboots/syndie
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/harness
|
||||
req_access = list(access_syndicate)
|
||||
safeties = FALSE //in a syndicate base, everything can be used as a murder weapon at a moment's notice.
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
|
||||
return FALSE
|
||||
|
||||
/obj/effect/experience_pressure_difference()
|
||||
return
|
||||
|
||||
/obj/effect/decal
|
||||
plane = FLOOR_PLANE
|
||||
var/no_scoop = FALSE //if it has this, don't let it be scooped up
|
||||
|
||||
@@ -25,7 +25,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
var/w_class = WEIGHT_CLASS_NORMAL
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 3
|
||||
pressure_resistance = 4
|
||||
// causeerrorheresoifixthis
|
||||
var/obj/item/master = null
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
throw_range = 1
|
||||
throw_speed = 1
|
||||
layer = 4
|
||||
pressure_resistance = 1
|
||||
pressure_resistance = 2
|
||||
|
||||
/obj/item/documents/nanotrasen
|
||||
desc = "\"Top Secret\" Nanotrasen documents printed on special copy-protected paper. It is filled with complex diagrams and lists of names, dates and coordinates."
|
||||
|
||||
@@ -7,32 +7,35 @@
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
flags = CONDUCT
|
||||
force = 3.0
|
||||
throwforce = 10.0
|
||||
force = 3
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=500)
|
||||
origin_tech = "combat=1;plasmatech=2;engineering=2"
|
||||
var/status = 0
|
||||
var/lit = 0 //on or off
|
||||
var/operating = 0//cooldown
|
||||
var/turf/previousturf = null
|
||||
var/status = FALSE
|
||||
var/lit = FALSE //on or off
|
||||
var/operating = FALSE//cooldown
|
||||
var/obj/item/weldingtool/weldtool = null
|
||||
var/obj/item/assembly/igniter/igniter = null
|
||||
var/obj/item/tank/plasma/ptank = null
|
||||
var/warned_admins = FALSE //for the message_admins() when lit
|
||||
//variables for prebuilt flamethrowers
|
||||
var/create_full = FALSE
|
||||
var/create_with_tank = FALSE
|
||||
var/igniter_type = /obj/item/assembly/igniter
|
||||
|
||||
|
||||
/obj/item/flamethrower/Destroy()
|
||||
QDEL_NULL(weldtool)
|
||||
QDEL_NULL(igniter)
|
||||
QDEL_NULL(ptank)
|
||||
previousturf = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/flamethrower/process()
|
||||
if(!lit)
|
||||
if(!lit || !igniter)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return null
|
||||
var/turf/location = loc
|
||||
@@ -41,133 +44,139 @@
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = M.loc
|
||||
if(isturf(location)) //start a fire if possible
|
||||
location.hotspot_expose(700, 2)
|
||||
return
|
||||
igniter.flamethrower_process(location)
|
||||
|
||||
|
||||
/obj/item/flamethrower/update_icon()
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
if(igniter)
|
||||
overlays += "+igniter[status]"
|
||||
add_overlay("+igniter[status]")
|
||||
if(ptank)
|
||||
overlays += "+ptank"
|
||||
add_overlay("+ptank")
|
||||
if(lit)
|
||||
overlays += "+lit"
|
||||
add_overlay("+lit")
|
||||
item_state = "flamethrower_1"
|
||||
else
|
||||
item_state = "flamethrower_0"
|
||||
return
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/flamethrower/afterattack(atom/target, mob/user, flag)
|
||||
if(flag) return // too close
|
||||
// Make sure our user is still holding us
|
||||
if(user && user.is_in_active_hand(src))
|
||||
. = ..()
|
||||
if(flag)
|
||||
return // too close
|
||||
if(user && user.get_active_hand() == src) // Make sure our user is still holding us
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(target_turf)
|
||||
var/turflist = getline(user, target_turf)
|
||||
add_attack_logs(user, target, "Flamethrowered at [target.x],[target.y],[target.z]")
|
||||
flame_turf(turflist)
|
||||
|
||||
/obj/item/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
if(iswrench(W) && !status)//Taking this apart
|
||||
/obj/item/flamethrower/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I) && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.loc = T
|
||||
weldtool.forceMove(T)
|
||||
weldtool = null
|
||||
if(igniter)
|
||||
igniter.loc = T
|
||||
igniter.forceMove(T)
|
||||
igniter = null
|
||||
if(ptank)
|
||||
ptank.loc = T
|
||||
ptank.forceMove(T)
|
||||
ptank = null
|
||||
new /obj/item/stack/rods(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(isscrewdriver(W) && igniter && !lit)
|
||||
else if(isscrewdriver(I) && igniter && !lit)
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(isigniter(W))
|
||||
var/obj/item/assembly/igniter/I = W
|
||||
if(I.secured) return
|
||||
if(igniter) return
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
igniter = I
|
||||
else if(isigniter(I))
|
||||
var/obj/item/assembly/igniter/IG = I
|
||||
if(IG.secured)
|
||||
return
|
||||
if(igniter)
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
IG.forceMove(src)
|
||||
igniter = IG
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/tank/plasma))
|
||||
else if(istype(I, /obj/item/tank/plasma))
|
||||
if(ptank)
|
||||
to_chat(user, "<span class='notice'>There appears to already be a plasma tank loaded in [src]!</span>")
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
ptank.forceMove(get_turf(src))
|
||||
ptank = I
|
||||
to_chat(user, "<span class='notice'>You swap the plasma tank in [src]!</span>")
|
||||
return
|
||||
user.drop_item()
|
||||
ptank = W
|
||||
W.loc = src
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
ptank = I
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/analyzer) && ptank)
|
||||
else if(istype(I, /obj/item/analyzer) && ptank)
|
||||
atmosanalyzer_scan(ptank.air_contents, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/flamethrower/attack_self(mob/user)
|
||||
toggle_igniter(user)
|
||||
|
||||
/obj/item/flamethrower/AltClick(mob/user)
|
||||
if(ptank && isliving(user) && user.Adjacent(src))
|
||||
user.put_in_hands(ptank)
|
||||
ptank = null
|
||||
to_chat(user, "<span class='notice'>You remove the plasma tank from [src]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/flamethrower/examine(mob/user)
|
||||
..()
|
||||
return
|
||||
if(ptank)
|
||||
to_chat(user, "<span class='notice'>[src] has \a [ptank] attached. Alt-click to remove it.</span>")
|
||||
|
||||
|
||||
/obj/item/flamethrower/attack_self(mob/user as mob)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
user.set_machine(src)
|
||||
/obj/item/flamethrower/proc/toggle_igniter(mob/user)
|
||||
if(!ptank)
|
||||
to_chat(user, "<span class='notice'>Attach a plasma tank first!</span>")
|
||||
return
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=[UID()];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\n<A HREF='?src=[UID()];remove=1'>Remove plasmatank</A> - <A HREF='?src=[UID()];close=1'>Close</A></TT>")
|
||||
user << browse(dat, "window=flamethrower;size=600x300")
|
||||
onclose(user, "flamethrower")
|
||||
if(!status)
|
||||
to_chat(user, "<span class='notice'>Secure the igniter first!</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/flamethrower/Topic(href,href_list[])
|
||||
if(href_list["close"])
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=flamethrower")
|
||||
return
|
||||
if(usr.stat || usr.restrained() || usr.lying) return
|
||||
usr.set_machine(src)
|
||||
if(href_list["light"])
|
||||
if(!ptank) return
|
||||
if(!status) return
|
||||
to_chat(user, "<span class='notice'>You [lit ? "extinguish" : "ignite"] [src]!</span>")
|
||||
lit = !lit
|
||||
if(lit)
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(href_list["remove"])
|
||||
if(!ptank) return
|
||||
usr.put_in_hands(ptank)
|
||||
ptank = null
|
||||
lit = 0
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=flamethrower")
|
||||
for(var/mob/M in viewers(1, loc))
|
||||
if((M.client && M.machine == src))
|
||||
attack_self(M)
|
||||
if(!warned_admins)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has lit a flamethrower.")
|
||||
warned_admins = TRUE
|
||||
else
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/flamethrower/CheckParts(list/parts_list)
|
||||
..()
|
||||
weldtool = locate(/obj/item/weldingtool) in contents
|
||||
igniter = locate(/obj/item/assembly/igniter) in contents
|
||||
weldtool.status = 0
|
||||
igniter.secured = 0
|
||||
status = 1
|
||||
weldtool.status = FALSE
|
||||
igniter.secured = FALSE
|
||||
status = TRUE
|
||||
update_icon()
|
||||
|
||||
//Called from turf.dm turf/dblclick
|
||||
/obj/item/flamethrower/proc/flame_turf(turflist)
|
||||
if(!lit || operating) return
|
||||
operating = 1
|
||||
if(!lit || operating)
|
||||
return
|
||||
operating = TRUE
|
||||
var/turf/previousturf = get_turf(src)
|
||||
for(var/turf/simulated/T in turflist)
|
||||
if(!T.air)
|
||||
@@ -176,47 +185,61 @@
|
||||
continue //so we don't burn the tile we be standin on
|
||||
if(!T.CanAtmosPass(previousturf))
|
||||
break
|
||||
ignite_turf(T)
|
||||
if(igniter)
|
||||
igniter.ignite_turf(src, T)
|
||||
else
|
||||
default_ignite(T)
|
||||
sleep(1)
|
||||
previousturf = T
|
||||
operating = 0
|
||||
operating = FALSE
|
||||
for(var/mob/M in viewers(1, loc))
|
||||
if((M.client && M.machine == src))
|
||||
attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
|
||||
/obj/item/flamethrower/proc/default_ignite(turf/target, release_amount = 0.05)
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
|
||||
air_transfer.toxins = air_transfer.toxins // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
if(air_transfer.toxins)
|
||||
air_transfer.toxins = air_transfer.toxins * 5
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380, 500)
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
SSair.add_to_active(target, 0)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/flamethrower/full/New(var/loc)
|
||||
..()
|
||||
/obj/item/flamethrower/Initialize(mapload)
|
||||
. = ..()
|
||||
if(create_full)
|
||||
if(!weldtool)
|
||||
weldtool = new /obj/item/weldingtool(src)
|
||||
weldtool.status = 0
|
||||
weldtool.status = FALSE
|
||||
if(!igniter)
|
||||
igniter = new /obj/item/assembly/igniter(src)
|
||||
igniter.secured = 0
|
||||
status = 1
|
||||
update_icon()
|
||||
|
||||
/obj/item/flamethrower/full/tank/New(var/loc)
|
||||
..()
|
||||
igniter = new igniter_type(src)
|
||||
igniter.secured = FALSE
|
||||
status = TRUE
|
||||
if(create_with_tank)
|
||||
ptank = new /obj/item/tank/plasma/full(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/flamethrower/full
|
||||
create_full = TRUE
|
||||
|
||||
/obj/item/flamethrower/full/tank
|
||||
create_with_tank = TRUE
|
||||
|
||||
/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
|
||||
var/target_turf = get_turf(owner)
|
||||
ignite_turf(target_turf, 100)
|
||||
qdel(ptank)
|
||||
igniter.ignite_turf(src,target_turf, release_amount = 100)
|
||||
QDEL_NULL(ptank)
|
||||
return 1 //It hit the flamethrower, not them
|
||||
|
||||
/obj/item/assembly/igniter/proc/flamethrower_process(turf/simulated/location)
|
||||
location.hotspot_expose(700, 2)
|
||||
|
||||
/obj/item/assembly/igniter/proc/ignite_turf(obj/item/flamethrower/F, turf/simulated/location, release_amount = 0.05)
|
||||
F.default_ignite(location, release_amount)
|
||||
@@ -8,7 +8,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
pressure_resistance = ONE_ATMOSPHERE*5
|
||||
pressure_resistance = ONE_ATMOSPHERE * 5
|
||||
force = 5.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -278,22 +278,22 @@
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < 50)
|
||||
to_chat(user, "You need at least 50 units of water to use the nanofrost launcher!")
|
||||
if(R.total_volume < 100)
|
||||
to_chat(user, "You need at least 100 units of water to use the nanofrost launcher!")
|
||||
return
|
||||
if(nanofrost_cooldown)
|
||||
to_chat(user, "Nanofrost launcher is still recharging")
|
||||
return
|
||||
nanofrost_cooldown = 1
|
||||
R.remove_any(50)
|
||||
R.remove_any(100)
|
||||
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
|
||||
log_game("[key_name(user)] used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(1)
|
||||
sleep(2)
|
||||
A.Smoke()
|
||||
spawn(50)
|
||||
spawn(100)
|
||||
if(src)
|
||||
nanofrost_cooldown = 0
|
||||
return
|
||||
|
||||
@@ -272,7 +272,6 @@
|
||||
new /obj/item/sensor_device(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/clothing/shoes/magboots(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src)
|
||||
new /obj/item/tank/jetpack/oxygen/harness(src)
|
||||
new /obj/item/clothing/shoes/magboots/syndie(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
var/custom_pixel_x_offset = 0 //for admin fuckery.
|
||||
var/custom_pixel_y_offset = 0
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/humanoid/New()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
heal_rate = 5
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/New()
|
||||
create_reagents(100)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/mob/living/carbon
|
||||
gender = MALE
|
||||
pressure_resistance = 15
|
||||
var/list/stomach_contents = list()
|
||||
var/list/internal_organs = list()
|
||||
var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access.
|
||||
|
||||
@@ -500,11 +500,12 @@ emp_act
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction)
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, 1)
|
||||
if(shoes)
|
||||
if(istype(shoes,/obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP)) //TODO: Make a not-shit shoe var system to negate airflow.
|
||||
return 0
|
||||
..()
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE)
|
||||
if(shoes && istype(shoes, /obj/item/clothing))
|
||||
var/obj/item/clothing/S = shoes
|
||||
if (S.flags & NOSLIP)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/water_act(volume, temperature, source, method = TOUCH)
|
||||
. = ..()
|
||||
|
||||
@@ -2,7 +2,7 @@ var/global/default_martial_art = new/datum/martial_art
|
||||
/mob/living/carbon/human
|
||||
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,GLAND_HUD)
|
||||
|
||||
pressure_resistance = 25
|
||||
//Marking colour and style
|
||||
var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000.
|
||||
var/list/m_styles = DEFAULT_MARKING_STYLES //All markings set to None.
|
||||
|
||||
@@ -604,6 +604,34 @@
|
||||
else
|
||||
return pick("trails_1", "trails_2")
|
||||
|
||||
/mob/living/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
|
||||
if(buckled)
|
||||
return
|
||||
if(client && client.move_delay >= world.time + world.tick_lag * 2)
|
||||
pressure_resistance_prob_delta -= 30
|
||||
|
||||
var/list/turfs_to_check = list()
|
||||
|
||||
if(has_limbs)
|
||||
var/turf/T = get_step(src, angle2dir(dir2angle(direction) + 90))
|
||||
if (T)
|
||||
turfs_to_check += T
|
||||
|
||||
T = get_step(src, angle2dir(dir2angle(direction) - 90))
|
||||
if(T)
|
||||
turfs_to_check += T
|
||||
|
||||
for(var/t in turfs_to_check)
|
||||
T = t
|
||||
if(T.density)
|
||||
pressure_resistance_prob_delta -= 20
|
||||
continue
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.density && AM.anchored)
|
||||
pressure_resistance_prob_delta -= 20
|
||||
break
|
||||
|
||||
..(pressure_difference, direction, pressure_resistance_prob_delta)
|
||||
|
||||
/*//////////////////////
|
||||
START RESIST PROCS
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/mob/living
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
pressure_resistance = 10
|
||||
|
||||
//Health and life related vars
|
||||
var/maxHealth = 100 //Maximum health that should be possible.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
modtype = "Syndicate"
|
||||
req_access = list(access_syndicate)
|
||||
ionpulse = 1
|
||||
magpulse = 1
|
||||
lawchannel = "State"
|
||||
var/playstyle_string = "<span class='userdanger'>You are a Syndicate assault cyborg!</span><br>\
|
||||
<b>You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
faction = list("syndicate")
|
||||
shoot_sound = 'sound/weapons/wave.ogg'
|
||||
anchored = 1
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120
|
||||
window_id = "syndiebot"
|
||||
window_name = "Syndicate Bot Interface"
|
||||
var/turf/saved_turf
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minbodytemp = 0
|
||||
faction = list("cult")
|
||||
flying = 1
|
||||
pressure_resistance = 100
|
||||
universal_speak = 1
|
||||
AIStatus = AI_OFF //normal constructs don't have AI
|
||||
var/const_type = "shade"
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
heat_damage_per_tick = 20
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
faction = list("alien")
|
||||
status_flags = CANPUSH
|
||||
minbodytemp = 0
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
faction = list("carp")
|
||||
flying = 1
|
||||
pressure_resistance = 200
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
|
||||
|
||||
var/carp_color = "carp" //holder for icon set
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
|
||||
pressure_resistance = 300
|
||||
faction = list("undead") // did I mention ghost
|
||||
loot = list(/obj/item/reagent_containers/food/snacks/ectoplasm)
|
||||
del_on_death = 1
|
||||
|
||||
@@ -49,10 +49,6 @@ var/global/list/ts_spiderling_list = list()
|
||||
// '1' (default for most simple_mobs, including terror spiders) converts to 3.5, or 2.8 tiles/sec.
|
||||
// '2' converts to 4.5, or 2.2 tiles/sec.
|
||||
|
||||
// Atmos
|
||||
pressure_resistance = 50 //50 kPa difference required to push
|
||||
throw_pressure_limit = 100 //100 kPa difference required to throw
|
||||
|
||||
// Ventcrawling
|
||||
ventcrawler = 1 // allows player ventcrawling
|
||||
var/ai_ventcrawls = TRUE
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
throw_range = 2
|
||||
throw_speed = 1
|
||||
layer = 4
|
||||
pressure_resistance = 1
|
||||
pressure_resistance = 2
|
||||
attack_verb = list("bapped")
|
||||
var/amount = 0 //Amount of items clipped to the paper. Note: If you have 2 paper, this should be 1
|
||||
var/page = 1
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
hitsound = 'sound/weapons/pierce.ogg'
|
||||
var/hitsound_wall = ""
|
||||
pressure_resistance = INFINITY
|
||||
burn_state = LAVA_PROOF
|
||||
var/def_zone = "" //Aiming at
|
||||
var/mob/firer = null//Who shot it
|
||||
@@ -334,3 +333,6 @@ obj/item/projectile/Crossed(atom/movable/AM, oldloc) //A mob moving on a tile wi
|
||||
/obj/item/projectile/proc/setAngle(new_angle) //wrapper for overrides.
|
||||
Angle = new_angle
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/experience_pressure_difference()
|
||||
return
|
||||
@@ -100,7 +100,6 @@
|
||||
icon = 'icons/vehicles/CargoTrain.dmi'
|
||||
icon_state = "ambulance"
|
||||
anchored = FALSE
|
||||
throw_pressure_limit = INFINITY //Throwing an ambulance trolley can kill the process scheduler.
|
||||
|
||||
/obj/structure/bed/amb_trolley/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user