Skip to content

Commit

Permalink
Merge pull request #98 from NebulaSS13/dev
Browse files Browse the repository at this point in the history
Updating from Neb dev.
  • Loading branch information
MistakeNot4892 authored Oct 18, 2024
2 parents bb7e202 + 329a54a commit ea204d8
Show file tree
Hide file tree
Showing 114 changed files with 503 additions and 300 deletions.
6 changes: 6 additions & 0 deletions code/__defines/interactions.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/// This interaction requires the user to be adjacent to the target.
#define INTERACTION_NEEDS_ADJACENCY BITFLAG(0)
/// This interaction requires the user to pass a physical interaction check.
#define INTERACTION_NEEDS_PHYSICAL_INTERACTION BITFLAG(1)
/// This interaction requires the target to be on a turf
#define INTERACTION_NEEDS_TURF BITFLAG(2)
/// This interaction requires the target to be in the user's inventory.
#define INTERACTION_NEEDS_INVENTORY BITFLAG(3)
/// This interaction will always prompt for a selection from the user, even if it is the only available interaction.
#define INTERACTION_NEVER_AUTOMATIC BITFLAG(4)
39 changes: 20 additions & 19 deletions code/__defines/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@

#define CANDLE_LUM 3 // For how bright candles are.

#define ACCESSORY_SLOT_UTILITY "Utility"
#define ACCESSORY_SLOT_HOLSTER "Holster"
#define ACCESSORY_SLOT_ARMBAND "Armband"
#define ACCESSORY_SLOT_RANK "Rank"
#define ACCESSORY_SLOT_DEPT "Department"
#define ACCESSORY_SLOT_DECOR "Decor"
#define ACCESSORY_SLOT_NECK "Neck"
#define ACCESSORY_SLOT_MEDAL "Medal"
#define ACCESSORY_SLOT_INSIGNIA "Insignia"
#define ACCESSORY_SLOT_ARMOR_C "Chest armor"
#define ACCESSORY_SLOT_ARMOR_A "Arm armor"
#define ACCESSORY_SLOT_ARMOR_L "Leg armor"
#define ACCESSORY_SLOT_ARMOR_S "Armor storage"
#define ACCESSORY_SLOT_ARMOR_M "Misc armor"
#define ACCESSORY_SLOT_HELM_C "Helmet cover"
#define ACCESSORY_SLOT_OVER "Over"
#define ACCESSORY_SLOT_SENSORS "Suit Sensors"
#define ACCESSORY_SLOT_GREAVES "Greaves"
#define ACCESSORY_SLOT_GAUNTLETS "Gauntlets"
#define ACCESSORY_SLOT_UTILITY "Utility"
#define ACCESSORY_SLOT_HOLSTER "Holster"
#define ACCESSORY_SLOT_ARMBAND "Armband"
#define ACCESSORY_SLOT_RANK "Rank"
#define ACCESSORY_SLOT_DEPT "Department"
#define ACCESSORY_SLOT_DECOR "Decor"
#define ACCESSORY_SLOT_NECK "Neck"
#define ACCESSORY_SLOT_MEDAL "Medal"
#define ACCESSORY_SLOT_INSIGNIA "Insignia"
#define ACCESSORY_SLOT_ARMOR_C "Chest armor"
#define ACCESSORY_SLOT_ARMOR_A "Arm armor"
#define ACCESSORY_SLOT_ARMOR_L "Leg armor"
#define ACCESSORY_SLOT_ARMOR_S "Armor storage"
#define ACCESSORY_SLOT_ARMOR_M "Misc armor"
#define ACCESSORY_SLOT_HELM_C "Helmet cover"
#define ACCESSORY_SLOT_OVER_HELMET "Hat"
#define ACCESSORY_SLOT_OVER "Over"
#define ACCESSORY_SLOT_SENSORS "Suit Sensors"
#define ACCESSORY_SLOT_GREAVES "Greaves"
#define ACCESSORY_SLOT_GAUNTLETS "Gauntlets"

// Accessory will be shown as part of the name of the item when examined.
#define ACCESSORY_VISIBILITY_ENSEMBLE 0
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystems/processing/nano.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ PROCESSING_SUBSYSTEM_DEF(nano)
*
* @return int The number of uis updated
*/
/datum/controller/subsystem/processing/nano/proc/update_user_uis(mob/user, src_object, ui_key)
/datum/controller/subsystem/processing/nano/proc/update_user_uis(mob/user, src_object, ui_key = null, force_open = FALSE)
. = 0
if (!length(user.open_uis))
return // has no open uis

