Skip to content

Commit

Permalink
Cool Things (#482)
Browse files Browse the repository at this point in the history
* incineryy

* first

* powerFist

* i am stupid

* Update code/modules/paperwork/paperbin.dm

Co-authored-by: EgorDinamit <[email protected]>

* hotfix

* microlaser to scanner port

* hotfix

---------

Co-authored-by: EgorDinamit <[email protected]>
  • Loading branch information
casualspacestation14enjoyer and EgorDinamit authored Oct 28, 2023
1 parent 196c272 commit 87bde44
Show file tree
Hide file tree
Showing 13 changed files with 290 additions and 14 deletions.
2 changes: 2 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@
#include "code\game\objects\items\devices\inducer.dm"
#include "code\game\objects\items\devices\lightreplacer.dm"
#include "code\game\objects\items\devices\megaphone.dm"
#include "code\game\objects\items\devices\microlaser_radioactive.dm"
#include "code\game\objects\items\devices\modkit.dm"
#include "code\game\objects\items\devices\multitool.dm"
#include "code\game\objects\items\devices\oxycandle.dm"
Expand Down Expand Up @@ -1052,6 +1053,7 @@
#include "code\game\objects\items\weapons\nuclear_cylinder.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\policetape.dm"
#include "code\game\objects\items\weapons\powerfist.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RPD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
Expand Down
8 changes: 7 additions & 1 deletion code/datums/uplink/highly_visible_and_dangerous_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
item_cost = 32
path = /obj/item/melee/energy/sword

/datum/uplink_item/item/visible_weapons/powerfist
name = "Power-Fist"
desc = "A gas-powered piston-based power-fist, this model is not usually seen and quite outdated. But can still pack a punch."
item_cost = 50
path = /obj/item/melee/powerfist

/datum/uplink_item/item/visible_weapons/silenced
name = "Small Silenced Pistol"
desc = "A kit with a pocket-sized holdout pistol, silencer, and an extra magazine. \
Expand Down Expand Up @@ -200,4 +206,4 @@
desc = "For arming your comrades on the cheap!"
item_cost = 12
path = /obj/item/gun/projectile/heavysniper/boltaction
antag_roles = list(MODE_REVOLUTIONARY)
antag_roles = list(MODE_REVOLUTIONARY)
6 changes: 6 additions & 0 deletions code/datums/uplink/stealthy_and_inconspicuous_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@
desc = "A syringe gun disguised as an electronic cigarette with 4 darts included in the box. Chemicals not included!"
item_cost = 10
path = /obj/item/storage/box/syndie_kit/syringegun

/datum/uplink_item/item/stealthy_weapons/radioactive_microlaser
name = "Radioactive Microlaser"
desc = "A powerful X-ray based device disguised as a regular handheld health analyzer. Use it on someone and they'll be ash in no time, comes with 3 modes. Runs on an internal bluespace battery, radiation suit not included."
item_cost = 25
path = /obj/item/device/scanner/health/radioactive_microlaser
46 changes: 46 additions & 0 deletions code/game/objects/items/devices/microlaser_radioactive.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/obj/item/device/scanner/health/radioactive_microlaser //a health scanner that will give you aids and radiation
origin_tech = list(TECH_MATERIAL = 2, TECH_ESOTERIC = 5)
var/rads = 100
var/cooldown //when it will be ready to dispense rads
var/delay = 4 SECONDS //how long we need to wait until we can dispense rads
var/microlaserLevel = 1

/obj/item/device/scanner/health/radioactive_microlaser/examine(mob/user, distance)
. = ..()
if(istraitor(user) || user.skill_check(SKILL_MEDICAL, SKILL_TRAINED) || user.skill_check(SKILL_DEVICES, SKILL_TRAINED))
to_chat(user, "It might seem like a normal health analyzer, but you noticed a few differences here and there.")
to_chat(user, "There's a dial on the side, it seems to be set to the number [microlaserLevel]. You can use <b>alt-click</b> to change the level.")

/obj/item/device/scanner/health/radioactive_microlaser/scan(atom/A, mob/user)
. = ..()
if(cooldown > world.time)
to_chat(user, SPAN_WARNING("<b>\The [src] is not yet done cooling down!</b>"))
return
if(isliving(A))
scan_data = medical_scan_action(A, user, src, mode)
playsound(src, 'sound/effects/fastbeep.ogg', 20)
SSradiation.radiate(A, rads)
cooldown = world.time + delay
return

/obj/item/device/scanner/health/radioactive_microlaser/AltClick(mob/user)
. = ..()
switch(microlaserLevel)
if(1)
microlaserLevel = 2
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2)
to_chat(user, SPAN_NOTICE("You set \the [src] to level 2."))
rads = 200
delay = 40 SECONDS
if(2)
microlaserLevel = 3
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2)
to_chat(user, SPAN_NOTICE("You set \the [src] to level 3."))
rads = 300
delay = 1 MINUTE
if(3)
microlaserLevel = 1
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2)
to_chat(user, SPAN_NOTICE("You set \the [src] back to level 1."))
rads = 100
delay = 20 SECONDS
84 changes: 84 additions & 0 deletions code/game/objects/items/weapons/powerfist.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
///Defines for the pressure strength of the fist
#define LOW_PRESSURE 1
#define MID_PRESSURE 2
#define HIGH_PRESSURE 3

