Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
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
69 changes: 0 additions & 69 deletions code/modules/cargo/bounties/syndicate.dm

This file was deleted.

33 changes: 6 additions & 27 deletions code/modules/cargo/bounty.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
GLOBAL_LIST_EMPTY(bounties_list)
GLOBAL_LIST_EMPTY(bounties_list_syndicate)

/datum/bounty
var/name
Expand Down Expand Up @@ -58,19 +57,16 @@ GLOBAL_LIST_EMPTY(bounties_list_syndicate)
/proc/bounty_ship_item_and_contents(atom/movable/AM, dry_run=FALSE)
if(!GLOB.bounties_list.len)
setup_bounties()
if(!GLOB.bounties_list_syndicate.len)
setup_syndicate_bounties()

var/list/matched_one = FALSE
for(var/thing in reverse_range(AM.get_all_contents()))
var/matched_this = FALSE
for(var/list/i in list(GLOB.bounties_list,GLOB.bounties_list_syndicate))
for(var/datum/bounty/B in i)
if(B.applies_to(thing))
matched_one = TRUE
matched_this = TRUE
if(!dry_run)
B.ship(thing)
for(var/datum/bounty/B as anything in GLOB.bounties_list)
if(B.applies_to(thing))
matched_one = TRUE
matched_this = TRUE
if(!dry_run)
B.ship(thing)
if(!dry_run && matched_this)
qdel(thing)
return matched_one
Expand Down Expand Up @@ -204,23 +200,6 @@ GLOBAL_LIST_EMPTY(bounties_list_syndicate)
for(var/low_priority_bounty in low_priority_strict_type_list)
try_add_bounty(new low_priority_bounty)

/proc/setup_syndicate_bounties() //Much simpler as we're only picking from one pool of bounties
for(var/i in 0 to 5)
var/pick = pick(subtypesof(/datum/bounty/item/syndicate))
if(!(try_add_syndie_bounty(new pick)))
i -= 1


/proc/try_add_syndie_bounty(datum/bounty/new_bounty)
if(!new_bounty || !new_bounty.name || !new_bounty.description)
return FALSE
for(var/i in GLOB.bounties_list_syndicate)
var/datum/bounty/B = i
if(!B.compatible_with(new_bounty) || !new_bounty.compatible_with(B))
return FALSE
GLOB.bounties_list_syndicate += new_bounty
return TRUE

/proc/completed_bounty_count()
var/count = 0
for(var/i in GLOB.bounties_list)
Expand Down
16 changes: 0 additions & 16 deletions code/modules/cargo/bounty_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,12 @@
<ul><li>Reward: [B.reward_string()]</li>
<li>Completed: [B.completion_string()]</li></ul>"}

/obj/machinery/computer/bounty/emag_act(mob/user, obj/item/card/emag/emag_card)
if(obj_flags & EMAGGED)
return FALSE
if(istype(emag_card, /obj/item/card/emag/improvised)) // We can't have nice things.
to_chat(user, span_notice("The cheap circuitry isn't strong enough to subvert this!"))
return FALSE
to_chat(user, span_warning("You adjust the antenna on \The [src], tuning it to a syndicate frequency."))
obj_flags |= EMAGGED
do_sparks(8, FALSE, loc)
return TRUE

/obj/machinery/computer/bounty/proc/get_list_to_use()
if(obj_flags & EMAGGED)
return GLOB.bounties_list_syndicate
return GLOB.bounties_list

/obj/machinery/computer/bounty/ui_interact(mob/user, datum/tgui/ui)
var/list/list_to_use = get_list_to_use()
if(!list_to_use.len)
if(get_list_to_use() == GLOB.bounties_list_syndicate)
setup_syndicate_bounties()
setup_bounties()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand All @@ -65,7 +50,6 @@
bountyinfo += list(list("name" = B.name, "description" = B.description, "reward_string" = B.reward_string(), "completion_string" = B.completion_string() , "claimed" = B.claimed, "can_claim" = B.can_claim(), "priority" = B.high_priority, "bounty_ref" = REF(B)))
data["stored_cash"] = cargocash.account_balance
data["bountydata"] = bountyinfo
data["emagged"] = (obj_flags & EMAGGED)
return data

/obj/machinery/computer/bounty/ui_act(action,params)
Expand Down
1 change: 0 additions & 1 deletion yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,6 @@
#include "code\modules\cargo\bounties\security.dm"
#include "code\modules\cargo\bounties\slime.dm"
#include "code\modules\cargo\bounties\special.dm"
#include "code\modules\cargo\bounties\syndicate.dm"
#include "code\modules\cargo\bounties\virus.dm"
#include "code\modules\cargo\exports\gear.dm"
#include "code\modules\cargo\exports\large_objects.dm"
Expand Down