Skip to content

Commit

Permalink
Eyepatch Flopping + Double Eyepatch (#2362)
Browse files Browse the repository at this point in the history
## About The Pull Request

You can now alt+click any eyepatch (normal, thermal, sechud) to switch
the side that it covers. Examine tells you which side it currently
covers.

You can also add another eyepatch to an eyepatch (only normal because I
don't want to make special ones for the other two types when the first
will probably see the light of day once) to make a DOUBLE EYEPATCH, aka
a blindfold. Interacting with the blindfold in hand gives you the two
eyepatches back.

## Why It's Good For The Game

Switching eyepatch to decide which side you wear it on is just... good,
because character and like, stuff.

Double eyepatch is a full-on meme that makes me giggle a LITTLE but I'm
fine with it not existing.

## Changelog

:cl:
add: Adds the double eyepatch, a blindfold made by adding a normal
eyepatch to another
tweak: Eyepatches can now swap sides with ALT+CLICK
/:cl:
  • Loading branch information
Skrem7 authored Sep 19, 2023
1 parent 4f5845a commit 28bff59
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
59 changes: 55 additions & 4 deletions code/modules/clothing/glasses/_glasses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,31 @@
/obj/item/clothing/glasses/eyepatch
name = "eyepatch"
desc = "Yarr."
icon_state = "eyepatch"
item_state = "eyepatch"
icon_state = "eyepatch-0"
item_state = "eyepatch-0"
var/flipped = FALSE

/obj/item/clothing/glasses/eyepatch/AltClick(mob/user)
. = ..()
flipped = !flipped
to_chat(user, "<span class='notice'>You shift the eyepatch to cover the [flipped == 0 ? "right" : "left"] eye.</span>")
icon_state = "eyepatch-[flipped]"
item_state = "eyepatch-[flipped]"
update_appearance()

/obj/item/clothing/glasses/eyepatch/examine(mob/user)
. = ..()
. += "It is currently aligned to the [flipped == 0 ? "right" : "left"] side."

/obj/item/clothing/glasses/eyepatch/attackby(obj/item/I, mob/user, params)
. = ..()
if(istype(I, /obj/item/clothing/glasses/eyepatch))
var/obj/item/clothing/glasses/eyepatch/old_patch = I
var/obj/item/clothing/glasses/blindfold/eyepatch/double_patch = new/obj/item/clothing/glasses/blindfold/eyepatch
double_patch.forceMove(user.drop_location())
to_chat(user, "<span class='notice'>You combine the eyepatches with a knot.</span>")
old_patch.Destroy()
Destroy()

/obj/item/clothing/glasses/monocle
name = "monocle"
Expand Down Expand Up @@ -348,6 +371,21 @@
M.color = "#[H.eye_color]"
. += M

/obj/item/clothing/glasses/blindfold/eyepatch
name = "double eyepatch"
desc = "For those pirates who've been at it a while. May interfere with navigating ability."
icon_state = "eyepatchd"
item_state = "eyepatchd"

/obj/item/clothing/glasses/blindfold/eyepatch/attack_self(mob/user)
. = ..()
var/obj/item/clothing/glasses/eyepatch/patch_one = new/obj/item/clothing/glasses/eyepatch
var/obj/item/clothing/glasses/eyepatch/patch_two = new/obj/item/clothing/glasses/eyepatch
patch_one.forceMove(user.drop_location())
patch_two.forceMove(user.drop_location())
to_chat(user, "<span class='notice'>You undo the knot on the eyepatches.</span>")
Destroy()

/obj/item/clothing/glasses/sunglasses/big
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks flashes."
icon_state = "bigsunglasses"
Expand Down Expand Up @@ -411,8 +449,21 @@
/obj/item/clothing/glasses/thermal/eyepatch
name = "optical thermal eyepatch"
desc = "An eyepatch with built-in thermal optics."
icon_state = "eyepatch"
item_state = "eyepatch"
icon_state = "eyepatch-0"
item_state = "eyepatch-0"
var/flipped = FALSE

/obj/item/clothing/glasses/thermal/eyepatch/AltClick(mob/user)
. = ..()
flipped = !flipped
to_chat(user, "<span class='notice'>You shift the eyepatch to cover the [flipped == 0 ? "right" : "left"] eye.</span>")
icon_state = "eyepatch-[flipped]"
item_state = "eyepatch-[flipped]"
update_appearance()

/obj/item/clothing/glasses/thermal/eyepatch/examine(mob/user)
. = ..()
. += "It is currently aligned to the [flipped == 0 ? "right" : "left"] side."

/obj/item/clothing/glasses/cold
name = "cold goggles"
Expand Down
15 changes: 14 additions & 1 deletion code/modules/clothing/glasses/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,20 @@
/obj/item/clothing/glasses/hud/security/sunglasses/eyepatch
name = "eyepatch HUD"
desc = "A heads-up display that connects directly to the optical nerve of the user, replacing the need for that useless eyeball."
icon_state = "hudpatch"
icon_state = "hudpatch-0"
var/flipped = FALSE

/obj/item/clothing/glasses/hud/security/sunglasses/eyepatch/AltClick(mob/user)
. = ..()
flipped = !flipped
to_chat(user, "<span class='notice'>You shift the hudpatch to cover the [flipped == 0 ? "right" : "left"] eye.</span>")
icon_state = "hudpatch-[flipped]"
item_state = "hudpatch-[flipped]"
update_appearance()

/obj/item/clothing/glasses/hud/security/sunglasses/eyepatch/examine(mob/user)
. = ..()
. += "It is currently aligned to the [flipped == 0 ? "right" : "left"] side."

/obj/item/clothing/glasses/hud/security/sunglasses
name = "security HUDSunglasses"
Expand Down
Binary file modified icons/mob/clothing/eyes.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/glasses.dmi
Binary file not shown.

0 comments on commit 28bff59

Please sign in to comment.