Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
004754a
objective requesting system
ynot01 Sep 2, 2022
a987f4f
Update folders.dm
ynot01 Sep 2, 2022
b205729
Update folders.dm
ynot01 Sep 2, 2022
9f58c49
Update folders.dm
ynot01 Sep 2, 2022
69d3eef
Update folders.dm
ynot01 Sep 2, 2022
9dc7709
Update uplink_items.dm
ynot01 Sep 2, 2022
0dd2d9c
Update randomverbs.dm
ynot01 Sep 2, 2022
8e923dd
Update folders.dm
ynot01 Sep 2, 2022
720e5cf
Update topic.dm
ynot01 Sep 2, 2022
1fca581
Update topic.dm
ynot01 Sep 2, 2022
a37d363
no overriding diff if they selected one
ynot01 Sep 2, 2022
1f39815
js lints
ynot01 Sep 2, 2022
c97c80c
force & bold
ynot01 Sep 2, 2022
b160424
fix loc and lint
ynot01 Sep 2, 2022
b68c052
add obj
ynot01 Sep 2, 2022
f339f64
remind the admin what diff it is
ynot01 Sep 2, 2022
d0808f0
random might not roll so they all need the desc
ynot01 Sep 2, 2022
9821e10
prevent ANOTHER runtime
ynot01 Sep 2, 2022
54c2109
dont re-find on steals & sanity diff check
ynot01 Sep 2, 2022
1a31716
move can_see so no mobs are required
ynot01 Sep 2, 2022
f2ff253
make assassinate & jacket medium objs
ynot01 Sep 2, 2022
dad07e5
Merge remote-tracking branch 'upstream/master' into request-objectives
ynot01 Feb 22, 2023
b6fd38f
for bbs now
ynot01 Feb 22, 2023
8b59e18
spelling error
ynot01 Feb 22, 2023
bad2b84
Revert "spelling error"
ynot01 Feb 20, 2024
b53277c
Revert "for bbs now"
ynot01 Feb 20, 2024
2ec997c
Merge remote-tracking branch 'upstream/master' into request-objectives
ynot01 Feb 20, 2024
f6e1b0a
restore uplink_items & fix up
ynot01 Feb 20, 2024
70fb5f8
PROC_REF
ynot01 Feb 20, 2024
26a1c6d
REQUEST
ynot01 Feb 20, 2024
7b1ff3e
blackbox record
ynot01 Mar 10, 2024
65c0b68
add costs for maximum GAMBA
ynot01 Mar 16, 2024
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
13 changes: 9 additions & 4 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ GLOBAL_LIST_EMPTY(objectives)
if(!(eq_path in T.contents))
new eq_path(T)
return
if(LAZYLEN(get_owners()) == 0)
return
var/datum/mind/receiver = pick(get_owners())
if(receiver && receiver.current)
if(ishuman(receiver.current))
Expand Down Expand Up @@ -990,6 +992,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)

/datum/objective/destroy/find_target(dupe_search_range, blacklist)
var/list/possible_targets = active_ais(1)
if(LAZYLEN(possible_targets) == 0)
return
var/mob/living/silicon/ai/target_ai = pick(possible_targets)
target = target_ai.mind
update_explanation_text()
Expand Down Expand Up @@ -1358,7 +1362,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
* Kill Pet
*/
/datum/objective/minor/pet
name = "assasinate-pet"
name = "assassinate-pet"
explanation_text = "Assassinate the HoP's assistant, Ian."
/// Pet
var/mob/living/pet
Expand All @@ -1381,7 +1385,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
var/mob/A = locate(P) in GLOB.mob_living_list
if(A && is_station_level(A.z))
possible_pets += P
if(!possible_pets)
if(!possible_pets || LAZYLEN(possible_pets) == 0)
return
var/chosen_pet = rand(1, possible_pets.len)
pet = locate(possible_pets[chosen_pet]) in GLOB.mob_living_list
Expand All @@ -1405,7 +1409,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
update_explanation_text()

/datum/objective/minor/pet/update_explanation_text()
explanation_text = "Assassinate the important animal, [pet.name]"
if(pet?.name)
explanation_text = "Assassinate the important animal, [pet.name]"

