Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/l…
Browse files Browse the repository at this point in the history
…ockdown
  • Loading branch information
realforest2001 committed Apr 24, 2024
2 parents a5c2274 + fb0a2f8 commit 26cd128
Show file tree
Hide file tree
Showing 26 changed files with 321 additions and 30 deletions.
4 changes: 3 additions & 1 deletion code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@

#define COMSIG_ITEM_PICKUP "item_pickup"

///from /obj/item/device/camera/broadcasting/attack_self
///from /obj/item/device/camera/broadcasting
#define COMSIG_BROADCAST_GO_LIVE "broadcast_live"
#define COMSIG_BROADCAST_HEAR_TALK "broadcast_hear_talk"
#define COMSIG_BROADCAST_SEE_EMOTE "broadcast_see_emote"

/// from /obj/item/proc/mob_can_equip
#define COMSIG_ITEM_ATTEMPTING_EQUIP "item_attempting_equip"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#define USES_HEARING (1<<17)
/// Should we use the initial icon for display? Mostly used by overlay only objects
#define HTML_USE_INITAL_ICON (1<<18)
// Whether or not the object sees emotes
#define USES_SEEING (1<<19)

//==========================================================================================

Expand Down
12 changes: 9 additions & 3 deletions code/datums/effects/bleeding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
if(affected_mob.reagents.get_reagent_amount("thwei"))
blood_loss -= THWEI_BLOOD_REDUCTION

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
var/obj/structure/machinery/cryo_cell/cryo = affected_mob.loc
if(istype(cryo) && cryo.on && cryo.operable())
blood_loss -= CRYO_BLOOD_REDUCTION

var/mob/living/carbon/human/affected_human = affected_mob
if(istype(affected_human))
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
Expand All @@ -95,18 +100,19 @@
if(affected_mob.in_stasis == STASIS_IN_BAG)
return FALSE

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents && affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
blood_loss -= CRYO_BLOOD_REDUCTION

if(affected_mob.reagents) // Annoying QC check
if(affected_mob.reagents.get_reagent_amount("thwei"))
blood_loss -= THWEI_BLOOD_REDUCTION

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
blood_loss -= CRYO_BLOOD_REDUCTION

var/mob/living/carbon/human/affected_human = affected_mob
if(istype(affected_human))
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
return FALSE

blood_loss = max(blood_loss, 0) // Bleeding shouldn't give extra blood even if its only 1 tick
affected_mob.blood_volume = max(affected_mob.blood_volume - blood_loss, 0)

return TRUE
Expand Down
10 changes: 10 additions & 0 deletions code/datums/emotes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
var/paygrade = user.get_paygrade()
var/formatted_message = "<b>[paygrade][user]</b> [msg]"
var/user_turf = get_turf(user)
var/list/seeing_obj = list()
if (user.client)
for(var/mob/ghost as anything in GLOB.dead_mob_list)
if(!ghost.client || isnewplayer(ghost))
Expand All @@ -132,19 +133,28 @@
if(emote_type & EMOTE_VISIBLE)
var/list/viewers = get_mobs_in_view(7, user)
for(var/mob/current_mob in viewers)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_SEEING))
seeing_obj |= object
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES))
viewers -= current_mob
run_langchat(user, viewers)
else if(emote_type & EMOTE_AUDIBLE)
var/list/heard = get_mobs_in_view(7, user)
for(var/mob/current_mob in heard)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_HEARING))
seeing_obj |= object
if(current_mob.ear_deaf)
heard -= current_mob
continue
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES))
heard -= current_mob
run_langchat(user, heard)

for(var/obj/object as anything in seeing_obj)
object.see_emote(user, msg, (emote_type & EMOTE_AUDIBLE))

SEND_SIGNAL(user, COMSIG_MOB_EMOTED(key))


Expand Down
12 changes: 11 additions & 1 deletion code/datums/tutorial/xenomorph/xenomorph_basic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,24 @@
add_highlight(hugger, COLOR_YELLOW)
message_to_player("This is a facehugger, highlighted in yellow. Pick up the facehugger by clicking it.")
message_to_player("Stand next to the downed human and click them to apply the facehugger. Or drop the facehugger near them to see it leap onto their face automatically.")
RegisterSignal(human_dummy, COMSIG_HUMAN_IMPREGNATE, PROC_REF(nest_cap_phase))
RegisterSignal(hugger, COMSIG_PARENT_QDELETING, PROC_REF(on_hugger_deletion))
RegisterSignal(human_dummy, COMSIG_HUMAN_IMPREGNATE, PROC_REF(nest_cap_phase), override = TRUE)

/datum/tutorial/xenomorph/basic/proc/on_hugger_deletion(hugger)
SIGNAL_HANDLER
TUTORIAL_ATOM_FROM_TRACKING(/obj/effect/alien/resin/special/eggmorph, morpher)
morpher.stored_huggers = 1
add_highlight(morpher, COLOR_YELLOW)
message_to_player("Click the egg morpher to take a <b>facehugger</b>.")
RegisterSignal(xeno, COMSIG_XENO_TAKE_HUGGER_FROM_MORPHER, PROC_REF(take_facehugger_phase))

