Skip to content

Commit

Permalink
Merge branch 'forest/pred/armory' into forest/pred/HOLDER
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 13, 2023
2 parents 9e5e3e2 + 4abcd15 commit e44893f
Show file tree
Hide file tree
Showing 10 changed files with 364 additions and 162 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,11 @@ most of them are tied into map-placed objects. This should be reworked in the fu
#define ACCESS_WY_CORPORATE_DS 202
#define ACCESS_PRESS 203
//=================================================

// Yautja Access Levels
/// Requires a visible ID chip to open
#define ACCESS_YAUTJA_SECURE 250
/// Elders+ only
#define ACCESS_YAUTJA_ELDER 251
/// Ancients only
#define ACCESS_YAUTJA_ANCIENT 252
16 changes: 8 additions & 8 deletions code/__DEFINES/clans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
/// Scales with clan size
#define CLAN_LIMIT_SIZE 2

var/global/list/datum/rank/clan_ranks = list(
CLAN_RANK_UNBLOODED = new /datum/rank/unblooded(),
CLAN_RANK_YOUNG = new /datum/rank/young(),
CLAN_RANK_BLOODED = new /datum/rank/blooded(),
CLAN_RANK_ELITE = new /datum/rank/elite(),
CLAN_RANK_ELDER = new /datum/rank/elder(),
CLAN_RANK_LEADER = new /datum/rank/leader(),
CLAN_RANK_ADMIN = new /datum/rank/ancient()
var/global/list/datum/yautja_rank/clan_ranks = list(
CLAN_RANK_UNBLOODED = new /datum/yautja_rank/unblooded(),
CLAN_RANK_YOUNG = new /datum/yautja_rank/young(),
CLAN_RANK_BLOODED = new /datum/yautja_rank/blooded(),
CLAN_RANK_ELITE = new /datum/yautja_rank/elite(),
CLAN_RANK_ELDER = new /datum/yautja_rank/elder(),
CLAN_RANK_LEADER = new /datum/yautja_rank/leader(),
CLAN_RANK_ADMIN = new /datum/yautja_rank/ancient()
)

var/global/list/clan_ranks_ordered = list(
Expand Down
30 changes: 30 additions & 0 deletions code/game/machinery/doors/airlock_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,36 @@
/obj/structure/machinery/door/airlock/strata/mining/autoname
autoname = TRUE

//YAUTJA SHIP - CURRENTLY USES STRATA DOORS
/obj/structure/machinery/door/airlock/yautja
name = "\improper Airlock"
icon = 'icons/obj/structures/doors/strata/strata_doors.dmi'
openspeed = 5
req_access = null
req_one_access = null
tiles_with = list(
/obj/structure/window/framed/strata,
/obj/structure/machinery/door/airlock,
)
masterkey_resist = TRUE
no_panel = TRUE
not_weldable = TRUE
unacidable = TRUE

/obj/structure/machinery/door/airlock/yautja/autoname
autoname = TRUE

/obj/structure/machinery/door/airlock/yautja/secure
heavy = TRUE
req_one_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)

/obj/structure/machinery/door/airlock/yautja/secure/elder
req_one_access = list(ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)

/obj/structure/machinery/door/airlock/yautja/secure/ancient
req_one_access = list(ACCESS_YAUTJA_ANCIENT)
unslashable = TRUE

//FIORINA PENITENTIARY (PRISON_FOP) MAINTENANCE HATCHES

/obj/structure/machinery/door/airlock/prison_hatch
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clans/client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@
to_chat(src, SPAN_WARNING("This player doesn't belong to a clan!"))
return

var/list/datum/rank/ranks = clan_ranks.Copy()
var/list/datum/yautja_rank/ranks = clan_ranks.Copy()
ranks -= CLAN_RANK_ADMIN // Admin rank should not and cannot be obtained from here

var/datum/rank/chosen_rank
var/datum/yautja_rank/chosen_rank
if(has_clan_permission(CLAN_PERMISSION_ADMIN_MODIFY, warn = FALSE))
var/input = tgui_input_list(src, "Select the rank to change this user to.", "Select Rank", ranks)

Expand Down
16 changes: 8 additions & 8 deletions code/modules/clans/rank.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/datum/rank
/datum/yautja_rank
var/name

var/limit_type
Expand All @@ -7,37 +7,37 @@
var/permissions = CLAN_PERMISSION_USER_VIEW
var/permission_required = CLAN_PERMISSION_USER_MODIFY

/datum/rank/unblooded
/datum/yautja_rank/unblooded
name = CLAN_RANK_UNBLOODED
permission_required = CLAN_PERMISSION_ADMIN_MODIFY

/datum/rank/young
/datum/yautja_rank/young
name = CLAN_RANK_YOUNG

/datum/rank/blooded
/datum/yautja_rank/blooded
name = CLAN_RANK_BLOODED

/datum/rank/elite
/datum/yautja_rank/elite
name = CLAN_RANK_ELITE

limit_type = CLAN_LIMIT_SIZE
limit = 5

/datum/rank/elder
/datum/yautja_rank/elder
name = CLAN_RANK_ELDER

limit_type = CLAN_LIMIT_SIZE
limit = 12

/datum/rank/leader
/datum/yautja_rank/leader
name = CLAN_RANK_LEADER

permissions = CLAN_PERMISSION_USER_ALL
permission_required = CLAN_PERMISSION_ADMIN_MODIFY
limit_type = CLAN_LIMIT_NUMBER
limit = 1

/datum/rank/ancient
/datum/yautja_rank/ancient
name = CLAN_RANK_ADMIN

permission_required = CLAN_PERMISSION_ADMIN_MANAGER
Expand Down
6 changes: 4 additions & 2 deletions code/modules/cm_preds/yaut_bracers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
var/caster_material = "ebony"

var/obj/item/card/id/bracer_chip/embedded_id

var/owner_rank = CLAN_RANK_UNBLOODED_INT

var/caster_deployed = FALSE
var/obj/item/weapon/gun/energy/yautja/plasma_caster/caster
Expand All @@ -246,8 +246,10 @@
var/obj/item/weapon/wristblades/left_wristblades
var/obj/item/weapon/wristblades/right_wristblades

/obj/item/clothing/gloves/yautja/hunter/Initialize(mapload, new_translator_type, new_caster_material)
/obj/item/clothing/gloves/yautja/hunter/Initialize(mapload, new_translator_type, new_caster_material, new_owner_rank)
. = ..()
if(new_owner_rank)
owner_rank = new_owner_rank
embedded_id = new(src)
if(new_translator_type)
translator_type = new_translator_type
Expand Down
20 changes: 20 additions & 0 deletions code/modules/cm_preds/yaut_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -888,11 +888,31 @@
desc = "A complex cypher chip embedded within a set of clan bracers."
icon = 'icons/obj/items/radio.dmi'
icon_state = "upp_key"
access = list(ACCESS_YAUTJA_SECURE)
w_class = SIZE_TINY
flags_equip_slot = SLOT_ID
flags_item = ITEM_PREDATOR|DELONDROP|NODROP
paygrade = null

/obj/item/card/id/bracer_chip/set_user_data(mob/living/carbon/human/H)
if(!istype(H))
return

registered_name = H.real_name
registered_ref = WEAKREF(H)
registered_gid = H.gid
blood_type = H.blood_type

var/list/new_access = list(ACCESS_YAUTJA_SECURE)
var/obj/item/clothing/gloves/yautja/hunter/bracer = loc
if(istype(bracer) && bracer.owner_rank)
switch(bracer.owner_rank)
if(CLAN_RANK_ELDER_INT, CLAN_RANK_LEADER_INT)
new_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER)
if(CLAN_RANK_ADMIN_INT)
new_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)
access = new_access

