Merge pull request #3914 from Citadel-Station-13/upstream-merge-31947
[MIRROR] Pirate ship event
This commit is contained in:
@@ -108,3 +108,12 @@
|
||||
/area/shuttle/syndicate_scout
|
||||
name = "Syndicate Scout"
|
||||
blob_allowed = FALSE
|
||||
|
||||
/area/shuttle/pirate
|
||||
name = "Pirate Shuttle"
|
||||
blob_allowed = FALSE
|
||||
requires_power = TRUE
|
||||
|
||||
/area/shuttle/pirate/vault
|
||||
name = "Pirate Shuttle Vault"
|
||||
requires_power = FALSE
|
||||
@@ -230,6 +230,10 @@
|
||||
if(!currmsg || !answer || currmsg.possible_answers.len < answer)
|
||||
state = STATE_MESSAGELIST
|
||||
currmsg.answered = answer
|
||||
log_game("[key_name(usr)] answered [currmsg.title] comm message. Answer : [currmsg.answered]")
|
||||
if(currmsg)
|
||||
currmsg.answer_callback.Invoke()
|
||||
|
||||
state = STATE_VIEWMESSAGE
|
||||
if("status")
|
||||
state = STATE_STATUSDISPLAY
|
||||
@@ -359,6 +363,9 @@
|
||||
if(!aicurrmsg || !answer || aicurrmsg.possible_answers.len < answer)
|
||||
aistate = STATE_MESSAGELIST
|
||||
aicurrmsg.answered = answer
|
||||
log_game("[key_name(usr)] answered [currmsg.title] comm message. Answer : [currmsg.answered]")
|
||||
if(aicurrmsg.answer_callback)
|
||||
aicurrmsg.answer_callback.Invoke()
|
||||
aistate = STATE_VIEWMESSAGE
|
||||
if("ai-status")
|
||||
aistate = STATE_STATUSDISPLAY
|
||||
@@ -733,3 +740,13 @@
|
||||
var/content
|
||||
var/list/possible_answers = list()
|
||||
var/answered
|
||||
var/datum/callback/answer_callback
|
||||
|
||||
/datum/comm_message/New(new_title,new_content,new_possible_answers)
|
||||
..()
|
||||
if(title)
|
||||
title = new_title
|
||||
if(content)
|
||||
content = new_content
|
||||
if(new_possible_answers)
|
||||
possible_answers = new_possible_answers
|
||||
@@ -168,7 +168,8 @@
|
||||
return
|
||||
log_game("[user.ckey] golem-swapped into [src]")
|
||||
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
|
||||
create(ckey = user.ckey, flavour = FALSE, name = user.real_name)
|
||||
show_flavour = FALSE
|
||||
create(ckey = user.ckey,name = user.real_name)
|
||||
user.death()
|
||||
return
|
||||
..()
|
||||
@@ -526,3 +527,44 @@
|
||||
/obj/effect/mob_spawn/human/oldsci/Destroy()
|
||||
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
|
||||
return ..()
|
||||
|
||||
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate
|
||||
name = "space pirate sleeper"
|
||||
desc = "A cryo sleeper smelling faintly of rum."
|
||||
random = TRUE
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
mob_name = "a space pirate"
|
||||
mob_species = /datum/species/human
|
||||
outfit = /datum/outfit/pirate/space
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
show_flavour = FALSE //Flavour only exists for spawners menu
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are a space pirate. The station refused to pay for your protection, protect the ship, siphon the credits from the station and raid it for even more loot.</b>"
|
||||
assignedrole = "Space Pirate"
|
||||
var/rank = "Mate"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/special(mob/living/new_spawn)
|
||||
new_spawn.fully_replace_character_name(new_spawn.real_name,generate_pirate_name())
|
||||
new_spawn.mind.add_antag_datum(/datum/antagonist/pirate)
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/proc/generate_pirate_name()
|
||||
var/beggings = strings(PIRATE_NAMES_FILE, "beginnings")
|
||||
var/endings = strings(PIRATE_NAMES_FILE, "endings")
|
||||
return "[rank] [pick(beggings)][pick(endings)]"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/Destroy()
|
||||
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/captain
|
||||
rank = "Captain"
|
||||
outfit = /datum/outfit/pirate/space/captain
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/gunner
|
||||
rank = "Gunner"
|
||||
Reference in New Issue
Block a user