Merge branch 'master' into foodport-p2-7/12/20

This commit is contained in:
Winter Flare
2020-07-19 18:58:52 -04:00
232 changed files with 1927 additions and 895 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
))
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
/obj/item/cardboard_cutout/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.a_intent == INTENT_HELP || pushed_over)
return ..()
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
+1 -1
View File
@@ -78,7 +78,7 @@
toggle_paddles()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/defibrillator/attack_hand(mob/user)
/obj/item/defibrillator/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(loc == user)
if(slot_flags == ITEM_SLOT_BACK)
if(user.get_item_by_slot(SLOT_BACK) == src)
@@ -11,7 +11,7 @@
/obj/item/stack/circuit_stack/attack_self(mob/user)// Prevents the crafting menu, and tells you how to use it.
to_chat(user, "<span class='warning'>You can't use [src] by itself, you'll have to try and remove one of these circuits by hand... carefully.</span>")
/obj/item/stack/circuit_stack/attack_hand(mob/user)
/obj/item/stack/circuit_stack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
var/mob/living/carbon/human/H = user
if(!user.get_inactive_held_item() == src)
return ..()
+1 -1
View File
@@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
/obj/item/powersink/attack_ai()
return
/obj/item/powersink/attack_hand(mob/user)
/obj/item/powersink/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
@@ -32,7 +32,7 @@
. = ..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/electropack/attack_hand(mob/user)
/obj/item/electropack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.back)
@@ -162,7 +162,7 @@
materials = list(/datum/material/iron = 5000, /datum/material/glass =2000)
category = list("hacked", "Misc")
/obj/item/electropack/shockcollar/attack_hand(mob/user)
/obj/item/electropack/shockcollar/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(loc == user && user.get_item_by_slot(SLOT_NECK))
to_chat(user, "<span class='warning'>The collar is fastened tight! You'll need help taking this off!</span>")
return
@@ -86,7 +86,7 @@
/obj/item/radio/intercom/attack_ai(mob/user)
interact(user)
/obj/item/radio/intercom/attack_hand(mob/user)
/obj/item/radio/intercom/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
@@ -45,7 +45,7 @@
to_chat(loc, "<span class='userdanger'>*ding*</span>")
addtimer(CALLBACK(src, .proc/snap), 2)
/obj/item/reverse_bear_trap/attack_hand(mob/user)
/obj/item/reverse_bear_trap/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.get_item_by_slot(SLOT_HEAD) == src)
@@ -55,7 +55,7 @@
..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/taperecorder/attack_hand(mob/user)
/obj/item/taperecorder/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(loc == user)
if(mytape)
if(!user.is_holding(src))
+1 -1
View File
@@ -320,7 +320,7 @@
do_sparks(1, TRUE, src)
qdel(src)
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
Crossed(user) //honk
. = ..()
+1 -1
View File
@@ -621,7 +621,7 @@
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
update_icon()
/obj/item/melee/roastingstick/attack_hand(mob/user)
/obj/item/melee/roastingstick/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
..()
if (held_sausage)
user.put_in_hands(held_sausage)
+52 -4
View File
@@ -18,6 +18,8 @@
icon = 'icons/obj/device.dmi'
icon_state = "gangtool-blue"
item_state = "radio"
var/list/stored_options
var/force_refresh = FALSE //if set to true, the beacon will recalculate its display options whenever opened
/obj/item/choice_beacon/attack_self(mob/user)
if(canUseBeacon(user))
@@ -34,14 +36,15 @@
return FALSE
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
var/list/display_names = generate_display_names()
if(!display_names.len)
if(!stored_options || force_refresh)
stored_options = generate_display_names()
if(!stored_options.len)
return
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
spawn_option(display_names[choice],M)
spawn_option(stored_options[choice],M)
qdel(src)
/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M)
@@ -153,6 +156,51 @@
new choice(get_turf(M))
to_chat(M, "<span class='hear'>You hear something crackle from the beacon for a moment before a voice speaks. \"Please stand by for a message from S.E.L.F. Message as follows: <b>Item request received. Your package has been transported, use the autosurgeon supplied to apply the upgrade.</b> Message ends.\"</span>")
/obj/item/choice_beacon/box
name = "choice box (default)"
desc = "Think really hard about what you want, and then rip it open!"
icon = 'icons/obj/storage.dmi'
icon_state = "deliverypackage3"
item_state = "deliverypackage3"
/obj/item/choice_beacon/box/spawn_option(obj/choice,mob/living/M)
to_chat(M, "<span class='hear'>The box opens, revealing the [choice]!</span>")
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
M.temporarilyRemoveItemFromInventory(src, TRUE)
M.put_in_hands(new choice)
qdel(src)
/obj/item/choice_beacon/box/plushie
name = "choice box (plushie)"
desc = "Using the power of quantum entanglement, this box contains every plush, until the moment it is opened!"
icon = 'icons/obj/plushes.dmi'
icon_state = "box"
item_state = "box"
/obj/item/choice_beacon/box/spawn_option(choice,mob/living/M)
if(ispath(choice, /obj/item/toy/plush))
..() //regular plush, spawn it naturally
else
//snowflake plush
var/obj/item/toy/plush/snowflake_plushie = new(get_turf(M))
snowflake_plushie.set_snowflake_from_config(choice)
M.temporarilyRemoveItemFromInventory(src, TRUE)
M.put_in_hands(new choice)
qdel(src)
/obj/item/choice_beacon/box/plushie/generate_display_names()
var/list/plushie_list = list()
//plushie set 1: just subtypes of /obj/item/toy/plush
var/list/plushies_set_one = subtypesof(/obj/item/toy/plush) - list(/obj/item/toy/plush/narplush, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random_snowflake, /obj/item/toy/plush/random) //don't allow these special ones (you can still get narplush/hugbox)
for(var/V in plushies_set_one)
var/atom/A = V
plushie_list[initial(A.name)] = A
//plushie set 2: snowflake plushies
var/list/plushies_set_two = CONFIG_GET(keyed_list/snowflake_plushies)
for(var/V in plushies_set_two)
plushie_list[V] = V //easiest way to do this which works with how selecting options works, despite being snowflakey to have the key equal the value
return plushie_list
/obj/item/skub
desc = "It's skub."
name = "skub"
+31 -17
View File
@@ -746,8 +746,8 @@
***********************************************************************/
/obj/item/weapon/gripper
name = "circuit gripper"
desc = "A simple grasping tool for inserting circuitboards into machinary."
name = "engineering gripper"
desc = "A simple grasping tool for interacting with various engineering related items, such as circuits, gas tanks and conveyer belts. Alt click to drop instead of use."
icon = 'icons/obj/device.dmi'
icon_state = "gripper"
@@ -755,18 +755,36 @@
//Has a list of items that it can hold.
var/list/can_hold = list(
/obj/item/circuitboard
/obj/item/circuitboard,
/obj/item/light,
/obj/item/electronics,
/obj/item/tank,
/obj/item/conveyor_switch_construct,
/obj/item/stack/conveyor,
/obj/item/wallframe,
/obj/item/vending_refill,
/obj/item/stack/sheet,
/obj/item/stack/tile,
/obj/item/stack/rods,
/obj/item/stock_parts
)
//Basically a blacklist for any subtypes above we dont want
var/list/cannot_hold = list(
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/plasteel
)
var/obj/item/wrapped = null // Item currently being held.
/obj/item/weapon/gripper/attack_self()
//Used to interact with UI's of held items, such as gas tanks and airlock electronics.
/obj/item/weapon/gripper/AltClick(mob/user)
if(wrapped)
wrapped.forceMove(get_turf(wrapped))
to_chat(user, "<span class='notice'>You drop the [wrapped].</span>")
wrapped = null
return ..()
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/silicon/robot/user, proximity, params)
if(!proximity)
return
@@ -792,18 +810,21 @@
return
else if(istype(target,/obj/item))
var/obj/item/I = target
var/grab = 0
for(var/typepath in can_hold)
if(istype(I,typepath))
grab = 1
break
for(var/badpath in cannot_hold)
if(istype(I,badpath))
if(!user.emagged)
grab = 0
continue
//We can grab the item, finally.
if(grab)
to_chat(user, "You collect \the [I].")
to_chat(user, "<span class='notice'>You collect \the [I].</span>")
I.loc = src
wrapped = I
return
@@ -812,19 +833,12 @@
/obj/item/weapon/gripper/mining
name = "shelter capsule deployer"
desc = "A simple grasping tool for carrying and deploying shelter capsules."
desc = "A simple grasping tool for carrying and deploying shelter capsules. Alt click to drop instead of use."
icon_state = "gripper_mining"
can_hold = list(
/obj/item/survivalcapsule
)
/obj/item/weapon/gripper/mining/attack_self()
if(wrapped)
wrapped.forceMove(get_turf(wrapped))
wrapped.attack_self()
wrapped = null
return
/obj/item/gun/energy/plasmacutter/cyborg
name = "cyborg plasma cutter"
desc = "A basic variation of the plasma cutter, compressed into a cyborg chassis. Less effective than normal plasma cutters."
+6
View File
@@ -446,6 +446,12 @@ obj/item/shield/riot/bullet_proof
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
return ..()
/obj/item/shield/energy/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
return ..()
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class='userdanger'>You beat yourself in the head with [src]!</span>")
+1 -1
View File
@@ -31,7 +31,7 @@
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
return TRUE
/obj/item/target/attack_hand(mob/user)
/obj/item/target/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
+1 -1
View File
@@ -75,7 +75,7 @@
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.get_inactive_held_item() == src)
if(zero_amount())
return
+1 -1
View File
@@ -280,7 +280,7 @@
return
. = ..()
/obj/item/stack/medical/mesh/attack_hand(mob/user)
/obj/item/stack/medical/mesh/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(!is_open & user.get_inactive_held_item() == src)
to_chat(user, "<span class='warning'>You need to open [src] first.</span>")
return
+1 -1
View File
@@ -390,7 +390,7 @@
. = ..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/stack/attack_hand(mob/user)
/obj/item/stack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.get_inactive_held_item() == src)
if(zero_amount())
return
@@ -648,3 +648,9 @@ obj/item/storage/backpack/duffelbag/syndie/shredderbundle
new /obj/item/gun/ballistic/automatic/flechette/shredder(src)
new /obj/item/storage/belt/military(src)
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
/obj/item/storage/backpack/snail
name = "snail shell"
desc = "Worn by snails as armor and storage compartment."
icon_state = "snailshell"
item_state = "snailshell"
+1 -1
View File
@@ -205,7 +205,7 @@
new /obj/item/paper(src)
new /obj/item/pen(src)
/obj/item/storage/secure/safe/attack_hand(mob/user)
/obj/item/storage/secure/safe/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
+1 -1
View File
@@ -72,7 +72,7 @@
QDEL_NULL(noz)
return ..()
/obj/item/watertank/attack_hand(mob/user)
/obj/item/watertank/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if (user.get_item_by_slot(user.getBackSlot()) == src)
toggle_mister(user)
else
+2 -2
View File
@@ -574,7 +574,7 @@
else
. = ..()
/obj/item/toy/prize/attack_hand(mob/user)
/obj/item/toy/prize/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
@@ -813,7 +813,7 @@
//ATTACK HAND IGNORING PARENT RETURN VALUE
//ATTACK HAND NOT CALLING PARENT
/obj/item/toy/cards/deck/attack_hand(mob/user)
/obj/item/toy/cards/deck/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
draw_card(user)
/obj/item/toy/cards/deck/proc/draw_card(mob/user)
+86
View File
@@ -706,6 +706,92 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
item_flags = DROPDEL | ABSTRACT
attack_verb = list("bopped")
/obj/item/circlegame/Initialize()
. = ..()
var/mob/living/owner = loc
if(!istype(owner))
return
RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/ownerExamined)
/obj/item/circlegame/Destroy()
var/mob/owner = loc
if(istype(owner))
UnregisterSignal(owner, COMSIG_PARENT_EXAMINE)
return ..()
/obj/item/circlegame/dropped(mob/user)
UnregisterSignal(user, COMSIG_PARENT_EXAMINE) //loc will have changed by the time this is called, so Destroy() can't catch it
// this is a dropdel item.
return ..()
/// Stage 1: The mistake is made
/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker)
if(!istype(sucker) || !in_range(owner, sucker))
return
addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4)
/// Stage 2: Fear sets in
/obj/item/circlegame/proc/waitASecond(mob/living/owner, mob/living/sucker)
if(QDELETED(sucker) || QDELETED(src) || QDELETED(owner))
return
if(owner == sucker) // big mood
to_chat(owner, "<span class='danger'>Wait a second... you just looked at your own [src.name]!</span>")
addtimer(CALLBACK(src, .proc/selfGottem, owner), 10)
else
to_chat(sucker, "<span class='danger'>Wait a second... was that a-</span>")
addtimer(CALLBACK(src, .proc/GOTTEM, owner, sucker), 6)
/// Stage 3A: We face our own failures
/obj/item/circlegame/proc/selfGottem(mob/living/owner)
if(QDELETED(src) || QDELETED(owner))
return
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
owner.visible_message("<span class='danger'>[owner] shamefully bops [owner.p_them()]self with [owner.p_their()] [src.name].</span>", "<span class='userdanger'>You shamefully bop yourself with your [src.name].</span>", \
"<span class='hear'>You hear a dull thud!</span>")
log_combat(owner, owner, "bopped", src.name, "(self)")
owner.do_attack_animation(owner)
owner.apply_damage(100, STAMINA)
owner.Knockdown(10)
qdel(src)
/// Stage 3B: We face our reckoning (unless we moved away or they're incapacitated)
/obj/item/circlegame/proc/GOTTEM(mob/living/owner, mob/living/sucker)
if(QDELETED(sucker))
return
if(QDELETED(src) || QDELETED(owner))
to_chat(sucker, "<span class='warning'>Nevermind... must've been your imagination...</span>")
return
if(!in_range(owner, sucker) || !(owner.mobility_flags & MOBILITY_USE))
to_chat(sucker, "<span class='notice'>Phew... you moved away before [owner] noticed you saw [owner.p_their()] [src.name]...</span>")
return
to_chat(owner, "<span class='warning'>[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!</span>")
to_chat(sucker, "<span class='danger'><b>[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!</b></span>")
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
owner.do_attack_animation(sucker)
if(HAS_TRAIT(owner, TRAIT_HULK))
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", \
"<span class='danger'>You bop [sucker] with your [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", ignored_mobs=list(sucker))
to_chat(sucker, "<span class='userdanger'>[owner] bops you incredibly hard with [owner.p_their()] [src.name], sending you flying!</span>")
sucker.apply_damage(50, STAMINA)
sucker.Knockdown(50)
log_combat(owner, sucker, "bopped", src.name, "(setup- Hulk)")
var/atom/throw_target = get_edge_target_turf(sucker, owner.dir)
sucker.throw_at(throw_target, 6, 3, owner)
else
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name]!</span>", "<span class='danger'>You bop [sucker] with your [src.name]!</span>", \
"<span class='hear'>You hear a dull thud!</span>", ignored_mobs=list(sucker))
sucker.apply_damage(15, STAMINA)
log_combat(owner, sucker, "bopped", src.name, "(setup)")
to_chat(sucker, "<span class='userdanger'>[owner] bops you with [owner.p_their()] [src.name]!</span>")
qdel(src)
/obj/item/slapper
name = "slapper"
desc = "This is how real men fight."