Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pocket Knife - Hephaestus Soul #20081

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions code/game/machinery/autolathe/designs/armaments.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ ABSTRACT_TYPE(/singleton/autolathe_recipe/armaments)
name = "mechanical trap"
path = /obj/item/trap
hack_only = TRUE

/singleton/autolathe_recipe/armaments/pocketgreen
name = "pocket knife, green"
path = /obj/item/material/knife/butterfly/switchblade/pocket_knife
hack_only = TRUE

/singleton/autolathe_recipe/armaments/pocketblue
name = "pocket knife, blue"
path = /obj/item/material/knife/butterfly/switchblade/pocket_knife/blue
hack_only = TRUE

/singleton/autolathe_recipe/armaments/pocketred
name = "pocket knife, red"
path = /obj/item/material/knife/butterfly/switchblade/pocket_knife/red
hack_only = TRUE
42 changes: 42 additions & 0 deletions code/game/objects/items/weapons/material/kitchen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,45 @@
user.Paralyse(2)
return
return ..()

/obj/item/material/kitchen/utensil/knife/pocketbutterknife
name = "pocket butter knife"
desc = "An SCC Security approved modification of the H30V4 pocket knife."
desc_extended = "The H30V4B was developed to answer the immediate issue posed by the SCC not allowing pocket knives aboard the SCCV Horizon. Featuring a circular, \
rounded tip and notching in place of serration, it gets the job done. The knife is an employee exclusive, issued to Hephaestus crew either by purchase, or at \
request for 5+ year veteran employees."
icon = 'icons/obj/weapons.dmi'
icon_state = "pocketbutter"
attack_verb = list("poked", "jabbed", "schmeared")
var/on = FALSE
courierbravo marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/material/kitchen/utensil/knife/pocketbutterknife/update_icon()
if(on)
icon_state = "[initial(icon_state)]-on"
else
icon_state = initial(icon_state)

/obj/item/material/kitchen/utensil/knife/pocketbutterknife/proc/activate(mob/user)
courierbravo marked this conversation as resolved.
Show resolved Hide resolved
on = !on
update_icon()
return 1

/obj/item/material/kitchen/utensil/knife/pocketbutterknife/AltClick(mob/user)
courierbravo marked this conversation as resolved.
Show resolved Hide resolved
activate(user)
if(on)
courierbravo marked this conversation as resolved.
Show resolved Hide resolved
to_chat(user, SPAN_NOTICE("You flip out \the [src]."))
playsound(user, 'sound/weapons/blade_open.ogg', 15, 1)
else
to_chat(user, SPAN_NOTICE("\The [src] can now be put away."))
playsound(user, 'sound/weapons/blade_close.ogg', 15, 1)
add_fingerprint(user)
courierbravo marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/material/kitchen/utensil/knife/pocketbutterknife/attack_self(mob/user)
courierbravo marked this conversation as resolved.
Show resolved Hide resolved
activate(user)
if(on)
to_chat(user, SPAN_NOTICE("You flip out \the [src]."))
playsound(user, 'sound/weapons/blade_open.ogg', 15, 1)
else
to_chat(user, SPAN_NOTICE("\The [src] can now be put away."))
playsound(user, 'sound/weapons/blade_close.ogg', 15, 1)
add_fingerprint(user)
20 changes: 20 additions & 0 deletions code/game/objects/items/weapons/material/knives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,23 @@
playsound(user, 'sound/weapons/blade_close.ogg', 15, 1)
update_force()
add_fingerprint(user)

/obj/item/material/knife/butterfly/switchblade/pocket_knife
name = "pocket knife"
desc = "A traditional pocket knife, perfect for opening letters, cutting up boxes, whittling wood, or anything else. The handle comes in 24 different colors, or one of hundreds \
of novelty, licensed, or commemorative designs."
desc_extended = "The H30V4 pocket knife, produced by Hephaestus Industries, is credited as the single most produced pocket knife in human history. \
With a tanto style blade, high quality steel, and a surprisingly sturdy textured plastic handle, its a true every person tool. The pocket knife is often \
given as a gift to Hephaestus employees who have been with the company for 5 years, or who have invested into the company. Titanius Aeson himself often \
flaunts his own pocket knife when emphasizing the benefits of employment or thanking long-time Hephaestus employees. The plastic handle is known to become quite \
brittle after several years of use, however easy disassembly and replacement parts available on Hephaestus' webstore (and a large third party aftermarket of dubious legality) \
means worn out components can be readily replaced"
icon = 'icons/obj/weapons.dmi'
icon_state = "pocketgreen"
applies_material_colour = FALSE

/obj/item/material/knife/butterfly/switchblade/pocket_knife/blue
icon_state = "pocketblue"

/obj/item/material/knife/butterfly/switchblade/pocket_knife/red
icon_state = "pocketred"
Comment on lines +204 to +208
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't manually create colored variants, use recolorable code (see : screwdrivers)

5 changes: 4 additions & 1 deletion code/game/objects/random/loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@
/obj/item/clothing/mask/gas/voice = 1,
/obj/item/clothing/gloves/brassknuckles = 2,
/obj/item/reagent_containers/inhaler/xuxigas = 1,
/obj/item/toy/balloon/syndicate = 4
/obj/item/toy/balloon/syndicate = 4,
/obj/item/material/knife/butterfly/switchblade/pocket_knife = 2.5,
/obj/item/material/knife/butterfly/switchblade/pocket_knife/blue = 2.5,
/obj/item/material/knife/butterfly/switchblade/pocket_knife/red = 2.5
Comment on lines +359 to +362
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spawn chance should be much lower and should be shared with normal butterfly knives.

Not only this has a higher chance of rolling, it's also rolling three times

)

/obj/random/coin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,12 @@
slot = slot_tie
faction = "Hephaestus Industries"

/datum/gear/faction/pocketbutterknife
display_name = "hephaestus pocket butter knife"
description = "An SCC Security approved modification of the H30V4 pocket knife."
path = /obj/item/material/kitchen/utensil/knife/pocketbutterknife
faction = "Hephaestus Industries"

//NanoTrasen
/datum/gear/faction/nanotrasen_labcoat
display_name = "nanotrasen coat selection"
Expand Down
59 changes: 59 additions & 0 deletions html/changelogs/courierbravo-pocketknives.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################

# Your name.
author: CourierBravo

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Added the H30V4 and H30V4B pocket knives, made by Hephaestus. The H30V4B can be taken by Hephaestus employees in the faction section of the loadout menu."
- imageadd: "Added sprites for the H30V4 and H30V4B"
Binary file modified icons/obj/weapons.dmi
Binary file not shown.
Loading