Skip to content
Open
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
12 changes: 12 additions & 0 deletions code/game/objects/structures/crates_lockers/crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest
var/base_icon_state

//CC EDIT
/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/fulton) && (!opened))
user.visible_message("[user] attaches a fulton to the [src]", "You attach a fulton to the [src]")
fulton = TRUE
qdel(W)
if(istype(W,/obj/item/drop_signal_horn) && (!opened))
var/obj/item/drop_signal_horn/dsh = W
dsh.sendCrate(user, src)
. = ..()
//CC EDIT END

/obj/structure/closet/crate/Initialize()
. = ..()
if(!base_icon_state)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cargo/packsrogue/_rogue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
if(cost == initial(cost) && !static_cost)
var/na = max(round(cost * randomprice_factor, 1), 1)
cost = max(rand(cost-na, cost+na), 1)
#endif
#endif
5 changes: 4 additions & 1 deletion code/modules/jobs/job_types/roguetown/adventurer/trader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
/datum/advclass/trader/cuisiner,
/datum/advclass/trader/peddler,
/datum/advclass/trader/servant,
/datum/advclass/trader/doomsayer
/datum/advclass/trader/doomsayer,
//CC Edit
/datum/advclass/trader/travelling_merchant
//CC Edit ned
)
20 changes: 20 additions & 0 deletions code/modules/roguetown/roguemachine/mail.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,21 @@
data["paper_cost"] = 1
data["quill_cost"] = 5
data["letter_cost"] = 1
//CC Edit
var/datum/component/travelling_merchant/tmc = user.GetComponent(/datum/component/travelling_merchant)
if(tmc)
data["travellingmerchant_static"] = tmc.ui_static_data_fill_in()
//CC Edit End
return data

/obj/structure/roguemachine/mail/ui_data(mob/user)
var/list/data = list()
data["balance"] = coin_loaded
//CC Edit
var/datum/component/travelling_merchant/tmc = user.GetComponent(/datum/component/travelling_merchant)
if(tmc)
data["travellingmerchant"] = tmc.ui_dynamic_data_fill_in()
//CC Edit end
return data

/obj/structure/roguemachine/mail/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
Expand Down Expand Up @@ -223,6 +233,15 @@
coin_loaded = 0
update_icon()
return TRUE
//CC Edit
if("addToCart")
var/datum/component/travelling_merchant/tmc = user.GetComponent(/datum/component/travelling_merchant)
if(tmc)
tmc.add_to_cart(params["pckpath"])
return TRUE
//CC Edit End



/obj/structure/roguemachine/mail/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/merctoken))
Expand Down Expand Up @@ -670,6 +689,7 @@

if(href_list["directory"])
view_directory(usr)
return

/obj/structure/roguemachine/mail/proc/view_directory(mob/user)
var/dat
Expand Down
7 changes: 7 additions & 0 deletions modular_causticcove/code/__DEFINES/supplies.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#define SUPPLY_TIER_BUDGET "budget"
#define SUPPLY_TIER_COMMON "common"
#define SUPPLY_TIER_GOOD "good"
#define SUPPLY_TIER_EXCELLENT "excellent"
#define SUPPLY_TIER_RESERVE "royal reserve"


Empty file.
65 changes: 65 additions & 0 deletions modular_causticcove/code/modules/supplies/supplyface.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/obj/structure/roguemachine/supplyface
name = "SUPPLYFACE"
desc = "A specialized goldface, which, instead of paying with coins, accepts favours from the Azurian Mercenary's Guild."
icon = 'icons/roguetown/misc/machines.dmi'
icon_state = "streetvendor1" //Placeholder :tm:
var/favours = 100
var/cooldown = 0

/obj/structure/roguemachine/supplyface/Initialize()
. = ..()

/obj/structure/roguemachine/supplyface/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/voucher/quest))
favours += 50
playsound(loc, 'sound/misc/machinevomit.ogg', 100, TRUE, -1)
say("Genuine voucher accepted!")
qdel(P)

/obj/structure/roguemachine/supplyface/attack_hand(mob/living/user)
var/datum/job/mob_job = user.job ? SSjob.GetJob(user.job) : null
if(istype(mob_job, /datum/job/roguetown/merchant))
say("Welcome "+ user.name + "... contact with the Mercenary's Guild estabilished.")
ui_interact(user)
else
say(user.name + " is not authorized as a merchant. This incident will be reported.")
return

/obj/structure/roguemachine/supplyface/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Supplies", "Order Supplies")
ui.open()



/obj/structure/roguemachine/supplyface/ui_static_data(mob/user)
var/list/data = list()
data["favours"] = favours

data["supplymails"] = list()

data["supplymails"]["categories"] = list()

data["supplymails"]["categories"]["Potions"] = list()

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions)

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions/health)

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions/mana)

return data

/obj/structure/roguemachine/supplyface/proc/AddSupplyMailToList(list/appending, datum/supply_mail/sm)
appending[sm::name] = list(
"path" = sm,
"price" = sm.cost,
"desc" = sm.desc,
"tier" = sm.supply_tier,
"contents" = list(),
recipents = sm.recipents
)
for(var/path in sm.contents)
var/atom/A = path
appending[sm::name]["contents"] += A.name + "\n"
39 changes: 39 additions & 0 deletions modular_causticcove/code/modules/supplies/supplyface_datum.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/datum/supplyfacedatum

var/obj/structure/roguemachine/supplyface/parent