/obj/item/storage/medicomp
name = "medicomp"
desc = "A complex kit of alien tools and medicines."
Expand Down
9 changes: 8 additions & 1 deletion code/modules/gear_presets/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
skills = /datum/skills/yautja/warrior

var/default_cape_type = "None"
var/clan_rank

/datum/equipment_preset/yautja/load_race(mob/living/carbon/human/new_human, client/mob_client)
new_human.set_species(SPECIES_YAUTJA)
Expand Down Expand Up @@ -53,7 +54,7 @@
cape_color = mob_client.prefs.predator_cape_color

new_human.equip_to_slot_or_del(new /obj/item/clothing/under/chainshirt/hunter(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/yautja/hunter(new_human, translator_type, caster_material), WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/yautja/hunter(new_human, translator_type, caster_material, clan_rank), WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/yautja(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/device/flashlight/lantern(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/yautja_teleporter(new_human), WEAR_L_STORE)
Expand Down Expand Up @@ -89,6 +90,7 @@
/datum/equipment_preset/yautja/youngblood
name = "Yautja Young"
flags = EQUIPMENT_PRESET_START_OF_ROUND
clan_rank = CLAN_RANK_UNBLOODED_INT

/datum/equipment_preset/yautja/youngblood/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
Expand All @@ -100,12 +102,14 @@
name = "Yautja Blooded"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_QUARTER_CAPE
clan_rank = CLAN_RANK_BLOODED_INT

// ELITE
/datum/equipment_preset/yautja/elite
name = "Yautja Elite"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_HALF_CAPE
clan_rank = CLAN_RANK_ELITE_INT

/datum/equipment_preset/yautja/elite/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
Expand All @@ -117,6 +121,7 @@
name = "Yautja Elder"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_THIRD_CAPE
clan_rank = CLAN_RANK_ELDER_INT

/datum/equipment_preset/yautja/elder/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
Expand All @@ -132,6 +137,7 @@
name = "Yautja Leader"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_CAPE
clan_rank = CLAN_RANK_LEADER_INT

/datum/equipment_preset/yautja/leader/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
Expand All @@ -147,6 +153,7 @@
name = "Yautja Ancient"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_PONCHO
clan_rank = CLAN_RANK_ADMIN_INT

/datum/equipment_preset/yautja/ancient/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/Embryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@

if(isyautja(affected_mob) || (flags_embryo & FLAG_EMBRYO_PREDATOR))
new_xeno = new /mob/living/carbon/xenomorph/larva/predalien(affected_mob)
yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nAn abomination has been detected at [get_area_name(new_xeno)]. It is a stain upon our purity and is unfit for life. Exterminate it immediately"))
yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nAn abomination has been detected at [get_area_name(new_xeno)]. It is a stain upon our purity and is unfit for life. Exterminate it immediately.\n\nHeavy Armory unlocked."))
for(var/obj/structure/machinery/door/poddoor/shutters/almayer/D in machines)
if(D.id == "Yautja Armory")
D.open()
else
new_xeno = new(affected_mob)

Expand Down
Loading

0 comments on commit e44893f

Please sign in to comment.