/datum/tutorial/xenomorph/basic/proc/nest_cap_phase()
SIGNAL_HANDLER
TUTORIAL_ATOM_FROM_TRACKING(/mob/living/carbon/human, human_dummy)
TUTORIAL_ATOM_FROM_TRACKING(/obj/item/clothing/mask/facehugger, hugger)
UnregisterSignal(human_dummy, COMSIG_MOB_TAKE_DAMAGE)
UnregisterSignal(human_dummy, COMSIG_HUMAN_IMPREGNATE)
UnregisterSignal(hugger, COMSIG_PARENT_QDELETING)
remove_highlight(hugger)

message_to_player("We should nest the infected human to make sure they don't get away.")
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@
new_title = "[record.title] at [record.time]"
new_details = record.details
datacore.records_tech -= record
if(ARES_RECORD_FLIGHT)
new_title = "[record.title] at [record.time]"
new_details = record.details
datacore.records_flight -= record

new_delete.details = new_details
new_delete.user = last_login
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera)
. = ..()
if(!camera_item)
return INITIALIZE_HINT_QDEL
c_tag = camera_item.get_broadcast_name()
linked_broadcasting = camera_item
c_tag = linked_broadcasting.get_broadcast_name()

/obj/structure/machinery/camera/mortar
alpha = 0
Expand Down
59 changes: 50 additions & 9 deletions code/game/machinery/computer/camera_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

var/colony_camera_mapload = TRUE
var/admin_console = FALSE
var/stay_connected = FALSE

/obj/structure/machinery/computer/cameras/Initialize(mapload)
. = ..()
Expand All @@ -33,7 +34,7 @@

/obj/structure/machinery/computer/cameras/Destroy()
SStgui.close_uis(src)
QDEL_NULL(current)
current = null
UnregisterSignal(src, COMSIG_CAMERA_MAPNAME_ASSIGNED)
last_camera_turf = null
concurrent_users = null
Expand Down Expand Up @@ -147,7 +148,7 @@
// Unregister map objects
SEND_SIGNAL(src, COMSIG_CAMERA_UNREGISTER_UI, user)
// Turn off the console
if(length(concurrent_users) == 0 && is_living)
if(length(concurrent_users) == 0 && is_living && !stay_connected)
current = null
SEND_SIGNAL(src, COMSIG_CAMERA_CLEAR)
last_camera_turf = null
Expand Down Expand Up @@ -206,45 +207,85 @@
name = "Television Set"
desc = "An old TV hooked up to a video cassette recorder, you can even use it to time shift WOW."
network = list(CAMERA_NET_CORRESPONDENT)
stay_connected = TRUE
circuit = /obj/item/circuitboard/computer/cameras/tv
var/obj/item/device/camera/broadcasting/broadcastingcamera = null

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/Destroy()
broadcastingcamera = null
return ..()

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_state(mob/user)
return GLOB.default_state
return GLOB.in_view

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_act(action, params)
. = ..()
if(action != "switch_camera")
return
broadcastingcamera = null
if (!istype(current, /obj/structure/machinery/camera/correspondent))
if(broadcastingcamera)
clear_camera()
if(!istype(current, /obj/structure/machinery/camera/correspondent))
return
var/obj/structure/machinery/camera/correspondent/corr_cam = current
if (!corr_cam.linked_broadcasting)
if(!corr_cam.linked_broadcasting)
return
broadcastingcamera = corr_cam.linked_broadcasting
RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, PROC_REF(go_back_live))
RegisterSignal(broadcastingcamera, COMSIG_COMPONENT_ADDED, PROC_REF(handle_rename))
RegisterSignal(broadcastingcamera, COMSIG_PARENT_QDELETING, PROC_REF(clear_camera))
RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_HEAR_TALK, PROC_REF(transfer_talk))
RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_SEE_EMOTE, PROC_REF(transfer_emote))

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_close(mob/user)
. = ..()
if (!current && broadcastingcamera)
if(!broadcastingcamera)
return
if(!current)
clear_camera()

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/clear_camera()
SIGNAL_HANDLER
UnregisterSignal(broadcastingcamera, list(COMSIG_BROADCAST_GO_LIVE, COMSIG_PARENT_QDELETING))
UnregisterSignal(broadcastingcamera, list(COMSIG_BROADCAST_GO_LIVE, COMSIG_PARENT_QDELETING, COMSIG_COMPONENT_ADDED, COMSIG_BROADCAST_HEAR_TALK, COMSIG_BROADCAST_SEE_EMOTE))
broadcastingcamera = null

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera)
SIGNAL_HANDLER
if (current.c_tag == broadcastingcamera.get_broadcast_name())
if(current.c_tag == broadcastingcamera.get_broadcast_name())
current = broadcastingcamera.linked_cam
SEND_SIGNAL(src, COMSIG_CAMERA_SET_TARGET, broadcastingcamera.linked_cam, broadcastingcamera.linked_cam.view_range, broadcastingcamera.linked_cam.view_range)

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/transfer_talk(obj/item/camera, mob/living/sourcemob, message, verb = "says", datum/language/language, italics = FALSE, show_message_above_tv = FALSE)
SIGNAL_HANDLER
if(inoperable())
return
if(show_message_above_tv)
langchat_speech(message, get_mobs_in_view(7, src), language, sourcemob.langchat_color, FALSE, LANGCHAT_FAST_POP, list(sourcemob.langchat_styles))
for(var/datum/weakref/user_ref in concurrent_users)
var/mob/user = user_ref.resolve()
if(user?.client?.prefs && !user.client.prefs.lang_chat_disabled && !user.ear_deaf && user.say_understands(sourcemob, language))
sourcemob.langchat_display_image(user)

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/transfer_emote(obj/item/camera, mob/living/sourcemob, emote, audible = FALSE, show_message_above_tv = FALSE)
SIGNAL_HANDLER
if(inoperable())
return
if(show_message_above_tv)
langchat_speech(emote, get_mobs_in_view(7, src), null, null, TRUE, LANGCHAT_FAST_POP, list("emote"))
for(var/datum/weakref/user_ref in concurrent_users)
var/mob/user = user_ref.resolve()
if(user?.client?.prefs && (user.client.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES) && (!audible || !user.ear_deaf))
sourcemob.langchat_display_image(user)

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/examine(mob/user)
. = ..()
attack_hand(user) //watch tv on examine

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/handle_rename(obj/item/camera, datum/component/label)
SIGNAL_HANDLER
if(!istype(label, /datum/component/label))
return
current.c_tag = broadcastingcamera.get_broadcast_name()