/obj/item/melee/powerfist
name = "power-fist"
desc = "A metal gauntlet with a gas-powered piston ram ontop for that extra 'ompfh' in your punch."
icon = 'icons/obj/weapons/melee_physical.dmi'
icon_state = "powerfist"
item_state = "powerfist"
attack_verb = list("whacked", "power-fisted", "power-punched")
force = 10
throwforce = 10
throw_range = 7
w_class = ITEM_SIZE_LARGE //its a damn power fist, its big
var/fist_pressure_setting = LOW_PRESSURE
var/gas_per_fist = 20 //amount of shit to use on pawnch, scales with pressure setting
var/obj/item/tank/tank

/obj/item/melee/powerfist/proc/pressure_setting_to_text(fist_pressure_setting)
switch(fist_pressure_setting)
if(LOW_PRESSURE)
return "low"
if(MID_PRESSURE)
return "medium"
if(HIGH_PRESSURE)
return "high"
else
CRASH("Invalid pressure setting: [fist_pressure_setting]!")

/obj/item/melee/powerfist/examine(mob/user, distance)
. = ..()
if(distance <= 1)
if(tank)
to_chat(user, SPAN_NOTICE("[icon2html(tank, user)] It has \a <b>[tank]</b> mounted on it."))
to_chat(user, SPAN_NOTICE("It can be removed with a <b>screwdriver</b>."))
else
to_chat(user, "You'll need to get closer to see any more.")
return
to_chat(user, SPAN_NOTICE("Use a <b>wrench</b> to change the valve strength. Current strength is at <b>[pressure_setting_to_text(fist_pressure_setting)]</b> level."))


/obj/item/melee/powerfist/attackby(obj/item/W, mob/user)
. = ..()
if(istype(W, /obj/item/tank))
if(!user.unEquip(W, src)) //for some reason this allows it to actually move, hilarious
return
tank = W
W.forceMove(src)
to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
return

if(isScrewdriver(W))
if(tank)
tank.forceMove(get_turf(user))
user.put_in_hands(tank)
to_chat(user, SPAN_NOTICE("You detach \the [tank] from \the [src]."))
tank = null
else
to_chat(user, SPAN_WARNING("No tank present!"))
return

if(isWrench(W))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
fist_pressure_setting = fist_pressure_setting >= HIGH_PRESSURE ? LOW_PRESSURE : fist_pressure_setting + 1
to_chat(user, SPAN_NOTICE("Piston strength set to [pressure_setting_to_text(fist_pressure_setting)]!"))
return