/datum/objective/minor/pet/copy_target(datum/objective/minor/pet/old_obj)
. = ..()
Expand Down Expand Up @@ -1689,7 +1694,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)

/datum/objective/gimmick/check_completion()
return TRUE

/datum/objective/gimmick/admin_edit(mob/admin)
update_explanation_text()

Expand Down
8 changes: 4 additions & 4 deletions code/game/gamemodes/objective_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/datum/objective_item/steal/caplaser
name = "the Captain's antique laser gun."
targetitem = /obj/item/gun/energy/laser/captain
difficulty = 5
difficulty = 10
excludefromjob = list("Captain")

/datum/objective_item/steal/hoslaser
Expand All @@ -47,7 +47,7 @@
/datum/objective_item/steal/jetpack
name = "the Captain's jetpack."
targetitem = /obj/item/tank/jetpack/oxygen/captain
difficulty = 5
difficulty = 10
excludefromjob = list("Captain")

/datum/objective_item/steal/magboots
Expand All @@ -71,7 +71,7 @@
/datum/objective_item/steal/nukedisc
name = "the nuclear authentication disk."
targetitem = /obj/item/disk/nuclear
difficulty = 5
difficulty = 15
excludefromjob = list("Captain")

/datum/objective_item/steal/nukedisc/check_special_completion(obj/item/disk/nuclear/N)
Expand All @@ -80,7 +80,7 @@
/datum/objective_item/steal/reflector
name = "a reflective jacket."
targetitem = /obj/item/clothing/suit/armor/laserproof
difficulty = 3
difficulty = 5
excludefromjob = list("Head of Security", "Warden")

/datum/objective_item/steal/aiupload
Expand Down
62 changes: 62 additions & 0 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2297,6 +2297,68 @@
to_chat(src.owner, span_danger("Unable to locate fax!"))
return
owner.send_admin_fax(F)

else if(href_list["uplink_custom_obj"])
if(!check_rights(R_ADMIN))
return
var/datum/uplink_item/new_objective/UPL = locate(href_list["uplink_custom_obj"])
var/mob/requester = locate(href_list["requester"]) in GLOB.mob_list
if(!requester)
to_chat(usr, span_danger("Requesting mob doesn't exist anymore!"))
return
if(!UPL)
to_chat(usr, span_danger("NewObjective datum doesn't exist anymore!"))
return
if(UPL.admin_forging)
to_chat(usr, span_danger("Another admin is already forging an objective for this request!"))
return
if(UPL.obj_set)
to_chat(usr, span_danger("An objective has already been set for this request!"))
return
usr.client.uplink_custom_obj(UPL, requester)

else if(href_list["uplink_custom_obj_accept"])
if(!check_rights(R_ADMIN))
return
var/obj/item/folder/objective/FLD = locate(href_list["uplink_custom_obj_accept"])
var/mob/requester = locate(href_list["requester"]) in GLOB.mob_list
if(!FLD)
to_chat(usr, span_danger("Objective Folder does not exist!"))
return
if(!requester)
to_chat(usr, span_danger("Requesting mob doesn't exist anymore!"))
return
if(!FLD.objective)
to_chat(usr, span_danger("Objective Folder has no objective!"))
return
if(FLD.objective.completed)
to_chat(usr, span_danger("Objective is already marked complete by another admin!"))
return
FLD.objective.completed = TRUE
to_chat(requester, span_notice("The folder lets out a small beep, letting you know that its objective has been marked as complete."))
requester.playsound_local(get_turf(FLD), 'sound/machines/ping.ogg', 20, 0)
message_admins("[key_name_admin(usr)] has marked the custom objective, <b>[FLD.objective.explanation_text]</b>, as complete.")

