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

TWEAK: Merc kits and some fixes #1798

Merged
merged 20 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ var/global/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, // allows us to spawn instances,
/datum/admins/proc/spawn_artifact,
/client/proc/spawn_chemdisp_cartridge,
// [SIERRA-ADD] - CLIENT_VERBS - ,
/client/proc/respawn_as_self,
// [/SIERRA-ADD] - CLIENT_VERBS ,
/datum/admins/proc/mass_debug_closet_icons
)
var/global/list/admin_verbs_server = list(
Expand Down
17 changes: 17 additions & 0 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_l_hand(0)
else
update_inv_r_hand(0)
// [SIERRA-ADD] - SSINPUT
SuhEugene marked this conversation as resolved.
Show resolved Hide resolved
// Try put it in their toolbelt
if(istype(src.belt, /obj/item/storage))
var/obj/item/storage/belt = src.belt
if(belt.can_be_inserted(I, null, 1) && belt.handle_item_insertion(I))
return
// Try put it in their backpack
if(istype(src.back, /obj/item/storage))
var/obj/item/storage/backpack = src.back
if(backpack.can_be_inserted(I, null, 1) && backpack.handle_item_insertion(I))
return

// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/storage/S in src.contents)
if(S.can_be_inserted(I, null, 1) && S.handle_item_insertion(I))
return
// [/SIERRA-ADD]
else
to_chat(H, SPAN_WARNING("You are unable to equip that."))

Expand Down
Binary file added maps/sierra/icons/obj/target.dmi
Binary file not shown.
Binary file modified maps/sierra/icons/turf/decals.dmi
Binary file not shown.
21 changes: 21 additions & 0 deletions maps/sierra/items/modular_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,24 @@
/obj/item/modular_computer/pda/wrist/lila/black
icon_state = "wrist-lila-black"
icon_state_unpowered = "wrist-lila-black"

// Laptop icon override

/obj/item/modular_computer/laptop
icon = 'maps/sierra/icons/obj/modular_laptop.dmi'

/obj/item/modular_computer/laptop/verb/rotatelaptop()
set name = "Rotate laptop"
set category = "Object"
set src in view(1)

if(usr.stat == DEAD)
if(!round_is_spooky())
to_chat(src, "<span class='warning'>The veil is not thin enough for you to do that.</span>")
return

src.set_dir(turn(src.dir, -90))

/obj/item/modular_computer/laptop/update_verbs()
..()
verbs |= /obj/item/modular_computer/laptop/verb/rotatelaptop
LordNest marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion maps/sierra/job/jobs_command.dm
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@

minimum_character_age = list(SPECIES_HUMAN = 30)
ideal_character_age = 40
outfit_type = /singleton/hierarchy/outfit/job/sierra/crew/research/iaa
outfit_type = /singleton/hierarchy/outfit/job/sierra/crew/command/iaa
allowed_branches = list(
/datum/mil_branch/employee
)
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/job/outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Keeping them simple for now, just spawning with basic EC uniforms, and pretty mu
..()
BACKPACK_OVERRIDE_SECURITY

/singleton/hierarchy/outfit/job/sierra/crew/research/iaa
/singleton/hierarchy/outfit/job/sierra/crew/command/iaa
name = OUTFIT_JOB_NAME("Internal Affairs Agent - Sierra")
l_ear = /obj/item/device/radio/headset/ia
uniform = /obj/item/clothing/under/rank/internalaffairs/plain/nt
Expand Down
8 changes: 8 additions & 0 deletions maps/sierra/structures/closets/_closets_appearances.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@
"atmos" = COLOR_COMMAND_BLUE
)

/singleton/closet_appearance/secure_closet/sierra/engineering/infotech
color = COLOR_GUNMETAL
extra_decals = list(
"stripe_vertical_mid_partial" = COLOR_PALE_ORANGE,
"stripe_vertical_right_partial" = COLOR_PALE_ORANGE,
"eng_narrow" = COLOR_PALE_ORANGE
)

/singleton/closet_appearance/secure_closet/sierra/engineering/ce
color = COLOR_OFF_WHITE
extra_decals = list(
Expand Down
21 changes: 21 additions & 0 deletions maps/sierra/structures/closets/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,24 @@
/obj/item/taperoll/atmos,
/obj/item/device/scanner/gas
)

/obj/structure/closet/secure_closet/infotech_sierra
name = "information technician locker"
req_access = list(access_network_admin)
closet_appearance = /singleton/closet_appearance/secure_closet/sierra/engineering/infotech

