Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

J Corp Representative #2141

Merged
merged 21 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions ModularTegustation/tegu_items/refinery/crates/_crate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,23 @@
var/veryrarechance
var/cosmeticloot = list()
var/cosmeticchance = 0 //These do not count on the total odds of a crate
var/repmodifier = 0
var/crate_multiplier = 2

/obj/structure/lootcrate/Initialize()
. = ..()
if(SSmaptype.maptype in SSmaptype.citymaps) //Also can't drag it out to open it. Open it on spot, bitch
anchored = TRUE
for(var/upgradecheck in GLOB.jcorp_upgrades)
switch(upgradecheck)
if("Gacha Chance 4")
repmodifier += 3
if("Gacha Chance 3")
repmodifier += 3
if("Gacha Chance 2")
repmodifier += 2
if("Gacha Chance 1")
repmodifier += 2

/obj/structure/lootcrate/attackby(obj/item/I, mob/living/user, params)
. = ..()
Expand All @@ -42,6 +54,10 @@
if(I.tool_behaviour != TOOL_CROWBAR)
return

rarechance += repmodifier
if(veryrarechance)
veryrarechance += (repmodifier/crate_multiplier)

if(SSmaptype.maptype in SSmaptype.citymaps) //Fuckers shouldn't loot like this
if(!do_after(user, 7 SECONDS, src))
return
Expand Down
1 change: 1 addition & 0 deletions ModularTegustation/tegu_items/refinery/crates/workshop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
icon_state = "crate_allas"
rarechance = 25
veryrarechance = 1
crate_multiplier = 4
lootlist = list(
/obj/item/ego_weapon/city/fixerblade,
/obj/item/ego_weapon/city/fixergreatsword,
Expand Down
1 change: 1 addition & 0 deletions ModularTegustation/tegu_items/refinery/sales.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,4 @@
crate = /obj/structure/lootcrate/jcorp
power_timer = 180 //Takes a bit
crate_timer = 180 //And it's super cheap
our_corporation = "J corp"
9 changes: 9 additions & 0 deletions ModularTegustation/tegu_items/representative/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define W_CORP_REP "W corp"
#define N_CORP_REP "N corp"
#define P_CORP_REP "P corp"
#define J_CORP_REP "J corp"
#define IS_MONIES istype(I, /obj/item/holochip)
#define IS_REFINED_PE istype(I, /obj/item/refinedpe)
#define IS_RAW_PE istype(I, /obj/item/rawpe)
Expand Down Expand Up @@ -221,6 +222,14 @@
new /datum/data/extraction_cargo("P Corp Canned Bread", /obj/item/food/canned/pcorp, 10, P_CORP_REP) = 1,
)

if("J Corp Representative")
our_corporation = J_CORP_REP
CustomizeOffice(null, /obj/structure/pe_sales/jcorp)
order_list = list(
new /datum/data/extraction_cargo("J Corp Casino Token", /obj/item/casinotoken, 200, J_CORP_REP) = 1,
)


else
to_chat(usr, span_warning("ASSIGNMENT ERROR."))
playsound(get_turf(src), 'sound/machines/uplinkerror.ogg', 20, 1)
Expand Down
42 changes: 42 additions & 0 deletions ModularTegustation/tegu_items/representative/items/jcorp.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/obj/item/casinotoken
name = "J-Corp Casino Token"
desc = "You won't get much use of it in this facility. But maybe the wishing well might see this as a more fitting sacrifice?"
icon = 'icons/obj/economy.dmi'
icon_state = "coin_heads"
slot_flags = ITEM_SLOT_POCKETS
w_class = WEIGHT_CLASS_SMALL

/obj/item/a_gift/jcorp
name = "J Corp Brand Lootbox"
desc = "What could be inside of this?"
icon_state = "jcorplootbox1" //Sprite by RayAleciana
inhand_icon_state = "jcorplootbox"
slot_flags = ITEM_SLOT_POCKETS
w_class = WEIGHT_CLASS_SMALL

/obj/item/a_gift/jcorp/Initialize()
. = ..()
icon_state = "jcorplootbox[rand(1,3)]"

