Skip to content

Commit

Permalink
lets hope this works
Browse files Browse the repository at this point in the history
  • Loading branch information
wraith-54321 committed May 30, 2024
1 parent 2348999 commit 089e0a6
Show file tree
Hide file tree
Showing 6 changed files with 226 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
hijack_speed = 0.5
antagpanel_category = "Gang"
antag_hud_name = "hud_gangster"
ui_name = "AntagInfoGang"
///Ref to our team
var/datum/team/gang/gang_team
///What is our rank
Expand Down Expand Up @@ -40,7 +41,7 @@
if(owner?.current)
add_team_hud(owner.current, /datum/antagonist/gang_member)
. = ..()
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/familieswork.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)

//might need to handle body transfer
/datum/antagonist/gang_member/apply_innate_effects(mob/living/mob_override)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
created_machine.alpha = 0 //to hopefully avoid any flashing before coming down
created_machine.owner = user_datum.gang_team
created_machine.do_setup()
. = ..(user_datum, created_machine, our_turf) //thats right its a parent call with args, dont worry about it
. = ..(user_datum, created_machine, our_turf) //yes its a parent call with args, dont worry about it
created_machine.alpha = 255

/obj/item/gang_device/object_beacon/gang_machine/credit_converter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ PROCESSING_SUBSYSTEM_DEF(gang_machines) //temp SS

/obj/machinery/gang_machine/attackby(obj/item/weapon, mob/user, params)
var/area/our_area = get_area(src)
if(!setup && setup_tc_cost && istype(weapon, /obj/item/stack/telecrystal) && setup_checks(user, our_area))
if(!setup && setup_tc_cost && istype(weapon, /obj/item/stack/telecrystal) && setup_checks(user, our_area) && IS_GANGMEMBER(user))
var/obj/item/stack/telecrystal/tc = weapon
if(!tc.use(setup_tc_cost))
balloon_alert(user, "You need at least [setup_tc_cost] telecrystals to setup \the [src].")
return ..()
do_setup(our_area)
do_setup(our_area, user)
return
return ..()

Expand All @@ -54,5 +54,8 @@ PROCESSING_SUBSYSTEM_DEF(gang_machines) //temp SS
return TRUE

///Fully setup the machine
/obj/machinery/gang_machine/proc/do_setup(area/passed_area)
/obj/machinery/gang_machine/proc/do_setup(area/passed_area, mob/living/user)
setup = TRUE
if(!owner)
var/datum/antagonist/gang_member/antag_datum = IS_GANGMEMBER(user)
owner = antag_datum?.gang_team
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
var/datum/antagonist/gang_member/boss/boss_datum = boss_list[1]
if(boss_datum.owner?.current?.stat != DEAD)
return FALSE
boss_datum.change_rank(target.type) //already accessed so just handle this here as we pass by this point
// boss_datum.change_rank(target.type) //already accessed so just handle this here as we pass by this point
return TRUE

/obj/item/implant/uplink/gang/lieutenant
Expand Down
Binary file added sound/ambience/antag/familieswork.ogg
Binary file not shown.
216 changes: 216 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoGang.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
// THIS IS A MONKESTATION UI FILE

import { useBackend, useLocalState } from '../backend';
import { Section, Stack, Tabs } from '../components';
import { Window } from '../layouts';

type Objective = {
count: number;
name: string;
explanation: string;
};

type Info = {
gang_name: string;
objectives: Objective[];
};

const ObjectivePrintout = (props: any, context: any) => {
const { data } = useBackend<Info>(context);
const { objectives } = data;
return (
<Stack vertical>
<Stack.Item bold>Your current objectives:</Stack.Item>
<Stack.Item>
{(!objectives && 'None!') ||
objectives.map((objective) => (
<Stack.Item key={objective.count}>
#{objective.count}: {objective.explanation}
</Stack.Item>
))}
</Stack.Item>
</Stack>
);
};

