Files
Bubberstation/code/game/objects/items/tail_pin.dm
Qustinnus 707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00

44 lines
1.7 KiB
Plaintext

/obj/item/tail_pin
icon_state = "tailpin"
name = "tail pin"
desc = "Offically branded 'pin the tail on the corgi' style party implement. Not intended to be used on people."
force = 0
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
throw_speed = 1
embedding = EMBED_HARMLESS
custom_materials = list(/datum/material/iron=1000)
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb_continuous = list("pokes", "jabs", "pins the tail on")
attack_verb_simple = list("poke", "jab")
sharpness = SHARP_POINTY
max_integrity = 200
layer = CORGI_ASS_PIN_LAYER
/obj/item/poster/tail_board
name = "party game poster"
poster_type = /obj/structure/sign/poster/party_game
icon_state = "rolled_poster"
/obj/structure/sign/poster/party_game
name = "pin the tail on the corgi"
desc = "The rules are simple, pin the tail on the corgi, while blindfolded. Are you a bad enough dude to hit the target?"
icon_state = "pinningposter"
poster_item_name = "party game poster"
poster_item_desc = "Place it on a wall to start playing pin the tail on the corgi."
/obj/structure/sign/poster/party_game/attackby(obj/item/I, mob/user, params)
. = ..()
if(!istype(I,/obj/item/tail_pin))
return
if(!(I.item_flags & ABSTRACT)) //We're using the same trick that tables use for placing objects x and y onto the click location.
return
if(!user.transferItemToLoc(I, drop_location(), silent = FALSE))
return
var/list/click_params = params2list(params)
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return TRUE