Allows paper airplanes to be vareditted to always hit someone in the eye (#41328)

cl ShizCalev
tweak: Paper airplanes can now have their hit probability adjusted by badmins.
add: Added syndicate paper airplanes. They are rather robust and are guaranteed to hit someone in the eye.
add: Added The Art of Origami to the syndicate uplink. This allows you to fold weapons grade paper airplanes. It will also allow you to catch paper airplanes when you have the ability enabled.
/cl
This commit is contained in:
ShizCalev
2018-11-12 02:49:32 -05:00
committed by yogstation13-bot
parent 286755fb1b
commit db43ecb624
9 changed files with 115 additions and 32 deletions

View File

@@ -7,7 +7,7 @@
var/name = "Generic Action"
var/desc = null
var/obj/target = null
var/check_flags = 0
var/check_flags = NONE
var/processing = FALSE
var/obj/screen/movable/action_button/button = null
var/buttontooltipstyle = ""
@@ -409,7 +409,7 @@
name = "Shift Nerves"
/datum/action/item_action/explosive_implant
check_flags = 0
check_flags = NONE
name = "Activate Explosive Implant"
/datum/action/item_action/toggle_research_scanner
@@ -522,7 +522,7 @@
//Preset for spells
/datum/action/spell_action
check_flags = 0
check_flags = NONE
background_icon_state = "bg_spell"
/datum/action/spell_action/New(Target)
@@ -578,7 +578,7 @@
//Preset for general and toggled actions
/datum/action/innate
check_flags = 0
check_flags = NONE
var/active = 0
/datum/action/innate/Trigger()
@@ -599,7 +599,7 @@
//Preset for an action with a cooldown
/datum/action/cooldown
check_flags = 0
check_flags = NONE
transparent_when_unavailable = FALSE
var/cooldown_time = 0
var/next_use_time = 0
@@ -659,7 +659,7 @@
name = "Language Menu"
desc = "Open the language menu to review your languages, their keys, and select your default language."
button_icon_state = "language_menu"
check_flags = 0
check_flags = NONE
/datum/action/language_menu/Trigger()
if(!..())

View File

@@ -75,7 +75,7 @@
name = "Drink Flinging"
desc = "Toggles your ability to satisfyingly throw glasses without spilling them."
button_icon_state = "drinkfling_off"
check_flags = 0
check_flags = NONE
/datum/action/innate/drink_fling/Activate()
button_icon_state = "drinkfling_on"
@@ -87,6 +87,34 @@
active = FALSE
UpdateButtonIcon()
/obj/item/book/granter/action/origami
granted_action = /datum/action/innate/origami
name = "The Art of Origami"
desc = "A meticulously in-depth manual explaining the art of paper folding."
icon_state = "origamibook"
actionname = "origami"
oneuse = TRUE
remarks = list("Dead-stick stability...", "Symmetry seems to play a rather large factor...", "Accounting for crosswinds... really?", "Drag coefficients of various paper types...", "Thrust to weight ratios?", "Positive dihedral angle?", "Center of gravity forward of the center of lift...")
/datum/action/innate/origami
name = "Origami Folding"
desc = "Toggles your ability to fold and catch robust paper airplanes."
button_icon_state = "origami_off"
check_flags = NONE
/datum/action/innate/origami/Activate()
to_chat(owner, "<span class='notice'>You will now fold origami planes.</span>")
button_icon_state = "origami_on"
active = TRUE
UpdateButtonIcon()
/datum/action/innate/origami/Deactivate()
to_chat(owner, "<span class='notice'>You will no longer fold origami planes.</span>")
button_icon_state = "origami_off"
active = FALSE
UpdateButtonIcon()
///SPELLS///
/obj/item/book/granter/spell

View File

@@ -218,7 +218,7 @@
desc = "This box contains injectors, it seems."
/obj/item/storage/box/injectors/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/dnainjector/h2m = 3,
/obj/item/dnainjector/m2h = 3)
generate_items_inside(items_inside,src)
@@ -286,7 +286,7 @@
illustration = "implant"
/obj/item/storage/box/trackimp/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/implantcase/tracking = 4,
/obj/item/implanter = 1,
/obj/item/implantpad = 1,
@@ -299,7 +299,7 @@
illustration = "implant"
/obj/item/storage/box/minertracker/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/implantcase/tracking = 3,
/obj/item/implanter = 1,
/obj/item/implantpad = 1,
@@ -312,7 +312,7 @@
illustration = "implant"
/obj/item/storage/box/chemimp/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/implantcase/chem = 5,
/obj/item/implanter = 1,
/obj/item/implantpad = 1)
@@ -324,7 +324,7 @@
illustration = "implant"
/obj/item/storage/box/exileimp/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/implantcase/exile = 5,
/obj/item/implanter = 1)
generate_items_inside(items_inside,src)
@@ -1010,9 +1010,9 @@
desc = "Contains a variety of basic stock parts."
/obj/item/storage/box/stockparts/basic/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/stock_parts/capacitor = 3,
/obj/item/stock_parts/scanning_module = 3,
/obj/item/stock_parts/scanning_module = 3,
/obj/item/stock_parts/manipulator = 3,
/obj/item/stock_parts/micro_laser = 3,
/obj/item/stock_parts/matter_bin = 3)
@@ -1024,7 +1024,7 @@
icon_state = "syndiebox"
/obj/item/storage/box/stockparts/deluxe/PopulateContents()
var/static/items_inside = list(
var/static/items_inside = list(
/obj/item/stock_parts/capacitor/quadratic = 3,
/obj/item/stock_parts/scanning_module/triphasic = 3,
/obj/item/stock_parts/manipulator/femto = 3,

View File

@@ -132,6 +132,15 @@
icon_state = "syndiebox"
illustration = "writing_syndie"
/obj/item/storage/box/syndie_kit/origami_bundle
name = "boxed origami kit"
desc = "A box full of a number of rather masterfully engineered paper planes and a manual on \"The Art of Origami\"."
/obj/item/storage/box/syndie_kit/origami_bundle/PopulateContents()
new /obj/item/book/granter/action/origami(src)
for(var/i in 1 to 5)
new /obj/item/paper(src)
/obj/item/storage/box/syndie_kit/imp_freedom
name = "boxed freedom implant (with injector)"
@@ -279,6 +288,8 @@
/obj/item/storage/box/syndie_kit/throwing_weapons/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/throwing_star(src)
for(var/i in 1 to 2)
new /obj/item/paperplane/syndicate(src)
new /obj/item/restraints/legcuffs/bola/tactical(src)
new /obj/item/restraints/legcuffs/bola/tactical(src)

View File

@@ -48,18 +48,29 @@
if(affecting && affecting.dismemberable && affecting.get_damage() >= (affecting.max_damage - P.dismemberment))
affecting.dismember(P.damtype)
/mob/living/carbon/proc/can_catch_item(skip_throw_mode_check)
. = FALSE
if(!skip_throw_mode_check && !in_throw_mode)
return
if(get_active_held_item())
return
if(!(mobility_flags & MOBILITY_MOVE))
return
if(restrained())
return
return TRUE
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE)
if(!skipcatch) //ugly, but easy
if(in_throw_mode && !get_active_held_item()) //empty active hand and we're in throw mode
if((mobility_flags & MOBILITY_MOVE) && !restrained())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
I.attack_hand(src)
if(get_active_held_item() == I) //if our attack_hand() picks up the item...
visible_message("<span class='warning'>[src] catches [I]!</span>") //catch that sucker!
throw_mode_off()
return 1
if(can_catch_item())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
I.attack_hand(src)
if(get_active_held_item() == I) //if our attack_hand() picks up the item...
visible_message("<span class='warning'>[src] catches [I]!</span>") //catch that sucker!
throw_mode_off()
return 1
..()

View File

@@ -10,8 +10,14 @@
resistance_flags = FLAMMABLE
max_integrity = 50
var/hit_probability = 2 //%
var/obj/item/paper/internalPaper
/obj/item/paperplane/syndicate
desc = "Paper, masterfully folded in the shape of a plane."
throwforce = 20 //same as throwing stars, but no chance of embedding.
hit_probability = 100 //guaranteed to cause eye damage when it hits a mob.
/obj/item/paperplane/Initialize(mapload, obj/item/paper/newPaper)
. = ..()
pixel_y = rand(-8, 8)
@@ -22,13 +28,18 @@
color = newPaper.color
newPaper.forceMove(src)
else
internalPaper = new /obj/item/paper(src)
internalPaper = new(src)
update_icon()
/obj/item/paperplane/Destroy()
if(internalPaper)
qdel(internalPaper)
/obj/item/paperplane/handle_atom_del(atom/A)
if(A == internalPaper)
internalPaper = null
if(!QDELETED(src))
qdel(src)
return ..()
/obj/item/paperplane/Destroy()
QDEL_NULL(internalPaper)
return ..()
/obj/item/paperplane/suicide_act(mob/living/user)
@@ -48,7 +59,7 @@
/obj/item/paperplane/attack_self(mob/user)
to_chat(user, "<span class='notice'>You unfold [src].</span>")
var/atom/movable/internal_paper_tmp = internalPaper
var/obj/item/paper/internal_paper_tmp = internalPaper
internal_paper_tmp.forceMove(loc)
internalPaper = null
qdel(src)
@@ -86,10 +97,17 @@
. = ..(target, range, speed, thrower, FALSE, diagonals_first, callback)
/obj/item/paperplane/throw_impact(atom/hit_atom)
if(iscarbon(hit_atom))
var/mob/living/carbon/C = hit_atom
if(C.can_catch_item(TRUE))
var/datum/action/innate/origami/origami_action = locate() in C.actions
if(origami_action?.active) //if they're a master of origami and have the ability turned on, force throwmode on so they'll automatically catch the plane.
C.throw_mode_on()
if(..() || !ishuman(hit_atom))//if the plane is caught or it hits a nonhuman
return
var/mob/living/carbon/human/H = hit_atom
if(prob(2))
if(prob(hit_probability))
if(H.is_eyes_covered())
return
visible_message("<span class='danger'>\The [src] hits [H] in the eye!</span>")
@@ -107,5 +125,11 @@
return
to_chat(user, "<span class='notice'>You fold [src] into the shape of a plane!</span>")
user.temporarilyRemoveItemFromInventory(src)
I = new /obj/item/paperplane(user, src)
var/obj/item/paperplane/plane_type = /obj/item/paperplane
//Origami Master
var/datum/action/innate/origami/origami_action = locate() in user.actions
if(origami_action?.active)
plane_type = /obj/item/paperplane/syndicate
I = new plane_type(user, src)
user.put_in_hands(I)

View File

@@ -707,6 +707,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/stealthy_weapons
category = "Stealthy and Inconspicuous Weapons"
/datum/uplink_item/stealthy_weapons/origami_kit
name = "Boxed Origami Kit"
desc = "This box contains a guide on how to craft masterful works of origami, allowing you to transform normal pieces of paper into\
perfectly aerodynamic (and potentially lethal) paper airplanes."
item = /obj/item/storage/box/syndie_kit/origami_bundle
cost = 14
surplus = 0
exclude_modes = list(/datum/game_mode/nuclear) //clown ops intentionally left in, because that seems like some s-tier shenanigans.
/datum/uplink_item/stealthy_weapons/martialarts
name = "Martial Arts Scroll"
desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB