This commit is contained in:
Putnam3145
2021-06-30 02:19:02 -07:00
261 changed files with 133002 additions and 131408 deletions
+1 -7
View File
@@ -90,7 +90,6 @@
source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
RegisterSignal(source, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove)
RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move)
RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move)
if(hud_icon)
hud_icon.combat_on = TRUE
hud_icon.update_icon()
@@ -115,7 +114,7 @@
to_chat(source, self_message)
if(playsound)
source.playsound_local(source, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the toggleon sound!
UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_CLIENT_MOVE))
UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED))
if(hud_icon)
hud_icon.combat_on = FALSE
hud_icon.update_icon()
@@ -128,11 +127,6 @@
if((mode_flags & COMBAT_MODE_ACTIVE) && L.client)
L.setDir(lastmousedir, ismousemovement = TRUE)
/// Added movement delay if moving backward.
/datum/component/combat_mode/proc/on_client_move(mob/source, client/client, direction, n, oldloc, added_delay)
if(oldloc != n && direction == REVERSE_DIR(source.dir))
client.move_delay += added_delay*0.5
///Changes the user direction to (try) match the pointer.
/datum/component/combat_mode/proc/onMouseMove(mob/source, object, location, control, params)
if(source.client.show_popup_menus)
@@ -72,6 +72,16 @@
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/newsbaton
name = "Newspaper Baton"
result = /obj/item/melee/classic_baton/telescopic/newspaper
reqs = list(/obj/item/melee/classic_baton/telescopic = 1,
/obj/item/newspaper = 1,
/obj/item/stack/sticky_tape = 2)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bokken
name = "Training Bokken"
result = /obj/item/melee/bokken
+1
View File
@@ -24,6 +24,7 @@
identification_method_flags = id_method_flags
/datum/component/identification/RegisterWithParent()
RegisterSignal(parent, COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, .proc/check_knowledge)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
if(identification_effect_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
+1 -4
View File
@@ -214,7 +214,6 @@
/datum/component/nanites/proc/check_viral_prevention()
return SEND_SIGNAL(src, COMSIG_NANITE_INTERNAL_VIRAL_PREVENTION_CHECK)
//Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
///Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
/datum/component/nanites/proc/sync(datum/signal_source, datum/component/nanites/source, full_overwrite = TRUE, copy_activation = FALSE)
var/list/programs_to_remove = programs.Copy() - permanent_programs
@@ -274,10 +273,9 @@
///Modifies the current nanite volume, then checks if the nanites are depleted or exceeding the maximum amount
/datum/component/nanites/proc/adjust_nanites(datum/source, amount)
nanite_volume = clamp(nanite_volume + amount, 0, max_nanites)
SIGNAL_HANDLER
nanite_volume += amount
nanite_volume = max(nanite_volume + amount, 0) //Lets not have negative nanite counts on permanent ones.
if(nanite_volume > max_nanites)
reject_excess_nanites()
if(nanite_volume <= 0) //oops we ran out
@@ -407,7 +405,6 @@
nanite_volume = clamp(amount, 0, max_nanites)
/datum/component/nanites/proc/set_max_volume(datum/source, amount)
max_nanites = max(1, max_nanites)
SIGNAL_HANDLER
max_nanites = max(1, amount)
@@ -404,8 +404,8 @@
if(M.loc)
environment = M.loc.return_air()
if(environment)
plasmamount = environment.get_moles(/datum/gas/plasma)
if(plasmamount && plasmamount > GLOB.meta_gas_visibility[/datum/gas/plasma]) //if there's enough plasma in the air to see
plasmamount = environment.get_moles(GAS_PLASMA)
if(plasmamount && plasmamount > GLOB.gas_data.visibility[GAS_PLASMA]) //if there's enough plasma in the air to see
. += power * 0.5
if(M.reagents.has_reagent(/datum/reagent/toxin/plasma))
. += power * 0.75
+26 -2
View File
@@ -184,7 +184,7 @@
return location.loc.assume_air(env)
return location.assume_air(env)
/obj/item/clothing/head/mob_holder/remove_air(amount)
/obj/item/clothing/head/mob_holder/proc/get_loc_for_air()
var/atom/location = loc
if(!loc)
return //null
@@ -192,9 +192,33 @@
while(location != T)
location = location.loc
if(ismob(location))
return location.loc.remove_air(amount)
return location.loc
return location
/obj/item/clothing/head/mob_holder/assume_air_moles(datum/gas_mixture/env, moles)
var/atom/location = get_loc_for_air()
return location.assume_air_moles(env, moles)
/obj/item/clothing/head/mob_holder/assume_air_ratio(datum/gas_mixture/env, ratio)
var/atom/location = get_loc_for_air()
return location.assume_air_ratio(env, ratio)
/obj/item/clothing/head/mob_holder/remove_air(amount)
var/atom/location = get_loc_for_air()
return location.remove_air(amount)
/obj/item/clothing/head/mob_holder/remove_air_ratio(ratio)
var/atom/location = get_loc_for_air()
return location.remove_air_ratio(ratio)
/obj/item/clothing/head/mob_holder/transfer_air(datum/gas_mixture/taker, amount)
var/atom/location = get_loc_for_air()
return location.transfer_air(taker, amount)
/obj/item/clothing/head/mob_holder/transfer_air_ratio(datum/gas_mixture/taker, ratio)
var/atom/location = get_loc_for_air()
return location.transfer_air(taker, ratio)
// escape when found if applicable
/obj/item/clothing/head/mob_holder/on_found(mob/living/finder)
if(escape_on_find)
+12 -22
View File
@@ -283,14 +283,11 @@
// insanity define to mark the next set of cardinals.
#define CARDINAL_MARK(ndir, cdir, edir) \
if(edir & cdir) { \
CARDINAL_MARK_NOCHECK(ndir, cdir, edir); \
};
#define CARDINAL_MARK_NOCHECK(ndir, cdir, edir) \
expanding = get_step(T,ndir); \
if(expanding && !exploded_last[expanding] && !edges[expanding]) { \
powers_next[expanding] = max(powers_next[expanding], returned); \
edges_next[expanding] = (cdir | edges_next[expanding]); \
expanding = get_step(T,ndir); \
if(expanding && !exploded_last[expanding] && !edges[expanding]) { \
powers_next[expanding] = max(powers_next[expanding], returned); \
edges_next[expanding] = (cdir | edges_next[expanding]); \
}; \
};
// insanity define to do diagonal marking as 2 substeps
@@ -308,24 +305,15 @@
};
// insanity define to mark the diagonals that would otherwise be missed
#define DIAGONAL_MARK(ndir, cdir, edir) \
if(edir & cdir) { \
DIAGONAL_MARK_NOCHECK(ndir, cdir, edir); \
};
// this only works because right now, WEX_DIR_X is the same as a byond dir
// and we know we're only passing in one dir at a time.
// if this ever stops being the case, and explosions break when you touch this, now you know why.
#define DIAGONAL_MARK_NOCHECK(ndir, cdir, edir) \
DIAGONAL_SUBSTEP(turn(ndir, 90), turn(cdir, 90), edir); \
DIAGONAL_SUBSTEP(turn(ndir, -90), turn(cdir, -90), edir);
// mark
#define MARK(ndir, cdir, edir) \
#define DIAGONAL_MARK(ndir, cdir, edir) \
if(edir & cdir) { \
CARDINAL_MARK_NOCHECK(ndir, cdir, edir); \
DIAGONAL_MARK_NOCHECK(ndir, cdir, edir); \
DIAGONAL_SUBSTEP(turn(ndir, 90), turn(cdir, 90), edir); \
DIAGONAL_SUBSTEP(turn(ndir, -90), turn(cdir, -90), edir); \
};
CARDINAL_MARK(NORTH, WEX_DIR_NORTH, dir)
CARDINAL_MARK(SOUTH, WEX_DIR_SOUTH, dir)
CARDINAL_MARK(EAST, WEX_DIR_EAST, dir)
@@ -372,7 +360,9 @@
#undef WEX_ACT
#undef CALCULATE_DIAGONAL_POWER
#undef CALCULATE_DIAGONAL_CROSS_POWER
#undef DIAGONAL_SUBSTEP
#undef DIAGONAL_MARK
#undef CARDINAL_MARK
#undef MARK
+3 -3
View File
@@ -142,12 +142,12 @@
// Can most things breathe?
if(trace_gases)
continue
var/oxy_moles = A.get_moles(/datum/gas/oxygen)
var/oxy_moles = A.get_moles(GAS_O2)
if(oxy_moles < 16 || oxy_moles > 50)
continue
if(A.get_moles(/datum/gas/plasma))
if(A.get_moles(GAS_PLASMA))
continue
if(A.get_moles(/datum/gas/carbon_dioxide) >= 10)
if(A.get_moles(GAS_CO2) >= 10)
continue
// Aim for goldilocks temperatures and pressure
-4
View File
@@ -43,12 +43,8 @@
/datum/martial_art/proc/damage_roll(mob/living/carbon/human/A, mob/living/carbon/human/D)
//Here we roll for our damage to be added into the damage var in the various attack procs. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode.
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
if(SEND_SIGNAL(D, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
damage *= 1.2
if(!CHECK_MOBILITY(A, MOBILITY_STAND))
damage *= 0.7
if(SEND_SIGNAL(A, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
damage *= 0.8
return damage
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE)
+4 -2
View File
@@ -144,14 +144,16 @@
parry_time_active_visual_override = 3
parry_time_spindown_visual_override = 12
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK //can attack while
parry_time_perfect = 2.5 // first ds isn't perfect
parry_time_perfect_leeway = 1.5
parry_time_perfect = 2.5
parry_time_perfect_leeway = 2.5
parry_imperfect_falloff_percent = 5
parry_efficiency_to_counterattack = 100
parry_efficiency_considered_successful = 65 // VERY generous
parry_efficiency_perfect = 100
parry_failed_stagger_duration = 4 SECONDS
parry_failed_cooldown_duration = 2 SECONDS
parry_cooldown = 0.5 SECONDS
parry_flags = NONE
/mob/living/carbon/human/UseStaminaBuffer(amount, warn = FALSE, considered_action = TRUE)
amount *= physiology? physiology.stamina_buffer_mod : 1
+1 -1
View File
@@ -227,7 +227,7 @@
//can we sniff? is there miasma in the air?
var/datum/gas_mixture/air = user.loc.return_air()
if(air.get_moles(/datum/gas/miasma))
if(air.get_moles(GAS_MIASMA))
user.adjust_disgust(sensitivity * 45)
to_chat(user, "<span class='warning'>With your overly sensitive nose, you get a whiff of stench and feel sick! Try moving to a cleaner area!</span>")
return
+14 -16
View File
@@ -95,21 +95,31 @@
/datum/status_effect/staggered/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
if(!CONFIG_GET(flag/sprint_enabled))
new_owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/stagger, TRUE, CONFIG_GET(number/sprintless_stagger_slowdown))
return ..()
/datum/status_effect/staggered/on_remove()
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/stagger)
return ..()
/datum/status_effect/off_balance
id = "offbalance"
blocks_sprint = TRUE
alert_type = null
/datum/status_effect/off_balance/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
if(!CONFIG_GET(flag/sprint_enabled))
new_owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance, TRUE, CONFIG_GET(number/sprintless_off_balance_slowdown))
return ..()
/datum/status_effect/off_balance/on_remove()
var/active_item = owner.get_active_held_item()
if(active_item)
owner.visible_message("<span class='warning'>[owner.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance)
return ..()
/obj/screen/alert/status_effect/asleep
@@ -117,24 +127,14 @@
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
icon_state = "asleep"
/datum/status_effect/grouped/stasis
id = "stasis"
duration = -1
tick_interval = 10
var/last_dead_time
/datum/status_effect/no_combat_mode
id = "no_combat_mode"
alert_type = null
status_type = STATUS_EFFECT_REPLACE
blocks_combatmode = TRUE
/datum/status_effect/no_combat_mode/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
. = ..()
/datum/status_effect/no_combat_mode/robotic_emp
/datum/status_effect/robotic_emp
id = "emp_no_combat_mode"
/datum/status_effect/mesmerize
@@ -144,13 +144,11 @@
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
. = ..()
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
ADD_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, "mesmerize")
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
/datum/status_effect/mesmerize/on_remove()
. = ..()
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, "mesmerize")
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
@@ -168,7 +166,7 @@
id = "tased"
alert_type = null
var/movespeed_mod = /datum/movespeed_modifier/status_effect/tased
var/stamdmg_per_ds = 0 //a 20 duration would do 20 stamdmg, disablers do 24 or something
var/stamdmg_per_ds = 1 //a 20 duration would do 20 stamdmg, disablers do 24 or something
var/last_tick = 0 //fastprocess processing speed is a goddamn sham, don't trust it.
/datum/status_effect/electrode/on_creation(mob/living/new_owner, set_duration)
@@ -199,9 +197,9 @@
/datum/status_effect/electrode/no_combat_mode
id = "tased_strong"
movespeed_mod = /datum/movespeed_modifier/status_effect/tased/no_combat_mode
blocks_combatmode = TRUE
stamdmg_per_ds = 1
//OTHER DEBUFFS
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
id = "his_wrath"
@@ -11,8 +11,6 @@
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
/// If this is TRUE, the user will have combt mode forcefully disabled while this is active.
var/blocks_combatmode = FALSE
/// If this is TRUE, the user will have sprint forcefully disabled while this is active.
var/blocks_sprint = FALSE
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
@@ -61,8 +59,6 @@
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself.
SHOULD_CALL_PARENT(TRUE)
if(blocks_combatmode)
ADD_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
if(blocks_sprint)
ADD_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
return TRUE
@@ -74,8 +70,6 @@
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
SHOULD_CALL_PARENT(TRUE)
if(blocks_combatmode)
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
if(blocks_sprint)
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
return TRUE
@@ -83,8 +77,6 @@
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
if(blocks_combatmode)
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
if(blocks_sprint)
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
owner = null
+6 -8
View File
@@ -106,7 +106,7 @@
A.aiControlDisabled = 1
else if(A.aiControlDisabled == -1)
A.aiControlDisabled = 2
addtimer(CALLBACK(src, .proc/reenable_ai_control), 10)
addtimer(CALLBACK(A, /obj/machinery/door/airlock.proc/reset_ai_wire), 1 SECONDS)
if(WIRE_SHOCK) // Pulse to shock the door for 10 ticks.
if(!A.secondsElectrified)
A.set_electrified(30, usr)
@@ -120,13 +120,11 @@
A.lights = !A.lights
A.update_icon()
/datum/wires/airlock/proc/reenable_ai_control()
var/obj/machinery/door/airlock/A = holder
if(A)
if(A.aiControlDisabled == 1)
A.aiControlDisabled = 0
else if(A.aiControlDisabled == 2)
A.aiControlDisabled = -1
/obj/machinery/door/airlock/proc/reset_ai_wire()
if(aiControlDisabled == 1)
aiControlDisabled = 0
else if(aiControlDisabled == 2)
aiControlDisabled = -1
/datum/wires/airlock/on_cut(wire, mend)
var/obj/machinery/door/airlock/A = holder
+5 -5
View File
@@ -128,7 +128,7 @@
initial_flow = 1.5
gauzed_clot_rate = 0.8
internal_bleeding_chance = 30
internal_bleeding_coefficient = 1.25
internal_bleeding_coefficient = 1
threshold_minimum = 40
threshold_penalty = 15
status_effect_type = /datum/status_effect/wound/pierce/moderate
@@ -142,10 +142,10 @@
occur_text = "looses a violent spray of blood, revealing a pierced wound"
sound_effect = 'sound/effects/wounds/pierce2.ogg'
severity = WOUND_SEVERITY_SEVERE
initial_flow = 2.25
initial_flow = 2
gauzed_clot_rate = 0.6
internal_bleeding_chance = 60
internal_bleeding_coefficient = 1.5
internal_bleeding_coefficient = 1.25
threshold_minimum = 60
threshold_penalty = 25
status_effect_type = /datum/status_effect/wound/pierce/severe
@@ -159,10 +159,10 @@
occur_text = "blasts apart, sending chunks of viscera flying in all directions"
sound_effect = 'sound/effects/wounds/pierce3.ogg'
severity = WOUND_SEVERITY_CRITICAL
initial_flow = 3
initial_flow = 2.7
gauzed_clot_rate = 0.4
internal_bleeding_chance = 80
internal_bleeding_coefficient = 1.75
internal_bleeding_coefficient = 1.5
threshold_minimum = 110
threshold_penalty = 40
status_effect_type = /datum/status_effect/wound/pierce/critical
+5 -5
View File
@@ -253,7 +253,7 @@
occur_text = "is cut open, slowly leaking blood"
sound_effect = 'sound/effects/wounds/blood1.ogg'
severity = WOUND_SEVERITY_MODERATE
initial_flow = 1.5
initial_flow = 1.25
minimum_flow = 0.375
max_per_type = 3
clot_rate = 0.12
@@ -270,8 +270,8 @@
occur_text = "is ripped open, veins spurting blood"
sound_effect = 'sound/effects/wounds/blood2.ogg'
severity = WOUND_SEVERITY_SEVERE
initial_flow = 2.4375
minimum_flow = 2.0625
initial_flow = 2
minimum_flow = 1.75
clot_rate = 0.07
max_per_type = 4
threshold_minimum = 60
@@ -288,8 +288,8 @@
occur_text = "is torn open, spraying blood wildly"
sound_effect = 'sound/effects/wounds/blood3.ogg'
severity = WOUND_SEVERITY_CRITICAL
initial_flow = 3.1875
minimum_flow = 3
initial_flow = 2.75
minimum_flow = 2.5
clot_rate = -0.05 // critical cuts actively get worse instead of better
max_per_type = 5
threshold_minimum = 90