Skip to content

Commit

Permalink
Merge pull request #3406 from MistakeNot4892/devupdate
Browse files Browse the repository at this point in the history
Dev update from staging.
  • Loading branch information
MistakeNot4892 authored Oct 2, 2023
2 parents f4fbb49 + 1b92c0b commit a92b73b
Show file tree
Hide file tree
Showing 59 changed files with 265 additions and 204 deletions.
2 changes: 2 additions & 0 deletions code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@

#define DEFAULT_GAS_ACCELERANT /decl/material/gas/hydrogen
#define DEFAULT_GAS_OXIDIZER /decl/material/gas/oxygen

#define CHEM_REACTION_FLAG_OVERFLOW_CONTAINER BITFLAG(0)
2 changes: 1 addition & 1 deletion code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
ai_hud.input_args
)
if(mymob?.client)
mymob.client.screen = list(adding)
mymob.client.screen += adding
2 changes: 1 addition & 1 deletion code/controllers/subsystems/overlays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ SUBSYSTEM_DEF(overlays)
if(NOT_QUEUED_ALREADY)
QUEUE_FOR_COMPILE

/atom/proc/set_overlays(list/overlays_list, priority = FALSE) // Sets overlays to a list, equivalent to cut_overlays() + add_overlays().
/atom/proc/set_overlays(list/overlays_list, priority = FALSE) // Sets overlays to a list, equivalent to cut_overlays() + add_overlay().
if (!overlays_list)
return

Expand Down
12 changes: 6 additions & 6 deletions code/controllers/subsystems/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,21 @@ SUBSYSTEM_DEF(throwing)
thrownthing.throwing = null

