let's be [redacted], its really in t his year

This commit is contained in:
LetterN
2021-03-31 09:43:15 +08:00
parent 8bee5004ba
commit 74c00d17f8
2 changed files with 168 additions and 89 deletions

View File

@@ -7,6 +7,10 @@
earliest_start = 30 MINUTES earliest_start = 30 MINUTES
gamemode_blacklist = list("nuclear") gamemode_blacklist = list("nuclear")
#define PIRATES_ROGUES "Rogues"
// #define PIRATES_SILVERSCALES "Silverscales"
// #define PIRATES_DUTCHMAN "Flying Dutchman"
/datum/round_event_control/pirates/preRunEvent() /datum/round_event_control/pirates/preRunEvent()
if (!SSmapping.empty_space) if (!SSmapping.empty_space)
return EVENT_CANT_RUN return EVENT_CANT_RUN
@@ -15,31 +19,54 @@
/datum/round_event/pirates /datum/round_event/pirates
startWhen = 60 //2 minutes to answer startWhen = 60 //2 minutes to answer
var/datum/comm_message/threat_message var/datum/comm_message/threat_msg
var/payoff = 0 var/payoff = 0
var/payoff_min = 20000
var/paid_off = FALSE var/paid_off = FALSE
var/pirate_type
var/ship_template
var/ship_name = "Space Privateers Association" var/ship_name = "Space Privateers Association"
var/shuttle_spawned = FALSE var/shuttle_spawned = FALSE
/datum/round_event/pirates/setup() /datum/round_event/pirates/setup()
ship_name = pick(strings(PIRATE_NAMES_FILE, "ship_names")) pirate_type = PIRATES_ROGUES //pick(PIRATES_ROGUES, PIRATES_SILVERSCALES, PIRATES_DUTCHMAN)
switch(pirate_type)
if(PIRATES_ROGUES)
ship_name = pick(strings(PIRATE_NAMES_FILE, "rogue_names"))
// if(PIRATES_SILVERSCALES)
// ship_name = pick(strings(PIRATE_NAMES_FILE, "silverscale_names"))
// if(PIRATES_DUTCHMAN)
// ship_name = "Flying Dutchman"
/datum/round_event/pirates/announce(fake) /datum/round_event/pirates/announce(fake)
priority_announce("A business proposition has been downloaded and printed out at all communication consoles.", "Incoming Business Proposition", "commandreport") priority_announce("Incoming subspace communication. Secure channel opened at all communication consoles.", "Incoming Message", "commandreport")
if(fake) if(fake)
return return
threat_message = new threat_msg = new
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D) if(D)
payoff = round(D.account_balance * 0.80) payoff = max(payoff_min, FLOOR(D.account_balance * 0.80, 1000))
threat_message.title = "Business proposition" switch(pirate_type)
threat_message.content = "This is [ship_name]. Pay up [payoff] credits or you'll walk the plank." if(PIRATES_ROGUES)
threat_message.possible_answers = list("We'll pay.","No way.") ship_template = /datum/map_template/shuttle/pirate/default
threat_message.answer_callback = CALLBACK(src,.proc/answered) threat_msg.title = "Sector protection offer"
SScommunications.send_message(threat_message,unique = TRUE) threat_msg.content = "Hey, pal, this is the [ship_name]. Can't help but notice you're rocking a wild and crazy shuttle there with NO INSURANCE! Crazy. What if something happened to it, huh?! We've done a quick evaluation on your rates in this sector and we're offering [payoff] to cover for your shuttle in case of any disaster."
threat_msg.possible_answers = list("Purchase Insurance.","Reject Offer.")
// if(PIRATES_SILVERSCALES)
// ship_template = /datum/map_template/shuttle/pirate/silverscale
// threat_msg.title = "Tribute to high society"
// threat_msg.content = "This is the [ship_name]. The Silver Scales wish for some tribute from your plebeian lizards. [payoff] credits should do the trick."
// threat_msg.possible_answers = list("We'll pay.","Tribute? Really? Go away.")
// if(PIRATES_DUTCHMAN)
// ship_template = /datum/map_template/shuttle/pirate/dutchman
// threat_msg.title = "Business proposition"
// threat_msg.content = "Ahoy! This be the [ship_name]. Cough up [payoff] credits or you'll walk the plank."
// threat_msg.possible_answers = list("We'll pay.","We will not be extorted.")
threat_msg.answer_callback = CALLBACK(src,.proc/answered)
SScommunications.send_message(threat_msg,unique = TRUE)
/datum/round_event/pirates/proc/answered() /datum/round_event/pirates/proc/answered()
if(threat_message && threat_message.answered == 1) if(threat_msg && threat_msg.answered == 1)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D) if(D)
if(D.adjust_money(-payoff)) if(D.adjust_money(-payoff))
@@ -49,10 +76,14 @@
else else
priority_announce("Trying to cheat us? You'll regret this!",sender_override = ship_name) priority_announce("Trying to cheat us? You'll regret this!",sender_override = ship_name)
if(!shuttle_spawned) if(!shuttle_spawned)
priority_announce("You won't listen to reason? Then we'll take what's yours or die trying!",sender_override = ship_name)
spawn_shuttle() spawn_shuttle()
else
priority_announce("Too late to beg for mercy!",sender_override = ship_name)
/datum/round_event/pirates/start() /datum/round_event/pirates/start()
if(threat_msg && !threat_msg.answered)
threat_msg.possible_answers = list("Too late")
threat_msg.answered = 1
if(!paid_off && !shuttle_spawned) if(!paid_off && !shuttle_spawned)
spawn_shuttle() spawn_shuttle()
@@ -62,10 +93,7 @@
var/list/candidates = pollGhostCandidates("Do you wish to be considered for pirate crew?", ROLE_TRAITOR) var/list/candidates = pollGhostCandidates("Do you wish to be considered for pirate crew?", ROLE_TRAITOR)
shuffle_inplace(candidates) shuffle_inplace(candidates)
if(!SSmapping.empty_space) var/datum/map_template/shuttle/pirate/ship = new ship_template
SSmapping.empty_space = SSmapping.add_new_zlevel("Empty Area For Pirates", list(ZTRAIT_LINKAGE = SELFLOOPING))
var/datum/map_template/shuttle/pirate/default/ship = new
var/x = rand(TRANSITIONEDGE,world.maxx - TRANSITIONEDGE - ship.width) var/x = rand(TRANSITIONEDGE,world.maxx - TRANSITIONEDGE - ship.width)
var/y = rand(TRANSITIONEDGE,world.maxy - TRANSITIONEDGE - ship.height) var/y = rand(TRANSITIONEDGE,world.maxy - TRANSITIONEDGE - ship.height)
var/z = SSmapping.empty_space.z_value var/z = SSmapping.empty_space.z_value
@@ -75,6 +103,7 @@
if(!ship.load(T)) if(!ship.load(T))
CRASH("Loading pirate ship failed!") CRASH("Loading pirate ship failed!")
for(var/turf/A in ship.get_affected_turfs(T)) for(var/turf/A in ship.get_affected_turfs(T))
for(var/obj/effect/mob_spawn/human/pirate/spawner in A) for(var/obj/effect/mob_spawn/human/pirate/spawner in A)
if(candidates.len > 0) if(candidates.len > 0)
@@ -84,7 +113,8 @@
announce_to_ghosts(M) announce_to_ghosts(M)
else else
announce_to_ghosts(spawner) announce_to_ghosts(spawner)
priority_announce("Unidentified ship detected near the station.")
priority_announce("Unidentified armed ship detected near the station.")
//Shuttle equipment //Shuttle equipment
@@ -161,10 +191,8 @@
STOP_PROCESSING(SSobj,src) STOP_PROCESSING(SSobj,src)
/obj/machinery/shuttle_scrambler/update_icon_state() /obj/machinery/shuttle_scrambler/update_icon_state()
if(active) icon_state = active ? "dominator-blue" : "dominator"
icon_state = "dominator-blue" return ..()
else
icon_state = "dominator"
/obj/machinery/shuttle_scrambler/Destroy() /obj/machinery/shuttle_scrambler/Destroy()
toggle_off() toggle_off()
@@ -175,7 +203,6 @@
shuttleId = "pirateship" shuttleId = "pirateship"
icon_screen = "syndishuttle" icon_screen = "syndishuttle"
icon_keyboard = "syndie_key" icon_keyboard = "syndie_key"
resistance_flags = INDESTRUCTIBLE
light_color = LIGHT_COLOR_RED light_color = LIGHT_COLOR_RED
possible_destinations = "pirateship_away;pirateship_home;pirateship_custom" possible_destinations = "pirateship_away;pirateship_home;pirateship_custom"
@@ -183,7 +210,6 @@
name = "pirate shuttle navigation computer" name = "pirate shuttle navigation computer"
desc = "Used to designate a precise transit location for the pirate shuttle." desc = "Used to designate a precise transit location for the pirate shuttle."
shuttleId = "pirateship" shuttleId = "pirateship"
resistance_flags = INDESTRUCTIBLE
lock_override = CAMERA_LOCK_STATION lock_override = CAMERA_LOCK_STATION
shuttlePortId = "pirateship_custom" shuttlePortId = "pirateship_custom"
x_offset = 9 x_offset = 9
@@ -193,41 +219,20 @@
/obj/docking_port/mobile/pirate /obj/docking_port/mobile/pirate
name = "pirate shuttle" name = "pirate shuttle"
id = "pirateship" id = "pirateship"
var/engines_cooling = FALSE rechargeTime = 3 MINUTES
var/engine_cooldown = 3 MINUTES
/obj/docking_port/mobile/pirate/getStatusText()
. = ..()
if(engines_cooling)
return "[.] - Engines cooling."
/obj/docking_port/mobile/pirate/initiate_docking(obj/docking_port/stationary/new_dock, movement_direction, force=FALSE)
. = ..()
if(. == DOCKING_SUCCESS && !is_reserved_level(new_dock.z))
engines_cooling = TRUE
addtimer(CALLBACK(src,.proc/reset_cooldown),engine_cooldown,TIMER_UNIQUE)
/obj/docking_port/mobile/pirate/proc/reset_cooldown()
engines_cooling = FALSE
/obj/docking_port/mobile/pirate/canMove()
if(engines_cooling)
return FALSE
return ..()
/obj/machinery/suit_storage_unit/pirate /obj/machinery/suit_storage_unit/pirate
suit_type = /obj/item/clothing/suit/space suit_type = /obj/item/clothing/suit/space
helmet_type = /obj/item/clothing/head/helmet/space helmet_type = /obj/item/clothing/head/helmet/space
mask_type = /obj/item/clothing/mask/breath mask_type = /obj/item/clothing/mask/breath
storage_type = /obj/item/tank/jetpack/void storage_type = /obj/item/tank/jetpack/void
// storage_type = /obj/item/tank/internals/oxygen
/obj/machinery/loot_locator /obj/machinery/loot_locator
name = "Booty Locator" name = "Booty Locator"
desc = "This sophisticated machine scans the nearby space for items of value." desc = "This sophisticated machine scans the nearby space for items of value."
icon = 'icons/obj/machines/research.dmi' icon = 'icons/obj/machines/research.dmi'
icon_state = "tdoppler" icon_state = "tdoppler"
resistance_flags = INDESTRUCTIBLE
density = TRUE density = TRUE
var/cooldown = 300 var/cooldown = 300
var/next_use = 0 var/next_use = 0
@@ -261,23 +266,20 @@
name = "cargo hold pad" name = "cargo hold pad"
icon = 'icons/obj/telescience.dmi' icon = 'icons/obj/telescience.dmi'
icon_state = "lpad-idle-o" icon_state = "lpad-idle-o"
resistance_flags = INDESTRUCTIBLE
var/idle_state = "lpad-idle-o" var/idle_state = "lpad-idle-o"
var/warmup_state = "lpad-idle" var/warmup_state = "lpad-idle"
var/sending_state = "lpad-beam" var/sending_state = "lpad-beam"
var/cargo_hold_id var/cargo_hold_id
/obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/I) /obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/multitool/I)
if(I.tool_behaviour == TOOL_MULTITOOL) . = ..()
if (istype(I))
to_chat(user, "<span class='notice'>You register [src] in [I]s buffer.</span>") to_chat(user, "<span class='notice'>You register [src] in [I]s buffer.</span>")
I.buffer = src I.buffer = src
return TRUE return TRUE
/obj/machinery/computer/piratepad_control /obj/machinery/computer/piratepad_control
name = "cargo hold control terminal" name = "cargo hold control terminal"
resistance_flags = INDESTRUCTIBLE
ui_x = 600
ui_y = 230
var/status_report = "Ready for delivery." var/status_report = "Ready for delivery."
var/obj/machinery/piratepad/pad var/obj/machinery/piratepad/pad
var/warmup_time = 100 var/warmup_time = 100
@@ -291,8 +293,9 @@
..() ..()
return INITIALIZE_HINT_LATELOAD return INITIALIZE_HINT_LATELOAD
/obj/machinery/computer/piratepad_control/multitool_act(mob/living/user, obj/item/I) /obj/machinery/computer/piratepad_control/multitool_act(mob/living/user, obj/item/multitool/I)
if(I.tool_behaviour == TOOL_MULTITOOL && istype(I.buffer,/obj/machinery/piratepad)) . = ..()
if (istype(I) && istype(I.buffer,/obj/machinery/piratepad))
to_chat(user, "<span class='notice'>You link [src] with [I.buffer] in [I] buffer.</span>") to_chat(user, "<span class='notice'>You link [src] with [I.buffer] in [I] buffer.</span>")
pad = I.buffer pad = I.buffer
return TRUE return TRUE
@@ -322,7 +325,8 @@
return data return data
/obj/machinery/computer/piratepad_control/ui_act(action, params) /obj/machinery/computer/piratepad_control/ui_act(action, params)
if(..()) . = ..()
if(.)
return return
if(!pad) if(!pad)
return return
@@ -341,6 +345,7 @@
/obj/machinery/computer/piratepad_control/proc/recalc() /obj/machinery/computer/piratepad_control/proc/recalc()
if(sending) if(sending)
return return
status_report = "Predicted value: " status_report = "Predicted value: "
var/value = 0 var/value = 0
var/datum/export_report/ex = new var/datum/export_report/ex = new
@@ -386,11 +391,13 @@
for(var/datum/export/E in ex.total_amount) for(var/datum/export/E in ex.total_amount)
total_report.total_amount[E] += ex.total_amount[E] total_report.total_amount[E] += ex.total_amount[E]
total_report.total_value[E] += ex.total_value[E] total_report.total_value[E] += ex.total_value[E]
// playsound(loc, 'sound/machines/wewewew.ogg', 70, TRUE)
points += value points += value
if(!value) if(!value)
status_report += "Nothing" status_report += "Nothing"
pad.visible_message("<span class='notice'>[pad] activates!</span>") pad.visible_message("<span class='notice'>[pad] activates!</span>")
flick(pad.sending_state,pad) flick(pad.sending_state,pad)
pad.icon_state = pad.idle_state pad.icon_state = pad.idle_state
@@ -400,16 +407,18 @@
if(sending) if(sending)
return return
sending = TRUE sending = TRUE
status_report = "Sending..." status_report = "Sending... "
pad.visible_message("<span class='notice'>[pad] starts charging up.</span>") pad.visible_message("<span class='notice'>[pad] starts charging up.</span>")
pad.icon_state = pad.warmup_state pad.icon_state = pad.warmup_state
sending_timer = addtimer(CALLBACK(src,.proc/send),warmup_time, TIMER_STOPPABLE) sending_timer = addtimer(CALLBACK(src,.proc/send),warmup_time, TIMER_STOPPABLE)
/obj/machinery/computer/piratepad_control/proc/stop_sending() /obj/machinery/computer/piratepad_control/proc/stop_sending(custom_report)
if(!sending) if(!sending)
return return
sending = FALSE sending = FALSE
status_report = "Idle" status_report = "Ready for delivery."
if(custom_report)
status_report = custom_report
pad.icon_state = pad.idle_state pad.icon_state = pad.idle_state
deltimer(sending_timer) deltimer(sending_timer)

