Skip to content

Commit

Permalink
Merge pull request #78 from Atermonera/neb-dev-update
Browse files Browse the repository at this point in the history
Neb dev update
  • Loading branch information
Atermonera authored Oct 20, 2024
2 parents 1e739a2 + 37a6d1a commit 208537a
Show file tree
Hide file tree
Showing 164 changed files with 775 additions and 444 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
16 changes: 9 additions & 7 deletions code/datums/extensions/storage/subtypes_box.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
max_w_class = ITEM_SIZE_NORMAL
max_storage_space = DEFAULT_LARGEBOX_STORAGE

/datum/storage/box/monkey
can_hold = list(/obj/item/food/monkeycube)
/datum/storage/box/animal_cube
can_hold = list(/obj/item/food/animal_cube)

/datum/storage/box/snappop
can_hold = list(/obj/item/toy/snappop)
Expand Down 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
1 change: 1 addition & 0 deletions code/datums/extensions/storage/subtypes_wallet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
max_storage_space = 8
can_hold = list(
/obj/item/cash,
/obj/item/charge_stick,
/obj/item/card,
/obj/item/clothing/mask/smokable,
/obj/item/cosmetics,
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."
10 changes: 8 additions & 2 deletions code/datums/outfits/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,20 @@
post_equip(H)

if(outfit_flags & OUTFIT_HAS_VITALS_SENSOR)
var/obj/item/clothing/sensor/vitals/sensor = new(get_turf(H))
var/obj/item/clothing/sensor/vitals/sensor
for(var/check_slot in global.vitals_sensor_equip_slots)
if(!H.get_inventory_slot_datum(check_slot))
continue
if(!sensor) // only create the sensor if we have at least one eligible slot
sensor = new(get_turf(H))
var/obj/item/clothing/equipped = H.get_equipped_item(check_slot)
if(istype(equipped) && !(locate(/obj/item/clothing/sensor/vitals) in equipped.accessories) && equipped.can_attach_accessory(sensor))
equipped.attach_accessory(null, sensor)
break
if(isturf(sensor))
if(isturf(sensor?.loc))
H.put_in_hands(sensor)
else
qdel(sensor)

return 1

Expand Down
4 changes: 2 additions & 2 deletions code/datums/supplypacks/livecargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

/decl/hierarchy/supply_pack/livecargo/monkey
name = "Inert - Monkey cubes"
contains = list (/obj/item/box/monkeycubes)
contains = list (/obj/item/box/animal_cubes/monkeys)
containertype = /obj/structure/closet/crate/freezer
containername = "monkey crate"

/decl/hierarchy/supply_pack/livecargo/spidercubes
name = "Inert - Spiders"
contains = list(/obj/item/box/monkeycubes/spidercubes)
contains = list(/obj/item/box/animal_cubes/spiders)
containertype = /obj/structure/closet/crate/secure
containername = "spiderling crate"
contraband = 1
Expand Down
3 changes: 3 additions & 0 deletions code/datums/traits/prosthetics/prosthetic_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
if(. && pref.species && pref.bodytype)

var/decl/species/mob_species = pref.get_species_decl()
if(!istype(mob_species) || isnull(mob_species.base_internal_prosthetics_model))
return FALSE

var/decl/bodytype/mob_bodytype = pref.get_bodytype_decl()

if(!istype(mob_bodytype))
Expand Down
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: 1 addition & 1 deletion code/game/atoms_fluids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/atom/proc/fluid_act(var/datum/reagents/fluids)
SHOULD_CALL_PARENT(TRUE)
if(reagents && reagents != fluids && fluids?.total_volume >= FLUID_SHALLOW && ATOM_IS_OPEN_CONTAINER(src))
if(reagents && reagents != fluids && fluids?.total_volume >= FLUID_SHALLOW && !is_watertight())
reagents.trans_to_holder(fluids, reagents.total_volume)
fluids.trans_to_holder(reagents, min(fluids.total_volume, reagents.maximum_volume))

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
2 changes: 1 addition & 1 deletion code/game/objects/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
if (T.type == /turf/space) // Equality is faster than istype.
reception = EXPLFX_NONE

for (var/turf/THING in RANGE_TURFS(M, 1))
for (var/turf/THING as anything in RANGE_TURFS(M, 1))
if(THING.simulated)
reception |= EXPLFX_SHAKE
break
Expand Down
6 changes: 5 additions & 1 deletion code/game/objects/items/__item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@

var/base_name

var/watertight = FALSE // Can this object leak into water sources?
/// 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)
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
12 changes: 6 additions & 6 deletions code/game/objects/items/_item_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
return FALSE

if(!target.reagents || !target.reagents.total_volume)
to_chat(user, SPAN_NOTICE("[target] is empty."))
to_chat(user, SPAN_NOTICE("[target] is empty of reagents."))
return TRUE

if(reagents && !REAGENTS_FREE_SPACE(reagents))
to_chat(user, SPAN_NOTICE("[src] is full."))
to_chat(user, SPAN_NOTICE("[src] is full of reagents."))
return TRUE

var/trans = target.reagents.trans_to_obj(src, target.amount_dispensed)
Expand All @@ -23,11 +23,11 @@
return TRUE

if(!reagents || !reagents.total_volume)
to_chat(user, SPAN_NOTICE("[src] is empty."))
to_chat(user, SPAN_NOTICE("[src] is empty of reagents."))
return TRUE

if(target.reagents && !REAGENTS_FREE_SPACE(target.reagents))
to_chat(user, SPAN_NOTICE("[target] is full."))
to_chat(user, SPAN_NOTICE("[target] is full of reagents."))
return TRUE

var/contained = REAGENT_LIST(src)
Expand Down Expand Up @@ -56,11 +56,11 @@
return TRUE // don't splash if we can't pour

if(!reagents || !reagents.total_volume)
to_chat(user, SPAN_NOTICE("[src] is empty."))
to_chat(user, SPAN_NOTICE("[src] is empty of reagents."))
return TRUE

if(!REAGENTS_FREE_SPACE(target.reagents))
to_chat(user, SPAN_NOTICE("[target] is full."))
to_chat(user, SPAN_NOTICE("[target] is full of reagents."))
return TRUE

var/had_liquids = length(reagents.liquid_volumes)
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
Loading

0 comments on commit 208537a

Please sign in to comment.