/obj/structure/closet/secure_closet/infotech_sierra/WillContain()
return list(
/obj/item/storage/box/PDAs,
/obj/item/modular_computer/laptop/preset/custom_loadout/standard,
/obj/item/modular_computer/tablet/preset/custom_loadout/standard,
/obj/item/clothing/glasses/hud/it,
/obj/item/device/multitool,
/obj/item/clothing/gloves/insulated,
/obj/item/device/flashlight/upgraded,
/obj/item/storage/belt/utility/full,
/obj/item/clothing/head/beret/engineering,
/obj/item/device/radio/headset/headset_eng,
/obj/item/device/radio/headset/headset_eng/alt,
/obj/item/stack/cable_coil = 2
)
143 changes: 143 additions & 0 deletions maps/sierra/structures/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,146 @@
new /obj/item/book/manual/nt_tc(src)
new /obj/item/book/manual/military_law(src)
update_icon()

// Targets, the things that actually get shot!
/obj/item/target
name = "shooting target"
desc = "A shooting target."
icon = 'maps/sierra/icons/obj/target.dmi'
icon_state = "target_h"
density = FALSE
var/hp = 1800
var/icon/virtualIcon
var/list/bulletholes = list()

/obj/item/target/use_tool(obj/item/tool, mob/living/user, list/click_params)
if (isWelder(tool))
var/obj/item/weldingtool/welder = tool
if (welder.remove_fuel(0, user))
ClearOverlays()
bulletholes.Cut()
hp = initial(hp)
user.visible_message(
SPAN_NOTICE("[user] slices off uneven chunks of aluminium and scorch marks from [src]."),
SPAN_NOTICE("You slice off uneven chunks of aluminium and scorch marks from [src]."),
SPAN_NOTICE("You hear welding."),
)
return TRUE
return ..()

/obj/item/target/syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?

/obj/item/target/alien
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda

#define PROJECTILE_TYPE_SCORCH 1
#define PROJECTILE_TYPE_BULLET 2
#define TARGET_RANDOM_OFFSET pick(0, 0, 0, 0, 0, -1, 1)

/obj/item/target/bullet_act(obj/item/projectile/projectile)
var/p_x = projectile.p_x + TARGET_RANDOM_OFFSET
var/p_y = projectile.p_y + TARGET_RANDOM_OFFSET

var/projectile_type = PROJECTILE_TYPE_SCORCH
if (istype(/obj/item/projectile/bullet, projectile))
projectile_type = PROJECTILE_TYPE_BULLET

virtualIcon = new(icon, icon_state)

if (isnull(virtualIcon.GetPixel(p_x, p_y)))
return PROJECTILE_CONTINUE // The projectile goes through the target!

hp -= projectile.damage
if (hp <= 0)
visible_message(SPAN_WARNING("\The [src] breaks into tiny pieces and collapses!"))
qdel(src)
return FALSE // The projectile stops

// Create a temporary object to represent the damage
var/obj/bmark = new
bmark.pixel_x = p_x
bmark.pixel_y = p_y
bmark.icon = 'icons/effects/effects.dmi'
bmark.layer = ABOVE_OBJ_LAYER

// Set bmark icon_state
if (projectile_type == PROJECTILE_TYPE_SCORCH)
// Energy weapons are hot. they scorch!

// Offset correction
bmark.pixel_x--
bmark.pixel_y--

if (projectile.damage >= 20 || istype(projectile, /obj/item/projectile/beam/practice))
bmark.icon_state = "scorch"
bmark.set_dir(pick(NORTH, SOUTH, EAST, WEST)) // Random scorch design
else
bmark.icon_state = "light_scorch"
else
// Bullets are hard. They make dents!
bmark.icon_state = "dent"

// Create bulletholes
if (projectile.damage >= 25) // Seriously, we commonly won't achive more than 35 holes. Because this things are beyond window.

// Bullets make holes more commonly
if (projectile_type == PROJECTILE_TYPE_BULLET && prob(projectile.damage + 30))
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y)

// Lasers make holes less commonly
if (projectile_type == PROJECTILE_TYPE_SCORCH && prob(projectile.damage - 10))
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y)

// Draw bullet holes
for(var/datum/bullethole/bhole in bulletholes)
virtualIcon.DrawBox(null, bhole.b1x1, bhole.b1y, bhole.b1x2, bhole.b1y) // Horizontal line, left to right
virtualIcon.DrawBox(null, bhole.b2x, bhole.b2y1, bhole.b2x, bhole.b2y2) // Vertical line, top to bottom

AddOverlays(bmark) // Add the decal
icon = virtualIcon // Apply bulletholes over decals

return FALSE // The projectile stops

#undef TARGET_RANDOM_OFFSET
#undef PROJECTILE_TYPE_BULLET
#undef PROJECTILE_TYPE_SCORCH