export const AntagInfoGang = (props: any, context: any) => {
const [tab, setTab] = useLocalState(context, 'tab', 1);
return (
<Window width={620} height={580} theme="syndicate">
<Window.Content>
<Tabs>
<Tabs.Tab
icon="list"
lineHeight="23px"
selected={tab === 1}
onClick={() => setTab(1)}>
Introduction
</Tabs.Tab>
<Tabs.Tab
icon="list"
lineHeight="23px"
selected={tab === 2}
onClick={() => setTab(2)}>
Lieutenants
</Tabs.Tab>
<Tabs.Tab
icon="list"
lineHeight="23px"
selected={tab === 3}
onClick={() => setTab(3)}>
Gang Bosses
</Tabs.Tab>
<Tabs.Tab
icon="list"
lineHeight="23px"
selected={tab === 4}
onClick={() => setTab(4)}>
Other info
</Tabs.Tab>
</Tabs>
{tab === 1 && <MainPage />}
{tab === 2 && <Lieutenants />}
{tab === 3 && <GangBosses />}
{tab === 4 && <OtherInfo />}
</Window.Content>
</Window>
);
};

const MainPage = (props: any, context: any) => {
const { data } = useBackend<Info>(context);
return (
<Stack vertical fill>
<Stack.Item minHeight="14rem">
<Section scrollable fill>
<Stack vertical>
<Stack.Item textColor="red" fontSize="20px">
You are a member of the {data.gang_name} Gang.
</Stack.Item>
<Stack.Item>
<ObjectivePrintout />
</Stack.Item>
</Stack>
</Section>
</Stack.Item>
<Stack.Item minHeight="35rem">
<Section fill title="Essentials">
<Stack vertical>
<Stack.Item>
<span className={'color-red'}>
The basics of being a gangmember
</span>
<br />
<span>
Your gang has been hired by a Syndicate corporation to carry out
their dirty work on the station for a bet they made. Whichever
gang does the best will by taken on by The Syndicate as full
time hires. The others will be disposed of by their employers
due to making them lose their bet.
</span>
<br />
<br />
<span>
Your main job as a gang member is to increase the threat level
of your gang and follow the orders of your superiors. The main
way to increase threat level is to claim areas by spraying them
with the specially designed spraycans given to gangs. Claimed
areas will also generate telecrystals that can be distributed by
the gang boss and lieutenants.
</span>
<br />
<br />
<span>
You can induct additional people into your gang via gang uplink
implants which can be used to purchase additional gear with
telecrystals, a list of notable items available to purchase can
be found in the &quot;Other info&quot; section. Additional
implants can be created in the gang fabrcator. Be warned that if
your implant is ever removed you will lose your gang
afilliation.
</span>
</Stack.Item>
</Stack>
</Section>
</Stack.Item>
</Stack>
);
};

const Lieutenants = () => {
return (
<Stack vertical fill>
<Stack.Item minHeight="42rem">
<Section fill title="How to be a gang lieutenant">
<Stack vertical>
<Stack.Item>
<span>
As a gang lieutenant you act as second in command to your boss,
you and your boss are also immune to deconversion. You also get
a built in communicator that can be used to wirelessly
communicate with anyone else on your gang with a communicator,
additional communicators can be bought in your uplink for 4 TC
each. You and your boss are also the only ones able to promote
additional lieutenants or a new boss if the old one is
incapacitated.
</span>
</Stack.Item>
</Stack>
</Section>
</Stack.Item>
</Stack>
);
};

const GangBosses = () => {
return (
<Stack vertical fill>
<Stack.Item minHeight="42rem">
<Section fill title="How to lead your gang">
<Stack vertical>
<Stack.Item>
<span>
As a boss you act as the commander and chief of your gang,
everyone within your gang must listen and obey you, you are also
the only one able to allocate telecrystals gained from
controlled areas.
</span>
</Stack.Item>
</Stack>
</Section>
</Stack.Item>
</Stack>
);
};

const OtherInfo = () => {
return (
<Stack vertical fill>
<Stack.Item minHeight="45rem">
<Section fill title="Other useful things to know">
<Stack vertical>
<Stack.Item>
<span>
The credit converter will slowly turn inserted credits into
additional threat level.
</span>
<br />
<br />
<span>
Gang turrets can be purchased and can be toggled between a
lethal and non lethal mode.
</span>
<br />
<br />
<span>
Resistant spraycans will give you 5 sprays worth of a resistant
coating that when used can only be removed by other resistant
sprays, dont think about it.
</span>
</Stack.Item>
</Stack>
</Section>
</Stack.Item>
</Stack>
);
};

0 comments on commit 089e0a6

Please sign in to comment.