/obj/item/melee/powerfist/attack(mob/living/M, mob/living/user, target_zone, animate)
. = ..()
if(!user.a_intent == I_HURT)
return
if(!tank)
to_chat(user, SPAN_WARNING("\The [src] doesn't have a tank!"))
return
var/affecting = user.get_organ_target()
if(tank.air_contents.total_moles >= gas_per_fist*fist_pressure_setting)
tank.air_contents.remove_volume(gas_per_fist*fist_pressure_setting)
M.apply_damage(force*2*fist_pressure_setting, BRUTE, affecting) //might be a little too op... Too bad!
return
else
src.visible_message(SPAN_WARNING("\The [src] lets out a dull hiss..."))
return
53 changes: 42 additions & 11 deletions code/modules/paperwork/paperbin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@
layer = BELOW_OBJ_LAYER
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
var/obj/item/pen/bin_pen
///Overlay of the pen on top of the bin.
var/mutable_appearance/pen_overlay

/obj/item/paper_bin/Initialize(mapload)
. = ..()
if(mapload)
var/obj/item/pen/pen = locate(/obj/item/pen) in loc //map making compatibility
if(pen && !bin_pen)
pen.forceMove(src)
bin_pen = pen
update_icon()

/obj/item/paper_bin/MouseDrop(mob/user as mob)
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (list_find(usr.contents, src) || in_range(src, usr))))))
Expand All @@ -26,12 +37,13 @@
to_chat(user, "<span class='notice'>You try to move your [temp.name], but cannot!</span>")
return

to_chat(user, "<span class='notice'>You pick up the [src].</span>")
to_chat(user, "<span class='notice'>You pick up \the [src].</span>")
user.put_in_hands(src)

return

/obj/item/paper_bin/attack_hand(mob/user as mob)
var/response = ""
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
Expand All @@ -40,13 +52,19 @@
if(temp && !temp.is_usable())
to_chat(user, "<span class='notice'>You try to move your [temp.name], but cannot!</span>")
return
var/response = ""
if(!papers.len > 0)
if(bin_pen)
var/obj/item/pen/pen = bin_pen
pen.add_fingerprint(user)
pen.forceMove(user.loc)
user.put_in_hands(pen)
bin_pen = null
update_icon()
else if(!papers.len > 0)
response = alert(user, "Do you take regular paper, or Carbon copy paper?", "Paper type request", "Regular", "Carbon-Copy", "Cancel")
if (response != "Regular" && response != "Carbon-Copy")
add_fingerprint(user)
return
if(amount >= 1)
if(amount >= 1 && !bin_pen)
amount--
if(amount==0)
update_icon()
Expand All @@ -56,19 +74,19 @@
P = papers[papers.len]
papers.Remove(P)
else
if(response == "Regular")
P = new /obj/item/paper
else if (response == "Carbon-Copy")
P = new /obj/item/paper/carbon
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of the [src].</span>")
if(!bin_pen)
if(response == "Regular")
P = new /obj/item/paper
else if (response == "Carbon-Copy")
P = new /obj/item/paper/carbon
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is empty!</span>")

add_fingerprint(user)
return


/obj/item/paper_bin/attackby(obj/item/i as obj, mob/user as mob)
if(istype(i, /obj/item/paper))
if(!user.unEquip(i, src))
Expand All @@ -77,6 +95,13 @@
papers.Add(i)
update_icon()
amount++
else if(istype(i, /obj/item/pen) && !bin_pen)
var/obj/item/pen/pen = i
if(!user.unEquip(pen, src))
return
to_chat(user, SPAN_NOTICE("You put [pen] in [src]."))
bin_pen = pen
update_icon()
else if(istype(i, /obj/item/paper_bundle))
to_chat(user, "<span class='notice'>You loosen \the [i] and add its papers into \the [src].</span>")
var/was_there_a_photo = 0
Expand All @@ -101,10 +126,16 @@
to_chat(user, "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>")
else
to_chat(user, "<span class='notice'>There are no papers in the bin.</span>")
if(bin_pen)
to_chat(user, "There is \a [bin_pen] in \the [src].")