#define BULLETHOLE_RANDOM_OFFSET pick(1, 1, 1, 1, 2, 2, 3, 3, 4)

// Small memory holder entity for transparent bullet holes
/datum/bullethole
// First box
var/b1x1 = 0
var/b1x2 = 0
var/b1y = 0

// Second box
var/b2x = 0
var/b2y1 = 0
var/b2y2 = 0

/datum/bullethole/New(obj/item/target/owner, pixel_x = 0, pixel_y = 0)
if (!owner) return

// Randomize the first box
b1x1 = pixel_x - BULLETHOLE_RANDOM_OFFSET
b1x2 = pixel_x + BULLETHOLE_RANDOM_OFFSET
b1y = pixel_y
if (prob(35))
b1y += rand(-4, 4)

// Randomize the second box
b2x = pixel_x
if (prob(35))
b2x += rand(-4, 4)
b2y1 = pixel_y + BULLETHOLE_RANDOM_OFFSET
b2y2 = pixel_y - BULLETHOLE_RANDOM_OFFSET

owner.bulletholes += src

#undef BULLETHOLE_RANDOM_OFFSET
51 changes: 40 additions & 11 deletions maps/sierra/z1-z5_sierra.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -24513,6 +24513,15 @@
},
/turf/simulated/floor/tiled/techfloor/grid,
/area/maintenance/fourthdeck/aft)
"dDg" = (
/obj/floor_decal/industrial/warning{
dir = 5
},
/obj/item/target/alien,
/turf/simulated/floor/reinforced{
map_airless = 1
},
/area/space)
"dDh" = (
/turf/simulated/wall/prepainted,
/area/vacant/utility)
Expand Down Expand Up @@ -73498,6 +73507,11 @@
/obj/floor_decal/corner/darkblue/bordercorner2{
dir = 1
},
/obj/machinery/light_switch{
dir = 4;
pixel_x = -23;
pixel_y = 5
},
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/heads/office/iaa/high_sec)
"kWB" = (
Expand Down Expand Up @@ -73537,6 +73551,12 @@
},
/turf/simulated/floor/plating,
/area/shield/thirddeck)
"kXa" = (
/obj/item/target,
/turf/simulated/floor/reinforced{
map_airless = 1
},
/area/space)
"kXd" = (
/obj/structure/cable/green{
d1 = 4;
Expand Down Expand Up @@ -76062,6 +76082,11 @@
/obj/floor_decal/corner/darkblue/border,
/obj/floor_decal/borderfloorblack/corner2,
/obj/floor_decal/corner/darkblue/bordercorner2,
/obj/machinery/light_switch{
dir = 1;
pixel_x = -9;
pixel_y = -21
},
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/heads/office/iaa/high_sec)
"lrH" = (
Expand Down Expand Up @@ -76592,18 +76617,11 @@
/turf/simulated/floor/plating,
/area/medical/virology/atmos)
"lvu" = (
/obj/structure/closet/toolcloset,
/obj/item/storage/belt,
/obj/item/stack/cable_coil{
pixel_x = 3;
pixel_y = -7
},
/obj/item/device/multitool,
/obj/structure/extinguisher_cabinet{
pixel_x = 24;
dir = 8
},
/obj/item/clothing/glasses/hud/it,
/obj/structure/closet/secure_closet/infotech_sierra,
/turf/simulated/floor/tiled/techfloor/grid,
/area/tcommsat/computer)
"lvv" = (
Expand Down Expand Up @@ -79466,6 +79484,11 @@
/obj/floor_decal/corner/darkblue/bordercorner2{
dir = 5
},
/obj/machinery/light_switch{
pixel_x = 24;
dir = 8;
pixel_y = -5
},
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/heads/office/iaa/high_sec)
"lPF" = (
Expand Down Expand Up @@ -123027,6 +123050,12 @@
/obj/floor_decal/industrial/hatch/yellow,
/turf/simulated/floor/tiled/techfloor/grid,
/area/maintenance/fourthdeck/aft)
"stv" = (
/obj/item/target/syndicate,
/turf/simulated/floor/reinforced{
map_airless = 1
},
/area/space)
"stw" = (
/turf/simulated/wall/r_wall/hull,
/area/crew_quarters/garden_room)
Expand Down Expand Up @@ -290968,7 +290997,7 @@ rtT
rtT
rtT
uYw
uYw
stv
qPH
rox
sqc
Expand Down Expand Up @@ -291171,7 +291200,7 @@ rpE
qMW
uYw
uYw
uYw
kXa
aif
aAp
rsp
Expand Down Expand Up @@ -291371,7 +291400,7 @@ aTh
tXe
tXe
vDB
lQM
dDg
uYw
pJv
bYb
Expand Down
Loading