Skip to content

Commit

Permalink
such immense suffering.
Browse files Browse the repository at this point in the history
  • Loading branch information
doom committed Sep 27, 2023
1 parent 2329406 commit 79d20d2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
armor_bio = CLOTHING_ARMOR_MEDIUMHIGH
specialty = "M10 pattern captain"
flags_atom = NO_SNOW_TYPE
built_in_visors = list(new /obj/item/device/helmet_visor, new /obj/item/device/helmet_visor/medical/advanced, new /obj/item/device/helmet_visor/security)
built_in_visors = list(new /obj/item/device/helmet_visor, new /obj/item/device/helmet_visor/medical/advanced, new /obj/item/device/helmet_visor/security, new /obj/item/device/helmet_visor/tactical_map_visor)

/obj/item/clothing/head/helmet/marine/MP
name = "\improper M10 pattern MP helmet"
Expand All @@ -915,7 +915,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
icon_state = "helmet"
item_state = "helmet"
specialty = "M10 pattern officer"
built_in_visors = list(new /obj/item/device/helmet_visor, new /obj/item/device/helmet_visor/medical/advanced)
built_in_visors = list(new /obj/item/device/helmet_visor, new /obj/item/device/helmet_visor/medical/advanced, new /obj/item/device/helmet_visor/tactical_map_visor)

/obj/item/clothing/head/helmet/marine/mp/provost/marshal
name = "\improper Provost Marshal Cap"
Expand Down
9 changes: 5 additions & 4 deletions tgui/packages/tgui/interfaces/CanvasLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class CanvasLayer extends Component {
this.lastY,
x,
y,
this.state.selection,
this.ctx.strokeStyle,
]);
}

Expand Down Expand Up @@ -133,11 +133,12 @@ export class CanvasLayer extends Component {
if (this.lineStack.length === 0) {
return;
}
const line = this.lineStack[this.lineStack.length - 1];

// selects last color before line is yeeted, this is buggy sometimes.
const line = this.lineStack.pop();
if (line.length === 0) {
return;
}
const prevColor = line[0][4];
this.lineStack.pop();

this.ctx.clearRect(
0,
Expand Down
22 changes: 13 additions & 9 deletions tgui/packages/tgui/interfaces/TacticalMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,21 @@ export const TacticalMap = (props, context) => {

const ViewMapPanel = (props, context) => {
const { data } = useBackend<TacMapProps>(context);

//byond ui can't resist trying to render
if (data.canViewHome !== 1) {
return <OldMapPanel {...props} context={context} />;
}

return (
<Section fill>
{data.canViewHome === 1 && (
<ByondUi
params={{
id: data.mapRef,
type: 'map',
}}
class="TacticalMap"
/>
)}
<ByondUi
params={{
id: data.mapRef,
type: 'map',
}}
class="TacticalMap"
/>
</Section>
);
};
Expand Down

0 comments on commit 79d20d2

Please sign in to comment.