mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Revert "[MIRROR] [MIRROR] Throw Mode QoL Tweaks"
This commit is contained in:
@@ -84,10 +84,12 @@
|
|||||||
RestrainedClickOn(A)
|
RestrainedClickOn(A)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if(in_throw_mode && (isturf(A) || isturf(A.loc)) && throw_item(A))
|
if(in_throw_mode)
|
||||||
trigger_aiming(TARGET_CAN_CLICK)
|
if(isturf(A) || isturf(A.loc))
|
||||||
|
throw_item(A)
|
||||||
|
trigger_aiming(TARGET_CAN_CLICK)
|
||||||
|
return 1
|
||||||
throw_mode_off()
|
throw_mode_off()
|
||||||
return TRUE
|
|
||||||
|
|
||||||
var/obj/item/W = get_active_hand()
|
var/obj/item/W = get_active_hand()
|
||||||
|
|
||||||
@@ -284,7 +286,7 @@
|
|||||||
if(T && user.TurfAdjacent(T))
|
if(T && user.TurfAdjacent(T))
|
||||||
user.ToggleTurfTab(T)
|
user.ToggleTurfTab(T)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/mob/proc/ToggleTurfTab(var/turf/T)
|
/mob/proc/ToggleTurfTab(var/turf/T)
|
||||||
if(listed_turf == T)
|
if(listed_turf == T)
|
||||||
listed_turf = null
|
listed_turf = null
|
||||||
|
|||||||
@@ -1,46 +1,42 @@
|
|||||||
/mob/living/verb/give(var/mob/living/target in living_mobs(1))
|
/mob/living/carbon/human/verb/give(var/mob/living/carbon/target in living_mobs(1))
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
set name = "Give"
|
set name = "Give"
|
||||||
|
|
||||||
do_give(target)
|
// TODO : Change to incapacitated() on merge.
|
||||||
|
if(src.stat || src.lying || src.resting || src.handcuffed)
|
||||||
/mob/living/proc/do_give(var/mob/living/carbon/human/target)
|
|
||||||
|
|
||||||
if(src.incapacitated())
|
|
||||||
return
|
return
|
||||||
if(!istype(target) || target.incapacitated() || target.client == null)
|
if(!istype(target) || target.stat || target.lying || target.resting || target.handcuffed || target.client == null)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/I = src.get_active_hand()
|
var/obj/item/I = src.get_active_hand()
|
||||||
if(!I)
|
if(!I)
|
||||||
I = src.get_inactive_hand()
|
I = src.get_inactive_hand()
|
||||||
if(!I)
|
if(!I)
|
||||||
to_chat(src, SPAN_WARNING("You don't have anything in your hands to give to \the [target]."))
|
to_chat(src, "<span class='warning'>You don't have anything in your hands to give to \the [target].</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
usr.visible_message(SPAN_NOTICE("\The [usr] holds out \the [I] to \the [target]."), SPAN_NOTICE("You hold out \the [I] to \the [target], waiting for them to accept it."))
|
if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("Yes","No")) == "No") //VOREStation Edit - make yes on the left to be consistent with other dialogs
|
||||||
|
target.visible_message("<span class='notice'>\The [src] tried to hand \the [I] to \the [target], \
|
||||||
if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("No","Yes")) == "No")
|
but \the [target] didn't want it.</span>")
|
||||||
target.visible_message(SPAN_NOTICE("\The [src] tried to hand \the [I] to \the [target], but \the [target] didn't want it."))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!I) return
|
if(!I) return
|
||||||
|
|
||||||
if(!Adjacent(target))
|
if(!Adjacent(target))
|
||||||
to_chat(src, SPAN_WARNING("You need to stay in reaching distance while giving an object"))
|
to_chat(src, "<span class='warning'>You need to stay in reaching distance while giving an object.</span>")
|
||||||
to_chat(target, SPAN_WARNING("\The [src] moved too far away."))
|
to_chat(target, "<span class='warning'>\The [src] moved too far away.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(I.loc != src || !src.item_is_in_hands(I))
|
if(I.loc != src || !src.item_is_in_hands(I))
|
||||||
to_chat(src, SPAN_WARNING("You need to keep the item in your hands."))
|
to_chat(src, "<span class='warning'>You need to keep the item in your hands.</span>")
|
||||||
to_chat(target, SPAN_WARNING("\The [src] seems to have given up on passing \the [I] to you."))
|
to_chat(target, "<span class='warning'>\The [src] seems to have given up on passing \the [I] to you.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(target.hands_are_full())
|
if(target.hands_are_full())
|
||||||
to_chat(target, SPAN_WARNING("Your hands are full."))
|
to_chat(target, "<span class='warning'>Your hands are full.</span>")
|
||||||
to_chat(src, SPAN_WARNING("Their hands are full."))
|
to_chat(src, "<span class='warning'>Their hands are full.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(src.unEquip(I))
|
if(src.unEquip(I))
|
||||||
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
|
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
|
||||||
target.visible_message(SPAN_NOTICE("\The [src] handed \the [I] to \the [target]"))
|
target.visible_message("<span class='notice'>\The [src] handed \the [I] to \the [target].</span>")
|
||||||
|
|||||||
@@ -1004,13 +1004,14 @@
|
|||||||
swap_hand()
|
swap_hand()
|
||||||
|
|
||||||
/mob/living/throw_item(atom/target)
|
/mob/living/throw_item(atom/target)
|
||||||
if(incapacitated() || !target || istype(target, /obj/screen))
|
src.throw_mode_off()
|
||||||
return FALSE
|
if(usr.stat || !target)
|
||||||
|
return
|
||||||
|
if(target.type == /obj/screen) return
|
||||||
|
|
||||||
var/atom/movable/item = src.get_active_hand()
|
var/atom/movable/item = src.get_active_hand()
|
||||||
|
|
||||||
if(!item)
|
if(!item) return
|
||||||
return FALSE
|
|
||||||
|
|
||||||
var/throw_range = item.throw_range
|
var/throw_range = item.throw_range
|
||||||
if (istype(item, /obj/item/weapon/grab))
|
if (istype(item, /obj/item/weapon/grab))
|
||||||
@@ -1030,32 +1031,10 @@
|
|||||||
if((N.health + N.halloss) < config.health_threshold_crit || N.stat == DEAD)
|
if((N.health + N.halloss) < config.health_threshold_crit || N.stat == DEAD)
|
||||||
N.adjustBruteLoss(rand(10,30))
|
N.adjustBruteLoss(rand(10,30))
|
||||||
src.drop_from_inventory(G)
|
src.drop_from_inventory(G)
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
if(!item)
|
src.drop_from_inventory(item)
|
||||||
return FALSE //Grab processing has a chance of returning null
|
if(!item || !isturf(item.loc))
|
||||||
|
return
|
||||||
if(a_intent == I_HELP && Adjacent(target) && isitem(item))
|
|
||||||
var/obj/item/I = item
|
|
||||||
if(ishuman(target))
|
|
||||||
var/mob/living/carbon/human/H = target
|
|
||||||
if(H.in_throw_mode && H.a_intent == I_HELP && unEquip(I))
|
|
||||||
H.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
|
|
||||||
visible_message("<b>[src]</b> hands \the [H] \a [I].", SPAN_NOTICE("You give \the [target] \a [I]."))
|
|
||||||
else
|
|
||||||
to_chat(src, SPAN_NOTICE("You offer \the [I] to \the [target]."))
|
|
||||||
do_give(H)
|
|
||||||
return TRUE
|
|
||||||
make_item_drop_sound(I)
|
|
||||||
I.forceMove(get_turf(target))
|
|
||||||
return TRUE
|
|
||||||
|
|
||||||
drop_from_inventory(item)
|
|
||||||
|
|
||||||
if(!item || QDELETED(item))
|
|
||||||
return TRUE //It may not have thrown, but it sure as hell left your hand successfully.
|
|
||||||
|
|
||||||
//actually throw it!
|
//actually throw it!
|
||||||
src.visible_message("<span class='warning'>[src] has thrown [item].</span>")
|
src.visible_message("<span class='warning'>[src] has thrown [item].</span>")
|
||||||
@@ -1076,7 +1055,6 @@
|
|||||||
|
|
||||||
|
|
||||||
item.throw_at(target, throw_range, item.throw_speed, src)
|
item.throw_at(target, throw_range, item.throw_speed, src)
|
||||||
return TRUE
|
|
||||||
|
|
||||||
/mob/living/get_sound_env(var/pressure_factor)
|
/mob/living/get_sound_env(var/pressure_factor)
|
||||||
if (hallucination)
|
if (hallucination)
|
||||||
|
|||||||
@@ -1150,7 +1150,7 @@
|
|||||||
|
|
||||||
//Throwing stuff
|
//Throwing stuff
|
||||||
/mob/proc/throw_item(atom/target)
|
/mob/proc/throw_item(atom/target)
|
||||||
return FALSE
|
return
|
||||||
|
|
||||||
/mob/proc/will_show_tooltip()
|
/mob/proc/will_show_tooltip()
|
||||||
if(alpha <= EFFECTIVE_INVIS)
|
if(alpha <= EFFECTIVE_INVIS)
|
||||||
|
|||||||
Reference in New Issue
Block a user