if (!hit)
for (var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on.
var/atom/A = thing
if (A == target)
for (var/atom/thing as anything in get_turf(thrownthing)) //looking for our target on the turf we land on.
if (thing == target)
hit = TRUE
thrownthing.throw_impact(A, src)
thrownthing.throw_impact(thing, src)
break

if(QDELETED(thrownthing))
return

if(!hit)
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
thrownthing.space_drift(init_dir)
if(!QDELETED(thrownthing))
thrownthing.space_drift(init_dir)

if(t_target)
if(t_target && !QDELETED(thrownthing))
thrownthing.throw_impact(t_target, src)

if (callback)
Expand Down
15 changes: 9 additions & 6 deletions code/datums/inventory_slots/slots/slot_belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
/datum/inventory_slot/belt/can_equip_to_slot(var/mob/user, var/obj/item/prop, var/disable_warning, var/ignore_equipped)
. = ..()
if(.)
// If they have a uniform slot, they need a uniform to wear a belt.
// Things with this flag can be worn on the belt slot without a uniform.
if(prop.item_flags & ITEM_FLAG_IS_BELT)
return TRUE
// Otherwise, if they have a uniform slot, they need a uniform to wear a belt.
var/datum/inventory_slot/check_slot = user.get_inventory_slot_datum(slot_w_uniform_str)
if(check_slot && !check_slot.get_equipped_item())
if(!disable_warning)
to_chat(user, SPAN_WARNING("You need to be wearing something on your body before you can wear \the [prop]."))
return FALSE
return (prop.item_flags & ITEM_FLAG_IS_BELT)
if(check_slot?.get_equipped_item())
return TRUE
if(!disable_warning)
to_chat(user, SPAN_WARNING("You need to be wearing something on your body before you can wear \the [prop]."))
return FALSE

/datum/inventory_slot/belt/get_examined_string(mob/owner, mob/user, distance, hideflags, decl/pronouns/pronouns)
if(_holding)
Expand Down
17 changes: 12 additions & 5 deletions code/datums/recipe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@
--needed_items[itype]
if(needed_items[itype] <= 0)
needed_items -= itype
break
else
needed_items -= itype
break
break
// break
if(!length(container_contents))
break
return !length(needed_items)
Expand Down Expand Up @@ -128,10 +130,15 @@
//Find items we need
if (LAZYLEN(items))
for (var/i in items)
var/obj/item/I = locate(i) in container_contents
if (I && I.reagents)
I.reagents.trans_to_holder(buffer,I.reagents.total_volume)
qdel(I)
var/cnt = 1
if (isnum(items[i]))
cnt = items[i]
for (cnt, cnt > 0, cnt--)
var/obj/item/I = locate(i) in container_contents
if (I && I.reagents)
container_contents -= I
I.reagents.trans_to_holder(buffer,I.reagents.total_volume)
qdel(I)

//Find fruits
if (LAZYLEN(fruit))
Expand Down
6 changes: 6 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,9 @@

/atom/proc/on_defilement()
return

/atom/proc/get_overhead_text_x_offset()
return 0

/atom/proc/get_overhead_text_y_offset()
return 0
3 changes: 1 addition & 2 deletions code/game/gamemodes/cult/cult_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@
/obj/item/clothing/head/culthood
name = "cult hood"
desc = "A hood worn by the followers of Nar-Sie."

icon = 'icons/clothing/head/cult.dmi'
flags_inv = HIDEFACE
flags_inv = HIDEFACE | BLOCK_HEAD_HAIR
body_parts_covered = SLOT_HEAD
armor = list(
ARMOR_MELEE = ARMOR_MELEE_RESISTANT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
icon_state = "transmitter"
var/range = 60 // Limits transmit range
var/latency = 2 // Delay between event and transmission; doesn't apply to transmit on tick
#ifdef UNIT_TEST
latency = 0 // this can slow down testing and cause random inconsistent failures
#endif
var/buffer

/obj/item/stock_parts/radio/transmitter/proc/queue_transmit(list/data)
if(!length(data))
return
if(!buffer)
buffer = data
addtimer(CALLBACK(src, .proc/transmit), latency)
if(latency)
addtimer(CALLBACK(src, .proc/transmit), latency)
else
transmit()
else
buffer |= data

Expand Down
3 changes: 2 additions & 1 deletion code/game/machinery/camera/_camera_device.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var/xray_enabled = FALSE
has_commands = TRUE

/datum/extension/network_device/camera/New(datum/holder, n_id, n_key, c_type, autojoin, list/preset_channels, camera_name, camnet_enabled = TRUE, req_connection = TRUE)
/datum/extension/network_device/camera/New(datum/holder, n_id, n_key, r_type, autojoin, list/preset_channels, camera_name, camnet_enabled = TRUE, req_connection = TRUE)
if(length(preset_channels))
channels = preset_channels.Copy()
. = ..()
Expand All @@ -22,6 +22,7 @@
display_name = camera_name

/datum/extension/network_device/camera/post_construction()
. = ..()
if(cameranet_enabled)
cameranet.add_source(holder)

Expand Down
17 changes: 8 additions & 9 deletions code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@
if(!c_tag)
var/area/A = get_area(src)
if(isturf(loc) && A)
for(var/obj/machinery/camera/C in A)
if(C == src) continue
if(C.number)
number = max(number, C.number+1)
c_tag = "[A.proper_name][number == 1 ? "" : " #[number]"]"
if(!c_tag) // Add a default c_tag in case the camera has been placed in an invalid location or inside another object.
c_tag = "Security Camera - [random_id(/obj/machinery/camera, 100,999)]"
var/suffix = uniqueness_repository.Generate(/datum/uniqueness_generator/id_sequential, "c_tag [A.proper_name]", 1) // unlike sequential_id, starts at 1 instead of 100
if(suffix == 1)
suffix = null
c_tag = "[A.proper_name][suffix ? " [suffix]" : null]"
// Add a default c_tag in case the camera has been placed in an invalid location or inside another object.
c_tag ||= "Security Camera - [random_id(/obj/machinery/camera, 100,999)]"

invalidateCameraCache()
set_extension(src, /datum/extension/network_device/camera, null, null, null, TRUE, preset_channels, c_tag, cameranet_enabled, requires_connection)
Expand Down Expand Up @@ -192,15 +191,15 @@
if (istype(AM, /obj))
var/obj/O = AM
if (O.throwforce >= src.toughness)
visible_message("<span class='warning'><B>[src] was hit by [O].</B></span>")
visible_message(SPAN_WARNING("[src] was hit by [O]!"))
take_damage(O.throwforce)

/obj/machinery/camera/physical_attack_hand(mob/living/carbon/human/user)
if(!istype(user))
return
if(user.species.can_shred(user))
user.do_attack_animation(src)
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
visible_message(SPAN_WARNING("\The [user] slashes at [src]!"))
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
add_hiddenprint(user)
take_damage(25)
Expand Down
15 changes: 7 additions & 8 deletions code/game/machinery/camera/presets.dm
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
/obj/machinery/camera/network/engineering
preset_channels = list(CAMERA_CAMERA_CHANNEL_ENGINEERING)
initial_access = list(access_engine)
req_access = list(access_engine)

/obj/machinery/camera/network/ert
preset_channels = list(CAMERA_CHANNEL_ERT)
cameranet_enabled = FALSE
initial_access = list(access_engine)
req_access = list(access_engine)

/obj/machinery/camera/network/medbay
preset_channels = list(CAMERA_CHANNEL_MEDICAL)
initial_access = list(access_medical)

req_access = list(access_medical)
/obj/machinery/camera/network/mercenary
preset_channels = list(CAMERA_CHANNEL_MERCENARY)
cameranet_enabled = FALSE
initial_access = list(access_mercenary)
req_access = list(access_mercenary)

/obj/machinery/camera/network/mining
preset_channels = list(CAMERA_CHANNEL_MINE)
initial_access = list(access_mining)
req_access = list(access_mining)

/obj/machinery/camera/network/research
preset_channels = list(CAMERA_CHANNEL_RESEARCH)
initial_access = list(access_research)
req_access = list(access_research)

/obj/machinery/camera/network/security
preset_channels = list(CAMERA_CHANNEL_SECURITY)
initial_access = list(access_security)
req_access = list(access_security)

/obj/machinery/camera/network/television
preset_channels = list(CAMERA_CHANNEL_TELEVISION)
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/computer/buildandrepair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
name = "computer frame"
icon = 'icons/obj/items/stock_parts/stock_parts.dmi'
icon_state = "unwired"
obj_flags = OBJ_FLAG_ROTATABLE
expected_machine_type = "computer"

/obj/machinery/constructable_frame/computerframe/on_update_icon()
Expand Down
9 changes: 4 additions & 5 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31

//Circuit boards are in /code/game/objects/items/weapons/circuitboards/machinery/

/obj/machinery/constructable_frame //Made into a seperate type to make future revisions easier.
///Made into a seperate type to make future revisions easier.
/obj/machinery/constructable_frame
name = "machine frame"
icon = 'icons/obj/items/stock_parts/stock_parts.dmi'
icon_state = "box_0"
Expand All @@ -11,9 +9,10 @@
use_power = POWER_USE_OFF
uncreated_component_parts = null
construct_state = /decl/machine_construction/frame/unwrenched
obj_flags = OBJ_FLAG_ROTATABLE
atom_flags = ATOM_FLAG_NO_TEMP_CHANGE | ATOM_FLAG_CLIMBABLE
var/obj/item/stock_parts/circuitboard/circuit = null
var/expected_machine_type
atom_flags = ATOM_FLAG_NO_TEMP_CHANGE | ATOM_FLAG_CLIMBABLE

/obj/machinery/constructable_frame/state_transition(decl/machine_construction/new_state)
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/chem/chemsmoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"

if(show_log)
var/atom/location = carry?.get_reaction_loc()
var/atom/location = carry?.get_reaction_loc(CHEM_REACTION_FLAG_OVERFLOW_CONTAINER)
if(location?.fingerprintslast)
var/mob/M = get_mob_by_key(location.fingerprintslast)
var/more = ""
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/posters/_poster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/obj/structure/sign/poster/Initialize(var/ml, var/_mat, var/_reinf_mat, var/placement_dir = null, var/given_poster_type = null)
. = ..(ml, _mat, _reinf_mat)
set_design(given_poster_type || poster_design || pick(decls_repository.get_decl_paths_of_subtype(/decl/poster_design)))
set_dir (placement_dir || dir)
set_dir(placement_dir || dir)

/obj/structure/sign/poster/physically_destroyed(skip_qdel)
playsound(src, sound_destroyed, 80, TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/item_materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if(blood_overlay)
add_overlay(blood_overlay)
if(global.contamination_overlay && contaminated)
overlays += global.contamination_overlay
add_overlay(global.contamination_overlay)

/obj/item/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
. = ..()
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/weapons/autopsy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@
playsound(src, 'sound/effects/fastbeep.ogg', 10)

/obj/item/scanner/autopsy/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len) return
if(!length(O.autopsy_data))
return

for(var/V in O.autopsy_data)
var/datum/autopsy_data/W = O.autopsy_data[V]
if(!weapon_data[V])
weapon_data[V] = list("data" = W.copy(), "organs" = list(O.name))
else
if(weapon_data[V])
var/datum/autopsy_data/data = weapon_data[V]["data"]
data.merge_with(W)
var/list/organs = weapon_data[V]["organs"]
organs |= O.name
weapon_data[V]["organs"] |= O.name
else
weapon_data[V] = list("data" = W.copy(), "organs" = list(O.name))

/obj/item/scanner/autopsy/proc/get_formatted_data()
var/list/scan_data = list("Subject: [target_name]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
var/list/supported_programs
var/list/restricted_programs

/obj/item/stock_parts/circuitboard/holodeckcontrol/get_buildable_types()
return typesof(/obj/machinery/computer/HolodeckControl)

/obj/item/stock_parts/circuitboard/holodeckcontrol/construct(var/obj/machinery/computer/HolodeckControl/HC)
if (..(HC))
HC.supported_programs = supported_programs.Copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
var/created_size = 0
for(var/i = 1 to 200) //sanity loop limit
var/obj/item/cash_type = pick(3; /obj/item/cash/c1000, 4; /obj/item/cash/c500, 5; /obj/item/cash/c200)
var/bundle_size = initial(cash_type.w_class) / 2
var/bundle_size = initial(cash_type.w_class)
if(created_size + bundle_size <= storage_capacity)
created_size += bundle_size
. += cash_type
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/structures/tables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -674,23 +674,23 @@

/obj/structure/table/holotable
icon_state = "holo_preview"
holographic = TRUE
color = COLOR_OFF_WHITE
material = /decl/material/solid/metal/aluminium/holographic
reinf_material = /decl/material/solid/metal/aluminium/holographic

/obj/structure/table/holo_plastictable
icon_state = "holo_preview"
holographic = TRUE
color = COLOR_OFF_WHITE
material = /decl/material/solid/plastic/holographic
reinf_material = /decl/material/solid/plastic/holographic

/obj/structure/table/holo_woodentable
holographic = TRUE
icon_state = "holo_preview"

/obj/structure/table/holo_woodentable/Initialize()
material = /decl/material/solid/wood/holographic
reinf_material = /decl/material/solid/wood/holographic
. = ..()

//wood wood wood
/obj/structure/table/woodentable
Expand Down
4 changes: 2 additions & 2 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ var/global/const/FALLOFF_SOUNDS = 0.5

volume *= pressure_factor

if(!turf_source.blocks_air && (T.zone || turf_source.zone) && T.zone != turf_source.zone)
volume -= 30
if(!turf_source.blocks_air && T.zone != turf_source.zone)
volume = round(volume * 0.7) // quick and dirty volume reduction from ZAS flood fill
return volume

/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, extrarange, override_env, envdry, envwet)
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@

// Called when turf is hit by a thrown object
/turf/hitby(atom/movable/AM, var/datum/thrownthing/TT)
..()
SHOULD_CALL_PARENT(FALSE) // /atom/hitby() applies damage to AM if it's a living mob.
if(density)
if(isliving(AM))
var/mob/living/M = AM
Expand Down
Loading

0 comments on commit a92b73b

Please sign in to comment.