things with stuff (#6233)
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
This commit is contained in:
@@ -168,9 +168,14 @@
|
||||
|
||||
/* AI Turrets */
|
||||
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
|
||||
if(ailock)
|
||||
return
|
||||
toggle_lethal()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
|
||||
if(ailock)
|
||||
return
|
||||
toggle_on()
|
||||
add_fingerprint(usr)
|
||||
|
||||
|
||||
+12
-14
@@ -20,6 +20,14 @@
|
||||
/mob/proc/changeNext_move(num)
|
||||
next_move = world.time + ((num+next_move_adjust)*next_move_modifier)
|
||||
|
||||
/mob/living/changeNext_move(num)
|
||||
var/mod = next_move_modifier
|
||||
var/adj = next_move_adjust
|
||||
for(var/i in status_effects)
|
||||
var/datum/status_effect/S = i
|
||||
mod *= S.nextmove_modifier()
|
||||
adj += S.nextmove_adjust()
|
||||
next_move = world.time + ((num + adj)*mod)
|
||||
|
||||
/*
|
||||
Before anything else, defer these calls to a per-mobtype handler. This allows us to
|
||||
@@ -193,23 +201,13 @@
|
||||
return FALSE
|
||||
|
||||
/atom/movable/proc/DirectAccess(atom/target)
|
||||
if(target == src)
|
||||
return TRUE
|
||||
if(target == loc)
|
||||
return TRUE
|
||||
return (target == src || target == loc)
|
||||
|
||||
/mob/DirectAccess(atom/target)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(target in contents) //This could probably use moving down and restricting to inventory only
|
||||
return TRUE
|
||||
return FALSE
|
||||
return (..() || (target in contents))
|
||||
|
||||
/mob/living/DirectAccess(atom/target)
|
||||
if(..()) //Lightweight checks first
|
||||
return TRUE
|
||||
if(target in GetAllContents())
|
||||
return TRUE
|
||||
return (..() || (target in GetAllContents()))
|
||||
|
||||
/atom/proc/AllowClick()
|
||||
return FALSE
|
||||
@@ -501,7 +499,7 @@
|
||||
if(client && client.click_intercept)
|
||||
if(call(client.click_intercept, "InterceptClickOn")(src, params, A))
|
||||
return TRUE
|
||||
|
||||
|
||||
//Mob level intercept
|
||||
if(click_intercept)
|
||||
if(call(click_intercept, "InterceptClickOn")(src, params, A))
|
||||
|
||||
+28
-28
@@ -55,35 +55,35 @@
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
if(!W && get_dist(src,A) <= remote_range)
|
||||
if(!W && get_dist(src,A) <= interaction_range)
|
||||
A.attack_robot(src)
|
||||
return
|
||||
|
||||
// buckled cannot prevent machine interlinking but stops arm movement
|
||||
if( buckled || incapacitated())
|
||||
return
|
||||
if(W)
|
||||
// buckled cannot prevent machine interlinking but stops arm movement
|
||||
if( buckled || incapacitated())
|
||||
return
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
return
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
return
|
||||
|
||||
//Middle click cycles through selected modules.
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
@@ -105,7 +105,7 @@
|
||||
CtrlShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlShiftClick()
|
||||
else
|
||||
..()
|
||||
@@ -115,7 +115,7 @@
|
||||
ShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick(mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AIShiftClick()
|
||||
else
|
||||
..()
|
||||
@@ -125,19 +125,19 @@
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/BorgCtrlClick(mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/turretid/BorgCtrlClick(mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
@@ -147,13 +147,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/BorgAltClick(mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AIAltClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/turretid/BorgAltClick(mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.remote_range)
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AIAltClick()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
if(!usr || !over)
|
||||
return
|
||||
if(SendSignal(COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is recieving will verify themselves for adjacency.
|
||||
return
|
||||
if(over == src)
|
||||
return usr.client.Click(src, src_location, src_control, params)
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
@@ -18,6 +20,7 @@
|
||||
|
||||
// recieve a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
||||
SendSignal(COMSIG_MOUSEDROPPED_ONTO, dropping, user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
|
||||
if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
|
||||
widescreenlayout = TRUE // CIT CHANGE - ditto
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
@@ -321,7 +320,7 @@
|
||||
staminabuffer = new /obj/screen/staminabuffer()
|
||||
infodisplay += staminabuffer
|
||||
//END OF CIT CHANGES
|
||||
|
||||
|
||||
healthdoll = new /obj/screen/healthdoll()
|
||||
infodisplay += healthdoll
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!tool_attack_chain(user, target) && pre_attackby(target, user, params))
|
||||
if(!tool_attack_chain(user, target) && pre_attack(target, user, params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = target.attackby(src, user, params)
|
||||
if(!resolved && target && !QDELETED(src))
|
||||
@@ -20,7 +20,9 @@
|
||||
SendSignal(COMSIG_ITEM_ATTACK_SELF, user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
if(SendSignal(COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
|
||||
return FALSE
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
@@ -80,7 +82,8 @@
|
||||
|
||||
//the equivalent of the standard version of attack() but for object targets.
|
||||
/obj/item/proc/attack_obj(obj/O, mob/living/user)
|
||||
SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user)
|
||||
if(SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
|
||||
return
|
||||
if(flags_1 & NOBLUDGEON_1)
|
||||
return
|
||||
if(user.staminaloss >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
|
||||
@@ -48,17 +48,19 @@
|
||||
|
||||
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user)
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
if(user.client)
|
||||
if(IsAdminGhost(user))
|
||||
attack_ai(user)
|
||||
else if(user.client.prefs.inquisitive_ghost)
|
||||
user.examinate(src)
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_ghost(mob/dead/observer/user)
|
||||
if(user.client && user.health_scan)
|
||||
healthscan(user, src, 1, TRUE)
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// ---------------------------------------
|
||||
// And here are some good things for free:
|
||||
@@ -69,17 +71,16 @@
|
||||
user.forceMove(awaygate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
|
||||
if(stationgate)
|
||||
user.forceMove(stationgate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
|
||||
/obj/item/storage/attack_ghost(mob/user)
|
||||
orient2hud(user)
|
||||
show_to(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user)
|
||||
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
|
||||
user.forceMove(get_turf(power_station.teleporter_console.target))
|
||||
return ..()
|
||||
|
||||
@@ -27,13 +27,50 @@
|
||||
|
||||
SendSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
A.attack_hand(src)
|
||||
SendSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY, src)
|
||||
|
||||
//Return TRUE to cancel other attack hand effects that respect it.
|
||||
/atom/proc/attack_hand(mob/user)
|
||||
return
|
||||
. = FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
||||
add_fingerprint(user)
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
. = TRUE
|
||||
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
||||
. = _try_interact(user)
|
||||
|
||||
//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
|
||||
/atom/proc/_try_interact(mob/user)
|
||||
if(IsAdminGhost(user)) //admin abuse
|
||||
return interact(user)
|
||||
if(can_interact(user))
|
||||
return interact(user)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/can_interact(mob/user)
|
||||
if(!user.can_interact_with(src))
|
||||
return FALSE
|
||||
if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/atom/movable/can_interact(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!anchored && (interaction_flags_atom & INTERACT_ATOM_REQUIRES_ANCHORED))
|
||||
return FALSE
|
||||
|
||||
/atom/proc/interact(mob/user)
|
||||
return
|
||||
if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT)
|
||||
add_hiddenprint(user)
|
||||
else
|
||||
add_fingerprint(user)
|
||||
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
|
||||
return ui_interact(user)
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this
|
||||
@@ -72,8 +109,11 @@
|
||||
*/
|
||||
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
|
||||
A.attack_paw(src)
|
||||
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
return
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Monkey RestrainedClickOn() was apparently the
|
||||
@@ -115,9 +155,11 @@
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
|
||||
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
@@ -194,7 +236,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
if(dextrous && !is_type_in_typecache(A, environment_target_typecache) && !ismob(A))
|
||||
if(dextrous && !ismob(A))
|
||||
..()
|
||||
else
|
||||
AttackingTarget()
|
||||
|
||||
@@ -104,9 +104,6 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/attack_hand(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/attack_self(mob/user)
|
||||
if(!focus)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user