stuff
This commit is contained in:
@@ -25,11 +25,32 @@
|
||||
if(user_unbuckle_mob(buckled_mobs[1],user))
|
||||
return 1
|
||||
|
||||
/atom/movable/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(!can_buckle || !istype(attacking_item, /obj/item/riding_offhand) || !user.Adjacent(src))
|
||||
return ..()
|
||||
|
||||
var/obj/item/riding_offhand/riding_item = attacking_item
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
user.unbuckle_mob(carried_mob)
|
||||
carried_mob.forceMove(get_turf(src))
|
||||
return mouse_buckle_handling(carried_mob, user)
|
||||
|
||||
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
return mouse_buckle_handling(M, user)
|
||||
|
||||
/**
|
||||
* Does some typechecks and then calls user_buckle_mob
|
||||
*
|
||||
* Arguments:
|
||||
* M - The mob being buckled to src
|
||||
* user - The mob buckling M to src
|
||||
*/
|
||||
/atom/movable/proc/mouse_buckle_handling(mob/living/M, mob/living/user)
|
||||
if(can_buckle && istype(M) && istype(user))
|
||||
if(user_buckle_mob(M, user))
|
||||
return 1
|
||||
return user_buckle_mob(M, user, check_loc = FALSE)
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
|
||||
@@ -177,6 +177,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
var/canMouseDown = FALSE
|
||||
|
||||
/// Used if we want to have a custom verb text for throwing. "John Spaceman flicks the ciggerate" for example.
|
||||
var/throw_verb
|
||||
|
||||
/obj/item/Initialize(mapload)
|
||||
|
||||
@@ -1116,6 +1118,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
QDEL_NULL(src)
|
||||
return TRUE
|
||||
|
||||
///Called by the carbon throw_item() proc. Returns null if the item negates the throw, or a reference to the thing to suffer the throw else.
|
||||
/obj/item/proc/on_thrown(mob/living/carbon/user, atom/target)
|
||||
if((item_flags & ABSTRACT) || HAS_TRAIT(src, TRAIT_NODROP))
|
||||
return
|
||||
user.dropItemToGround(src, silent = TRUE)
|
||||
if(throwforce && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, span_notice("You set [src] down gently on the ground."))
|
||||
return
|
||||
return src
|
||||
|
||||
/**
|
||||
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
body_parts_covered = null
|
||||
grind_results = list()
|
||||
throw_verb = "flick"
|
||||
var/lit = FALSE
|
||||
var/starts_lit = FALSE
|
||||
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/user)
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/user, check_loc)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.incapacitated() || M.buckled )
|
||||
return
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user, check_loc) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if(user.incapacitated() || !istype(user))
|
||||
return
|
||||
M.forceMove(get_turf(src))
|
||||
|
||||
@@ -330,6 +330,17 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/attackby(obj/P, mob/user, params)
|
||||
if(!istype(P, /obj/item/riding_offhand))
|
||||
return ..()
|
||||
|
||||
var/obj/item/riding_offhand/riding_item = P
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
user.unbuckle_mob(carried_mob)
|
||||
MouseDrop_T(carried_mob, user)
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
. = . || (caller.pass_flags & PASSTABLE)
|
||||
|
||||
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.forceMove(src.loc)
|
||||
pushed_mob.set_resting(TRUE, FALSE)
|
||||
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
|
||||
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
|
||||
log_combat(user, pushed_mob, "placed")
|
||||
pushed_mob.forceMove(loc)
|
||||
pushed_mob.set_resting(TRUE, TRUE)
|
||||
pushed_mob.visible_message(span_notice("[user] places [pushed_mob] onto [src]."), \
|
||||
span_notice("[user] places [pushed_mob] onto [src]."))
|
||||
log_combat(user, pushed_mob, "places", null, "onto [src]")
|
||||
|
||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
@@ -205,6 +205,30 @@
|
||||
return
|
||||
// If the tray IS empty, continue on (tray will be placed on the table like other items)
|
||||
|
||||
if(istype(I, /obj/item/riding_offhand))
|
||||
var/obj/item/riding_offhand/riding_item = I
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablelimbsmash(user, carried_mob)
|
||||
else
|
||||
var/tableplace_delay = 3.5 SECONDS
|
||||
var/skills_space = ""
|
||||
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
|
||||
tableplace_delay = 2 SECONDS
|
||||
skills_space = " expertly"
|
||||
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
|
||||
tableplace_delay = 2.75 SECONDS
|
||||
skills_space = " quickly"
|
||||
carried_mob.visible_message(span_notice("[user] begins to[skills_space] place [carried_mob] onto [src]..."),
|
||||
span_userdanger("[user] begins to[skills_space] place [carried_mob] onto [src]..."))
|
||||
if(do_after(user, tableplace_delay, target = carried_mob))
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tableplace(user, carried_mob)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
|
||||
if(user.transferItemToLoc(I, drop_location()))
|
||||
var/list/click_params = params2list(params)
|
||||
|
||||
Reference in New Issue
Block a user