diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fde5e19ae3..bc512e91d2 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -942,6 +942,11 @@ dat += "Bloodsucker" else dat += "Bloodsucker" + //Slave Trader + if(jobban_isbanned(M, ROLE_SLAVER) || isbanned_dept) + dat += "Slaver" + else + dat += "Slaver" //Other Roles (black) diff --git a/modular_splurt/code/game/machinery/computer/slavery.dm b/modular_splurt/code/game/machinery/computer/slavery.dm index 3feaeba762..cd49a46bf9 100644 --- a/modular_splurt/code/game/machinery/computer/slavery.dm +++ b/modular_splurt/code/game/machinery/computer/slavery.dm @@ -97,8 +97,6 @@ slave["price"] = C.price slave["price_change_cooldown"] = round((C.nextPriceChange - world.time) / 10) slave["bought"] = C.bought - slave["shock_cooldown"] = C.shock_cooldown; - slave["in_export_bay"] = FALSE var/turf/curr = get_turf(src) if(pos.z == curr.z) //Distance/Direction calculations for same z-level only @@ -106,6 +104,11 @@ slave["dist"] = max(get_dist(curr, pos), 0) //Distance between the machine and slave turfs slave["degrees"] = round(Get_Angle(curr, pos)) //0-360 degree directional bearing, for more precision. + slave["shock_cooldown"] = C.shock_cooldown + + if (C.nextRecruitChance < world.time) + slave["can_recruit"] = TRUE + var/area/A = get_area(get_turf(L)) if (istype(A, /area/slavers/export)) slave["in_export_bay"] = TRUE @@ -187,6 +190,35 @@ collar.setPrice(newPrice) + if("recruit") + var/mob/living/M = collar.loc + + if(QDELETED(M) || jobban_isbanned(M, ROLE_SLAVER) || jobban_isbanned(M, ROLE_SYNDICATE)) + radioAnnounce("[M.real_name] has failed the background check and cannot join our cause.") + collar.nextRecruitChance = INFINITY + return + + collar.nextRecruitChance = world.time + 10 MINUTES // 10 minutes before we can ask again + var/recruitResponse = tgui_alert(M, "It has been 15 minutes and your station has not paid your ransom. The slavers are offering for you to join their side.", "Recruitment Offer", list("Accept", "Maybe later", "Decline")) + switch(recruitResponse) + if ("Maybe later") + radioAnnounce("[M.real_name] has declined the offer to join our cause for now.") + return + if ("Decline") + radioAnnounce("[M.real_name] has refused the offer to join our cause.") + collar.nextRecruitChance = INFINITY + return + + radioAnnounce("[M.real_name] has accepted the offer to join our cause!") + var/datum/antagonist/slaver/antag_datum = new + antag_datum.send_to_spawnpoint = FALSE + antag_datum.equip_outfit = FALSE + M.mind.add_antag_datum(antag_datum) + message_admins("[key_name_admin(M)] has been recruited as a slaver.") + log_admin("[key_name(M)] has been recruited as a slaver.") + + qdel(collar) + if("export") editBalance(collar.price) GLOB.slavers_credits_total += collar.price diff --git a/modular_splurt/code/game/object/items/devices/radio/electropack.dm b/modular_splurt/code/game/object/items/devices/radio/electropack.dm index e98e74c18b..85821e5bd3 100644 --- a/modular_splurt/code/game/object/items/devices/radio/electropack.dm +++ b/modular_splurt/code/game/object/items/devices/radio/electropack.dm @@ -2,13 +2,14 @@ name = "slave collar" desc = "A reinforced metal collar. This one has a shock element and tracker installed." - var/price = 0 // The ransom amount + var/price // The ransom amount var/bought = FALSE // Has the station paid the ransom var/station_rank - var/nextPriceChange = 0 // Last time the price was changed - var/nextRansomChange = 0 // Last time the ransom was paid / cancelled + var/nextPriceChange // Last time the price was changed + var/nextRansomChange // Last time the ransom was paid / cancelled + var/nextRecruitChance = INFINITY // Next time the slave can get the option to join the slavers shockStrength = 400 - shockCooldown = 200 + shockCooldown = 20 SECONDS code = -1 frequency = -1 @@ -58,12 +59,14 @@ announceMessage = "[M.real_name]'s ransom has increased to [newPrice] credits." else // Price has decreased announceMessage = "[M.real_name]'s ransom has decreased to [newPrice] credits." + else + nextRecruitChance = world.time + 15 MINUTES // Our first time setting the price, now we begin the countdown for when this slave can be recruited price = newPrice - nextPriceChange = world.time + 3000 // Cannot be changed again for 5 minutes + nextPriceChange = world.time + 5 MINUTES // Cannot be changed again for 5 minutes priority_announce(announceMessage, sender_override = GLOB.slavers_team_name) /obj/item/electropack/shockcollar/slave/proc/setBought(isBought) bought = isBought - nextRansomChange = world.time + 1200 // Cannot be changed again for 2 minutes + nextRansomChange = world.time + 5 MINUTES // Cannot be changed again for 5 minutes diff --git a/modular_splurt/code/modules/admin/verbs/one_click_antag.dm b/modular_splurt/code/modules/admin/verbs/one_click_antag.dm index 5860b138b2..a81978e731 100644 --- a/modular_splurt/code/modules/admin/verbs/one_click_antag.dm +++ b/modular_splurt/code/modules/admin/verbs/one_click_antag.dm @@ -11,7 +11,7 @@ for(var/i = 0, i[src] is out of range! It can only be used at your hideout!") return FALSE + return TRUE /obj/item/antag_spawner/slaver_borg/attack_self(mob/user) if(!(check_usability(user))) return + if(!(next_attempt_allowed < world.time)) + to_chat(user, "A request has already been sent! Wait 1 minute.") + return + next_attempt_allowed = world.time + 1 MINUTES + to_chat(user, "You activate [src] and wait for confirmation.") var/list/borg_candidates = pollGhostCandidates("Do you want to play as a slaver [lowertext(borg_to_spawn)] cyborg?", ROLE_SLAVER, null, ROLE_SLAVER, 150, POLL_IGNORE_SLAVER) if(LAZYLEN(borg_candidates)) @@ -58,11 +65,7 @@ else R = new /mob/living/silicon/robot/modules/slaver(T) - var/brainfirstname = pick(GLOB.first_names_male) - if(prob(50)) - brainfirstname = pick(GLOB.first_names_female) - var/brainopslastname = pick(GLOB.last_names) - var/brainopsname = "[brainfirstname] [brainopslastname]" + var/brainopsname = C.prefs.real_name R.mmi.name = "Man-Machine Interface: [brainopsname]" R.mmi.brain.name = "[brainopsname]'s brain" diff --git a/modular_splurt/code/modules/antagonists/slaver/slaver.dm b/modular_splurt/code/modules/antagonists/slaver/slaver.dm index 9ae0fc3e40..c7d13692fb 100644 --- a/modular_splurt/code/modules/antagonists/slaver/slaver.dm +++ b/modular_splurt/code/modules/antagonists/slaver/slaver.dm @@ -62,6 +62,7 @@ GLOBAL_LIST_INIT(slavers_ransom_values, list( var/static/datum/team/slavers/slaver_team = new /datum/team/slavers var/slaver_outfit = /datum/outfit/slaver var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint. + var/equip_outfit = TRUE /datum/antagonist/slaver/proc/update_slaver_icons_added(mob/living/M) var/datum/atom_hud/antag/slaverhud = GLOB.huds[ANTAG_HUD_SLAVER] @@ -102,7 +103,8 @@ GLOBAL_LIST_INIT(slavers_ransom_values, list( /datum/antagonist/slaver/on_gain() forge_objectives() . = ..() - equip_slaver() + if(equip_outfit) + equip_slaver() if(send_to_spawnpoint) move_to_spawnpoint() @@ -130,7 +132,6 @@ GLOBAL_LIST_INIT(slavers_ransom_values, list( /datum/antagonist/slaver/admin_add(datum/mind/new_owner,mob/admin) send_to_spawnpoint = FALSE - new_owner.assigned_role = ROLE_SLAVER new_owner.add_antag_datum(src) message_admins("[key_name_admin(admin)] has slaver'd [new_owner.current].") diff --git a/tgui/packages/tgui/interfaces/SlaveConsole.js b/tgui/packages/tgui/interfaces/SlaveConsole.js index e2769d384f..2cb5545ec5 100644 --- a/tgui/packages/tgui/interfaces/SlaveConsole.js +++ b/tgui/packages/tgui/interfaces/SlaveConsole.js @@ -37,7 +37,7 @@ export const SlaveConsole = (props, context) => { return ( @@ -123,6 +123,17 @@ const SlavePanel = (props, context) => { title={slave.name} buttons={( +