/obj/structure/machinery/computer/cameras/wooden_tv/ot
name = "Mortar Monitoring Set"
desc = "A Console linked to Mortar launched cameras."
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@
/obj/proc/hear_talk(mob/living/M as mob, msg, verb="says", datum/language/speaking, italics = 0)
return

/obj/proc/see_emote(mob/living/M as mob, emote, audible = FALSE)
return

/obj/attack_hand(mob/user)
if(can_buckle) manual_unbuckle(user)
else . = ..()
Expand Down
19 changes: 19 additions & 0 deletions code/game/objects/structures/reagent_dispensers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@
if(N)
amount_per_transfer_from_this = N

/obj/structure/reagent_dispensers/clicked(mob/user, list/mods)
if(!Adjacent(user))
return ..()

if(!ishuman(user))
return ..()

if(!reagents || reagents.locked)
return ..()

if(mods["alt"])
dispensing = !dispensing
if(dispensing)
to_chat(user, SPAN_NOTICE("[src] is now dispensing"))
else
to_chat(user, SPAN_NOTICE("[src] is now filling"))
return TRUE
return ..()

/obj/structure/reagent_dispensers/attackby(obj/item/hit_item, mob/living/user)
if(istype(hit_item, /obj/item/reagent_container))
return
Expand Down
6 changes: 0 additions & 6 deletions code/modules/cm_marines/dropship_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,6 @@
if(light_on)
set_light(0)

/obj/structure/dropship_equipment/electronics/spotlights/on_launch()
set_light(0)

/obj/structure/dropship_equipment/electronics/spotlights/on_arrival()
set_light(brightness)

/obj/structure/dropship_equipment/electronics/spotlights/ui_data(mob/user)
. = list()
var/is_deployed = light_on
Expand Down
48 changes: 48 additions & 0 deletions code/modules/gear_presets/clf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,54 @@
list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
)

/datum/equipment_preset/clf/synth/combat
name = "CLF Combat Synthetic"
flags = EQUIPMENT_PRESET_EXTRA

/datum/equipment_preset/clf/synth/combat/load_skills(mob/living/carbon/human/new_human)
. = ..()
new_human.allow_gun_usage = TRUE

/datum/equipment_preset/clf/synth/combat/load_gear(mob/living/carbon/human/new_human)
//back
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/engineerpack/ert, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/extinguisher/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/roller, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar, WEAR_IN_BACK)
//face
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/CLF/command(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp, WEAR_FACE)
if(new_human.disabilities & NEARSIGHTED)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/prescription(new_human), WEAR_EYES)
else
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(new_human), WEAR_EYES)
//head
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/beret/jan, WEAR_HEAD)
//body
var/obj/item/clothing/under/colonist/clf/CLF = new()
var/obj/item/clothing/accessory/storage/webbing/webbing = new()
CLF.attach_accessory(new_human, webbing)
new_human.equip_to_slot_or_del(CLF, WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/mar40/extended, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/mar40/extended, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/mar40/extended, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/militia, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/mar40/extended, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/mar40/extended, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/mar40/carbine, WEAR_J_STORE)
//waist
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/full/with_suture_and_graft, WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(new_human), WEAR_IN_BELT)
//limbs
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat, WEAR_FEET)
//pockets
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/synth, WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full_barbed_wire, WEAR_R_STORE)

//*****************************************************************************************************/

/datum/equipment_preset/clf/commander
Expand Down
Loading

0 comments on commit 26cd128

Please sign in to comment.