for (var/datum/nanoui/ui in user.open_uis)
if ((isnull(src_object) || ui.src_object == src_object) && (isnull(ui_key) || ui.ui_key == ui_key))
ui.try_update(1)
ui.try_update(update = TRUE, force_open = force_open)
.++

/**
Expand Down
7 changes: 7 additions & 0 deletions code/datums/ai/_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,10 @@

/datum/mob_controller/proc/is_friend(mob/friend)
. = istype(friend) && LAZYLEN(_friends) && (weakref(friend) in _friends)

// By default, randomize the target area a bit to make armor/combat
// a bit more dynamic (and avoid constant organ damage to the chest)
/datum/mob_controller/proc/update_target_zone()
if(body)
return body.set_target_zone(ran_zone())
return FALSE
12 changes: 7 additions & 5 deletions code/datums/extensions/storage/subtypes_box.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
max_storage_space = 5

/datum/storage/box/parts_pack
max_storage_space = BASE_STORAGE_CAPACITY(ITEM_SIZE_SMALL)
max_storage_space = BASE_STORAGE_CAPACITY(ITEM_SIZE_NORMAL)

/datum/storage/box/donut
max_storage_space = ITEM_SIZE_SMALL * 6
Expand Down Expand Up @@ -108,12 +108,14 @@
max_w_class = ITEM_SIZE_TINY
max_storage_space = 6

/datum/storage/box/tapes
max_storage_space = 28

/datum/storage/box/candles
max_w_class = ITEM_SIZE_TINY
max_storage_space = 7
max_storage_space = DEFAULT_LARGEBOX_STORAGE

/datum/storage/box/candles/scented
max_storage_space = 5
max_storage_space = 10

/datum/storage/box/candles/incense
max_storage_space = 9
max_storage_space = 18
2 changes: 1 addition & 1 deletion code/datums/extensions/storage/subtypes_firstaid.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/storage/firstaid
max_w_class = ITEM_SIZE_SMALL
max_storage_space = DEFAULT_BOX_STORAGE
max_storage_space = DEFAULT_LARGEBOX_STORAGE
use_sound = 'sound/effects/storage/box.ogg'

/datum/storage/firstaid/surgery
Expand Down
13 changes: 10 additions & 3 deletions code/datums/inventory_slots/slots/slot_mask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@

/datum/inventory_slot/mask/get_examined_string(mob/owner, mob/user, distance, hideflags, decl/pronouns/pronouns)
if(_holding && !(hideflags & HIDEMASK))
if(user == owner)
return "You are wearing [_holding.get_examine_line()] on your face."
return "[pronouns.He] [pronouns.is] wearing [_holding.get_examine_line()] on [pronouns.his] face."
if(_holding.body_parts_covered & SLOT_FACE)
if(user == owner)
return "You are wearing [_holding.get_examine_line()] on your face."
else
return "[pronouns.He] [pronouns.is] wearing [_holding.get_examine_line()] on [pronouns.his] face."
else
if(user == owner)
return "You are wearing [_holding.get_examine_line()] around your neck."
else
return "[pronouns.He] [pronouns.is] wearing [_holding.get_examine_line()] around [pronouns.his] neck."
2 changes: 2 additions & 0 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ var/global/list/mob/living/forced_ambiance_list = new

/area/proc/throw_unbuckled_occupant(var/mob/M, var/maxrange, var/speed, var/direction)
if(isliving(M))
if(M.anchored) // So mechs don't get tossed around.
return
if(M.buckled)
to_chat(M, SPAN_WARNING("Sudden acceleration presses you into your chair!"))
shake_camera(M, 3, 1)
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
var/skill_points = 16 //The number of unassigned skill points the job comes with (on top of the minimum skills).
var/no_skill_buffs = FALSE //Whether skills can be buffed by age/species modifiers.
var/available_by_default = TRUE
/// If TRUE, 'Not available at roundstart.' won't be shown for this job if available_by_default is FALSE.
var/suppress_no_roundstart_warning = FALSE

var/list/possible_goals
var/min_goals = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
material = /decl/material/solid/metal/steel
matter = list(/decl/material/solid/fiberglass = MATTER_AMOUNT_REINFORCEMENT)
base_type = /obj/item/stock_parts/scanning_module
w_class = ITEM_SIZE_TINY

/obj/item/stock_parts/manipulator
name = "micro-manipulator"
Expand All @@ -17,7 +16,6 @@
origin_tech = @'{"materials":1,"programming":1}'
material = /decl/material/solid/metal/steel
base_type = /obj/item/stock_parts/manipulator
w_class = ITEM_SIZE_TINY

/obj/item/stock_parts/micro_laser
name = "micro-laser"
Expand All @@ -27,7 +25,6 @@
material = /decl/material/solid/metal/steel
matter = list(/decl/material/solid/fiberglass = MATTER_AMOUNT_REINFORCEMENT)
base_type = /obj/item/stock_parts/micro_laser
w_class = ITEM_SIZE_TINY

/obj/item/stock_parts/matter_bin
name = "matter bin"
Expand All @@ -44,10 +41,9 @@
origin_tech = @'{"powerstorage":1}'
material = /decl/material/solid/metal/steel
matter = list(/decl/material/solid/fiberglass = MATTER_AMOUNT_REINFORCEMENT)
base_type = /obj/item/stock_parts/capacitor
var/charge = 0
var/max_charge = 1000
base_type = /obj/item/stock_parts/capacitor
w_class = ITEM_SIZE_TINY

/obj/item/stock_parts/capacitor/Initialize()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
material = /decl/material/solid/organic/plastic
base_type = /obj/item/stock_parts/keyboard
part_flags = PART_FLAG_HAND_REMOVE
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
ignore_damage_types = list(ELECTROCUTE) // emp damage is annoying enough without destroying purely physical or mechanical components

/obj/item/stock_parts/keyboard/on_refresh(obj/machinery/machine)
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/embedded_controller/tin_can.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
return
state = STATE_EVACUATE
toggleDoor(memory["exterior_status"], tag_exterior_door, door_safety, "close")
signalPump(tag_pump_out_internal, 0)
signalPump(tag_pump_out_external, 1)
signalPump(tag_pump_out_internal, 1, 0, 0) // Interior pump, target is a vaccum
signalPump(tag_pump_out_external, 1, 1, 10000) // Exterior pump, target is infinite
if("fill_atmos")
if(state == STATE_FILL)
return
state = STATE_FILL
toggleDoor(memory["exterior_status"], tag_exterior_door, door_safety, "close")
signalPump(tag_pump_out_internal, 1)
signalPump(tag_pump_out_external, 0)
signalPump(tag_pump_out_internal, 1, 1, memory["external_sensor_pressure"]) // Interior pump, target is exterior pressure
signalPump(tag_pump_out_external, 1, 0, 0) // Exterior pump, target is zero, to intake
if("seal")
if(state == STATE_SEALED)
return
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/__item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
/// Can this object leak into water sources?
var/watertight = FALSE

/// Can this item knock someone out if used as a weapon? Overridden for natural weapons as a nerf to simplemobs.
var/weapon_can_knock_prone = TRUE

/obj/item/get_color()
if(paint_color)
return paint_color
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/_item_interactions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/decl/interaction_handler/wash_hands
name = "Wash Hands"
expected_target_type = /atom
interaction_flags = INTERACTION_NEEDS_PHYSICAL_INTERACTION
interaction_flags = INTERACTION_NEEDS_PHYSICAL_INTERACTION | INTERACTION_NEVER_AUTOMATIC

/decl/interaction_handler/wash_hands/is_possible(atom/target, mob/user, obj/item/prop)
. = ..() && target?.reagents?.has_reagent(/decl/material/liquid/water, 150)
Expand Down Expand Up @@ -92,10 +92,10 @@
/decl/interaction_handler/drink
name = "Drink"
expected_target_type = /atom
interaction_flags = INTERACTION_NEEDS_PHYSICAL_INTERACTION
interaction_flags = INTERACTION_NEEDS_PHYSICAL_INTERACTION | INTERACTION_NEVER_AUTOMATIC

/decl/interaction_handler/drink/is_possible(atom/target, mob/user, obj/item/prop)
return ..() && target?.reagents?.total_volume && user.check_has_mouth() && !istype(target, /obj/item)
return ..() && ATOM_IS_OPEN_CONTAINER(target) && target?.reagents?.total_volume && user.check_has_mouth() && !istype(target, /obj/item)

/decl/interaction_handler/drink/invoked(atom/target, mob/user, obj/item/prop)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/taperecorder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
desc = "A magnetic tape that can hold up to ten minutes of content."
icon = 'icons/obj/items/device/tape_recorder/tape_casette_white.dmi'
icon_state = ICON_STATE_WORLD
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
material = /decl/material/solid/organic/plastic
matter = list(
/decl/material/solid/metal/steel = MATTER_AMOUNT_REINFORCEMENT,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/traitordevices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ effective or pretty fucking useless.
desc = "A strange device with twin antennas."
icon = 'icons/obj/items/weapon/batterer.dmi'
icon_state = ICON_STATE_WORLD
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
throw_speed = 4
throw_range = 10
obj_flags = OBJ_FLAG_CONDUCTIBLE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flame/flame_candle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "candle"
desc = "A small pillar candle. Its specially-formulated fuel-oxidizer wax mixture allows continued combustion in airless environments."
icon = 'icons/obj/items/flame/candle.dmi'
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
material = /decl/material/solid/organic/wax
material_alteration = MAT_FLAG_ALTERATION_COLOR
lit_light_range = 2
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flashlights/flare.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/obj/item/flashlight/flare
name = "flare"
desc = "A red standard-issue flare. There are instructions on the side reading 'pull cord, make light'."
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
light_color = "#e58775"
icon = 'icons/obj/lighting/flare.dmi'
action_button_name = null //just pull it manually, neckbeard.
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flashlights/slime.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
gender = PLURAL
desc = "A glowing ball of what appears to be amber."
icon = 'icons/obj/lighting/slime.dmi'
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
flashlight_flags = FLASHLIGHT_ALWAYS_ON
flashlight_range = 5
light_wedge = LIGHT_OMNI
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
icon = 'icons/obj/toy/toy.dmi'
icon_state = "ripleytoy"
var/cooldown = 0
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL

//all credit to skasi for toy mech fun ideas
/obj/item/toy/prize/attack_self(mob/user)
Expand Down Expand Up @@ -299,7 +299,7 @@
desc = "A \"Space Life\" brand... wait, what the hell is this thing? It seems to be requesting the sweet release of death."
icon_state = "assistant"
icon = 'icons/obj/toy/toy.dmi'
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL

/obj/item/toy/figure/cmo
name = "Chief Medical Officer action figure"
Expand Down Expand Up @@ -622,7 +622,7 @@
name = "magic eightball"
desc = "A black ball with a stencilled number eight in white on the side. It seems full of dark liquid.\nThe instructions state that you should ask your question aloud, and then shake."
icon_state = "eightball"
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL

var/static/list/possible_answers = list(
"It is certain",
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
else
set_base_attack_force(3)
update_icon()
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
to_chat(user, SPAN_NOTICE("\The [src] can now be concealed."))

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
icon_state = "plasticbag"
item_state = "plasticbag"
storage = /datum/storage/bag/plastic
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL

material = /decl/material/solid/organic/plastic
material_alteration = MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
name = "crew survival kit"
desc = "A box decorated in warning colors that contains a limited supply of survival tools. The panel and white stripe indicate this one contains oxygen."
icon_state = "survival"
storage = /datum/storage/box/large

/obj/item/box/survival/WillContain()
return list(
Expand All @@ -87,6 +88,7 @@
name = "engineer survival kit"
desc = "A box decorated in warning colors that contains a limited supply of survival tools. The panel and orange stripe indicate this one as the engineering variant."
icon_state = "survivaleng"
storage = /datum/storage/box/large

/obj/item/box/engineer/WillContain()
return list(
Expand Down Expand Up @@ -602,6 +604,8 @@
/obj/item/box/tapes
name = "box of spare tapes"
desc = "A box full of blank tapes."
storage = /datum/storage/box/tapes

/obj/item/box/tapes/WillContain()
return list(/obj/item/magnetic_tape/random = 14)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/matches.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon = 'icons/obj/items/storage/matchbox.dmi'
icon_state = "matchbox"
item_state = "zippo"
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
slot_flags = SLOT_LOWER_BODY
storage = /datum/storage/box/matches

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/tanks/jetpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@
/obj/item/tank/jetpack/rig
name = "integrated manuvering module thrusterpack"
desc = "The 'manuvering' part of a manuvering jet module for a hardsuit. You could... probably use this standalone?"
starting_pressure = list(/decl/material/gas/oxygen = 6 ATM)
var/obj/item/rig/holder

2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/tools/crowbar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@
name = "discount pry bar"
desc = "A plastic bar with a wedge. It looks so poorly manufactured that you're sure it will break if you try to use it."
material = /decl/material/solid/organic/plastic
w_class = ITEM_SIZE_TINY
w_class = ITEM_SIZE_SMALL
shape_variations = 6
Loading

0 comments on commit ea204d8

Please sign in to comment.