/datum/supplyfacedatum/ui_interact(mob/user, datum/tgui/ui)



/datum/supplyfacedatum/ui_static_data(mob/user)
var/list/data = list()
//data["favous"] = favours

data["supplymails"]["categories"] = list()

data["supplymails"]["categories"]["Potions"] = list()

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions)

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions/health)

AddSupplyMailToList(data["supplymails"]["categories"]["Potions"], /datum/supply_mail/potions/mana)

return data

/datum/supplyfacedatum/proc/AddSupplyMailToList(list/appending, datum/supply_mail/sm)
appending[sm::name] = list(
"path" = sm,
"price" = sm.cost,
"desc" = sm.desc,
"tier" = sm.supply_tier,
"contents" = list(),
recipents = sm.recipents
)
for(var/path in sm.contents)
var/atom/A = path
appending[sm::name]["contents"] += A.name + "\n"

14 changes: 14 additions & 0 deletions modular_causticcove/code/modules/supplies/supplymail.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/supply_mail
var/name = "Number fifteen: Burger Duke Foot Cabbage"
var/desc = "If you see this let Mia know..."
var/cost = 0
var/supply_tier = SUPPLY_TIER_BUDGET
var/list/contents = list(
/obj/item/reagent_containers/food/snacks/grown/cabbage/rogue
)
var/list/datum/job/recipents = list(
/datum/job/roguetown/merchant
)



Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/datum/supply_mail/alchemyingredients
recipents = list(
/datum/job/roguetown/apothecary,
/datum/job/roguetown/physician,
/datum/job/roguetown/wapprentice,
/datum/job/roguetown/magician
)

/datum/supply_mail/alchemyingredients/healthpot
name = "Small cache of health potion ingredients"
desc = "Some odds and ends for brewing health potions"
cost = 10
supply_tier = SUPPLY_TIER_BUDGET
contents = list(
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/symphitum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,
/obj/item/alch/taraxacum,

)


/datum/supply_mail/alchemyingredients/healthpot
name = "Small cache of strong health potion ingredients"
desc = "Some odds and ends for brewing strong health potions"
cost = 30
supply_tier = SUPPLY_TIER_BUDGET
contents = list(
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/calendula,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,
/obj/item/alch/viscera,

)


/datum/supply_mail/summoningingredients
recipents = list(
/datum/job/roguetown/wapprentice,
/datum/job/roguetown/magician
)


/datum/supply_mail/summoningingredients/t1
name = "Begineer's summoning supplies"
desc = "Some odds and ends for begineer summoners, enough for 4 summons of each category"
cost = 10
supply_tier = SUPPLY_TIER_BUDGET
contents = list(
/obj/item/ash,
/obj/item/ash,
/obj/item/magic/obsidian,

/obj/item/ash,
/obj/item/ash,
/obj/item/magic/obsidian,

/obj/item/ash,
/obj/item/ash,
/obj/item/magic/obsidian,

/obj/item/ash,
/obj/item/ash,
/obj/item/magic/obsidian,

/obj/item/reagent_containers/food/snacks/grown/manabloom,
/obj/item/reagent_containers/food/snacks/grown/berries/rogue,

/obj/item/reagent_containers/food/snacks/grown/manabloom,
/obj/item/reagent_containers/food/snacks/grown/berries/rogue,

/obj/item/reagent_containers/food/snacks/grown/manabloom,
/obj/item/reagent_containers/food/snacks/grown/berries/rogue,

/obj/item/reagent_containers/food/snacks/grown/manabloom,
/obj/item/reagent_containers/food/snacks/grown/berries/rogue,

/obj/item/reagent_containers/food/snacks/grown/manabloom,
/obj/item/reagent_containers/food/snacks/grown/berries/rogue,

/obj/item/natural/stone,
/obj/item/natural/stone,
/obj/item/magic/manacrystal,

/obj/item/natural/stone,
/obj/item/natural/stone,
/obj/item/magic/manacrystal,

/obj/item/natural/stone,
/obj/item/natural/stone,
/obj/item/magic/manacrystal,

/obj/item/natural/stone,
/obj/item/natural/stone,
/obj/item/magic/manacrystal,

/obj/item/natural/stone,
/obj/item/natural/stone,
/obj/item/magic/manacrystal,

)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/datum/supply_mail/potions
name = "Small cache of potions"
desc = "A variety box of potion bottles"
cost = 50
supply_tier = SUPPLY_TIER_COMMON
contents = list(
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/manapot,
/obj/item/reagent_containers/glass/bottle/rogue/manapot,
/obj/item/reagent_containers/glass/bottle/rogue/stampot
)
recipents = list(
/datum/job/roguetown/merchant,
/datum/job/roguetown/shophand
)

/datum/supply_mail/potions/health
name = "Small cache of health potions"
desc = "5 red potions"
cost = 50
supply_tier = SUPPLY_TIER_BUDGET
contents = list(
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
/obj/item/reagent_containers/glass/bottle/rogue/healthpot,
)

/datum/supply_mail/potions/mana
name = "Tiny cache of mana potions"
desc = "3 blue potions"
cost = 15
supply_tier = SUPPLY_TIER_BUDGET
contents = list(
/obj/item/reagent_containers/glass/bottle/rogue/manapot,
/obj/item/reagent_containers/glass/bottle/rogue/manapot,
/obj/item/reagent_containers/glass/bottle/rogue/manapot
)
Loading
Loading