Merge branch 'master' into TGUIs_Nexties
This commit is contained in:
@@ -599,6 +599,10 @@
|
||||
name = "Scully"
|
||||
icon_state = "hair_scully"
|
||||
|
||||
/datum/sprite_accessory/hair/shaggy
|
||||
name = "Shaggy"
|
||||
icon_state = "hair_shaggy"
|
||||
|
||||
/datum/sprite_accessory/hair/shaved
|
||||
name = "Shaved"
|
||||
icon_state = "hair_shaved"
|
||||
|
||||
@@ -389,6 +389,7 @@
|
||||
if(resilience)
|
||||
actual_trauma.resilience = resilience
|
||||
SSblackbox.record_feedback("tally", "traumas", 1, actual_trauma.type)
|
||||
return actual_trauma
|
||||
|
||||
//Add a random trauma of a certain subtype
|
||||
/obj/item/organ/brain/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/alt_inhands_file = 'icons/mob/alienqueen.dmi'
|
||||
|
||||
/mob/living/carbon/alien/humanoid/royal/can_inject()
|
||||
/mob/living/carbon/alien/humanoid/royal/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/humanoid/royal/queen
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
if(M.occupant == src)
|
||||
M.go_out()
|
||||
|
||||
dna.species.spec_death(gibbed, src)
|
||||
if(!QDELETED(dna)) //The gibbed param is bit redundant here since dna won't exist at this point if they got deleted.
|
||||
dna.species.spec_death(gibbed, src)
|
||||
|
||||
if(SSticker.HasRoundStarted())
|
||||
SSblackbox.ReportDeath(src)
|
||||
|
||||
@@ -385,20 +385,17 @@
|
||||
else if(isobserver(user) && traitstring)
|
||||
. += "<span class='info'><b>Traits:</b> [traitstring]</span>"
|
||||
|
||||
if(print_flavor_text())
|
||||
if(get_visible_name() == "Unknown") //Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
|
||||
. += "...?"
|
||||
else if(skipface) //Sometimes we're not unknown, but impersonating someone in a hardsuit, let's not reveal our flavor text then either.
|
||||
. += "...?"
|
||||
else
|
||||
. += "[print_flavor_text()]"
|
||||
if(print_flavor_text_2())
|
||||
if(get_visible_name() == "Unknown") //Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
|
||||
. += "...?"
|
||||
else if(skipface) //Sometimes we're not unknown, but impersonating someone in a hardsuit, let's not reveal our flavor text then either.
|
||||
. += "...?"
|
||||
else
|
||||
. += "[print_flavor_text_2()]"
|
||||
//No flavor text unless the face can be seen. Prevents certain metagaming with impersonation.
|
||||
var/invisible_man = skipface || get_visible_name() == "Unknown"
|
||||
if(invisible_man)
|
||||
. += "...?"
|
||||
else
|
||||
var/flavor = print_flavor_text()
|
||||
if(flavor)
|
||||
. += flavor
|
||||
var/temp_flavor = print_flavor_text_2()
|
||||
if(temp_flavor)
|
||||
. += temp_flavor
|
||||
. += "*---------*</span>"
|
||||
|
||||
/mob/living/proc/status_effect_examines(pronoun_replacement) //You can include this in any mob's examine() to show the examine texts of status effects!
|
||||
|
||||
@@ -336,7 +336,8 @@
|
||||
if(bomb_armor < EXPLODE_GIB_THRESHOLD) //gibs the mob if their bomb armor is lower than EXPLODE_GIB_THRESHOLD
|
||||
for(var/I in contents)
|
||||
var/atom/A = I
|
||||
A.ex_act(severity)
|
||||
if(!QDELETED(A))
|
||||
A.ex_act(severity)
|
||||
gib()
|
||||
return
|
||||
else
|
||||
|
||||
@@ -849,6 +849,8 @@
|
||||
linked_mobs.Add(M)
|
||||
if(!selflink)
|
||||
to_chat(M, "<span class='notice'>You are now connected to [slimelink_owner.real_name]'s Slime Link.</span>")
|
||||
RegisterSignal(M, COMSIG_MOB_DEATH , .proc/unlink_mob)
|
||||
RegisterSignal(M, COMSIG_PARENT_QDELETING, .proc/unlink_mob)
|
||||
var/datum/action/innate/linked_speech/action = new(src)
|
||||
linked_actions.Add(action)
|
||||
action.Grant(M)
|
||||
@@ -858,6 +860,7 @@
|
||||
var/link_id = linked_mobs.Find(M)
|
||||
if(!(link_id))
|
||||
return
|
||||
UnregisterSignal(M, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING))
|
||||
var/datum/action/innate/linked_speech/action = linked_actions[link_id]
|
||||
action.Remove(M)
|
||||
to_chat(M, "<span class='notice'>You are no longer connected to [slimelink_owner.real_name]'s Slime Link.</span>")
|
||||
@@ -890,18 +893,11 @@
|
||||
Remove(H)
|
||||
return
|
||||
|
||||
if(QDELETED(H) || H.stat == DEAD)
|
||||
species.unlink_mob(H)
|
||||
return
|
||||
|
||||
if(message)
|
||||
var/msg = "<i><font color=#008CA2>\[[species.slimelink_owner.real_name]'s Slime Link\] <b>[H]:</b> [message]</font></i>"
|
||||
log_directed_talk(H, species.slimelink_owner, msg, LOG_SAY, "slime link")
|
||||
for(var/X in species.linked_mobs)
|
||||
var/mob/living/M = X
|
||||
if(QDELETED(M) || M.stat == DEAD)
|
||||
species.unlink_mob(M)
|
||||
continue
|
||||
to_chat(M, msg)
|
||||
|
||||
for(var/X in GLOB.dead_mob_list)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
..()
|
||||
|
||||
/datum/species/plasmaman/before_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
var/current_job = J.title
|
||||
var/current_job = J?.title
|
||||
var/datum/outfit/plasmaman/O = new /datum/outfit/plasmaman
|
||||
switch(current_job)
|
||||
if("Chaplain")
|
||||
|
||||
@@ -382,9 +382,6 @@ There are several things that need to be remembered:
|
||||
|
||||
if(wear_suit)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
var/item_level_support = FALSE // LISTEN! If you must degrade the code with further snowflake checks, at least keep it compatible with worn non-clothing items!
|
||||
if(!istype(S))
|
||||
item_level_support = TRUE
|
||||
wear_suit.screen_loc = ui_oclothing
|
||||
if(client && hud_used && hud_used.hud_shown)
|
||||
if(hud_used.inventory_shown)
|
||||
@@ -400,7 +397,7 @@ There are several things that need to be remembered:
|
||||
if("taur" in dna.species.mutant_bodyparts)
|
||||
T = GLOB.taur_list[dna.features["taur"]]
|
||||
|
||||
if(!item_level_support && S.mutantrace_variation)
|
||||
if(S.mutantrace_variation)
|
||||
if(T?.taur_mode)
|
||||
var/init_worn_icon = worn_icon
|
||||
variation_flag |= S.mutantrace_variation & T.taur_mode || S.mutantrace_variation & T.alt_taur_mode
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
/mob/living/carbon/monkey/handle_mutations_and_radiation()
|
||||
if(radiation)
|
||||
if(radiation > RAD_MOB_MUTATE && prob((radiation - RAD_MOB_MUTATE) / 25))
|
||||
gorillize()
|
||||
return
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
|
||||
if(!IsKnockdown())
|
||||
emote("collapse")
|
||||
@@ -41,10 +44,6 @@
|
||||
randmutb()
|
||||
emote("gasp")
|
||||
domutcheck()
|
||||
|
||||
if(radiation > RAD_MOB_MUTATE * 2 && prob(50))
|
||||
gorillize()
|
||||
return
|
||||
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
|
||||
vomit(10, TRUE)
|
||||
return ..()
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
return ret
|
||||
|
||||
// Living mobs use can_inject() to make sure that the mob is not syringe-proof in general.
|
||||
/mob/living/proc/can_inject()
|
||||
/mob/living/proc/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
return TRUE
|
||||
|
||||
/mob/living/is_injectable(allowmobs = TRUE)
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
if(NONE)
|
||||
return FALSE
|
||||
if(POWER_REQ_ALL)
|
||||
return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || ((!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
if(POWER_REQ_CLOCKCULT)
|
||||
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
|
||||
return FALSE
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -100,7 +100,7 @@
|
||||
sleep(50)
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/AIarea = get_area(src)
|
||||
if(AIarea && AIarea.power_equip)
|
||||
if(AIarea && AIarea.powered(EQUIP))
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
@@ -120,7 +120,7 @@
|
||||
var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
|
||||
for (PRP=1, PRP<=4, PRP++)
|
||||
T = get_turf(src)
|
||||
AIarea = get_area(src)
|
||||
AIarea = get_base_area(src)
|
||||
if(AIarea)
|
||||
for (var/obj/machinery/power/apc/APC in AIarea)
|
||||
if (!(APC.stat & BROKEN))
|
||||
@@ -134,7 +134,7 @@
|
||||
to_chat(src, "Lost connection with the APC!")
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
|
||||
return
|
||||
if(AIarea.power_equip)
|
||||
if(AIarea.powered(EQUIP))
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
if(1)
|
||||
. += "<CENTER><B>Medical Record</B></CENTER><BR>"
|
||||
if(medicalActive1 in GLOB.data_core.general)
|
||||
. += "Name: [medicalActive1.fields["name"]] ID: [medicalActive1.fields["id"]]<BR>\nSex: [medicalActive1.fields["sex"]]<BR>\nAge: [medicalActive1.fields["age"]]<BR>\nFingerprint: [medicalActive1.fields["fingerprint"]]<BR>\nPhysical Status: [medicalActive1.fields["p_stat"]]<BR>\nMental Status: [medicalActive1.fields["m_stat"]]<BR>"
|
||||
. += "Name: [medicalActive1.fields["name"]] ID: [medicalActive1.fields["id"]]<BR>\nGender: [medicalActive1.fields["gender"]]<BR>\nAge: [medicalActive1.fields["age"]]<BR>\nFingerprint: [medicalActive1.fields["fingerprint"]]<BR>\nPhysical Status: [medicalActive1.fields["p_stat"]]<BR>\nMental Status: [medicalActive1.fields["m_stat"]]<BR>"
|
||||
else
|
||||
. += "<pre>Requested medical record not found.</pre><BR>"
|
||||
if(medicalActive2 in GLOB.data_core.medical)
|
||||
@@ -460,7 +460,7 @@
|
||||
if(1)
|
||||
. += "<h3>Security Record</h3>"
|
||||
if(securityActive1 in GLOB.data_core.general)
|
||||
. += "Name: <A href='?src=[REF(src)];field=name'>[securityActive1.fields["name"]]</A> ID: <A href='?src=[REF(src)];field=id'>[securityActive1.fields["id"]]</A><BR>\nSex: <A href='?src=[REF(src)];field=sex'>[securityActive1.fields["sex"]]</A><BR>\nAge: <A href='?src=[REF(src)];field=age'>[securityActive1.fields["age"]]</A><BR>\nRank: <A href='?src=[REF(src)];field=rank'>[securityActive1.fields["rank"]]</A><BR>\nFingerprint: <A href='?src=[REF(src)];field=fingerprint'>[securityActive1.fields["fingerprint"]]</A><BR>\nPhysical Status: [securityActive1.fields["p_stat"]]<BR>\nMental Status: [securityActive1.fields["m_stat"]]<BR>"
|
||||
. += "Name: <A href='?src=[REF(src)];field=name'>[securityActive1.fields["name"]]</A> ID: <A href='?src=[REF(src)];field=id'>[securityActive1.fields["id"]]</A><BR>\nGender: <A href='?src=[REF(src)];field=sex'>[securityActive1.fields["gender"]]</A><BR>\nAge: <A href='?src=[REF(src)];field=age'>[securityActive1.fields["age"]]</A><BR>\nRank: <A href='?src=[REF(src)];field=rank'>[securityActive1.fields["rank"]]</A><BR>\nFingerprint: <A href='?src=[REF(src)];field=fingerprint'>[securityActive1.fields["fingerprint"]]</A><BR>\nPhysical Status: [securityActive1.fields["p_stat"]]<BR>\nMental Status: [securityActive1.fields["m_stat"]]<BR>"
|
||||
else
|
||||
. += "<pre>Requested security record not found,</pre><BR>"
|
||||
if(securityActive2 in GLOB.data_core.security)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
for(var/key in alarm_types_clear)
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg)
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>[p_their(TRUE)] outer shell is too tough.</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -207,7 +207,11 @@
|
||||
|
||||
switch(add_to)
|
||||
if("collar")
|
||||
add_collar(usr.get_active_held_item(), usr)
|
||||
var/obj/item/clothing/neck/petcollar/P = usr.get_active_held_item()
|
||||
if(!istype(P))
|
||||
to_chat(usr,"<span class='warning'>That's not a collar.</span>")
|
||||
return
|
||||
add_collar(P, usr)
|
||||
update_corgi_fluff()
|
||||
|
||||
if(BODY_ZONE_HEAD)
|
||||
|
||||
@@ -479,31 +479,33 @@ Difficulty: Very Hard
|
||||
NewTerrainTables = /obj/structure/table/abductor
|
||||
|
||||
/obj/machinery/anomalous_crystal/theme_warp/ActivationReaction(mob/user, method)
|
||||
if(..())
|
||||
var/area/A = get_area(src)
|
||||
if(!A.outdoors && !(A in affected_targets))
|
||||
for(var/atom/Stuff in A)
|
||||
if(isturf(Stuff))
|
||||
var/turf/T = Stuff
|
||||
if((isspaceturf(T) || isfloorturf(T)) && NewTerrainFloors)
|
||||
var/turf/open/O = T.ChangeTurf(NewTerrainFloors, flags = CHANGETURF_INHERIT_AIR)
|
||||
if(prob(florachance) && NewFlora.len && !is_blocked_turf(O, TRUE))
|
||||
var/atom/Picked = pick(NewFlora)
|
||||
new Picked(O)
|
||||
continue
|
||||
if(iswallturf(T) && NewTerrainWalls)
|
||||
T.ChangeTurf(NewTerrainWalls)
|
||||
continue
|
||||
if(istype(Stuff, /obj/structure/chair) && NewTerrainChairs)
|
||||
var/obj/structure/chair/Original = Stuff
|
||||
var/obj/structure/chair/C = new NewTerrainChairs(Original.loc)
|
||||
C.setDir(Original.dir)
|
||||
qdel(Stuff)
|
||||
continue
|
||||
if(istype(Stuff, /obj/structure/table) && NewTerrainTables)
|
||||
new NewTerrainTables(Stuff.loc)
|
||||
continue
|
||||
affected_targets += A
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
for(var/i in get_sub_areas(src))
|
||||
var/area/A = i
|
||||
if(A.outdoors || (A in affected_targets))
|
||||
continue
|
||||
affected_targets += A
|
||||
for(var/stuff in A)
|
||||
var/atom/target = stuff
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
if((isspaceturf(T) || isfloorturf(T)) && NewTerrainFloors)
|
||||
var/turf/open/O = T.ChangeTurf(NewTerrainFloors, flags = CHANGETURF_INHERIT_AIR)
|
||||
if(NewFlora.len && prob(florachance) && !is_blocked_turf(O, TRUE))
|
||||
var/atom/Picked = pick(NewFlora)
|
||||
new Picked(O)
|
||||
else if(iswallturf(T) && NewTerrainWalls)
|
||||
T.ChangeTurf(NewTerrainWalls)
|
||||
else if(NewTerrainChairs && istype(target, /obj/structure/chair))
|
||||
var/obj/structure/chair/Original = target
|
||||
var/obj/structure/chair/C = new NewTerrainChairs(Original.loc)
|
||||
C.setDir(Original.dir)
|
||||
qdel(target)
|
||||
else if(NewTerrainTables && istype(target, /obj/structure/table))
|
||||
new NewTerrainTables(target.loc)
|
||||
qdel(target)
|
||||
|
||||
/obj/machinery/anomalous_crystal/emitter //Generates a projectile when interacted with
|
||||
observer_desc = "This crystal generates a projectile when activated."
|
||||
|
||||
@@ -170,7 +170,7 @@ Difficulty: Medium
|
||||
to_chat(user, "<span class='warning'>The staff is still recharging!</span>")
|
||||
return
|
||||
|
||||
var/area/user_area = get_area(user)
|
||||
var/area/user_area = get_base_area(user)
|
||||
var/turf/user_turf = get_turf(user)
|
||||
if(!user_area || !user_turf || (user_area.type in excluded_areas))
|
||||
to_chat(user, "<span class='warning'>Something is preventing you from using the staff here.</span>")
|
||||
|
||||
@@ -456,8 +456,10 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
return
|
||||
|
||||
/mob/proc/transfer_ckey(mob/new_mob, send_signal = TRUE)
|
||||
if(!ckey || !new_mob)
|
||||
CRASH("transfer_ckey() called [ckey ? "" : "on a ckey-less mob[new_mob ? "" : " and "]"][new_mob ? "" : "without a valid mob target"]!")
|
||||
if(!new_mob || (!ckey && new_mob.ckey))
|
||||
CRASH("transfer_ckey() called [new_mob ? "on ckey-less mob with a player mob as target" : "without a valid mob target"]!")
|
||||
if(!ckey)
|
||||
return
|
||||
SEND_SIGNAL(new_mob, COMSIG_MOB_PRE_PLAYER_CHANGE, new_mob, src)
|
||||
if (client && client.prefs && client.prefs.auto_ooc)
|
||||
if (client.prefs.chat_toggles & CHAT_OOC && isliving(new_mob))
|
||||
@@ -569,29 +571,23 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
M.show_inv(user)
|
||||
|
||||
/mob/proc/is_muzzled()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/Stat()
|
||||
..()
|
||||
|
||||
if(statpanel("Status"))
|
||||
if (client)
|
||||
stat(null, "Ping: [round(client.lastping, 1)]ms (Average: [round(client.avgping, 1)]ms)")
|
||||
stat(null, "Map: [SSmapping.config?.map_name || "Loading..."]")
|
||||
var/datum/map_config/cached = SSmapping.next_map_config
|
||||
if(cached)
|
||||
stat(null, "Next Map: [cached.map_name]")
|
||||
stat(null, "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]")
|
||||
stat(null, "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]")
|
||||
stat(null, "Round Time: [WORLDTIME2TEXT("hh:mm:ss")]")
|
||||
stat(null, "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]")
|
||||
stat(null, "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)")
|
||||
if(SSshuttle.emergency)
|
||||
var/ETA = SSshuttle.emergency.getModeStr()
|
||||
if(ETA)
|
||||
stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]")
|
||||
//This is only called from client/Stat(), let's assume client exists.
|
||||
|
||||
if(client && client.holder)
|
||||
if(statpanel("Status"))
|
||||
var/list/L = list()
|
||||
L += "Ping: [round(client.lastping,1)]ms (Avg: [round(client.avgping,1)]ms)"
|
||||
L += SSmapping.stat_map_name
|
||||
L += "Round ID: [GLOB.round_id || "NULL"]"
|
||||
L += SStime_track.stat_time_text
|
||||
L += SSshuttle.emergency_shuttle_stat_text
|
||||
stat(null, "[L.Join("\n\n")]")
|
||||
|
||||
if(client.holder)
|
||||
if(statpanel("MC"))
|
||||
var/turf/T = get_turf(client.eye)
|
||||
stat("Location:", COORD(T))
|
||||
@@ -641,8 +637,6 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
if(A.IsObscured())
|
||||
continue
|
||||
statpanel(listed_turf.name, null, A)
|
||||
|
||||
|
||||
if(mind)
|
||||
add_spells_to_statpanel(mind.spell_list)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
@@ -964,4 +958,4 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
|
||||
/mob/setMovetype(newval)
|
||||
. = ..()
|
||||
update_movespeed(FALSE)
|
||||
update_movespeed(FALSE)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
var/computer_id = null
|
||||
var/list/logging = list()
|
||||
var/obj/machinery/machine = null
|
||||
var/atom/machine = null
|
||||
|
||||
var/next_move = null
|
||||
var/create_area_cooldown
|
||||
|
||||
@@ -9,37 +9,36 @@
|
||||
mob.dropItemToGround(mob.get_active_held_item())
|
||||
return
|
||||
|
||||
/client/proc/Move_object(direct)
|
||||
/client/proc/Move_object(direction)
|
||||
if(mob && mob.control_object)
|
||||
if(mob.control_object.density)
|
||||
step(mob.control_object,direct)
|
||||
step(mob.control_object,direction)
|
||||
if(!mob.control_object)
|
||||
return
|
||||
mob.control_object.setDir(direct)
|
||||
mob.control_object.setDir(direction)
|
||||
else
|
||||
mob.control_object.forceMove(get_step(mob.control_object,direct))
|
||||
mob.control_object.forceMove(get_step(mob.control_object,direction))
|
||||
|
||||
#define MOVEMENT_DELAY_BUFFER 0.75
|
||||
#define MOVEMENT_DELAY_BUFFER_DELTA 1.25
|
||||
|
||||
/client/Move(n, direct)
|
||||
/client/Move(n, direction)
|
||||
if(world.time < move_delay) //do not move anything ahead of this check please
|
||||
return FALSE
|
||||
else
|
||||
next_move_dir_add = 0
|
||||
next_move_dir_sub = 0
|
||||
next_move_dir_add = next_move_dir_sub = NONE
|
||||
var/old_move_delay = move_delay
|
||||
move_delay = world.time + world.tick_lag //this is here because Move() can now be called mutiple times per tick
|
||||
if(!mob || !mob.loc)
|
||||
return FALSE
|
||||
if(!n || !direct)
|
||||
if(!n || !direction || !mob?.loc)
|
||||
return FALSE
|
||||
//GET RID OF THIS SOON AS MOBILITY FLAGS IS DONE
|
||||
if(mob.notransform)
|
||||
return FALSE //This is sota the goto stop mobs from moving var
|
||||
return FALSE
|
||||
|
||||
if(mob.control_object)
|
||||
return Move_object(direct)
|
||||
return Move_object(direction)
|
||||
if(!isliving(mob))
|
||||
return mob.Move(n, direct)
|
||||
return mob.Move(n, direction)
|
||||
if(mob.stat == DEAD)
|
||||
mob.ghostize()
|
||||
return FALSE
|
||||
@@ -48,29 +47,29 @@
|
||||
|
||||
var/mob/living/L = mob //Already checked for isliving earlier
|
||||
if(L.incorporeal_move) //Move though walls
|
||||
Process_Incorpmove(direct)
|
||||
Process_Incorpmove(direction)
|
||||
return FALSE
|
||||
|
||||
if(mob.remote_control) //we're controlling something, our movement is relayed to it
|
||||
return mob.remote_control.relaymove(mob, direct)
|
||||
return mob.remote_control.relaymove(mob, direction)
|
||||
|
||||
if(isAI(mob))
|
||||
return AIMove(n,direct,mob)
|
||||
return AIMove(n,direction,mob)
|
||||
|
||||
if(Process_Grab()) //are we restrained by someone's grip?
|
||||
return
|
||||
|
||||
if(mob.buckled) //if we're buckled to something, tell it we moved.
|
||||
return mob.buckled.relaymove(mob, direct)
|
||||
return mob.buckled.relaymove(mob, direction)
|
||||
|
||||
if(!mob.canmove)
|
||||
return FALSE
|
||||
|
||||
if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
return O.relaymove(mob, direction)
|
||||
|
||||
if(!mob.Process_Spacemove(direct))
|
||||
if(!mob.Process_Spacemove(direction))
|
||||
return FALSE
|
||||
//We are now going to move
|
||||
var/add_delay = mob.movement_delay()
|
||||
@@ -85,16 +84,16 @@
|
||||
if(L.confused > 40)
|
||||
newdir = pick(GLOB.alldirs)
|
||||
else if(prob(L.confused * 1.5))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(90, -90))
|
||||
newdir = angle2dir(dir2angle(direction) + pick(90, -90))
|
||||
else if(prob(L.confused * 3))
|
||||
newdir = angle2dir(dir2angle(direct) + pick(45, -45))
|
||||
newdir = angle2dir(dir2angle(direction) + pick(45, -45))
|
||||
if(newdir)
|
||||
direct = newdir
|
||||
n = get_step(L, direct)
|
||||
direction = newdir
|
||||
n = get_step(L, direction)
|
||||
|
||||
. = ..()
|
||||
|
||||
if((direct & (direct - 1)) && mob.loc == n) //moved diagonally successfully
|
||||
if((direction & (direction - 1)) && mob.loc == n) //moved diagonally successfully
|
||||
add_delay *= 2
|
||||
move_delay += add_delay
|
||||
if(.) // If mob is null here, we deserve the runtime
|
||||
@@ -102,7 +101,7 @@
|
||||
mob.throwing.finalize(FALSE)
|
||||
|
||||
for(var/obj/O in mob.user_movement_hooks)
|
||||
O.intercept_user_move(direct, mob, n, oldloc)
|
||||
O.intercept_user_move(direction, mob, n, oldloc)
|
||||
|
||||
var/atom/movable/P = mob.pulling
|
||||
if(P && !ismob(P) && P.density)
|
||||
@@ -126,22 +125,22 @@
|
||||
///Process_Incorpmove
|
||||
///Called by client/Move()
|
||||
///Allows mobs to run though walls
|
||||
/client/proc/Process_Incorpmove(direct)
|
||||
/client/proc/Process_Incorpmove(direction)
|
||||
var/turf/mobloc = get_turf(mob)
|
||||
if(!isliving(mob))
|
||||
return
|
||||
var/mob/living/L = mob
|
||||
switch(L.incorporeal_move)
|
||||
if(INCORPOREAL_MOVE_BASIC)
|
||||
var/T = get_step(L,direct)
|
||||
var/T = get_step(L,direction)
|
||||
if(T)
|
||||
L.forceMove(T)
|
||||
L.setDir(direct)
|
||||
L.setDir(direction)
|
||||
if(INCORPOREAL_MOVE_SHADOW)
|
||||
if(prob(50))
|
||||
var/locx
|
||||
var/locy
|
||||
switch(direct)
|
||||
switch(direction)
|
||||
if(NORTH)
|
||||
locx = mobloc.x
|
||||
locy = (mobloc.y+2)
|
||||
@@ -175,12 +174,12 @@
|
||||
break
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/ninja/shadow(mobloc, L.dir)
|
||||
var/T = get_step(L,direct)
|
||||
var/T = get_step(L,direction)
|
||||
if(T)
|
||||
L.forceMove(T)
|
||||
L.setDir(direct)
|
||||
L.setDir(direction)
|
||||
if(INCORPOREAL_MOVE_JAUNT) //Incorporeal move, but blocked by holy-watered tiles and salt piles.
|
||||
var/turf/open/floor/stepTurf = get_step(L, direct)
|
||||
var/turf/open/floor/stepTurf = get_step(L, direction)
|
||||
if(stepTurf)
|
||||
for(var/obj/effect/decal/cleanable/salt/S in stepTurf)
|
||||
to_chat(L, "<span class='warning'>[S] bars your passage!</span>")
|
||||
@@ -197,7 +196,7 @@
|
||||
return
|
||||
|
||||
L.forceMove(stepTurf)
|
||||
L.setDir(direct)
|
||||
L.setDir(direction)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user