/obj/item/a_gift/jcorp/get_gift_type()
var/list/banned_items = subtypesof(/obj/item/lc_debug) + subtypesof(/obj/item/reagent_containers/glass/bottle) + subtypesof(/obj/item/uplink)
if(!GLOB.possible_gifts.len)
var/list/gift_types_list = subtypesof(/obj/item)
for(var/V in gift_types_list)
var/obj/item/I = V
if((!initial(I.icon_state)) || (!initial(I.inhand_icon_state)) || (initial(I.item_flags) & ABSTRACT))
gift_types_list -= V
continue
if(I in banned_items)
gift_types_list -= V
GLOB.possible_gifts = gift_types_list
var/gift_type = pick(GLOB.possible_gifts)
return gift_type

// Crit Sticker (Will Test and add once Critical Hits are in)
///obj/item/clothing/mask/crit_sticker
// name = "J Corp Critical Hit Sticker"
// desc = "A sticker with a J on it. It seems to make you feel more focused when it is on you."
// slot_flags = ITEM_SLOT_POCKETS
// w_class = WEIGHT_CLASS_SMALL
// var/crit_modifier = 2.5
84 changes: 84 additions & 0 deletions ModularTegustation/tegu_items/representative/research/jcorp.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//-----J_CORP-----
//J Corp mostly impacts RNG.

GLOBAL_LIST_EMPTY(jcorp_upgrades)

///Gacha

/datum/data/lc13research/gacha_chance
research_name = "Outlet Rarity Upgrade"
research_desc = "With some power, we can provide the facility with a slightly better chance to get rarer products from places they sell to."
cost = LOW_RESEARCH_PRICE
corp = J_CORP_REP

/datum/data/lc13research/gacha_chance/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
GLOB.jcorp_upgrades += "Gacha Chance 1"

/datum/data/lc13research/gacha_chance2
research_name = "Outlet Rarity Upgrade II"
research_desc = "With some power, we can provide the facility with better chances to get rarer products from places they sell to."
cost = AVERAGE_RESEARCH_PRICE
corp = J_CORP_REP
required_research = /datum/data/lc13research/gacha_chance

/datum/data/lc13research/gacha_chance2/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
GLOB.jcorp_upgrades += "Gacha Chance 2"

/datum/data/lc13research/gacha_chance3
research_name = "Outlet Rarity Upgrade III"
research_desc = "With some more power, we can provide the facility with an even better chances to get rarer products from places they sell to."
cost = HIGH_RESEARCH_PRICE-10
corp = J_CORP_REP
required_research = /datum/data/lc13research/gacha_chance2

/datum/data/lc13research/gacha_chance3/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
GLOB.jcorp_upgrades += "Gacha Chance 3"

/datum/data/lc13research/gacha_chance4
research_name = "Outlet Rarity Upgrade IV"
research_desc = "With some power, we can provide the facility with a final upgrade for better chances to get rarer products from places they sell to. The Suppression Agents and Extraction Officer will likely love you with this research."
cost = HIGH_RESEARCH_PRICE
corp = J_CORP_REP
required_research = /datum/data/lc13research/gacha_chance3

/datum/data/lc13research/gacha_chance4/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
GLOB.jcorp_upgrades += "Gacha Chance 4"

/datum/data/lc13research/well_gacha
research_name = "Wishing Well Output Rates"
research_desc = "According to some information L corp has told us, this well seems to rely tends to be unpredictable, and open to chance, so we can lock some of the bad outcomes from occuring as often."
cost = AVERAGE_RESEARCH_PRICE
corp = J_CORP_REP

/datum/data/lc13research/well_gacha/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
GLOB.jcorp_upgrades += "Well Gacha"

/datum/data/lc13research/lootbox
research_name = "Repeatable: J Corp Brand Lootboxes"
research_desc = "Hey, it's Tom from Marketing. We have been thinking of a new way to try to encourage people to gamble, and we heard some people won't resist a shiny box that can contain something neat. We will send you two boxes if you provide the energy."
cost = AVERAGE_RESEARCH_PRICE
corp = J_CORP_REP

