mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-17 04:27:39 +00:00
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
232 lines
9.4 KiB
Plaintext
232 lines
9.4 KiB
Plaintext
/obj/item/lipstick
|
|
gender = PLURAL
|
|
name = "red lipstick"
|
|
desc = "A generic brand of lipstick."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "lipstick"
|
|
w_class = WEIGHT_CLASS_TINY
|
|
var/colour = "red"
|
|
var/open = FALSE
|
|
|
|
/obj/item/lipstick/purple
|
|
name = "purple lipstick"
|
|
colour = "purple"
|
|
|
|
/obj/item/lipstick/jade
|
|
//It's still called Jade, but theres no HTML color for jade, so we use lime.
|
|
name = "jade lipstick"
|
|
colour = "lime"
|
|
|
|
/obj/item/lipstick/black
|
|
name = "black lipstick"
|
|
colour = "black"
|
|
|
|
/obj/item/lipstick/random
|
|
name = "lipstick"
|
|
icon_state = "random_lipstick"
|
|
|
|
/obj/item/lipstick/random/Initialize()
|
|
. = ..()
|
|
icon_state = "lipstick"
|
|
colour = pick("red","purple","lime","black","green","blue","white")
|
|
name = "[colour] lipstick"
|
|
|
|
/obj/item/lipstick/attack_self(mob/user)
|
|
cut_overlays()
|
|
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
|
open = !open
|
|
if(open)
|
|
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
|
|
colored_overlay.color = colour
|
|
icon_state = "lipstick_uncap"
|
|
add_overlay(colored_overlay)
|
|
else
|
|
icon_state = "lipstick"
|
|
|
|
/obj/item/lipstick/attack(mob/M, mob/user)
|
|
if(!open)
|
|
return
|
|
|
|
if(!ismob(M))
|
|
return
|
|
|
|
if(ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
if(H.is_mouth_covered())
|
|
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "[H.p_their()]" ] mask!</span>")
|
|
return
|
|
if(H.lip_style) //if they already have lipstick on
|
|
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
|
return
|
|
if(H == user)
|
|
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with \the [src].</span>", \
|
|
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
|
H.lip_style = "lipstick"
|
|
H.lip_color = colour
|
|
H.update_body()
|
|
else
|
|
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
|
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
|
|
if(do_after(user, 20, target = H))
|
|
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
|
|
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
|
|
H.lip_style = "lipstick"
|
|
H.lip_color = colour
|
|
H.update_body()
|
|
else
|
|
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
|
|
|
//you can wipe off lipstick with paper!
|
|
/obj/item/paper/attack(mob/M, mob/user)
|
|
if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
|
if(!ismob(M))
|
|
return
|
|
|
|
if(ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
if(H == user)
|
|
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
|
H.lip_style = null
|
|
H.update_body()
|
|
else
|
|
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
|
|
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
|
|
if(do_after(user, 10, target = H))
|
|
user.visible_message("<span class='notice'>[user] wipes [H]'s lipstick off with \the [src].</span>", \
|
|
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
|
|
H.lip_style = null
|
|
H.update_body()
|
|
else
|
|
..()
|
|
|
|
/obj/item/razor
|
|
name = "electric razor"
|
|
desc = "The latest and greatest power razor born from the science of shaving."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "razor"
|
|
flags_1 = CONDUCT_1
|
|
w_class = WEIGHT_CLASS_TINY
|
|
|
|
/obj/item/razor/suicide_act(mob/living/carbon/user)
|
|
user.visible_message("<span class='suicide'>[user] begins shaving [user.p_them()]self without the razor guard! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
shave(user, BODY_ZONE_PRECISE_MOUTH)
|
|
shave(user, BODY_ZONE_HEAD)//doesnt need to be BODY_ZONE_HEAD specifically, but whatever
|
|
return BRUTELOSS
|
|
|
|
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = BODY_ZONE_PRECISE_MOUTH)
|
|
if(location == BODY_ZONE_PRECISE_MOUTH)
|
|
H.facial_hairstyle = "Shaved"
|
|
else
|
|
H.hairstyle = "Skinhead"
|
|
|
|
H.update_hair()
|
|
playsound(loc, 'sound/items/welder2.ogg', 20, TRUE)
|
|
|
|
|
|
/obj/item/razor/attack(mob/M, mob/living/user)
|
|
if(ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
var/location = user.zone_selected
|
|
if((location in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_HEAD)) && !H.get_bodypart(BODY_ZONE_HEAD))
|
|
to_chat(user, "<span class='warning'>[H] doesn't have a head!</span>")
|
|
return
|
|
if(location == BODY_ZONE_PRECISE_MOUTH)
|
|
if(!user.combat_mode)
|
|
if(H.gender == MALE)
|
|
if (H == user)
|
|
to_chat(user, "<span class='warning'>You need a mirror to properly style your own facial hair!</span>")
|
|
return
|
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
|
return
|
|
var/new_style = input(user, "Select a facial hairstyle", "Grooming") as null|anything in GLOB.facial_hairstyles_list
|
|
if(!get_location_accessible(H, location))
|
|
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
|
return
|
|
user.visible_message("<span class='notice'>[user] tries to change [H]'s facial hairstyle using [src].</span>", "<span class='notice'>You try to change [H]'s facial hairstyle using [src].</span>")
|
|
if(new_style && do_after(user, 60, target = H))
|
|
user.visible_message("<span class='notice'>[user] successfully changes [H]'s facial hairstyle using [src].</span>", "<span class='notice'>You successfully change [H]'s facial hairstyle using [src].</span>")
|
|
H.facial_hairstyle = new_style
|
|
H.update_hair()
|
|
return
|
|
else
|
|
return
|
|
|
|
else
|
|
if(!(FACEHAIR in H.dna.species.species_traits))
|
|
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
|
return
|
|
if(!get_location_accessible(H, location))
|
|
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
|
return
|
|
if(H.facial_hairstyle == "Shaved")
|
|
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
|
return
|
|
|
|
if(H == user) //shaving yourself
|
|
user.visible_message("<span class='notice'>[user] starts to shave [user.p_their()] facial hair with [src].</span>", \
|
|
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
|
|
if(do_after(user, 50, target = H))
|
|
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] facial hair clean with [src].</span>", \
|
|
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
|
|
shave(H, location)
|
|
else
|
|
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
|
|
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
|
|
if(do_after(user, 50, target = H))
|
|
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
|
|
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
|
shave(H, location)
|
|
|
|
else if(location == BODY_ZONE_HEAD)
|
|
if(!user.combat_mode)
|
|
if (H == user)
|
|
to_chat(user, "<span class='warning'>You need a mirror to properly style your own hair!</span>")
|
|
return
|
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
|
return
|
|
var/new_style = input(user, "Select a hairstyle", "Grooming") as null|anything in GLOB.hairstyles_list
|
|
if(!get_location_accessible(H, location))
|
|
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
|
return
|
|
if(HAS_TRAIT(H, TRAIT_BALD))
|
|
to_chat(H, "<span class='warning'>[H] is just way too bald. Like, really really bald.</span>")
|
|
return
|
|
user.visible_message("<span class='notice'>[user] tries to change [H]'s hairstyle using [src].</span>", "<span class='notice'>You try to change [H]'s hairstyle using [src].</span>")
|
|
if(new_style && do_after(user, 60, target = H))
|
|
user.visible_message("<span class='notice'>[user] successfully changes [H]'s hairstyle using [src].</span>", "<span class='notice'>You successfully change [H]'s hairstyle using [src].</span>")
|
|
H.hairstyle = new_style
|
|
H.update_hair()
|
|
return
|
|
|
|
else
|
|
if(!(HAIR in H.dna.species.species_traits))
|
|
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
|
return
|
|
if(!get_location_accessible(H, location))
|
|
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
|
return
|
|
if(H.hairstyle == "Bald" || H.hairstyle == "Balding Hair" || H.hairstyle == "Skinhead")
|
|
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
|
return
|
|
|
|
if(H == user) //shaving yourself
|
|
user.visible_message("<span class='notice'>[user] starts to shave [user.p_their()] head with [src].</span>", \
|
|
"<span class='notice'>You start to shave your head with [src]...</span>")
|
|
if(do_after(user, 5, target = H))
|
|
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] head with [src].</span>", \
|
|
"<span class='notice'>You finish shaving with [src].</span>")
|
|
shave(H, location)
|
|
else
|
|
var/turf/H_loc = H.loc
|
|
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
|
|
"<span class='notice'>You start shaving [H]'s head...</span>")
|
|
if(do_after(user, 50, target = H))
|
|
if(H_loc == H.loc)
|
|
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
|
|
"<span class='notice'>You shave [H]'s head bald.</span>")
|
|
shave(H, location)
|
|
else
|
|
..()
|
|
else
|
|
..()
|