mass ports like 15 tg prs + counting (#13386)
* changes * ok * changes * sigh * fixes * changes * fix * fix * alright * fixes git pus * fix * fix * fix * test * ok * Update code/modules/paperwork/ticketmachine.dm Co-authored-by: Letter N <24603524+LetterN@users.noreply.github.com> * ok * compile and other stuff * ok * fix * fix * Fix * Update menu.dm * Update view.dm * Update preferences.dm Co-authored-by: Letter N <24603524+LetterN@users.noreply.github.com> Co-authored-by: Putnam3145 <putnam3145@gmail.com>
This commit is contained in:
@@ -408,7 +408,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(mind.current.key && mind.current.key[1] != "@") //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
|
||||
return
|
||||
client.change_view(CONFIG_GET(string/default_view))
|
||||
client.view_size.setDefault(getScreenSize(client.prefs.widescreenpref))//Let's reset so people can't become allseeing gods
|
||||
transfer_ckey(mind.current, FALSE)
|
||||
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
|
||||
mind.current.client.init_verbs()
|
||||
@@ -568,15 +568,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set desc = "Change your view range."
|
||||
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(client.view == CONFIG_GET(string/default_view))
|
||||
if(client.view_size.getView() == client.view_size.default)
|
||||
var/list/views = list()
|
||||
for(var/i in 7 to max_view)
|
||||
views |= i
|
||||
var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views
|
||||
var/new_view = input("Choose your new view", "Modify view range", 0) as null|anything in views
|
||||
if(new_view)
|
||||
client.change_view(clamp(new_view, 7, max_view))
|
||||
client.view_size.setTo(clamp(new_view, 7, max_view) - 7)
|
||||
else
|
||||
client.change_view(CONFIG_GET(string/default_view))
|
||||
client.view_size.resetToDefault()
|
||||
|
||||
/mob/dead/observer/verb/add_view_range(input as num)
|
||||
set name = "Add View Range"
|
||||
|
||||
@@ -979,21 +979,6 @@
|
||||
O.held_index = r_arm_index_next //2, 4, 6, 8...
|
||||
hand_bodyparts += O
|
||||
|
||||
/mob/living/carbon/do_after_coefficent()
|
||||
. = ..()
|
||||
var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) //Currently, only carbons or higher use mood, move this once that changes.
|
||||
if(mood)
|
||||
switch(mood.sanity) //Alters do_after delay based on how sane you are
|
||||
if(SANITY_INSANE to SANITY_DISTURBED)
|
||||
. *= 1.25
|
||||
if(SANITY_NEUTRAL to SANITY_GREAT)
|
||||
. *= 0.90
|
||||
|
||||
for(var/i in status_effects)
|
||||
var/datum/status_effect/S = i
|
||||
. *= S.interact_speed_modifier()
|
||||
|
||||
|
||||
/mob/living/carbon/proc/create_internal_organs()
|
||||
for(var/X in internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
|
||||
@@ -1058,11 +1058,6 @@
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown)
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying)
|
||||
|
||||
|
||||
/mob/living/carbon/human/do_after_coefficent()
|
||||
. = ..()
|
||||
. *= physiology.do_after_speed
|
||||
|
||||
/mob/living/carbon/human/is_bleeding()
|
||||
if(NOBLOOD in dna.species.species_traits || bleedsuppress)
|
||||
return FALSE
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
var/hunger_mod = 1 //% of hunger rate taken per tick.
|
||||
|
||||
var/do_after_speed = 1 //Speed mod for do_after. Lower is better. If temporarily adjusting, please only modify using *= and /=, so you don't interrupt other calculations.
|
||||
|
||||
/// footstep type override for both shoeless and not footstep sounds.
|
||||
var/footstep_type
|
||||
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
active_block_do_stamina_damage(owner, object, stamina_cost, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
|
||||
block_return[BLOCK_RETURN_ACTIVE_BLOCK_DAMAGE_MITIGATED] = damage - final_damage
|
||||
block_return[BLOCK_RETURN_SET_DAMAGE_TO] = final_damage
|
||||
block_return[BLOCK_RETURN_MITIGATION_PERCENT] = clamp(1 - (final_damage / damage), 0, 1)
|
||||
. = BLOCK_SHOULD_CHANGE_DAMAGE
|
||||
if((final_damage <= 0) || (damage <= 0))
|
||||
. |= BLOCK_SUCCESS //full block
|
||||
|
||||
@@ -52,6 +52,19 @@
|
||||
var/lose_patience_timer_id //id for a timer to call LoseTarget(), used to stop mobs fixating on a target they can't reach
|
||||
var/lose_patience_timeout = 300 //30 seconds by default, so there's no major changes to AI behaviour, beyond actually bailing if stuck forever
|
||||
|
||||
///When a target is found, will the mob attempt to charge at it's target?
|
||||
var/charger = FALSE
|
||||
///Tracks if the target is actively charging.
|
||||
var/charge_state = FALSE
|
||||
///In a charge, how many tiles will the charger travel?
|
||||
var/charge_distance = 3
|
||||
///How often can the charging mob actually charge? Effects the cooldown between charges.
|
||||
var/charge_frequency = 6 SECONDS
|
||||
///If the mob is charging, how long will it stun it's target on success, and itself on failure?
|
||||
var/knockdown_time = 3 SECONDS
|
||||
///Declares a cooldown for potential charges right off the bat.
|
||||
COOLDOWN_DECLARE(charge_cooldown)
|
||||
|
||||
/mob/living/simple_animal/hostile/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -292,6 +305,9 @@
|
||||
if(ranged) //We ranged? Shoot at em
|
||||
if(!target.Adjacent(targets_from) && ranged_cooldown <= world.time) //But make sure they're not in range for a melee attack and our range attack is off cooldown
|
||||
OpenFire(target)
|
||||
if(charger && (target_distance > minimum_distance) && (target_distance <= charge_distance))//Attempt to close the distance with a charge.
|
||||
enter_charge(target)
|
||||
return TRUE
|
||||
if(!Process_Spacemove()) //Drifting
|
||||
walk(src,0)
|
||||
return 1
|
||||
@@ -599,3 +615,64 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
|
||||
. += M
|
||||
else if (M.loc.type in hostile_machines)
|
||||
. += M.loc
|
||||
|
||||
|
||||
/**
|
||||
* Proc that handles a charge attack windup for a mob.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/proc/enter_charge(var/atom/target)
|
||||
if((mobility_flags & (MOBILITY_MOVE | MOBILITY_STAND)) != (MOBILITY_MOVE | MOBILITY_STAND) || charge_state)
|
||||
return FALSE
|
||||
|
||||
if(!(COOLDOWN_FINISHED(src, charge_cooldown)) || !has_gravity() || !target.has_gravity())
|
||||
return FALSE
|
||||
Shake(15, 15, 1 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/handle_charge_target, target), 1.5 SECONDS, TIMER_STOPPABLE)
|
||||
|
||||
/**
|
||||
* Proc that throws the mob at the target after the windup.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/proc/handle_charge_target(var/atom/target)
|
||||
charge_state = TRUE
|
||||
throw_at(target, charge_distance, 1, src, FALSE, TRUE, callback = CALLBACK(src, .proc/charge_end))
|
||||
COOLDOWN_START(src, charge_cooldown, charge_frequency)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Proc that handles a charge attack after it's concluded.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/proc/charge_end()
|
||||
charge_state = FALSE
|
||||
|
||||
/**
|
||||
* Proc that handles the charge impact of the charging mob.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(!charge_state)
|
||||
return ..()
|
||||
|
||||
if(hit_atom)
|
||||
if(isliving(hit_atom))
|
||||
var/mob/living/L = hit_atom
|
||||
var/blocked = FALSE
|
||||
if(ishuman(hit_atom))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
var/list/return_list = list()
|
||||
if(H.mob_run_block(src, 0, "the [name]", ATTACK_TYPE_TACKLE, 0, src, null, return_list) & BLOCK_SUCCESS)
|
||||
blocked = TRUE
|
||||
if(!blocked)
|
||||
blocked = return_list[BLOCK_RETURN_MITIGATION_PERCENT]
|
||||
if(!blocked)
|
||||
L.visible_message("<span class='danger'>[src] charges on [L]!</span>", "<span class='userdanger'>[src] charges into you!</span>")
|
||||
L.Knockdown(knockdown_time)
|
||||
else
|
||||
Stun((knockdown_time * 2), 1, 1)
|
||||
charge_end()
|
||||
else if(hit_atom.density && !hit_atom.CanPass(src))
|
||||
visible_message("<span class='danger'>[src] smashes into [hit_atom]!</span>")
|
||||
Stun((knockdown_time * 2), 1, 1)
|
||||
|
||||
if(charge_state)
|
||||
charge_state = FALSE
|
||||
update_icons()
|
||||
update_mobility()
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Lobstrosities, the poster boy of charging AI mobs. Drops crab meat and bones.
|
||||
* Outside of charging, it's intended behavior is that it is generally slow moving, but makes up for that with a knockdown attack to score additional hits.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/asteroid/lobstrosity
|
||||
name = "arctic lobstrosity"
|
||||
desc = "A marvel of evolution gone wrong, the frosty ice produces underground lakes where these ill tempered seafood gather. Beware its charge."
|
||||
icon = 'icons/mob/icemoon/icemoon_monsters.dmi'
|
||||
icon_state = "arctic_lobstrosity"
|
||||
icon_living = "arctic_lobstrosity"
|
||||
icon_dead = "arctic_lobstrosity_dead"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
friendly_verb_continuous = "chitters at"
|
||||
friendly_verb_simple = "chits at"
|
||||
speak_emote = list("chitters")
|
||||
speed = 3
|
||||
move_to_delay = 20
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
obj_damage = 15
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 19
|
||||
attack_verb_continuous = "snips"
|
||||
attack_verb_simple = "snip"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
weather_immunities = list("snow")
|
||||
vision_range = 5
|
||||
aggro_vision_range = 7
|
||||
charger = TRUE
|
||||
charge_distance = 4
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/crab = 2, /obj/item/stack/sheet/bone = 2)
|
||||
robust_searching = TRUE
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/lobstrosity/lava
|
||||
name = "tropical lobstrosity"
|
||||
desc = "A marvel of evolution gone wrong, the sulfur lakes of lavaland have given them a vibrant, red hued shell. Beware its charge."
|
||||
icon_state = "lobstrosity"
|
||||
icon_living = "lobstrosity"
|
||||
icon_dead = "lobstrosity_dead"
|
||||
@@ -39,8 +39,7 @@
|
||||
update_client_colour()
|
||||
update_mouse_pointer()
|
||||
if(client)
|
||||
client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed.
|
||||
|
||||
client.view_size?.resetToDefault()
|
||||
if(client.player_details && istype(client.player_details))
|
||||
if(client.player_details.player_actions.len)
|
||||
for(var/datum/action/A in client.player_details.player_actions)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
. = ..()
|
||||
update_config_movespeed()
|
||||
update_movespeed(TRUE)
|
||||
initialize_actionspeed()
|
||||
hook_vr("mob_new",list(src))
|
||||
|
||||
/mob/GenerateTag()
|
||||
|
||||
@@ -58,6 +58,13 @@
|
||||
var/list/movespeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
||||
/// The calculated mob speed slowdown based on the modifiers list
|
||||
var/cached_multiplicative_slowdown
|
||||
/// List of action speed modifiers applying to this mob
|
||||
var/list/actionspeed_modification //Lazy list, see mob_movespeed.dm
|
||||
/// List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources)
|
||||
var/list/actionspeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
||||
/// The calculated mob action speed slowdown based on the modifiers list
|
||||
var/cached_multiplicative_actions_slowdown
|
||||
|
||||
/////////////////
|
||||
|
||||
var/name_archive //For admin things like possession
|
||||
|
||||
Reference in New Issue
Block a user