mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 07:48:55 +00:00
9
code/__HELPERS/admin.dm
Normal file
9
code/__HELPERS/admin.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
/// Returns if the given client is an admin, REGARDLESS of if they're deadminned or not.
|
||||
/proc/is_admin(client/client)
|
||||
return !isnull(GLOB.admin_datums[client.ckey]) || !isnull(GLOB.deadmins[client.ckey])
|
||||
|
||||
/// Sends a message in the event that someone attempts to elevate their permissions through invoking a certain proc.
|
||||
/proc/alert_to_permissions_elevation_attempt(mob/user)
|
||||
var/message = " has tried to elevate permissions!"
|
||||
message_admins(key_name_admin(user) + message)
|
||||
log_admin(key_name(user) + message)
|
||||
@@ -93,7 +93,7 @@
|
||||
if(!hud.mymob)
|
||||
continue
|
||||
HideFrom(hud.mymob)
|
||||
LAZYREMOVE(remove_from.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
|
||||
LAZYREMOVE(remove_from?.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
|
||||
viewers = list()
|
||||
|
||||
if(isnull(owner))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/rotation_flags = NONE
|
||||
var/default_rotation_direction = ROTATION_CLOCKWISE
|
||||
|
||||
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
|
||||
/datum/component/simple_rotation/Initialize(rotation_flags = NONE, can_user_rotate, can_be_rotated, after_rotation)
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
|
||||
@@ -702,7 +702,8 @@
|
||||
/atom/proc/hitby(atom/movable/hitting_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_HITBY, hitting_atom, skipcatch, hitpush, blocked, throwingdatum)
|
||||
if(density && !has_gravity(hitting_atom)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...).
|
||||
addtimer(CALLBACK(src, PROC_REF(hitby_react), hitting_atom), 2)
|
||||
addtimer(CALLBACK(src, PROC_REF(hitby_react), hitting_atom), 0.2 SECONDS)
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* We have have actually hit the passed in atom
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
/atom/movable/hitby(atom/movable/hitting_atom, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
|
||||
if(!anchored && hitpush && (!throwingdatum || (throwingdatum.force >= (move_resist * MOVE_FORCE_PUSH_RATIO))))
|
||||
step(src, hitting_atom.dir)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE)
|
||||
if((force < (move_resist * MOVE_FORCE_THROW_RATIO)) || (move_resist == INFINITY))
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
/obj/hitby(atom/movable/hit_by, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
var/throwdamage = AM.throwforce
|
||||
if(isobj(AM))
|
||||
var/obj/O = AM
|
||||
if(O.damtype == STAMINA)
|
||||
var/throwdamage = hit_by.throwforce
|
||||
if(isobj(hit_by))
|
||||
var/obj/as_obj = hit_by
|
||||
if(as_obj.damtype == STAMINA)
|
||||
throwdamage = 0
|
||||
take_damage(throwdamage, BRUTE, MELEE, 1, get_dir(src, AM))
|
||||
take_damage(throwdamage, BRUTE, MELEE, 1, get_dir(src, hit_by))
|
||||
|
||||
/obj/ex_act(severity, target, origin)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
/obj/structure/chair/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
|
||||
. += span_notice("It's held together by a couple of <b>bolts</b>.")
|
||||
if(!has_buckled_mobs())
|
||||
. += "<span class='notice'>Drag your sprite to sit in it.</span>"
|
||||
. += span_notice("Drag your sprite to sit in it.")
|
||||
|
||||
/obj/structure/chair/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/structure/chair/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, PROC_REF(can_user_rotate),CALLBACK(src), PROC_REF(can_be_rotated)),null)
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, PROC_REF(can_user_rotate)), CALLBACK(src, PROC_REF(can_be_rotated)), null)
|
||||
|
||||
/obj/structure/chair/proc/can_be_rotated(mob/user)
|
||||
return TRUE
|
||||
|
||||
@@ -13,9 +13,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
|
||||
/datum/admin_rank/New(init_name, init_rights, init_exclude_rights, init_edit_rights)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
if (name == "NoRank") //only del if this is a true creation (and not just a New() proc call), other wise trialmins/coders could abuse this to deadmin other admins
|
||||
QDEL_IN(src, 0)
|
||||
CRASH("Admin proc call creation of admin datum")
|
||||
@@ -35,9 +33,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
|
||||
/datum/admin_rank/Destroy()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
. = ..()
|
||||
|
||||
@@ -93,9 +89,7 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
// Adds/removes rights to this admin_rank
|
||||
/datum/admin_rank/proc/process_keyword(word, previous_rights=0)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return
|
||||
var/flag = admin_keyword_to_flag(word, previous_rights)
|
||||
if(flag)
|
||||
|
||||
@@ -40,9 +40,7 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/New(datum/admin_rank/R, ckey, force_active = FALSE, protected)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
if (!target) //only del if this is a true creation (and not just a New() proc call), other wise trialmins/coders could abuse this to deadmin other admins
|
||||
QDEL_IN(src, 0)
|
||||
CRASH("Admin proc call creation of admin datum")
|
||||
@@ -70,17 +68,13 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/Destroy()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
. = ..()
|
||||
|
||||
/datum/admins/proc/activate()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return
|
||||
GLOB.deadmins -= target
|
||||
GLOB.admin_datums[target] = src
|
||||
@@ -91,9 +85,7 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/proc/deactivate()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return
|
||||
GLOB.deadmins[target] = src
|
||||
GLOB.admin_datums -= target
|
||||
@@ -105,9 +97,7 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/proc/associate(client/C)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return
|
||||
|
||||
if(istype(C))
|
||||
@@ -127,9 +117,7 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/proc/disassociate()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
var/msg = " has tried to elevate permissions!"
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin("[key_name(usr)][msg]")
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return
|
||||
if(owner)
|
||||
GLOB.admins -= owner
|
||||
|
||||
@@ -130,10 +130,10 @@
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/assembly/mousetrap/hitby(atom/hit_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
/obj/item/assembly/mousetrap/hitby(atom/movable/hit_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [hit_atom].</span>")
|
||||
visible_message(span_warning("[src] is triggered by [hit_atom]."))
|
||||
triggered(null)
|
||||
|
||||
|
||||
|
||||
@@ -1139,11 +1139,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(user.client)
|
||||
if(unlock_content)
|
||||
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</a><br>"
|
||||
if(unlock_content || check_rights_for(user.client, R_ADMIN))
|
||||
if(unlock_content || is_admin(user.client))
|
||||
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'><font color='[color_hex2num(ooccolor ? ooccolor : GLOB.normal_ooc_colour) < 200 ? "FFFFFF" : "000000"]'>[ooccolor ? ooccolor : GLOB.normal_ooc_colour]</font></span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
dat += "<b>Antag OOC Color:</b> <span style='border: 1px solid #161616; background-color: [aooccolor ? aooccolor : GLOB.normal_aooc_colour];'><font color='[color_hex2num(aooccolor ? aooccolor : GLOB.normal_aooc_colour) < 200 ? "FFFFFF" : "000000"]'>[aooccolor ? aooccolor : GLOB.normal_aooc_colour]</font></span> <a href='?_src_=prefs;preference=aooccolor;task=input'>Change</a><br>"
|
||||
|
||||
if(user.client.holder)
|
||||
if(is_admin(user.client))
|
||||
dat += "<h2>Admin Settings</h2>"
|
||||
dat += "<b>Adminhelp Sounds:</b> <a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Announce Login:</b> <a href='?_src_=prefs;preference=announce_login'>[(toggles & ANNOUNCE_LOGIN)?"Enabled":"Disabled"]</a><br>"
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
if (isitem(AM) && !istype(AM,/obj/item/projectile))
|
||||
if(prob(50))
|
||||
AM.forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'>Swish! [AM] lands in [src].</span>")
|
||||
visible_message(span_warning("Swish! [AM] lands in [src]."))
|
||||
return
|
||||
else
|
||||
visible_message("<span class='danger'>[AM] bounces off of [src]'s rim!</span>")
|
||||
visible_message(span_danger("[AM] bounces off of [src]'s rim!"))
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/monkey/hitby(atom/movable/hitting_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
if(istype(hitting_atom, /obj/item))
|
||||
if(isitem(hitting_atom))
|
||||
var/obj/item/item_hitby = hitting_atom
|
||||
var/mob/thrown_by = item_hitby.thrownby?.resolve()
|
||||
if(item_hitby.throwforce < src.health && thrown_by && ishuman(thrown_by))
|
||||
|
||||
@@ -107,37 +107,42 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest
|
||||
if(!isitem(AM))
|
||||
// Filled with made up numbers for non-items.
|
||||
if(mob_run_block(AM, 30, "\the [AM.name]", ATTACK_TYPE_THROWN, 0, throwingdatum.thrower, throwingdatum.thrower.zone_selected, list()))
|
||||
if(mob_run_block(AM, 30, "\the [AM.name]", ATTACK_TYPE_THROWN, 0, throwingdatum.thrower, zone, list()) & BLOCK_SUCCESS)
|
||||
hitpush = FALSE
|
||||
skipcatch = TRUE
|
||||
blocked = TRUE
|
||||
return TRUE
|
||||
else
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) //Item sounds are handled in the item itself
|
||||
log_combat(AM, src, "hit ")
|
||||
return ..()
|
||||
|
||||
var/obj/item/thrown_item = AM
|
||||
if(thrown_item.thrownby == WEAKREF(src)) //No throwing stuff at yourself to trigger hit reactions
|
||||
return ..()
|
||||
|
||||
if(mob_run_block(AM, thrown_item.throwforce, "\the [thrown_item.name]", ATTACK_TYPE_THROWN, 0, throwingdatum.thrower, throwingdatum.thrower.zone_selected, list()))
|
||||
if(mob_run_block(AM, thrown_item.throwforce, "\the [thrown_item.name]", ATTACK_TYPE_THROWN, 0, throwingdatum.thrower, zone, list()))
|
||||
hitpush = FALSE
|
||||
skipcatch = TRUE
|
||||
blocked = TRUE
|
||||
|
||||
var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest
|
||||
// zone moved up because things need it early while checking it from the thrower is unnecessary
|
||||
var/nosell_hit = SEND_SIGNAL(thrown_item, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, throwingdatum, blocked, FALSE)
|
||||
if(nosell_hit)
|
||||
skipcatch = TRUE
|
||||
hitpush = FALSE
|
||||
|
||||
if(blocked)
|
||||
return TRUE
|
||||
return BLOCK_SUCCESS
|
||||
|
||||
var/mob/thrown_by = thrown_item.thrownby?.resolve()
|
||||
if(thrown_by)
|
||||
log_combat(thrown_by, src, "threw and hit", thrown_item)
|
||||
else
|
||||
log_combat(thrown_item, src, "hit ")
|
||||
if(nosell_hit)
|
||||
return ..()
|
||||
visible_message(span_danger("[src] is hit by [thrown_item]!"), \
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/hitby(atom/movable/hitting_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
if(istype(hitting_atom, /obj/item))
|
||||
if(isitem(hitting_atom))
|
||||
playsound(src, honksound, 50, TRUE, -1)
|
||||
var/obj/item/item_hitby = hitting_atom
|
||||
var/mob/thrown_by = item_hitby.thrownby?.resolve()
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/hitting_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
if(istype(hitting_atom, /obj/item))
|
||||
if(isitem(hitting_atom))
|
||||
var/obj/item/item_hitby = hitting_atom
|
||||
var/mob/thrown_by = item_hitby.thrownby?.resolve()
|
||||
if(item_hitby.throwforce < src.health && thrown_by && ishuman(thrown_by))
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
visible_message("<span class='danger'>[P] has a reduced effect on [src]!</span>")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)//No floor tiling them to death, wiseguy
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/T = AM
|
||||
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/hitting_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)//No floor tiling them to death, wiseguy
|
||||
if(isitem(hitting_atom))
|
||||
var/obj/item/item_hitby = hitting_atom
|
||||
if(!stat)
|
||||
Aggro()
|
||||
if(T.throwforce <= 20)
|
||||
visible_message(span_notice("The [T.name] [throw_message] [src.name]!"))
|
||||
if(item_hitby.throwforce <= 20)
|
||||
visible_message(span_notice("\The [item_hitby] [throw_message] [src]!"))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -180,11 +180,11 @@
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
Bruise()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/hitting_atom, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/T = AM
|
||||
if(T.throwforce)
|
||||
if(isitem(hitting_atom))
|
||||
var/obj/item/item_hitby = hitting_atom
|
||||
if(item_hitby.throwforce)
|
||||
Bruise()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/bullet_act(obj/item/projectile/P)
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
if(S.amount < S.max_amount)
|
||||
sheets += S
|
||||
|
||||
if(sheets.len > 0)
|
||||
if(length(sheets))
|
||||
var/obj/item/stack/sheet/S = pick(sheets)
|
||||
S.add(1) // Dare var edit directly again and i'll strangle you.
|
||||
to_chat(owner, "<span class='notice'>[linked_extract] adds a layer of slime to [S], which metamorphosizes into another sheet of material!</span>")
|
||||
@@ -587,6 +587,7 @@
|
||||
/obj/item/hothands
|
||||
name = "burning fingertips"
|
||||
desc = "You shouldn't see this."
|
||||
item_flags = ABSTRACT
|
||||
|
||||
/obj/item/hothands/get_temperature()
|
||||
return 290 //Below what's required to ignite plasma.
|
||||
@@ -595,11 +596,11 @@
|
||||
id = "stabilizeddarkpurple"
|
||||
colour = "dark purple"
|
||||
var/obj/item/hothands/fire
|
||||
examine_text = "<span class='notice'>Their fingertips burn brightly!</span>"
|
||||
examine_text = span_notice("Their fingertips burn brightly!")
|
||||
|
||||
/datum/status_effect/stabilized/darkpurple/on_apply()
|
||||
ADD_TRAIT(owner, TRAIT_RESISTHEATHANDS, "slimestatus")
|
||||
fire = new(owner)
|
||||
fire = new()
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/stabilized/darkpurple/tick()
|
||||
@@ -607,7 +608,7 @@
|
||||
if(item)
|
||||
var/obj/item/reagent_containers/food/snacks/F = item
|
||||
if(istype(F) && F.cooked_type)
|
||||
to_chat(owner, "<span class='warning'>[linked_extract] flares up brightly, and your hands alone are enough cook [F]!</span>")
|
||||
to_chat(owner, span_warning("[linked_extract] flares up brightly, and your hands alone are enough cook [F]!"))
|
||||
F.microwave_act()
|
||||
else
|
||||
item.attackby(fire, owner)
|
||||
|
||||
@@ -1027,13 +1027,13 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
/obj/machinery/vending/proc/canLoadItem(obj/item/I, mob/user)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/vending/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
/obj/machinery/vending/hitby(atom/movable/hitting_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
var/mob/living/L = AM
|
||||
if(tilted || !istype(L) || !prob(20 * (throwingdatum.speed - L.throw_speed))) // hulk throw = +20%, neckgrab throw = +20%
|
||||
var/mob/living/living_mob = hitting_atom
|
||||
if(tilted || !istype(living_mob) || !prob(20 * (throwingdatum.speed - living_mob.throw_speed))) // hulk throw = +20%, neckgrab throw = +20%
|
||||
return
|
||||
|
||||
tilt(L)
|
||||
tilt(living_mob)
|
||||
|
||||
/obj/machinery/vending/attack_tk_grab(mob/user)
|
||||
to_chat(user, span_warning("[src] seems to resist your mental grasp!"))
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
#include "code\__HELPERS\_lists.dm"
|
||||
#include "code\__HELPERS\_logging.dm"
|
||||
#include "code\__HELPERS\_string_lists.dm"
|
||||
#include "code\__HELPERS\admin.dm"
|
||||
#include "code\__HELPERS\angles.dm"
|
||||
#include "code\__HELPERS\areas.dm"
|
||||
#include "code\__HELPERS\chat.dm"
|
||||
|
||||
Reference in New Issue
Block a user