View File

@@ -1,31 +1,101 @@
{ {
"beginnings":[ "beginnings":[
"Star",
"Oort",
"Comet", "Comet",
"Pulsar", "Ion",
"Plasma",
"Void",
"Space",
"Solar",
"Laser", "Laser",
"Ion" "Oort",
"Plasma",
"Pulsar",
"Solar",
"Space",
"Star",
"Void"
], ],
"endings":[ "endings":[
"keel",
"beard", "beard",
"bilge", "bilge",
"hull",
"hook",
"flag",
"deck", "deck",
"salt",
"knot",
"fish", "fish",
"helm" "flag",
"helm",
"hook",
"hull",
"keel",
"knot",
"salt"
], ],
"ship_names":[ "rogue_names":[
"Abyssal Titan",
"Ashes to Ashes",
"Asteroid Blaster",
"Asteroid Dragger",
"Bellowing Spacedragon",
"Blargbeam Solar-slider",
"Blood Money",
"Cosmic Gunboat",
"Customer Service",
"Deadman's Switch",
"Diplomacy Disputer",
"Driftbeam",
"Echoing Laughter",
"Electric Boogaloo",
"Fat Leg",
"Heaven's Cavaliers",
"I Am Become Death",
"I Love the Bomb",
"Ickity Pickety Startooth Knuckle Dragger",
"John Ship",
"Lizard Melter",
"Lost in Deep Space",
"Missile Rack",
"Moth Splatterer",
"New Sins for Old",
"One Last Job",
"Paint Asteroids Red",
"Pastafarianism",
"Raging Meteor",
"Reverse Far Leap",
"Scourge of the Milky Way",
"Silicon Policy",
"Space Grease",
"Space Justice",
"Space Pearl",
"Star Scraper",
"War as a Business",
"Xenophobia",
"Space Queen's Revenge", "Space Queen's Revenge",
"Syndicate Privateer" "Syndicate Privateer"
],
"silverscale_names":[
"Antelope's Run",
"Aristocrat's Principle",
"Aristocratic Tributary",
"Bane of Serfs",
"Benevolence of the Serpentine",
"Casus Belli",
"Celestial Lizardhawk",
"Divine Space Wind",
"Empire Sprawl",
"Guiding Hand",
"His Majesty's Chosen",
"Home Away from Home",
"Jewel of Tizira",
"Manifest Destiny",
"Necessary Evil",
"Pearly Gates",
"Pinnacle of the Stratocracy",
"Prince Regent",
"Right to Rule",
"Ruling Body",
"Serpentine Dominion",
"Silver Fox",
"Silver Sterling",
"Silverchain's Sovereignty",
"Spaceflower",
"Status Quo",
"Swords and Sandals",
"Thesaurus Terror",
"Archduke's Silver Ring",
"Silver Steed"
] ]
} }