/datum/data/lc13research/lootbox/ResearchEffect(obj/structure/representative_console/caller)
if(repeat_cooldown > world.time)
return
new /obj/item/a_gift/jcorp(get_turf(caller))
new /obj/item/a_gift/jcorp(get_turf(caller))
caller.visible_message(span_notice("The [caller] lights up as it teleports in the Lootboxes."))
repeat_cooldown = world.time + (10 SECONDS)

// Critical Hits (Untested! Don't add till Critical Hits PR is merged)
///datum/data/lc13research/crit_sticker
// research_name = "Critical Hit Sticker"
// research_desc = "These stickers contain locks which should be able to lock away the doubt or second thoughts out of a person's mind midcombat, to make them take the best opprotunites and locations to hit."
// cost = AVERAGE_RESEARCH_PRICE
// corp = J_CORP_REP

// /datum/data/lc13research/crit_sticker/ResearchEffect(obj/structure/representative_console/caller)
// new /obj/item/clothing/mask/crit_sticker(get_turf(caller))
// ..()
4 changes: 4 additions & 0 deletions code/modules/clothing/under/clerksuits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,7 @@
desc = "A sepiatone suit with white undershirt. Used by T-corp staff."
icon_state = "tcorp"

/obj/item/clothing/under/suit/lobotomy/jcorp
name = "j-corp officer uniform"
desc = "A business suit. Used by J-corp staff."
icon_state = "agent" //Placeholder until a sprite is made
5 changes: 5 additions & 0 deletions code/modules/jobs/job_types/trusted_players/representative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"K Corp Representative",
"N Corp Representative",
"P Corp Representative",
"J Corp Representative",
)

/datum/outfit/job/representative/rcorprepresentative
Expand All @@ -64,3 +65,7 @@
/datum/outfit/job/representative/pcorprepresentative
name = "P Corp Representative"
uniform = /obj/item/clothing/under/suit/lobotomy/pcorp

/datum/outfit/job/representitive/jcorprepresentative
name = "J Corp Representative"
uniform = /obj/item/clothing/under/suit/lobotomy/jcorp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
output = "ALEPH"
else
output = "ZAYIN" //If an EGO is not in the lists for whatever reason it will default to zayin
else if(istype(I, /obj/item/casinotoken))
output = "TETH"
to_chat(user, span_notice("You hear a plop as the token comes in contact with the water..."))
user.playsound_local(user, 'sound/items/coinflip.ogg', 80, TRUE)
else
to_chat(user, span_userdanger("The well rejects your item!"))

Expand All @@ -241,6 +245,9 @@
var/gift = null
qdel(I)
var/gacha = rand(1,100)
for(var/upgradecheck in GLOB.jcorp_upgrades)
if(upgradecheck == "Well Gacha")
gacha = min(gacha+5,100)
switch(output)
if("MONEY")
switch(gacha)
Expand Down
Binary file modified icons/mob/inhands/items_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/items_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/storage.dmi
Binary file not shown.
2 changes: 2 additions & 0 deletions lobotomy-corp13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4142,11 +4142,13 @@
#include "ModularTegustation\tegu_items\representative\outfits.dm"
#include "ModularTegustation\tegu_items\representative\research.dm"
#include "ModularTegustation\tegu_items\representative\spawners.dm"
#include "ModularTegustation\tegu_items\representative\items\jcorp.dm"
#include "ModularTegustation\tegu_items\representative\items\kcorp.dm"
#include "ModularTegustation\tegu_items\representative\items\lcorp.dm"
#include "ModularTegustation\tegu_items\representative\items\ncorp.dm"
#include "ModularTegustation\tegu_items\representative\items\pcorp.dm"
#include "ModularTegustation\tegu_items\representative\research\generic.dm"
#include "ModularTegustation\tegu_items\representative\research\jcorp.dm"
#include "ModularTegustation\tegu_items\representative\research\kcorp.dm"
#include "ModularTegustation\tegu_items\representative\research\lcorp.dm"
#include "ModularTegustation\tegu_items\representative\research\ncorp.dm"
Expand Down
Loading