else if(href_list["uplink_custom_obj_deny"])
if(!check_rights(R_ADMIN))
return
var/obj/item/folder/objective/FLD = locate(href_list["uplink_custom_obj_deny"])
var/mob/requester = locate(href_list["requester"]) in GLOB.mob_list
if(!FLD)
to_chat(usr, span_danger("Objective Folder does not exist!"))
return
if(!requester)
to_chat(usr, span_danger("Requesting mob doesn't exist anymore!"))
return
if(!FLD.objective)
to_chat(usr, span_danger("Objective Folder has no objective!"))
return
if(FLD.objective.completed)
to_chat(usr, span_danger("Objective is already marked complete by another admin!"))
return
to_chat(requester, span_danger("The folder lets out a harsh beep, letting you know that its objective has not been completed."))
requester.playsound_local(get_turf(FLD), 'sound/machines/buzz-two.ogg', 20, 0)
message_admins("[key_name_admin(usr)] has marked the custom objective, <b>[FLD.objective.explanation_text]</b>, as incomplete.")

/client/proc/send_global_fax()
set category = "Admin.Round Interaction"
Expand Down
62 changes: 62 additions & 0 deletions code/modules/admin/verbs/randomverbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1556,3 +1556,65 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
else
usr.forceMove(T)

/client/proc/uplink_custom_obj(var/datum/uplink_item/new_objective/objective_uplink_datum, mob/requester)
if(!check_rights(R_ADMIN))
return

message_admins("[key_name_admin(usr)] is forging a custom objective for [ADMIN_LOOKUPFLW(requester)].")


var/obj_txt = "Kill everyone."
if(objective_uplink_datum.difficulty == 0)
obj_txt = stripped_input(usr, "Custom objective:", "Objective", obj_txt)
else
var/diff_txt = list("EASY", "MEDIUM", "HARD")[objective_uplink_datum.difficulty]
obj_txt = stripped_input(usr, "Custom [diff_txt] objective:", "Objective", obj_txt)
if(!obj_txt)
objective_uplink_datum.admin_forging = FALSE
message_admins("[key_name_admin(usr)] decided not to forge a custom objective.")
objective_uplink_datum.cancelled(requester)
return

var/difficulty = 1
if(objective_uplink_datum.difficulty == 0)
difficulty = input("1-3", "Set Difficulty Rating (Determines TC)", difficulty) as null|num
if(!difficulty || difficulty < 1 || difficulty > 3)
objective_uplink_datum.admin_forging = FALSE
if(difficulty < 1 || difficulty > 3)
to_chat(usr, span_danger("Difficulty must be 1, 2, or 3!"))
message_admins("[key_name_admin(usr)] decided not to forge a custom objective.")
objective_uplink_datum.cancelled(requester)
return
else
difficulty = objective_uplink_datum.difficulty

if(!objective_uplink_datum)
objective_uplink_datum.admin_forging = FALSE
to_chat(usr, span_danger("Requesting uplink item no longer exists!"))
message_admins("[key_name_admin(usr)] decided not to forge a custom objective.")
objective_uplink_datum.cancelled(requester)
return

if(!requester)
objective_uplink_datum.admin_forging = FALSE
to_chat(usr, span_danger("Requesting mob no longer exists!"))
message_admins("[key_name_admin(usr)] decided not to forge a custom objective.")
objective_uplink_datum.cancelled(requester)
return

var/datum/objective/custom/forged_objective = new /datum/objective/custom
forged_objective.explanation_text = obj_txt

var/obj/item/folder/objective/folder = objective_uplink_datum.spawn_objective(requester, forged_objective, difficulty)

var/diff_txt = list("RANDOM", "EASY", "MEDIUM", "HARD")[difficulty+1]
objective_uplink_datum.admin_forging = FALSE
if(folder)
deltimer(objective_uplink_datum.timer)
message_admins("[key_name_admin(usr)] forged a folder objective for [ADMIN_LOOKUPFLW(requester)] with difficulty rating [diff_txt]: <b>[obj_txt]</b>")
log_game("[key_name(usr)] forged a folder objective for [key_name(requester)] with difficulty rating [diff_txt]: <b>[obj_txt]</b>")
else
to_chat(usr, span_danger("Failed to create objective folder!"))
message_admins("[key_name_admin(usr)] attempted to forge a folder objective for [ADMIN_LOOKUPFLW(requester)] with difficulty rating [diff_txt]: <b>[obj_txt]</b>, but it failed to create.")
log_game("[key_name(usr)] attempted to forge a folder objective for [key_name(requester)] with difficulty rating [diff_txt]: <b>[obj_txt]</b>, but it failed to create.")
Loading