mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 21:27:01 +01:00
[MIRROR] Various QoL (#12720)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
72d0a4f8ff
commit
e763f2dff1
@@ -1253,15 +1253,17 @@ GLOBAL_LIST_INIT(area_or_turf_fail_types, typecacheof(list(
|
||||
/obj/item/book, \
|
||||
/obj/item/newspaper
|
||||
|
||||
//Food reagent containers due to having to grind food.
|
||||
#define MEDICAL_GRIPPER \
|
||||
/obj/item/reagent_containers/glass, \
|
||||
/obj/item/reagent_containers/food, \
|
||||
/obj/item/storage/pill_bottle, \
|
||||
/obj/item/reagent_containers/pill, \
|
||||
/obj/item/reagent_containers/blood, \
|
||||
/obj/item/nif, \
|
||||
/obj/item/stack/material/phoron, \
|
||||
/obj/item/tank/anesthetic, \
|
||||
/obj/item/disk/body_record
|
||||
/obj/item/disk/body_record, \
|
||||
|
||||
#define RESEARCH_GRIPPER \
|
||||
/obj/item/cell, \
|
||||
@@ -1331,7 +1333,9 @@ GLOBAL_LIST_INIT(area_or_turf_fail_types, typecacheof(list(
|
||||
/obj/item/pen, \
|
||||
/obj/item/leash, \
|
||||
/obj/item/paper, \
|
||||
/obj/item/a_gift
|
||||
/obj/item/a_gift, \
|
||||
/obj/item/remote_scene_tool, \
|
||||
|
||||
|
||||
#define ORGAN_GRIPPER \
|
||||
/obj/item/organ, \
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/perfect_tele/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
|
||||
afterattack(M, user)
|
||||
|
||||
/obj/item/perfect_tele/proc/unload_ammo(mob/user, var/ignore_inactive_hand_check = 0)
|
||||
if(battery_lock)
|
||||
to_chat(user,span_notice("[src] does not have a battery port."))
|
||||
@@ -254,9 +257,11 @@ This device records all warnings given and teleport events for admin review in c
|
||||
//Seems okay to me!
|
||||
return TRUE
|
||||
|
||||
/obj/item/perfect_tele/afterattack(mob/living/target, mob/living/user, proximity, var/ignore_fail_chance = 0)
|
||||
/obj/item/perfect_tele/afterattack(mob/living/target, mob/user, proximity_flag, click_parameters, ignore_fail_chance = 0)
|
||||
//No, you can't teleport people from over there.
|
||||
if(!proximity)
|
||||
if(!user.Adjacent(target) && !proximity_flag)
|
||||
return
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
if(!teleport_checks(target,user))
|
||||
@@ -310,14 +315,13 @@ This device records all warnings given and teleport events for admin review in c
|
||||
var/televored = FALSE
|
||||
if(isbelly(real_dest))
|
||||
var/obj/belly/B = real_dest
|
||||
// CHOMPEdit Start - Making pref checks work properly
|
||||
if(target.devourable && target.can_be_drop_prey && B.owner != target)
|
||||
televored = TRUE
|
||||
to_chat(target,span_vwarning("\The [src] teleports you right into \a [lowertext(real_dest.name)]!"))
|
||||
to_chat(target, span_vwarning("\The [src] teleports you right into \a [lowertext(real_dest.name)]!"))
|
||||
else
|
||||
to_chat(target,span_vwarning("\The [src] narrowly avoids teleporting you right into \a [lowertext(real_dest.name)]!"))
|
||||
to_chat(target, span_vwarning("\The [src] narrowly avoids teleporting you right into \a [lowertext(real_dest.name)]!"))
|
||||
real_dest = dT //Nevermind!
|
||||
// CHOMPEdit End
|
||||
|
||||
//Phase-out effect
|
||||
phase_out(target,get_turf(target))
|
||||
|
||||
|
||||
@@ -189,6 +189,10 @@
|
||||
S.gather_all(src, user)
|
||||
return ..()
|
||||
|
||||
/turf/attack_robot(mob/user)
|
||||
if(!isAI(user))
|
||||
attack_hand(user)
|
||||
|
||||
// Hits a mob on the tile.
|
||||
/turf/proc/attack_tile(obj/item/W, mob/living/user)
|
||||
if(!istype(W))
|
||||
|
||||
@@ -66,7 +66,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(jumptomob, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to M
|
||||
else
|
||||
to_chat(A, span_filter_adminlog("This mob is not located in the game world."))
|
||||
|
||||
ADMIN_VERB(jumptocoord, R_ADMIN|R_MOD|R_DEBUG|R_EVENT,"Jump to Coordinate", "Jump to the target coordinates.", ADMIN_CATEGORY_GAME, tx, ty, tz)
|
||||
ADMIN_VERB(jumptocoord, R_ADMIN|R_MOD|R_DEBUG|R_EVENT,"Jump to Coordinate", "Jump to the target coordinates.", ADMIN_CATEGORY_GAME, tx as num|null, ty as num|null, tz as num|null)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
has_suit = null
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(user)
|
||||
if(user && !issilicon(user))
|
||||
user.put_in_hands(src)
|
||||
add_fingerprint(user)
|
||||
else if(get_turf(src)) //We actually exist in space
|
||||
|
||||
@@ -69,6 +69,10 @@
|
||||
for(var/trait in clothing_traits)
|
||||
REMOVE_CLOTHING_TRAIT(user, trait)
|
||||
|
||||
/obj/item/clothing/click_alt(mob/user)
|
||||
if(Adjacent(user) || user == src.loc)
|
||||
removetie_verb(user)
|
||||
|
||||
//BS12: Species-restricted clothing check.
|
||||
/obj/item/clothing/mob_can_equip(mob/M, slot, disable_warning = FALSE, ignore_obstruction, go_over_slot)
|
||||
|
||||
|
||||
@@ -115,15 +115,18 @@
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
slowdown += A.slowdown
|
||||
|
||||
/obj/item/clothing/proc/removetie_verb()
|
||||
/obj/item/clothing/proc/removetie_verb(mob/user)
|
||||
set name = "Remove Accessory"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!isliving(usr))
|
||||
if(!user)
|
||||
user = usr
|
||||
|
||||
if(!isliving(user))
|
||||
return
|
||||
|
||||
if(usr.stat)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
// CHOMPEdit begin
|
||||
@@ -145,13 +148,13 @@
|
||||
if(accessory_amount == 1)
|
||||
A = accessories[1] // If there's only one accessory, just remove it without any additional prompts.
|
||||
else
|
||||
A = tgui_input_list(usr, "Select an accessory to remove from \the [src]", "Accessory Choice", accessories)
|
||||
A = tgui_input_list(user, "Select an accessory to remove from \the [src]", "Accessory Choice", accessories)
|
||||
|
||||
if(A)
|
||||
if(A.can_remove)
|
||||
remove_accessory(usr,A)
|
||||
remove_accessory(user,A)
|
||||
else
|
||||
to_chat(usr, span_warning("It doesn't look like \the [A] can be taken off \the [src]."))
|
||||
to_chat(user, span_warning("It doesn't look like \the [A] can be taken off \the [src]."))
|
||||
|
||||
|
||||
if(!LAZYLEN(accessories))
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
return TRUE
|
||||
to_chat(user, span_warning("There is already a pAI inserted, and you don't feel like cooking \the [O]."))
|
||||
return TRUE
|
||||
if(istype(O, /obj/item/gripper)) //Grippers count as 'attacking' before the thing they're holding. Don't send a message.
|
||||
return FALSE
|
||||
to_chat(user, span_warning("You have no idea what you can cook with \the [O]."))
|
||||
..()
|
||||
post_state_change()
|
||||
|
||||
@@ -381,6 +381,9 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/target = null)
|
||||
if(module_active && istype(module_active,/obj/item/gripper))
|
||||
var/obj/item/gripper/robot_gripper = module_active
|
||||
robot_gripper.drop_item_nm(target)
|
||||
return FALSE //Dropping things from robots break everything.
|
||||
|
||||
// CONTINUE CODING HERE
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
generate_icons()
|
||||
|
||||
//FORCES the item onto the ground and resets.
|
||||
/obj/item/gripper/proc/drop_item_nm(atom/taget)
|
||||
/obj/item/gripper/proc/drop_item_nm(atom/target)
|
||||
var/obj/item/wrapped = get_wrapped_item()
|
||||
if(!wrapped)
|
||||
return
|
||||
@@ -362,7 +362,7 @@
|
||||
generate_icons()
|
||||
return
|
||||
|
||||
wrapped.forceMove(taget ? taget : get_turf(src))
|
||||
wrapped.forceMove(target ? target : get_turf(src))
|
||||
clear_and_select_pocket()
|
||||
generate_icons()
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
pixel_x = -16
|
||||
icon_x = 64
|
||||
icon_y = 32
|
||||
dogborg_sprites = TRUE
|
||||
|
||||
whitelist_ckey = "jademanique"
|
||||
whitelist_charname = "B.A.U-Kingside"
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
throwforce = 0
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
pry = 1
|
||||
edge = TRUE
|
||||
sharp = TRUE
|
||||
tool_qualities = list(TOOL_CROWBAR)
|
||||
|
||||
/obj/item/melee/robotic/jaws/big
|
||||
|
||||
@@ -66,8 +66,12 @@
|
||||
if(current_size >= STAGE_FIVE)
|
||||
atom_deconstruct(TRUE)
|
||||
|
||||
/obj/machinery/disposal/MouseDrop_T(atom/dropping, mob/user, src_location, over_location, src_control, over_control, params)
|
||||
if(Adjacent(user) && Adjacent(dropping) && isobj(dropping) && isturf(dropping.loc))
|
||||
attackby(dropping, user, drag_dropped = TRUE)
|
||||
|
||||
// attack by item places it in to disposal
|
||||
/obj/machinery/disposal/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/disposal/attackby(obj/item/I, mob/user, attack_modifier, click_parameters, drag_dropped = FALSE)
|
||||
if(stat & BROKEN || !I || !user)
|
||||
return
|
||||
|
||||
@@ -143,12 +147,13 @@
|
||||
add_attack_logs(user,GM,"Disposals dunked")
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
if(isrobot(user) && !drag_dropped) //Borgs are allowed to drag-drop items into the disposal unit.
|
||||
return
|
||||
if(!I || I.anchored || !I.canremove)
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
if(!drag_dropped)
|
||||
user.drop_item()
|
||||
if(I)
|
||||
if(istype(I, /obj/item/holder))
|
||||
var/obj/item/holder/holder = I
|
||||
@@ -262,9 +267,11 @@
|
||||
|
||||
// mouse drop another mob or self
|
||||
//
|
||||
/obj/machinery/disposal/MouseDrop_T(mob/living/target, mob/living/user)
|
||||
if(istype(target))
|
||||
stuff_mob_in(target, user)
|
||||
/obj/machinery/disposal/MouseDrop_T(atom/dropping, mob/user, src_location, over_location, src_control, over_control, params)
|
||||
if(isliving(dropping))
|
||||
stuff_mob_in(dropping, user)
|
||||
else if(isobj(dropping) && isturf(dropping.loc))
|
||||
attackby(dropping, user, drag_dropped = TRUE)
|
||||
|
||||
/obj/machinery/disposal/proc/stuff_mob_in(mob/living/target, mob/living/user)
|
||||
//animals cannot put mobs other than themselves into disposal
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
source.forceMove(src)
|
||||
flush()
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/machinery/disposal/deliveryChute/attackby(obj/item/I, mob/user, attack_modifier, click_parameters, drag_dropped = FALSE)
|
||||
if(!I || !user)
|
||||
return
|
||||
|
||||
|
||||
@@ -1959,7 +1959,7 @@ Departamental Swimsuits, for general use
|
||||
var/uh_oh = pick(translocator.beacons)
|
||||
user.remove_from_mob(src, get_turf(user))
|
||||
translocator.destination = translocator.beacons[uh_oh]
|
||||
translocator.afterattack(user, user, proximity = 1, ignore_fail_chance = 1)
|
||||
translocator.afterattack(user, user, proximity_flag = 1, ignore_fail_chance = 1)
|
||||
add_attack_logs(user, user, "Tried to put on \the [src] and was involuntarily teleported by it (via \the [translocator] within)!")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user