/obj/item/paper_bin/on_update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"
if(bin_pen)
add_overlay(mutable_appearance(bin_pen.icon, bin_pen.icon_state))
else
cut_overlays()
4 changes: 2 additions & 2 deletions code/modules/paperwork/pen/pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
colour = "green"

/obj/item/pen/invisible
desc = "It's an invisble pen marker."
desc = "It's an invisible pen marker."
icon_state = "pen"
colour = "white"
color_description = "transluscent ink"
Expand All @@ -59,4 +59,4 @@
head.write_on(user, color_description)

/obj/item/pen/proc/toggle()
return
return
32 changes: 32 additions & 0 deletions code/modules/projectiles/ammunition/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
max_ammo = 5
multiple_sprites = 1

/obj/item/ammo_magazine/speedloader/clip/flame
ammo_type = /obj/item/ammo_casing/rifle/flame

/obj/item/ammo_magazine/shotholder
name = "shotgun slug holder"
desc = "A convenient pouch that holds 12 gauge shells."
Expand Down Expand Up @@ -101,6 +104,11 @@
matter = list(MATERIAL_STEEL = 1440, MATERIAL_GLASS = 2880)
marking_color = COLOR_MUZZLE_FLASH

/obj/item/ammo_magazine/shotholder/flame
name = "incendiary shell holder"
ammo_type = /obj/item/ammo_casing/shotgun/flame
marking_color = COLOR_YELLOW

/obj/item/ammo_magazine/shotholder/empty
name = "shotgun ammunition holder"
matter = list(MATERIAL_STEEL = 250)
Expand Down Expand Up @@ -172,6 +180,14 @@
labels = list("rubber")
ammo_type = /obj/item/ammo_casing/pistol/rubber

/obj/item/ammo_magazine/pistol/practice
labels = list("practice")
ammo_type = /obj/item/ammo_casing/pistol/practice

/obj/item/ammo_magazine/pistol/flame
labels = list("incendiary")
ammo_type = /obj/item/ammo_casing/pistol/flame

/obj/item/ammo_magazine/pistol/double
name = "doublestack pistol magazine"
icon_state = "pistol_mag"
Expand All @@ -186,6 +202,10 @@
labels = list("practice")
ammo_type = /obj/item/ammo_casing/pistol/practice

/obj/item/ammo_magazine/pistol/double/flame
labels = list("incendiary")
ammo_type = /obj/item/ammo_casing/pistol/flame

/obj/item/ammo_magazine/pistol/small
icon_state = "holdout"
matter = list(MATERIAL_STEEL = 480)
Expand Down Expand Up @@ -303,6 +323,9 @@
max_ammo = 30
multiple_sprites = 1

/obj/item/ammo_magazine/rifle/flame
ammo_type = /obj/item/ammo_casing/rifle/flame

/obj/item/ammo_magazine/mil_rifle
name = "assault rifle magazine"
icon_state = "bullup"
Expand All @@ -314,6 +337,9 @@
max_ammo = 20
multiple_sprites = 1

/obj/item/ammo_magazine/mil_rifle/flame
ammo_type = /obj/item/ammo_casing/rifle/military/flame

/obj/item/ammo_magazine/mil_rifle/empty
initial_ammo = 0

Expand Down Expand Up @@ -361,8 +387,14 @@
max_ammo = 30
multiple_sprites = 1

/obj/item/ammo_magazine/ak47/flame
ammo_type = /obj/item/ammo_casing/rifle/ak47/flame

/obj/item/ammo_magazine/ak47/extended
name = "AK47 extended magazine"
icon_state = "ak47-ext"
matter = list(MATERIAL_STEEL = 2400)
max_ammo = 50

/obj/item/ammo_magazine/ak47/extended/flame //the weapon of satan
ammo_type = /obj/item/ammo_casing/rifle/ak47/flame
Loading

0 comments on commit 87bde44

Please sign in to comment.