Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions code/__DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#define COOLDOWN_CIRCUIT_PATHFIND_DIF "circuit_pathfind_different"
#define COOLDOWN_CIRCUIT_TARGET_INTERCEPT "circuit_target_intercept"
#define COOLDOWN_CIRCUIT_VIEW_SENSOR "circuit_view_sensor"
#define COOLDOWN_CIRCUIT_LASER "circuit_laser"

// mob cooldowns
#define COOLDOWN_YAWN_PROPAGATION "yawn_propagation_cooldown"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/rituals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
smoke.set_up(amount = 5, location = get_turf(human.loc))
smoke.start()

for(var/obj/item/obj as anything in human.get_equipped_items(TRUE, TRUE))
for(var/obj/item/obj as anything in human.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
human.drop_item_ground(obj)

return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
user.visible_message(span_warning("Вещи [user] неожиданно начали сползать. С них стекает обильное количество фиолетовой жижи, которая формируется вокруг них."), \
span_shadowling("Вы сбрасываете одежду, которая может помешать вашему вылуплению и начинаете выделять смолу, которая защитит вас."))
user.Stun(35 SECONDS, TRUE)
for(var/obj/item/item as anything in user.get_equipped_items(TRUE, TRUE))
for(var/obj/item/item as anything in user.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
user.drop_item_ground(item, force = TRUE)

sleep(5 SECONDS)
Expand Down Expand Up @@ -242,7 +242,7 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
* Testing purpose.
*/
/mob/living/carbon/human/proc/make_unhatched_shadowling()
for(var/obj/item/item as anything in get_equipped_items(TRUE, TRUE))
for(var/obj/item/item as anything in get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
drop_item_ground(item, force = TRUE)

var/newNameId = pick(GLOB.possibleShadowlingNames)
Expand Down
29 changes: 14 additions & 15 deletions code/game/machinery/recycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,41 +146,40 @@
emergency_mode = FALSE
update_icon(UPDATE_ICON_STATE)

/obj/machinery/recycler/proc/crush_living(mob/living/L)
/obj/machinery/recycler/proc/crush_living(mob/living/target)
target.forceMove(loc)

L.forceMove(loc)

if(issilicon(L))
if(issilicon(target))
playsound(loc, 'sound/items/welder.ogg', 50, TRUE)
else
playsound(loc, 'sound/effects/splat.ogg', 50, TRUE)

var/gib = 1
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
if(iscarbon(L))
if(iscarbon(target))
gib = 0
if(L.stat == CONSCIOUS)
L.say("ARRRRRRRRRRRGH!!!")
add_mob_blood(L)
if(target.stat == CONSCIOUS)
target.say("ARRRRRRRRRRRGH!!!")
add_mob_blood(target)

if(!blood && !issilicon(L))
if(!blood && !issilicon(target))
blood = 1
update_icon(UPDATE_ICON_STATE)

// Remove and recycle the equipped items
if(eat_victim_items)
for(var/obj/item/I in L.get_equipped_items(TRUE, TRUE))
if(L.drop_item_ground(I))
eat(I, sound = 0)
for(var/obj/item/item in target.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
if(target.drop_item_ground(item))
eat(item, sound = 0)

// Instantly lie down, also go unconscious from the pain, before you die.
L.Paralyse(10 SECONDS)
target.Paralyse(10 SECONDS)

// For admin fun, var edit emagged to 2.
if(gib || emagged == 2)
L.gib()
target.gib()
else if(emagged == 1)
L.adjustBruteLoss(crush_damage)
target.adjustBruteLoss(crush_damage)

/obj/machinery/recycler/verb/rotate()
set name = "Повернуть по часовой"
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -816,12 +816,12 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g
* Returns `TRUE` if the item is equipped by a mob, `FALSE` otherwise.
* This might need some error trapping, not sure if get_equipped_items() is safe for non-human mobs.
*/
/obj/item/proc/is_equipped(include_pockets = FALSE, include_hands = FALSE)
/obj/item/proc/is_equipped(include_flags = NONE)
if(!ismob(loc))
return FALSE

var/mob/M = loc
if(src in M.get_equipped_items(include_pockets, include_hands))
if(src in M.get_equipped_items(include_flags))
return TRUE
else
return FALSE
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 @@ -384,7 +384,7 @@ effective or pretty fucking useless.
playsound(destination, SFX_SPARKS, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
playsound(destination, 'sound/magic/disintegrate.ogg', 50, TRUE)
destination.ex_act(rand(EXPLODE_DEVASTATE, EXPLODE_HEAVY))
for(var/obj/item/thing as anything in user.get_equipped_items(TRUE, TRUE))
for(var/obj/item/thing as anything in user.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
if(!user.drop_item_ground(thing))
qdel(thing)
to_chat(user, span_biggerdanger("You teleport into the wall, the teleporter tries to save you, but--"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(select_equipment, R_EVENT, "Select Equipment", mob/
if(tgui_alert(user, "Нужно ли выбрасывать вещи из карманов? Выбор \"Нет\" удалит их.", "Выбор экипировки существа", "Да", "Нет") == "Нет")
delete_pocket = TRUE

for(var/obj/item/I in H.get_equipped_items(delete_pocket))
for(var/obj/item/I in H.get_equipped_items(delete_pocket ? INCLUDE_POCKETS : NONE))
qdel(I)
if(dresscode != "Naked")
H.equipOutfit(dresscode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
if(!our_outfit)
return

for(var/obj/item/item as anything in human.get_equipped_items(TRUE, TRUE))
for(var/obj/item/item as anything in human.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
qdel(item)

human.equipOutfit(our_outfit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
if(!outfit)
return

for(var/obj/item/item in human.get_equipped_items(TRUE, TRUE))
for(var/obj/item/item in human.get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
qdel(item)

human.equipOutfit(outfit)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/misc_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
return PROCESS_KILL

var/turf/cake_turf = loc
if(is_equipped(include_pockets = TRUE, include_hands = TRUE))
if(is_equipped(INCLUDE_POCKETS | INCLUDE_HELD))
cake_turf = loc.loc

if(isturf(cake_turf))
Expand Down
7 changes: 1 addition & 6 deletions code/modules/mob/hear_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,7 @@
to_chat(src, span_warning("Ваша гарнитура вибрирует, но вы не слышите ни звука!"))
else
if(track)
// The track already contains a name, so we don't print speaker_name
// But we need part_a before the name, which already exists in the track
// We split the track into a label and a name
var/prefix = copytext(track, 1, findtext(track, speaker_name))
var/rest = copytext(track, findtext(track, speaker_name))
to_chat(src, "[prefix][part_a][rest][part_b][message]</span></span>")
Comment on lines -234 to -239
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вся проблема в этом и евляется

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

track() выводит готовый кликабельный текст а тут она проходила через кашу и работала некорректно заодно ломая цвет чата

to_chat(src, "[part_a][track][message]</span></span>")
else
to_chat(src, "[part_a][speaker_name][part_b][message]</span></span>")

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@

//get_all_contents that is reasonable and not stupid
/mob/living/proc/get_all_gear(recursive = TRUE)
var/list/processing_list = get_equipped_items(TRUE, TRUE)
var/list/processing_list = get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD)
list_clear_nulls(processing_list) // handles empty hands
var/i = 0
while(i < length(processing_list))
Expand Down
31 changes: 0 additions & 31 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -633,37 +633,6 @@
for(var/slot in get_all_slots())//order matters, dependant slots go first
qdel(slot)

/mob/living/carbon/human/get_equipped_items(include_pockets = FALSE, include_hands = FALSE)
var/list/items = ..()
if(belt)
items += belt
if(l_ear)
items += l_ear
if(r_ear)
items += r_ear
if(glasses)
items += glasses
if(gloves)
items += gloves
if(neck)
items += neck
if(shoes)
items += shoes
if(wear_id)
items += wear_id
if(wear_pda)
items += wear_pda
if(w_uniform)
items += w_uniform
if(include_pockets)
if(l_store)
items += l_store
if(r_store)
items += r_store
if(s_store)
items += s_store
return items

/**
* Used to return a list of equipped items on a human mob; does not by default include held items, see include_flags
*
Expand Down
32 changes: 3 additions & 29 deletions code/modules/mob/living/carbon/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -395,38 +395,12 @@

// Returns items which are currently visible on the mob
/mob/living/carbon/proc/get_visible_items()
var/static/list/visible_slots = list(
ITEM_SLOT_GLOVES,
ITEM_SLOT_EYES,
ITEM_SLOT_EARS,
ITEM_SLOT_MASK,
ITEM_SLOT_HEAD,
ITEM_SLOT_FEET,
ITEM_SLOT_ID,
ITEM_SLOT_PDA,
ITEM_SLOT_BELT,
ITEM_SLOT_BACK,
ITEM_SLOT_NECK,
ITEM_SLOT_HANDS,
ITEM_SLOT_BACKPACK,
ITEM_SLOT_SUITSTORE,
ITEM_SLOT_HANDCUFFED,
ITEM_SLOT_LEGCUFFED,
)
var/list/obscured = check_obscured_slots()
var/list/visible_items = list()

for(var/slot in visible_slots)
if(obscured & slot)
continue

var/obj/item/equipped = get_item_by_slot(slot)

if(equipped)
visible_items += equipped

for(var/obj/item/held in get_equipped_items(INCLUDE_HELD))
visible_items += held
for(var/obj/item/thing in get_equipped_items(INCLUDE_HELD))
if(!(get_slot_by_item(thing) & obscured))
visible_items += thing

return visible_items

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@
return

/mob/living/extinguish_light(force = FALSE)
for(var/obj/item/item as anything in get_equipped_items(TRUE, TRUE))
for(var/obj/item/item as anything in get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD))
item.extinguish_light(force)

/mob/living/vv_edit_var(var_name, var_value)
Expand Down
17 changes: 7 additions & 10 deletions code/modules/mob/living/silicon/ai/ai_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,18 @@

var/track = ""
var/mob/mob_to_track = null
if(changed_voice)
if(impersonating)
mob_to_track = impersonating
else
track = "[speaker_name] ([jobname])"
speaker_name = html_encode(speaker_name)
jobname = html_encode(jobname)
if(changed_voice && impersonating)
mob_to_track = impersonating
else if(isbot(follow_target))
track = "<a href='byond://?src=[UID()];trackbot=[follow_target.UID()]'>[speaker_name] ([jobname])</a>"
else
if(isbot(follow_target))
track = "<a href='byond://?src=[UID()];trackbot=[follow_target.UID()]'>[speaker_name] ([jobname])</a>"
else
mob_to_track = speaker
mob_to_track = speaker

if(mob_to_track)
track = "<a href='byond://?src=[UID()];track=[mob_to_track.UID()]'>[speaker_name] ([jobname])</a>"
track += "&nbsp;<a href='byond://?src=[UID()];open=[mob_to_track.UID()]'>\[Open\]</a>"

return track

// MARK: AI VOX Announcements
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/robot/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/mob/living/silicon/robot/get_all_slots()
return list(module_state_1, module_state_2, module_state_3)

/mob/living/silicon/robot/get_equipped_items(include_pockets = FALSE, include_hands = FALSE)
/mob/living/silicon/robot/get_equipped_items(include_flags = NONE)
. = list()
if(module_state_1)
. += module_state_1
Expand Down
6 changes: 1 addition & 5 deletions code/modules/research/designs/wiremod_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -592,15 +592,11 @@
PROTOLATHE_CATEGORY_CIRCUITRY,
)

/datum/design/mod_module_shell
/datum/design/module/mod_module_shell
id = "module_shell"
req_tech = list(RESEARCH_TREE_MATERIALS = 2, RESEARCH_TREE_PROGRAMMING = 2)
materials = list(MAT_GLASS = 1000)
build_path = /obj/item/mod/module/circuit
build_type = PROTOLATHE
category = list(
PROTOLATHE_CATEGORY_CIRCUITRY,
)

// /datum/design/undertile_shell
// id = "undertile_shell"
Expand Down
3 changes: 2 additions & 1 deletion code/modules/wiremod/components/action/equpiment_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@
/obj/item/circuit_component/equipment_action/proc/update_actions()
for(var/uid in granted_to)
var/datum/action/granted_action = granted_to[uid]
granted_action.name = button_name.value || "Дейстие"
granted_action.name = button_name.value || "Действие"
granted_action.button_icon_state = LAZYACCESS(options_map, icon_options.value)
granted_action.build_all_button_icons(ALL)


#undef HUD_BLANK
Expand Down
9 changes: 6 additions & 3 deletions code/modules/wiremod/components/action/laserpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@

var/datum/port/input/option/lasercolour_option

var/laser_cooldown = 1 SECONDS

/obj/item/circuit_component/laserpointer/get_ui_notices()
. = ..()
. += create_ui_notice("Максимальная дальность: [max_range] тайл[DECL_CREDIT(max_range)]", "orange", "info")
. += create_ui_notice("Перезарядка: [DisplayTimeText(laser_cooldown)]", "orange", "stopwatch")

/obj/item/circuit_component/laserpointer/populate_options()
var/static/component_options = list(
Expand All @@ -32,20 +34,19 @@
)
lasercolour_option = add_option_port("Цвет лазера", component_options)


/obj/item/circuit_component/laserpointer/populate_ports()
target_input = add_input_port("Цель", PORT_TYPE_ATOM)
image_pixel_x = add_input_port("X", PORT_TYPE_NUMBER)
image_pixel_y = add_input_port("Y", PORT_TYPE_NUMBER)


/obj/item/circuit_component/laserpointer/input_received(datum/port/input/port)
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_LASER))
return

var/atom/target = target_input.value
var/atom/movable/shell = parent.shell
var/turf/target_location = get_turf(target)


var/pointer_icon_state = lasercolour_option.value

var/turf/current_turf = get_location()
Expand All @@ -65,3 +66,5 @@
laser_location.pixel_z = clamp(target.pixel_y + image_pixel_y.value, -15, 15)

target_location.flick_overlay_view(laser_location, 1 SECONDS)

TIMER_COOLDOWN_START(shell, COOLDOWN_CIRCUIT_LASER, laser_cooldown)
9 changes: 6 additions & 3 deletions code/modules/wiremod/shell/brain_computer_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,20 @@
var/obj/item/stock_parts/cell/cell = circuit_component.parent.cell

if(isnull(cell))
to_chat(owner, span_boldwarning("[circuit_component.parent.declent_ru(NOMINATIVE)] не име[PLUR_ET_UT(circuit_component.parent)] элемента питания."))
to_chat(owner, span_boldwarning("[circuit_component.parent.declent_ru(NOMINATIVE)] \
не име[PLUR_ET_UT(circuit_component.parent)] элемента питания."))
else
to_chat(owner, span_notice("В [cell.declent_ru(PREPOSITIONAL)] [circuit_component.parent.declent_ru(GENITIVE)] осталось <b>[cell.percent()]%</b> заряда."))
to_chat(owner, span_notice("В [cell.declent_ru(PREPOSITIONAL)] \
[circuit_component.parent.declent_ru(GENITIVE)] \
осталось <b>[round(cell.percent(), 1)]%</b> заряда."))

/datum/action/innate/bci_charge_action/process(seconds_per_tick)
build_all_button_icons(UPDATE_BUTTON_STATUS)

/datum/action/innate/bci_charge_action/update_button_status(atom/movable/screen/movable/action_button/button, force = FALSE)
. = ..()
var/obj/item/stock_parts/cell/cell = circuit_component.parent.cell
button.maptext = cell ? MAPTEXT("[cell.percent()]%") : ""
button.maptext = cell ? MAPTEXT("[round(cell.percent(), 1)]%") : ""

/obj/machinery/bci_implanter
name = "brain-computer interface manipulation chamber"
Expand Down
Loading
Loading