Merge remote-tracking branch 'citadel/master' into combat_v7
This commit is contained in:
@@ -684,6 +684,7 @@
|
||||
if(HAS_TRAIT(user, TRAIT_NOPUGILIST))
|
||||
to_chat(user, "<span class='warning'>We would gain nothing by forming our fists into brute-force weapons when we are trained in precision martial arts!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/gloves/fingerless/pugilist/cling // switches between lesser GotNS and Big Punchy Rib Breaky Hands
|
||||
name = "hewn bone gauntlets"
|
||||
|
||||
@@ -181,9 +181,15 @@
|
||||
make_glow()
|
||||
glow.icon_state = "clockwork_gateway_disrupted"
|
||||
resistance_flags |= INDESTRUCTIBLE
|
||||
sleep(27)
|
||||
explosion(src, 1, 3, 8, 8)
|
||||
sound_to_playing_players('sound/effects/explosion_distant.ogg', volume = 50)
|
||||
addtimer(CALLBACK(src, .proc/go_boom), 2.7 SECONDS)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/go_boom()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
explosion(src, 1, 3, 8, 8)
|
||||
sound_to_playing_players('sound/effects/explosion_distant.ogg', volume = 50)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/make_glow()
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
name = "syndicate pinpointer"
|
||||
desc = "A handheld tracking device that locks onto certain signals. It's configured to switch tracking modes once it detects the activation signal of a nuclear device."
|
||||
icon_state = "pinpointer_syndicate"
|
||||
item_state = "pinpointer_black"
|
||||
|
||||
/obj/item/pinpointer/syndicate_cyborg // Cyborg pinpointers just look for a random operative.
|
||||
name = "cyborg syndicate pinpointer"
|
||||
|
||||
79
code/modules/antagonists/space_dragon/space_dragon.dm
Normal file
79
code/modules/antagonists/space_dragon/space_dragon.dm
Normal file
@@ -0,0 +1,79 @@
|
||||
/datum/antagonist/space_dragon
|
||||
name = "Space Dragon"
|
||||
roundend_category = "space dragons"
|
||||
antagpanel_category = "Space Dragon"
|
||||
job_rank = ROLE_SPACE_DRAGON
|
||||
show_in_antagpanel = TRUE
|
||||
show_name_in_check_antagonists = TRUE
|
||||
var/list/datum/mind/carp = list()
|
||||
|
||||
/datum/antagonist/space_dragon/greet()
|
||||
to_chat(owner, "<b>Endless time and space we have moved through. We do not remember from where we came, we do not know where we will go. All space belongs to us.\n\
|
||||
Space is an empty void, of which our kind is the apex predator, and there was little to rival our claim to this title.\n\
|
||||
But now, we find intruders spread out amongst our claim, willing to fight our teeth with magics unimaginable, their dens like lights flicking in the depths of space.\n\
|
||||
Today, we will snuff out one of those lights.</b>")
|
||||
to_chat(owner, "<span class='boldwarning'>You have five minutes to find a safe location to place down the first rift. If you take longer than five minutes to place a rift, you will be returned from whence you came.\n\
|
||||
Alt click to cause a gust around you!</span>")
|
||||
owner.announce_objectives()
|
||||
SEND_SOUND(owner.current, sound('sound/magic/demon_attack1.ogg'))
|
||||
|
||||
/datum/antagonist/space_dragon/proc/forge_objectives()
|
||||
var/datum/objective/summon_carp/summon = new()
|
||||
summon.dragon = src
|
||||
objectives += summon
|
||||
|
||||
/datum/antagonist/space_dragon/on_gain()
|
||||
forge_objectives()
|
||||
. = ..()
|
||||
|
||||
/datum/objective/summon_carp
|
||||
var/datum/antagonist/space_dragon/dragon
|
||||
explanation_text = "Summon and protect the rifts to flood the station with carp."
|
||||
|
||||
/datum/antagonist/space_dragon/roundend_report()
|
||||
var/list/parts = list()
|
||||
var/datum/objective/summon_carp/S = locate() in objectives
|
||||
if(S.check_completion())
|
||||
parts += "<span class='redtext big'>The [name] has succeeded! Station space has been reclaimed by the space carp!</span>"
|
||||
parts += printplayer(owner)
|
||||
var/objectives_complete = TRUE
|
||||
if(objectives.len)
|
||||
parts += printobjectives(objectives)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(!objective.check_completion())
|
||||
objectives_complete = FALSE
|
||||
break
|
||||
if(objectives_complete)
|
||||
parts += "<span class='greentext big'>The [name] was successful!</span>"
|
||||
else
|
||||
parts += "<span class='redtext big'>The [name] has failed!</span>"
|
||||
parts += "<span class='header'>The [name] was assisted by:</span>"
|
||||
parts += printplayerlist(carp)
|
||||
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"
|
||||
|
||||
/datum/antagonist/space_dragon/admin_add(datum/mind/new_owner, mob/admin)
|
||||
// pick the spawn loc
|
||||
var/list/spawn_locs = list()
|
||||
for(var/obj/effect/landmark/carpspawn/carp_spawn in GLOB.landmarks_list)
|
||||
if(!isturf(carp_spawn.loc))
|
||||
stack_trace("Carp spawn found not on a turf: [carp_spawn.type] on [isnull(carp_spawn.loc) ? "null" : carp_spawn.loc.type]")
|
||||
continue
|
||||
spawn_locs += carp_spawn.loc
|
||||
if(!spawn_locs.len)
|
||||
message_admins("No valid spawn locations found, aborting...")
|
||||
return MAP_ERROR
|
||||
|
||||
// spawn our dragon
|
||||
var/mob/living/simple_animal/hostile/space_dragon/S = new(pick(spawn_locs))
|
||||
// gib or delete the old mob here
|
||||
new_owner.current.gib()
|
||||
// alternativelly, isntead of using the code above to pick a location, we can gib the mob, then spawn the dragon where it died for a goresome transformation
|
||||
|
||||
//mind transfer and role setup
|
||||
new_owner.transfer_to(S)
|
||||
new_owner.assigned_role = "Space Dragon"
|
||||
new_owner.special_role = "Space Dragon"
|
||||
|
||||
playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
|
||||
. = ..()
|
||||
return SUCCESSFUL_SPAWN
|
||||
@@ -244,6 +244,7 @@
|
||||
name = "contractor pinpointer"
|
||||
desc = "A handheld tracking device that locks onto certain signals. Ignores suit sensors, but is much less accurate."
|
||||
icon_state = "pinpointer_syndicate"
|
||||
item_state = "pinpointer_black"
|
||||
minimum_range = 25
|
||||
has_owner = TRUE
|
||||
ignore_suit_sensor_level = TRUE
|
||||
|
||||
@@ -166,6 +166,13 @@
|
||||
)
|
||||
parents = list("font-awesome.css" = 'html/font-awesome/css/all.min.css')
|
||||
|
||||
/datum/asset/simple/namespaced/tgfont
|
||||
assets = list(
|
||||
"tgfont.eot" = 'tgui/packages/tgfont/dist/tgfont.eot',
|
||||
"tgfont.woff2" = 'tgui/packages/tgfont/dist/tgfont.woff2',
|
||||
)
|
||||
parents = list("tgfont.css" = 'tgui/packages/tgfont/dist/tgfont.css')
|
||||
|
||||
/datum/asset/spritesheet/chat
|
||||
name = "chat"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
air_contents.set_volume(volume)
|
||||
air_contents.set_temperature(T20C)
|
||||
if(gas_type)
|
||||
air_contents.set_moles(AIR_CONTENTS)
|
||||
air_contents.set_moles(gas_type, AIR_CONTENTS)
|
||||
name = "[name] ([GLOB.meta_gas_names[gas_type]])"
|
||||
setPipingLayer(piping_layer)
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
/obj/machinery/atmospherics/components/unary/tank/air/New()
|
||||
..()
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
air_contents.set_moles(/datum/gas/oxygen, AIR_CONTENTS * 0.2)
|
||||
air_contents.set_moles(/datum/gas/nitrogen, AIR_CONTENTS * 0.8)
|
||||
air_contents.set_moles(/datum/gas/oxygen, AIR_CONTENTS * 0.21)
|
||||
air_contents.set_moles(/datum/gas/nitrogen, AIR_CONTENTS * 0.79)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
|
||||
gas_type = /datum/gas/carbon_dioxide
|
||||
|
||||
@@ -84,17 +84,19 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
|
||||
/datum/export/New()
|
||||
..()
|
||||
SSprocessing.processing += src
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
init_cost = cost
|
||||
export_types = typecacheof(export_types)
|
||||
exclude_types = typecacheof(exclude_types)
|
||||
|
||||
/datum/export/Destroy()
|
||||
SSprocessing.processing -= src
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/datum/export/process()
|
||||
..()
|
||||
. = ..()
|
||||
if(!k_elasticity)
|
||||
return PROCESS_KILL
|
||||
cost *= NUM_E**(k_elasticity * (1/30))
|
||||
if(cost > init_cost)
|
||||
cost = init_cost
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
name = "Cat Surgeon"
|
||||
typepath = /datum/round_event/cat_surgeon
|
||||
max_occurrences = 1
|
||||
weight = 10
|
||||
weight = 8
|
||||
|
||||
/datum/round_event/cat_surgeon/announce(fake)
|
||||
priority_announce("One of our... ahem... 'special' cases has escaped. Our sensors now show their tracker implant on your station. On an unrelated note, has anyone seen our cats?",
|
||||
sender_override = "Nanotrasen Psych Ward")
|
||||
|
||||
/datum/round_event/cat_surgeon/start()
|
||||
var/list/spawn_locs = list()
|
||||
@@ -16,7 +19,7 @@
|
||||
|
||||
var/turf/T = get_turf(pick(spawn_locs))
|
||||
var/mob/living/simple_animal/hostile/cat_butcherer/S = new(T)
|
||||
playsound(S, 'sound/misc/catscream.ogg', 50, 1, -1)
|
||||
playsound(S, 'sound/misc/catscream.ogg', 75, 1, -1)
|
||||
message_admins("A cat surgeon has been spawned at [COORD(T)][ADMIN_JMP(T)]")
|
||||
log_game("A cat surgeon has been spawned at [COORD(T)]")
|
||||
return SUCCESSFUL_SPAWN
|
||||
|
||||
45
code/modules/events/space_dragon.dm
Normal file
45
code/modules/events/space_dragon.dm
Normal file
@@ -0,0 +1,45 @@
|
||||
/datum/round_event_control/space_dragon
|
||||
name = "Spawn Space Dragon"
|
||||
typepath = /datum/round_event/ghost_role/space_dragon
|
||||
weight = 8
|
||||
max_occurrences = 1
|
||||
min_players = 20
|
||||
|
||||
/datum/round_event/ghost_role/space_dragon
|
||||
minimum_required = 1
|
||||
role_name = "Space Dragon"
|
||||
announceWhen = 10
|
||||
|
||||
/datum/round_event/ghost_role/space_dragon/announce(fake)
|
||||
priority_announce("A large organic energy flux has been recorded near of [station_name()], please stand-by.", "Lifesign Alert")
|
||||
|
||||
/datum/round_event/ghost_role/space_dragon/spawn_role()
|
||||
var/list/spawn_locs = list()
|
||||
for(var/obj/effect/landmark/carpspawn/carp_spawn in GLOB.landmarks_list)
|
||||
if(!isturf(carp_spawn.loc))
|
||||
stack_trace("Carp spawn found not on a turf: [carp_spawn.type] on [isnull(carp_spawn.loc) ? "null" : carp_spawn.loc.type]")
|
||||
continue
|
||||
spawn_locs += carp_spawn.loc
|
||||
if(!spawn_locs.len)
|
||||
message_admins("No valid spawn locations found, aborting...")
|
||||
return MAP_ERROR
|
||||
|
||||
var/list/candidates = get_candidates(ROLE_SPACE_DRAGON, null, ROLE_SPACE_DRAGON)
|
||||
if(!candidates.len)
|
||||
return NOT_ENOUGH_PLAYERS
|
||||
|
||||
var/mob/dead/selected = pick_n_take(candidates)
|
||||
|
||||
var/datum/mind/player_mind = new /datum/mind(selected.key)
|
||||
player_mind.active = TRUE
|
||||
|
||||
var/mob/living/simple_animal/hostile/space_dragon/S = new(pick(spawn_locs))
|
||||
player_mind.transfer_to(S)
|
||||
player_mind.assigned_role = "Space Dragon"
|
||||
player_mind.special_role = "Space Dragon"
|
||||
player_mind.add_antag_datum(/datum/antagonist/space_dragon)
|
||||
playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
|
||||
message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Space Dragon by an event.")
|
||||
log_game("[key_name(S)] was spawned as a Space Dragon by an event.")
|
||||
spawned_mobs += S
|
||||
return SUCCESSFUL_SPAWN
|
||||
@@ -514,17 +514,17 @@
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, toxic = FALSE)
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||
return 1
|
||||
/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, vomit_type = VOMIT_TOXIC, harm = TRUE, force = FALSE, purge_ratio = 0.1)
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER) && !force)
|
||||
return TRUE
|
||||
|
||||
if(nutrition < 100 && !blood)
|
||||
if(nutrition < 100 && !blood && !force)
|
||||
if(message)
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
|
||||
if(stun)
|
||||
DefaultCombatKnockdown(200)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(is_mouth_covered()) //make this add a blood/vomit overlay later it'll be hilarious
|
||||
if(message)
|
||||
@@ -537,30 +537,29 @@
|
||||
visible_message("<span class='danger'>[src] throws up!</span>", "<span class='userdanger'>You throw up!</span>")
|
||||
if(!isflyperson(src))
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "vomit", /datum/mood_event/vomit)
|
||||
|
||||
if(stun)
|
||||
Stun(80)
|
||||
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!blood)
|
||||
adjust_nutrition(-lost_nutrition)
|
||||
adjustToxLoss(-3)
|
||||
|
||||
for(var/i=0 to distance)
|
||||
if(blood)
|
||||
if(T)
|
||||
add_splatter_floor(T)
|
||||
if(stun)
|
||||
if(harm)
|
||||
adjustBruteLoss(3)
|
||||
else if(src.reagents.has_reagent(/datum/reagent/consumable/ethanol/blazaam))
|
||||
if(T)
|
||||
T.add_vomit_floor(src, VOMIT_PURPLE)
|
||||
else
|
||||
if(T)
|
||||
T.add_vomit_floor(src, VOMIT_TOXIC)//toxic barf looks different
|
||||
T.add_vomit_floor(src, vomit_type, purge_ratio) //toxic barf looks different || call purge when doing detoxicfication to pump more chems out of the stomach.
|
||||
T = get_step(T, dir)
|
||||
if (is_blocked_turf(T))
|
||||
break
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/spew_organ(power = 5, amt = 1)
|
||||
var/list/spillable_organs = list()
|
||||
|
||||
@@ -840,7 +840,7 @@
|
||||
override = dna.species.override_float
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0)
|
||||
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, vomit_type = VOMIT_TOXIC, harm = TRUE, force = FALSE, purge_ratio = 0.1)
|
||||
if(blood && dna?.species && (NOBLOOD in dna.species.species_traits))
|
||||
if(message)
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
@@ -1095,7 +1095,7 @@
|
||||
* * Rock / Brownish if a golem
|
||||
* * Green if none of the others apply (aka, generic organic)
|
||||
*/
|
||||
/mob/living/carbon/human/proc/spec_trait_examine_font()
|
||||
/mob/living/carbon/human/proc/spec_trait_examine_font()
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
return "<font color='#aaa9ad'>"
|
||||
if(HAS_TRAIT(src, TRAIT_TOXINLOVER))
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
if(getToxLoss() >= 45 && nutrition > 20 && !HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
lastpuke += prob(50)
|
||||
if(lastpuke >= 50) // about 25 second delay I guess
|
||||
vomit(20, toxic = TRUE)
|
||||
vomit(20)
|
||||
lastpuke = 0
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts
|
||||
. = ..()
|
||||
if(laws && isobserver(user))
|
||||
. += "<b>[src] has the following laws:</b>"
|
||||
for(var/law in laws.get_law_list(include_zeroth = TRUE))
|
||||
|
||||
690
code/modules/mob/living/simple_animal/hostile/space_dragon.dm
Normal file
690
code/modules/mob/living/simple_animal/hostile/space_dragon.dm
Normal file
@@ -0,0 +1,690 @@
|
||||
/// The carp rift is currently charging.
|
||||
#define CHARGE_ONGOING 0
|
||||
/// The carp rift is currently charging and has output a final warning.
|
||||
#define CHARGE_FINALWARNING 1
|
||||
/// The carp rift is now fully charged.
|
||||
#define CHARGE_COMPLETED 2
|
||||
/// The darkness threshold for space dragon when choosing a color
|
||||
#define DARKNESS_THRESHOLD 50
|
||||
|
||||
/**
|
||||
* # Space Dragon
|
||||
*
|
||||
* A space-faring leviathan-esque monster which breathes fire and summons carp. Spawned during its respective midround antagonist event.
|
||||
*
|
||||
* A space-faring monstrosity who has the ability to breathe dangerous fire breath and uses its powerful wings to knock foes away.
|
||||
* Normally spawned as an antagonist during the Space Dragon event, Space Dragon's main goal is to open three rifts from which to pull a great tide of carp onto the station.
|
||||
* Space Dragon can summon only one rift at a time, and can do so anywhere a blob is allowed to spawn. In order to trigger his victory condition, Space Dragon must summon and defend three rifts while they charge.
|
||||
* Space Dragon, when spawned, has five minutes to summon the first rift. Failing to do so will cause Space Dragon to return from whence he came.
|
||||
* When the rift spawns, ghosts can interact with it to spawn in as space carp to help complete the mission. One carp is granted when the rift is first summoned, with an extra one every 30 seconds.
|
||||
* Once the victory condition is met, all current rifts become invulnerable to damage, are allowed to spawn infinite sentient space carp, and Space Dragon gets unlimited rage.
|
||||
* Alternatively, if the shuttle arrives while Space Dragon is still active, their victory condition will automatically be met and all the rifts will immediately become fully charged.
|
||||
* If a charging rift is destroyed, Space Dragon will be incredibly slowed, and the endlag on his gust attack is greatly increased on each use.
|
||||
* Space Dragon has the following abilities to assist him with his objective:
|
||||
* - Can shoot fire in straight line, dealing 30 burn damage and setting those suseptible on fire.
|
||||
* - Can use his wings to temporarily stun and knock back any nearby mobs. This attack has no cooldown, but instead has endlag after the attack where Space Dragon cannot act. This endlag's time decreases over time, but is added to every time he uses the move.
|
||||
* - Can swallow mob corpses to heal for half their max health. Any corpses swallowed are stored within him, and will be regurgitated on death.
|
||||
* - Can tear through any type of wall. This takes 4 seconds for most walls, and 12 seconds for reinforced walls.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon
|
||||
name = "Space Dragon"
|
||||
desc = "A vile, leviathan-esque creature that flies in the most unnatural way. Looks slightly similar to a space carp."
|
||||
maxHealth = 400
|
||||
health = 400
|
||||
a_intent = INTENT_HARM
|
||||
speed = 0
|
||||
attack_verb_continuous = "chomps"
|
||||
attack_verb_simple = "chomp"
|
||||
attack_sound = 'sound/magic/demon_attack1.ogg'
|
||||
deathsound = 'sound/creatures/space_dragon_roar.ogg'
|
||||
icon = 'icons/mob/spacedragon.dmi'
|
||||
icon_state = "spacedragon"
|
||||
icon_living = "spacedragon"
|
||||
icon_dead = "spacedragon_dead"
|
||||
obj_damage = 50
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 | HEAR_1
|
||||
melee_damage_upper = 35
|
||||
melee_damage_lower = 35
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
armour_penetration = 30
|
||||
pixel_x = -16
|
||||
turns_per_move = 5
|
||||
movement_type = FLYING
|
||||
health_doll_icon = "spacedragon"
|
||||
ranged = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/bone = 30)
|
||||
deathmessage = "screeches as its wings turn to dust and it collapses on the floor, its life extinguished."
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 1500
|
||||
faction = list("carp")
|
||||
pressure_resistance = 200
|
||||
/// Current time since the the last rift was activated. If set to -1, does not increment.
|
||||
var/riftTimer = 0
|
||||
/// Maximum amount of time which can pass without a rift before Space Dragon despawns.
|
||||
var/maxRiftTimer = 300
|
||||
/// How much endlag using Wing Gust should apply. Each use of wing gust increments this, and it decreases over time.
|
||||
var/tiredness = 0
|
||||
/// A multiplier to how much each use of wing gust should add to the tiredness variable. Set to 5 if the current rift is destroyed.
|
||||
var/tiredness_mult = 1
|
||||
/// The distance Space Dragon's gust reaches
|
||||
var/gust_distance = 4
|
||||
/// The amount of tiredness to add to Space Dragon per use of gust
|
||||
var/gust_tiredness = 30
|
||||
/// Determines whether or not Space Dragon is in the middle of using wing gust. If set to true, prevents him from moving and doing certain actions.
|
||||
var/using_special = FALSE
|
||||
/// Determines whether or not Space Dragon is currently tearing through a wall.
|
||||
var/tearing_wall = FALSE
|
||||
/// A list of all of the rifts created by Space Dragon. Used for setting them all to infinite carp spawn when Space Dragon wins, and removing them when Space Dragon dies.
|
||||
var/list/obj/structure/carp_rift/rift_list = list()
|
||||
/// How many rifts have been successfully charged
|
||||
var/rifts_charged = 0
|
||||
/// Whether or not Space Dragon has completed their objective, and thus triggered the ending sequence.
|
||||
var/objective_complete = FALSE
|
||||
/// The innate ability to summon rifts
|
||||
var/datum/action/innate/summon_rift/rift
|
||||
/// The color of the space dragon.
|
||||
var/chosen_color
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/Initialize(mapload)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT)
|
||||
rift = new
|
||||
rift.Grant(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/Login()
|
||||
. = ..()
|
||||
if(!chosen_color)
|
||||
dragon_name()
|
||||
color_selection()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/Life()
|
||||
. = ..()
|
||||
tiredness = max(tiredness - 1, 0)
|
||||
for(var/mob/living/consumed_mob in src)
|
||||
if(consumed_mob.stat == DEAD)
|
||||
continue
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
visible_message("<span class='danger'>[src] vomits up [consumed_mob]!</span>")
|
||||
consumed_mob.forceMove(loc)
|
||||
consumed_mob.Paralyze(50)
|
||||
if((rifts_charged == 3 || (SSshuttle.emergency.mode == SHUTTLE_DOCKED && rifts_charged > 0)) && !objective_complete)
|
||||
victory()
|
||||
if(riftTimer == -1)
|
||||
return
|
||||
riftTimer = min(riftTimer + 1, maxRiftTimer + 1)
|
||||
if(riftTimer == (maxRiftTimer - 60))
|
||||
to_chat(src, "<span class='boldwarning'>You have a minute left to summon the rift! Get to it!</span>")
|
||||
return
|
||||
if(riftTimer >= maxRiftTimer)
|
||||
to_chat(src, "<span class='boldwarning'>You've failed to summon the rift in a timely manner! You're being pulled back from whence you came!</span>")
|
||||
destroy_rifts()
|
||||
playsound(src, 'sound/magic/demon_dies.ogg', 100, TRUE)
|
||||
QDEL_NULL(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/AttackingTarget()
|
||||
if(using_special)
|
||||
return
|
||||
if(target == src)
|
||||
to_chat(src, "<span class='warning'>You almost bite yourself, but then decide against it.</span>")
|
||||
return
|
||||
if(istype(target, /turf/closed/wall))
|
||||
if(tearing_wall)
|
||||
return
|
||||
tearing_wall = TRUE
|
||||
var/turf/closed/wall/thewall = target
|
||||
to_chat(src, "<span class='warning'>You begin tearing through the wall...</span>")
|
||||
playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE)
|
||||
var/timetotear = 40
|
||||
if(istype(target, /turf/closed/wall/r_wall))
|
||||
timetotear = 120
|
||||
if(do_after(src, timetotear, target = thewall))
|
||||
if(istype(thewall, /turf/open))
|
||||
return
|
||||
thewall.dismantle_wall(1)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
|
||||
tearing_wall = FALSE
|
||||
return
|
||||
if(isliving(target)) //Swallows corpses like a snake to regain health.
|
||||
var/mob/living/L = target
|
||||
if(L.stat == DEAD)
|
||||
to_chat(src, "<span class='warning'>You begin to swallow [L] whole...</span>")
|
||||
if(do_after(src, 30, target = L))
|
||||
if(eat(L))
|
||||
adjustHealth(-L.maxHealth * 0.5)
|
||||
return
|
||||
. = ..()
|
||||
if(istype(target, /obj/mecha))
|
||||
var/obj/mecha/M = target
|
||||
M.take_damage(50, BRUTE, MELEE, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/AltClickOn(atom/A)
|
||||
. = ..()
|
||||
if(using_special)
|
||||
return
|
||||
using_special = TRUE
|
||||
icon_state = "spacedragon_gust"
|
||||
add_dragon_overlay()
|
||||
useGust(0)
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/Move()
|
||||
if(!using_special)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/OpenFire()
|
||||
if(using_special)
|
||||
return
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
fire_stream()
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/death(gibbed)
|
||||
empty_contents()
|
||||
if(!objective_complete)
|
||||
destroy_rifts()
|
||||
..()
|
||||
add_dragon_overlay()
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/revive(full_heal, admin_revive)
|
||||
. = ..()
|
||||
add_dragon_overlay()
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/wabbajack_act(mob/living/new_mob)
|
||||
empty_contents()
|
||||
. = ..()
|
||||
|
||||
/**
|
||||
* Allows space dragon to choose its own name.
|
||||
*
|
||||
* Prompts the space dragon to choose a name, which it will then apply to itself.
|
||||
* If the name is invalid, will re-prompt the dragon until a proper name is chosen.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/dragon_name()
|
||||
var/chosen_name = sanitize_name(reject_bad_text(stripped_input(src, "What would you like your name to be?", "Choose Your Name", real_name, MAX_NAME_LEN)))
|
||||
if(!chosen_name)
|
||||
to_chat(src, "<span class='warning'>Not a valid name, please try again.</span>")
|
||||
dragon_name()
|
||||
return
|
||||
visible_message("<span class='notice'>Your name is now <span class='name'>[chosen_name]</span>, the feared Space Dragon.</span>")
|
||||
fully_replace_character_name(null, chosen_name)
|
||||
|
||||
/**
|
||||
* Allows space dragon to choose a color for itself.
|
||||
*
|
||||
* Prompts the space dragon to choose a color, from which it will then apply to itself.
|
||||
* If an invalid color is given, will re-prompt the dragon until a proper color is chosen.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/color_selection()
|
||||
chosen_color = input(src,"What would you like your color to be?","Choose Your Color", COLOR_WHITE) as color|null
|
||||
if(!chosen_color) //redo proc until we get a color
|
||||
to_chat(src, "<span class='warning'>Not a valid color, please try again.</span>")
|
||||
color_selection()
|
||||
return
|
||||
var/temp_hsv = RGBtoHSV(chosen_color)
|
||||
if(ReadHSV(temp_hsv)[3] < DARKNESS_THRESHOLD)
|
||||
to_chat(src, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
color_selection()
|
||||
return
|
||||
add_atom_colour(chosen_color, FIXED_COLOUR_PRIORITY)
|
||||
add_dragon_overlay()
|
||||
|
||||
/**
|
||||
* Adds the proper overlay to the space dragon.
|
||||
*
|
||||
* Clears the current overlay on space dragon and adds a proper one for whatever animation he's in.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/add_dragon_overlay()
|
||||
cut_overlays()
|
||||
if(stat == DEAD)
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, "overlay_dead")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
return
|
||||
if(!using_special)
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, "overlay_base")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
return
|
||||
if(using_special)
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, "overlay_gust")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
|
||||
/**
|
||||
* Determines a line of turfs from sources's position to the target with length range.
|
||||
*
|
||||
* Determines a line of turfs from the source's position to the target with length range.
|
||||
* The line will extend on past the target if the range is large enough, and not reach the target if range is small enough.
|
||||
* Arguments:
|
||||
* * offset - whether or not to aim slightly to the left or right of the target
|
||||
* * range - how many turfs should we go out for
|
||||
* * atom/at - The target
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/line_target(offset, range, atom/at = target)
|
||||
if(!at)
|
||||
return
|
||||
var/angle = ATAN2(at.x - src.x, at.y - src.y) + offset
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/i in 1 to range)
|
||||
var/turf/check = locate(src.x + cos(angle) * i, src.y + sin(angle) * i, src.z)
|
||||
if(!check)
|
||||
break
|
||||
T = check
|
||||
return (getline(src, T) - get_turf(src))
|
||||
|
||||
/**
|
||||
* Spawns fire at each position in a line from the source to the target.
|
||||
*
|
||||
* Spawns fire at each position in a line from the source to the target.
|
||||
* Stops if it comes into contact with a solid wall, a window, or a door.
|
||||
* Delays the spawning of each fire by 1.5 deciseconds.
|
||||
* Arguments:
|
||||
* * atom/at - The target
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/fire_stream(atom/at = target)
|
||||
playsound(get_turf(src),'sound/magic/fireball.ogg', 200, TRUE)
|
||||
var/range = 20
|
||||
var/list/turfs = list()
|
||||
turfs = line_target(0, range, at)
|
||||
var/delayFire = -1.0
|
||||
for(var/turf/T in turfs)
|
||||
if(istype(T, /turf/closed))
|
||||
return
|
||||
for(var/obj/structure/window/W in T.contents)
|
||||
return
|
||||
for(var/obj/machinery/door/D in T.contents)
|
||||
if(D.density)
|
||||
return
|
||||
delayFire += 1.0
|
||||
addtimer(CALLBACK(src, .proc/dragon_fire_line, T), delayFire)
|
||||
|
||||
/**
|
||||
* What occurs on each tile to actually create the fire.
|
||||
*
|
||||
* Creates a fire on the given turf.
|
||||
* It creates a hotspot on the given turf, damages any living mob with 30 burn damage, and damages mechs by 50.
|
||||
* It can only hit any given target once.
|
||||
* Arguments:
|
||||
* * turf/T - The turf to trigger the effects on.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/dragon_fire_line(turf/T)
|
||||
var/list/hit_list = list()
|
||||
hit_list += src
|
||||
new /obj/effect/hotspot(T)
|
||||
T.hotspot_expose(700,50,1)
|
||||
for(var/mob/living/L in T.contents)
|
||||
if(L in hit_list)
|
||||
continue
|
||||
hit_list += L
|
||||
L.adjustFireLoss(30)
|
||||
to_chat(L, "<span class='userdanger'>You're hit by [src]'s fire breath!</span>")
|
||||
// deals damage to mechs
|
||||
for(var/obj/mecha/M in T.contents)
|
||||
if(M in hit_list)
|
||||
continue
|
||||
hit_list += M
|
||||
M.take_damage(50, BRUTE, MELEE, 1)
|
||||
|
||||
/**
|
||||
* Handles consuming and storing consumed things inside Space Dragon
|
||||
*
|
||||
* Plays a sound and then stores the consumed thing inside Space Dragon.
|
||||
* Used in AttackingTarget(), paired with a heal should it succeed.
|
||||
* Arguments:
|
||||
* * atom/movable/A - The thing being consumed
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/eat(atom/movable/A)
|
||||
if(A && A.loc != src)
|
||||
playsound(src, 'sound/magic/demon_attack1.ogg', 100, TRUE)
|
||||
visible_message("<span class='warning'>[src] swallows [A] whole!</span>")
|
||||
A.forceMove(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Disperses the contents of the mob on the surrounding tiles.
|
||||
*
|
||||
* Randomly places the contents of the mob onto surrounding tiles.
|
||||
* Has a 10% chance to place on the same tile as the mob.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/empty_contents()
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(loc)
|
||||
if(prob(90))
|
||||
step(AM, pick(GLOB.alldirs))
|
||||
|
||||
/**
|
||||
* Resets Space Dragon's status after using wing gust.
|
||||
*
|
||||
* Resets Space Dragon's status after using wing gust.
|
||||
* If it isn't dead by the time it calls this method, reset the sprite back to the normal living sprite.
|
||||
* Also sets the using_special variable to FALSE, allowing Space Dragon to move and attack freely again.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/reset_status()
|
||||
if(stat != DEAD)
|
||||
icon_state = "spacedragon"
|
||||
using_special = FALSE
|
||||
add_dragon_overlay()
|
||||
|
||||
/**
|
||||
* Handles Space Dragon's temporary empowerment after boosting a rift.
|
||||
*
|
||||
* Empowers and depowers Space Dragon after a successful rift charge.
|
||||
* Empowered, Space Dragon regains all his health and becomes temporarily faster for 30 seconds, along with being tinted red.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/rift_empower(is_permanent)
|
||||
fully_heal()
|
||||
add_filter("anger_glow", 3, list("type" = "outline", "color" = "#ff330030", "size" = 5))
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/dragon_rage)
|
||||
addtimer(CALLBACK(src, .proc/rift_depower), 30 SECONDS)
|
||||
|
||||
/**
|
||||
* Gives Space Dragon their the rift speed buff permanantly.
|
||||
*
|
||||
* Gives Space Dragon the enraged speed buff from charging rifts permanantly.
|
||||
* Only happens in circumstances where Space Dragon completes their objective.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/permanant_empower()
|
||||
fully_heal()
|
||||
add_filter("anger_glow", 3, list("type" = "outline", "color" = "#ff330030", "size" = 5))
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/dragon_rage)
|
||||
|
||||
/**
|
||||
* Removes Space Dragon's rift speed buff.
|
||||
*
|
||||
* Removes Space Dragon's speed buff from charging a rift. This is only called
|
||||
* in rift_empower, which uses a timer to call this after 30 seconds. Also
|
||||
* removes the red glow from Space Dragon which is synonymous with the speed buff.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/rift_depower()
|
||||
remove_filter("anger_glow")
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/dragon_rage)
|
||||
|
||||
/**
|
||||
* Destroys all of Space Dragon's current rifts.
|
||||
*
|
||||
* QDeletes all the current rifts after removing their references to other objects.
|
||||
* Currently, the only reference they have is to the Dragon which created them, so we clear that before deleting them.
|
||||
* Currently used when Space Dragon dies or one of his rifts is destroyed.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/destroy_rifts()
|
||||
rifts_charged = 0
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/dragon_depression)
|
||||
riftTimer = -1
|
||||
tiredness_mult = 5
|
||||
playsound(src, 'sound/vehicles/rocketlaunch.ogg', 100, TRUE)
|
||||
for(var/obj/structure/carp_rift/rift in rift_list)
|
||||
rift.dragon = null
|
||||
rift_list -= rift
|
||||
if(!QDELETED(rift))
|
||||
QDEL_NULL(rift)
|
||||
|
||||
/**
|
||||
* Handles wing gust from the windup all the way to the endlag at the end.
|
||||
*
|
||||
* Handles the wing gust attack from start to finish, based on the timer.
|
||||
* When intially triggered, starts at 0. Until the timer reaches 10, increase Space Dragon's y position by 2 and call back to the function in 1.5 deciseconds.
|
||||
* When the timer is at 10, trigger the attack. Change Space Dragon's sprite. reset his y position, and push all living creatures back in a 3 tile radius and stun them for 5 seconds.
|
||||
* Stay in the ending state for how much our tiredness dictates and add to our tiredness.
|
||||
* Arguments:
|
||||
* * timer - The timer used for the windup.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/useGust(timer)
|
||||
if(timer != 10)
|
||||
pixel_y = pixel_y + 2;
|
||||
addtimer(CALLBACK(src, .proc/useGust, timer + 1), 1.5)
|
||||
return
|
||||
pixel_y = 0
|
||||
icon_state = "spacedragon_gust_2"
|
||||
cut_overlays()
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, "overlay_gust_2")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
playsound(src, 'sound/effects/gravhit.ogg', 100, TRUE)
|
||||
var/gust_locs = spiral_range_turfs(gust_distance, get_turf(src))
|
||||
var/list/hit_things = list()
|
||||
for(var/turf/T in gust_locs)
|
||||
for(var/mob/living/L in T.contents)
|
||||
if(L == src)
|
||||
continue
|
||||
hit_things += L
|
||||
visible_message("<span class='boldwarning'>[L] is knocked back by the gust!</span>")
|
||||
to_chat(L, "<span class='userdanger'>You're knocked back by the gust!</span>")
|
||||
var/dir_to_target = get_dir(get_turf(src), get_turf(L))
|
||||
var/throwtarget = get_edge_target_turf(target, dir_to_target)
|
||||
L.safe_throw_at(throwtarget, 10, 1, src)
|
||||
L.Paralyze(50)
|
||||
addtimer(CALLBACK(src, .proc/reset_status), 4 + ((tiredness * tiredness_mult) / 10))
|
||||
tiredness = tiredness + (gust_tiredness * tiredness_mult)
|
||||
|
||||
/**
|
||||
* Sets up Space Dragon's victory for completing the objectives.
|
||||
*
|
||||
* Triggers when Space Dragon completes his objective.
|
||||
* Calls the shuttle with a coefficient of 3, making it impossible to recall.
|
||||
* Sets all of his rifts to allow for infinite sentient carp spawns
|
||||
* Also plays appropiate sounds and CENTCOM messages.
|
||||
*/
|
||||
/mob/living/simple_animal/hostile/space_dragon/proc/victory()
|
||||
objective_complete = TRUE
|
||||
permanant_empower()
|
||||
var/datum/antagonist/space_dragon/S = mind.has_antag_datum(/datum/antagonist/space_dragon)
|
||||
if(S)
|
||||
var/datum/objective/summon_carp/main_objective = locate() in S.objectives
|
||||
if(main_objective)
|
||||
main_objective.completed = TRUE
|
||||
priority_announce("A large amount of lifeforms have been detected approaching [station_name()] at extreme speeds. Remaining crew are advised to evacuate as soon as possible.", "Central Command Wildlife Observations")
|
||||
sound_to_playing_players('sound/creatures/space_dragon_roar.ogg')
|
||||
for(var/obj/structure/carp_rift/rift in rift_list)
|
||||
rift.carp_stored = 999999
|
||||
rift.time_charged = rift.max_charge
|
||||
|
||||
/datum/action/innate/summon_rift
|
||||
name = "Summon Rift"
|
||||
desc = "Summon a rift to bring forth a horde of space carp."
|
||||
background_icon_state = "bg_default"
|
||||
icon_icon = 'icons/mob/actions/actions_space_dragon.dmi'
|
||||
button_icon_state = "carp_rift"
|
||||
|
||||
/datum/action/innate/summon_rift/Activate()
|
||||
var/mob/living/simple_animal/hostile/space_dragon/S = owner
|
||||
if(S.using_special)
|
||||
return
|
||||
if(S.riftTimer == -1)
|
||||
to_chat(S, "<span class='warning'>Your death has left you unable to summon rifts!</span>")
|
||||
return
|
||||
var/area/A = get_area(S)
|
||||
if(!(A.area_flags & (VALID_TERRITORY | BLOBS_ALLOWED)))
|
||||
to_chat(S, "<span class='warning'>You can't summon a rift here! Try summoning somewhere secure within the station!</span>")
|
||||
return
|
||||
for(var/obj/structure/carp_rift/rift in S.rift_list)
|
||||
var/area/RA = get_area(rift)
|
||||
if(RA == A)
|
||||
to_chat(S, "<span class='warning'>You've already summoned a rift in this area! You have to summon again somewhere else!</span>")
|
||||
return
|
||||
to_chat(S, "<span class='warning'>You begin to open a rift...</span>")
|
||||
if(do_after(S, 100, target = S))
|
||||
for(var/obj/structure/carp_rift/c in S.loc.contents)
|
||||
return
|
||||
var/obj/structure/carp_rift/CR = new /obj/structure/carp_rift(S.loc)
|
||||
playsound(S, 'sound/vehicles/rocketlaunch.ogg', 100, TRUE)
|
||||
S.riftTimer = -1
|
||||
CR.dragon = S
|
||||
S.rift_list += CR
|
||||
to_chat(S, "<span class='boldwarning'>The rift has been summoned. Prevent the crew from destroying it at all costs!</span>")
|
||||
notify_ghosts("The Space Dragon has opened a rift!", source = CR, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Carp Rift Opened")
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* # Carp Rift
|
||||
*
|
||||
* The portals Space Dragon summons to bring carp onto the station.
|
||||
*
|
||||
* The portals Space Dragon summons to bring carp onto the station. His main objective is to summon 3 of them and protect them from being destroyed.
|
||||
* The portals can summon sentient space carp in limited amounts. The portal also changes color based on whether or not a carp spawn is available.
|
||||
* Once it is fully charged, it becomes indestructible, and intermitently spawns non-sentient carp. It is still destroyed if Space Dragon dies.
|
||||
*/
|
||||
/obj/structure/carp_rift
|
||||
name = "carp rift"
|
||||
desc = "A rift akin to the ones space carp use to travel long distances."
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
max_integrity = 300
|
||||
icon = 'icons/obj/carp_rift.dmi'
|
||||
icon_state = "carp_rift_carpspawn"
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
light_range = 10
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = MASSIVE_OBJ_LAYER
|
||||
/// The amount of time the rift has charged for.
|
||||
var/time_charged = 0
|
||||
/// The maximum charge the rift can have.
|
||||
var/max_charge = 300
|
||||
/// How many carp spawns it has available.
|
||||
var/carp_stored = 1
|
||||
/// A reference to the Space Dragon that created it.
|
||||
var/mob/living/simple_animal/hostile/space_dragon/dragon
|
||||
/// Current charge state of the rift.
|
||||
var/charge_state = CHARGE_ONGOING
|
||||
/// The interval for adding additional space carp spawns to the rift.
|
||||
var/carp_interval = 30
|
||||
/// The time since an extra carp was added to the ghost role spawning pool.
|
||||
var/last_carp_inc = 0
|
||||
|
||||
/obj/structure/carp_rift/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/carp_rift/examine(mob/user)
|
||||
. = ..()
|
||||
if(time_charged < max_charge)
|
||||
. += "<span class='notice'>It seems to be [(time_charged / max_charge) * 100]% charged.</span>"
|
||||
else
|
||||
. += "<span class='warning'>This one is fully charged. In this state, it is poised to transport a much larger amount of carp than normal.</span>"
|
||||
|
||||
if(isobserver(user))
|
||||
. += "<span class='notice'>It has [carp_stored] carp available to spawn as.</span>"
|
||||
|
||||
/obj/structure/carp_rift/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 50, TRUE)
|
||||
|
||||
/obj/structure/carp_rift/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(time_charged != max_charge + 1)
|
||||
dragon?.destroy_rifts()
|
||||
if(dragon)
|
||||
to_chat(dragon, "<span class='boldwarning'>A rift has been destroyed! You have failed, and find yourself weakened.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/structure/carp_rift/process(delta_time)
|
||||
// Heal carp on our loc.
|
||||
for(var/mob/living/simple_animal/hostile/hostilehere in loc)
|
||||
if("carp" in hostilehere.faction)
|
||||
hostilehere.adjustHealth(-5 * delta_time)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(hostilehere))
|
||||
H.color = "#0000FF"
|
||||
|
||||
// If we're fully charged, just start mass spawning carp and move around.
|
||||
if(charge_state == CHARGE_COMPLETED)
|
||||
if(DT_PROB(1.25, delta_time))
|
||||
new /mob/living/simple_animal/hostile/carp(loc)
|
||||
if(DT_PROB(1.5, delta_time))
|
||||
var/rand_dir = pick(GLOB.cardinals)
|
||||
Move(get_step(src, rand_dir), rand_dir)
|
||||
return
|
||||
|
||||
// Increase time trackers and check for any updated states.
|
||||
time_charged = min(time_charged + delta_time, max_charge)
|
||||
last_carp_inc += delta_time
|
||||
update_check()
|
||||
|
||||
/obj/structure/carp_rift/attack_ghost(mob/user)
|
||||
. = ..()
|
||||
summon_carp(user)
|
||||
|
||||
/**
|
||||
* Does a series of checks based on the portal's status.
|
||||
*
|
||||
* Performs a number of checks based on the current charge of the portal, and triggers various effects accordingly.
|
||||
* If the current charge is a multiple of carp_interval, add an extra carp spawn.
|
||||
* If we're halfway charged, announce to the crew our location in a CENTCOM announcement.
|
||||
* If we're fully charged, tell the crew we are, change our color to yellow, become invulnerable, and give Space Dragon the ability to make another rift, if he hasn't summoned 3 total.
|
||||
*/
|
||||
/obj/structure/carp_rift/proc/update_check()
|
||||
// If the rift is fully charged, there's nothing to do here anymore.
|
||||
if(charge_state == CHARGE_COMPLETED)
|
||||
return
|
||||
|
||||
// Can we increase the carp spawn pool size?
|
||||
if(last_carp_inc >= carp_interval)
|
||||
carp_stored++
|
||||
icon_state = "carp_rift_carpspawn"
|
||||
if(light_color != LIGHT_COLOR_PURPLE)
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
update_light()
|
||||
notify_ghosts("The carp rift can summon an additional carp!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Carp Spawn Available")
|
||||
last_carp_inc -= carp_interval
|
||||
|
||||
// Is the rift now fully charged?
|
||||
if(time_charged >= max_charge)
|
||||
charge_state = CHARGE_COMPLETED
|
||||
var/area/A = get_area(src)
|
||||
priority_announce("Spatial object has reached peak energy charge in [initial(A.name)], please stand-by.", "Central Command Wildlife Observations")
|
||||
obj_integrity = INFINITY
|
||||
icon_state = "carp_rift_charged"
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
update_light()
|
||||
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
dragon.rifts_charged += 1
|
||||
if(dragon.rifts_charged != 3 && !dragon.objective_complete)
|
||||
dragon.rift = new
|
||||
dragon.rift.Grant(dragon)
|
||||
dragon.riftTimer = 0
|
||||
dragon.rift_empower()
|
||||
// Early return, nothing to do after this point.
|
||||
return
|
||||
|
||||
// Do we need to give a final warning to the station at the halfway mark?
|
||||
if(charge_state < CHARGE_FINALWARNING && time_charged >= (max_charge * 0.5))
|
||||
charge_state = CHARGE_FINALWARNING
|
||||
var/area/A = get_area(src)
|
||||
priority_announce("A rift is causing an unnaturally large energy flux in [initial(A.name)]. Stop it at all costs!", "Central Command Wildlife Observations", sound = 'sound/announcer/classic/spanomalies.ogg')
|
||||
|
||||
/**
|
||||
* Used to create carp controlled by ghosts when the option is available.
|
||||
*
|
||||
* Creates a carp for the ghost to control if we have a carp spawn available.
|
||||
* Gives them prompt to control a carp, and if our circumstances still allow if when they hit yes, spawn them in as a carp.
|
||||
* Also add them to the list of carps in Space Dragon's antgonist datum, so they'll be displayed as having assisted him on round end.
|
||||
* Arguments:
|
||||
* * mob/user - The ghost which will take control of the carp.
|
||||
*/
|
||||
/obj/structure/carp_rift/proc/summon_carp(mob/user)
|
||||
if(carp_stored <= 0)//Not enough carp points
|
||||
return FALSE
|
||||
var/carp_ask = alert("Become a carp?", "Help bring forth the horde?", "Yes", "No")
|
||||
if(carp_ask == "No" || !src || QDELETED(src) || QDELETED(user))
|
||||
return FALSE
|
||||
if(carp_stored <= 0)
|
||||
to_chat(user, "<span class='warning'>The rift already summoned enough carp!</span>")
|
||||
return FALSE
|
||||
var/mob/living/simple_animal/hostile/carp/newcarp = new /mob/living/simple_animal/hostile/carp(loc)
|
||||
newcarp.key = user.key
|
||||
var/datum/antagonist/space_dragon/S = dragon.mind.has_antag_datum(/datum/antagonist/space_dragon)
|
||||
if(S)
|
||||
S.carp += newcarp.mind
|
||||
to_chat(newcarp, "<span class='boldwarning'>You have arrived in order to assist the space dragon with securing the rifts. Do not jeopardize the mission, and protect the rifts at all costs!</span>")
|
||||
carp_stored--
|
||||
if(carp_stored <= 0 && charge_state < CHARGE_COMPLETED)
|
||||
icon_state = "carp_rift"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
#undef CHARGE_ONGOING
|
||||
#undef CHARGE_FINALWARNING
|
||||
#undef CHARGE_COMPLETED
|
||||
#undef DARKNESS_THRESHOLD
|
||||
@@ -208,7 +208,7 @@
|
||||
///For moving in space
|
||||
///return TRUE for movement 0 for none
|
||||
/mob/Process_Spacemove(movement_dir = 0)
|
||||
if(spacewalk || ..())
|
||||
if(HAS_TRAIT(src, TRAIT_SPACEWALK) || spacewalk || ..())
|
||||
return TRUE
|
||||
var/atom/movable/backup = get_spacemove_backup()
|
||||
if(backup)
|
||||
|
||||
@@ -160,3 +160,9 @@
|
||||
var/current_tiles = 10 / max(existing, world.tick_lag)
|
||||
var/minimum_speed = 10 / min(max(SAMT.config_entry_value, current_tiles), current_tiles + SMTI.config_entry_value)
|
||||
. = min(., max(minimum_speed, existing - SSI.config_entry_value))
|
||||
|
||||
/datum/movespeed_modifier/dragon_rage
|
||||
multiplicative_slowdown = -0.5
|
||||
|
||||
/datum/movespeed_modifier/dragon_depression
|
||||
multiplicative_slowdown = 5
|
||||
|
||||
@@ -1389,13 +1389,7 @@
|
||||
charging = APC_NOT_CHARGING
|
||||
chargecount = 0
|
||||
longtermpower = max(-10,longtermpower - 2)
|
||||
if(cell.charge >= cur_used)
|
||||
cell.use(GLOB.CELLRATE * cur_used)
|
||||
else
|
||||
// This turns everything off in the case that there is still a charge left on the battery, just not enough to run the room.
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
cell.use(min(GLOB.CELLRATE * cur_used, cell.charge))
|
||||
|
||||
// set channels based on remaining charge
|
||||
|
||||
|
||||
@@ -2196,7 +2196,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(prob(10))
|
||||
stored_teleports += rand(2,6)
|
||||
if(prob(70))
|
||||
M.vomit()
|
||||
M.vomit(vomit_type = VOMIT_PURPLE)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/planet_cracker
|
||||
@@ -2593,7 +2593,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
alcohol_description = "sweet"
|
||||
else
|
||||
alcohol_description = "watery" //How the hell did you get negative boozepwr?
|
||||
|
||||
|
||||
var/list/fruits = list()
|
||||
if(names_in_order.len <= 3)
|
||||
fruits = names_in_order
|
||||
|
||||
@@ -735,7 +735,7 @@
|
||||
/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C)
|
||||
.=..()
|
||||
if(current_cycle >=11 && prob(min(50,current_cycle)))
|
||||
C.vomit(10, prob(10), prob(50), rand(0,4), TRUE, prob(30))
|
||||
C.vomit(10, prob(10), prob(50), rand(0,4), TRUE)
|
||||
for(var/datum/reagent/toxin/R in C.reagents.reagent_list)
|
||||
if(R != src)
|
||||
C.reagents.remove_reagent(R.type,1)
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
R.stun(20)
|
||||
R.reveal(100)
|
||||
R.adjustHealth(50)
|
||||
sleep(20)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(round(multiplier/48,1),get_turf(holder.my_atom)))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
@@ -433,20 +432,24 @@
|
||||
var/T1 = multiplier * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
|
||||
var/T2 = multiplier * 50
|
||||
var/T3 = multiplier * 120
|
||||
sleep(5)
|
||||
var/added_delay = 0.5 SECONDS
|
||||
if(multiplier >= 75)
|
||||
tesla_zap(holder.my_atom, 7, T1, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T1), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(multiplier >= 40)
|
||||
tesla_zap(holder.my_atom, 7, T2, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T2), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(multiplier >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
|
||||
tesla_zap(holder.my_atom, 7, T3, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T3), added_delay)
|
||||
..()
|
||||
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/proc/zappy_zappy(datum/reagents/holder, power)
|
||||
if(QDELETED(holder.my_atom))
|
||||
return
|
||||
tesla_zap(holder.my_atom, 7, power, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/heat
|
||||
id = "teslium_lightning2"
|
||||
required_temp = 474
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
var/deletes_extract = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/proc/use_slime_core(datum/reagents/holder)
|
||||
SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type")
|
||||
if(deletes_extract)
|
||||
delete_extract(holder)
|
||||
@@ -570,7 +573,9 @@
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
|
||||
sleep(50)
|
||||
addtimer(CALLBACK(src, .proc/slime_stop, holder), 5 SECONDS)
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/proc/slime_stop(datum/reagents/holder)
|
||||
var/obj/item/slime_extract/sepia/extract = holder.my_atom
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
new /obj/effect/timestop(T, null, null, null)
|
||||
@@ -579,8 +584,7 @@
|
||||
var/mob/lastheld = get_mob_by_key(holder.my_atom.fingerprintslast)
|
||||
if(lastheld && !lastheld.equip_to_slot_if_possible(extract, SLOT_HANDS, disable_warning = TRUE))
|
||||
extract.forceMove(get_turf(lastheld))
|
||||
|
||||
..()
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/slimecamera
|
||||
name = "Slime Camera"
|
||||
|
||||
@@ -184,10 +184,11 @@
|
||||
/datum/design/syringe
|
||||
name = "Syringe"
|
||||
id = "syringe"
|
||||
build_type = AUTOLATHE
|
||||
build_type = AUTOLATHE | PROTOLATHE
|
||||
materials = list(/datum/material/iron = 10, /datum/material/glass = 20)
|
||||
build_path = /obj/item/reagent_containers/syringe
|
||||
category = list("initial", "Medical")
|
||||
category = list("initial", "Medical","Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/health_sensor
|
||||
name = "Health Sensor"
|
||||
|
||||
@@ -201,6 +201,15 @@
|
||||
build_path = /obj/item/storage/hypospraykit // let's not summon new hyposprays thanks
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/hypospray/mkii
|
||||
name = "Hypospray Mk. II"
|
||||
id = "hypospray_mkii"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(/datum/material/iron = 1600, /datum/material/glass = 1000)
|
||||
build_path = /obj/item/hypospray/mkii
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/blood_bag
|
||||
name = "Empty Blood Bag"
|
||||
|
||||
@@ -246,8 +246,8 @@
|
||||
category = list("Augmentation Nanites")
|
||||
|
||||
/datum/design/nanites/coagulating
|
||||
name = "Rapid Coagulation"
|
||||
desc = "The nanites induce rapid coagulation when the host is wounded, dramatically reducing bleeding rate."
|
||||
name = "Vein Repressurization"
|
||||
desc = "The nanites re-route circulating blood away from open wounds, dramatically reducing bleeding rate."
|
||||
id = "coagulating_nanites"
|
||||
program_type = /datum/nanite_program/coagulating
|
||||
category = list("Augmentation Nanites")
|
||||
@@ -558,15 +558,15 @@
|
||||
program_type = /datum/nanite_program/protocol/factory
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/tinker
|
||||
name = "Tinker Protocol"
|
||||
desc = "Replication Protocol: the nanites learn to use metallic material in the host's bloodstream to speed up the replication process."
|
||||
id = "tinker_nanites"
|
||||
program_type = /datum/nanite_program/protocol/tinker
|
||||
/datum/design/nanites/pyramid
|
||||
name = "Pyramid Protocol"
|
||||
desc = "Replication Protocol: the nanites implement an alternate cooperative replication protocol that is more efficient as long as the saturation level is above 80%."
|
||||
id = "pyramid_nanites"
|
||||
program_type = /datum/nanite_program/protocol/pyramid
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/offline
|
||||
name = "Offline Production Protocol"
|
||||
name = "Eclipse Protocol"
|
||||
desc = "Replication Protocol: while the host is asleep or otherwise unconcious, the nanites exploit the reduced interference to replicate more quickly."
|
||||
id = "offline_nanites"
|
||||
program_type = /datum/nanite_program/protocol/offline
|
||||
@@ -578,3 +578,32 @@
|
||||
id = "synergy_nanites"
|
||||
program_type = /datum/nanite_program/protocol/synergy
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/hive
|
||||
name = "Hive Protocol"
|
||||
desc = "Storage Protocol: the nanites use a more efficient grid arrangment for volume storage, increasing maximum volume in a host."
|
||||
id = "hive_nanites"
|
||||
program_type = /datum/nanite_program/protocol/hive
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/zip
|
||||
name = "Zip Protocol"
|
||||
desc = "Storage Protocol: the nanites are disassembled and compacted when unused, greatly increasing the maximum volume while in a host. However, the process slows down the replication rate slightly."
|
||||
id = "zip_nanites"
|
||||
program_type = /datum/nanite_program/protocol/zip
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/free_range
|
||||
name = "Free-range Protocol"
|
||||
desc = "Storage Protocol: the nanites discard their default storage protocols in favour of a cheaper and more organic approach. Reduces maximum volume, but increases the replication rate."
|
||||
id = "free_range_nanites"
|
||||
program_type = /datum/nanite_program/protocol/free_range
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
/datum/design/nanites/unsafe_storage
|
||||
name = "S.L.O. Protocol"
|
||||
desc = "Storage Protocol: 'S.L.O.P.', or Storage Level Override Protocol, completely disables the safety measures normally present in nanites,\
|
||||
allowing them to reach much higher saturation levels, but at the risk of causing internal damage to the host."
|
||||
id = "unsafe_storage_nanites"
|
||||
program_type = /datum/nanite_program/protocol/unsafe_storage
|
||||
category = list("Protocols_Nanites")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/machines/research.dmi'
|
||||
icon_state = "nanite_cloud_controller"
|
||||
circuit = /obj/item/circuitboard/computer/nanite_cloud_controller
|
||||
icon_screen = "nanite_cloud_controller_screen"
|
||||
|
||||
var/obj/item/disk/nanite_program/disk
|
||||
var/list/datum/nanite_cloud_backup/cloud_backups = list()
|
||||
@@ -144,6 +145,7 @@
|
||||
cloud_program["rules"] = rules
|
||||
if(LAZYLEN(rules))
|
||||
cloud_program["has_rules"] = TRUE
|
||||
cloud_program["all_rules_required"] = P.all_rules_required
|
||||
|
||||
var/list/extra_settings = P.get_extra_settings_frontend()
|
||||
cloud_program["extra_settings"] = extra_settings
|
||||
@@ -232,6 +234,15 @@
|
||||
|
||||
investigate_log("[key_name(usr)] removed rule [rule.display()] from program [P.name] in cloud #[current_view]", INVESTIGATE_NANITES)
|
||||
. = TRUE
|
||||
if("toggle_rule_logic")
|
||||
var/datum/nanite_cloud_backup/backup = get_backup(current_view)
|
||||
if(backup)
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
var/datum/component/nanites/nanites = backup.nanites
|
||||
var/datum/nanite_program/P = nanites.programs[text2num(params["program_id"])]
|
||||
P.all_rules_required = !P.all_rules_required
|
||||
investigate_log("[key_name(usr)] edited rule logic for program [P.name] into [P.all_rules_required ? "All" : "Any"] in cloud #[current_view]", INVESTIGATE_NANITES)
|
||||
. = TRUE
|
||||
|
||||
/datum/nanite_cloud_backup
|
||||
var/cloud_id = 0
|
||||
|
||||
@@ -26,6 +26,14 @@
|
||||
. = ..()
|
||||
linked_techweb = SSresearch.science_tech
|
||||
|
||||
/obj/machinery/nanite_program_hub/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
|
||||
return
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", layer, plane)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
|
||||
|
||||
/obj/machinery/nanite_program_hub/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/disk/nanite_program))
|
||||
var/obj/item/disk/nanite_program/N = I
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
flags_1 = HEAR_1
|
||||
circuit = /obj/item/circuitboard/machine/nanite_programmer
|
||||
|
||||
/obj/machinery/nanite_programmer/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
|
||||
return
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", layer, plane)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
|
||||
|
||||
/obj/machinery/nanite_programmer/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/disk/nanite_program))
|
||||
var/obj/item/disk/nanite_program/N = I
|
||||
|
||||
@@ -48,11 +48,12 @@
|
||||
|
||||
//Extra settings
|
||||
///Don't ever override this or I will come to your house and stand menacingly behind a bush
|
||||
var/list/extra_settings = list()
|
||||
VAR_FINAL/list/extra_settings = list()
|
||||
|
||||
//Rules
|
||||
//Rules that automatically manage if the program's active without requiring separate sensor programs
|
||||
var/list/datum/nanite_rule/rules = list()
|
||||
var/all_rules_required = TRUE //Whether all rules are required for positive condition or any of specified
|
||||
|
||||
/// Corruptable - able to have code/configuration changed
|
||||
var/corruptable = TRUE
|
||||
@@ -76,6 +77,9 @@
|
||||
if(nanites)
|
||||
nanites.programs -= src
|
||||
nanites.permanent_programs -= src
|
||||
for(var/datum/nanite_rule/rule as anything in rules)
|
||||
rule.remove()
|
||||
rules.Cut()
|
||||
return ..()
|
||||
|
||||
/**
|
||||
@@ -108,6 +112,7 @@
|
||||
for(var/R in rules)
|
||||
var/datum/nanite_rule/rule = R
|
||||
rule.copy_to(target)
|
||||
target.all_rules_required = all_rules_required
|
||||
|
||||
if(istype(target,src))
|
||||
copy_extra_settings_to(target)
|
||||
@@ -186,14 +191,17 @@
|
||||
if(timer_shutdown_next && world.time > timer_shutdown_next)
|
||||
deactivate()
|
||||
timer_shutdown_next = 0
|
||||
return
|
||||
|
||||
if(timer_trigger && world.time > timer_trigger_next)
|
||||
trigger()
|
||||
timer_trigger_next = world.time + timer_trigger
|
||||
return
|
||||
|
||||
if(timer_trigger_delay_next && world.time > timer_trigger_delay_next)
|
||||
trigger(delayed = TRUE)
|
||||
timer_trigger_delay_next = 0
|
||||
return
|
||||
|
||||
if(check_conditions() && consume_nanites(use_rate))
|
||||
if(!passive_enabled)
|
||||
@@ -203,14 +211,18 @@
|
||||
if(passive_enabled)
|
||||
disable_passive_effect()
|
||||
|
||||
//If false, disables active and passive effects, but doesn't consume nanites
|
||||
//If false, disables active, passive effects, and triggers without consuming nanites
|
||||
//Can be used to avoid consuming nanites for nothing
|
||||
/datum/nanite_program/proc/check_conditions()
|
||||
if (!LAZYLEN(rules))
|
||||
return TRUE
|
||||
for(var/R in rules)
|
||||
var/datum/nanite_rule/rule = R
|
||||
if(!rule.check_rule())
|
||||
if(!all_rules_required && rule.check_rule())
|
||||
return TRUE
|
||||
if(all_rules_required && !rule.check_rule())
|
||||
return FALSE
|
||||
return TRUE
|
||||
return all_rules_required ? TRUE : FALSE
|
||||
|
||||
//Constantly procs as long as the program is active
|
||||
/datum/nanite_program/proc/active_effect()
|
||||
@@ -235,6 +247,8 @@
|
||||
return
|
||||
if(world.time < next_trigger)
|
||||
return
|
||||
if(!check_conditions())
|
||||
return
|
||||
if(!consume_nanites(trigger_cost))
|
||||
return
|
||||
next_trigger = world.time + trigger_cooldown
|
||||
@@ -251,18 +265,22 @@
|
||||
if(program_flags & NANITE_EMP_IMMUNE)
|
||||
return
|
||||
if(prob(severity / 2))
|
||||
host_mob.investigate_log("[src] nanite program received a software error due to emp.", INVESTIGATE_NANITES)
|
||||
software_error()
|
||||
|
||||
/datum/nanite_program/proc/on_shock(shock_damage)
|
||||
if(!(program_flags & NANITE_SHOCK_IMMUNE))
|
||||
if(prob(10))
|
||||
host_mob.investigate_log("[src] nanite program received a software error due to shock.", INVESTIGATE_NANITES)
|
||||
software_error()
|
||||
else if(prob(33))
|
||||
host_mob.investigate_log("[src] nanite program was deleted due to shock.", INVESTIGATE_NANITES)
|
||||
self_destruct()
|
||||
|
||||
/datum/nanite_program/proc/on_minor_shock()
|
||||
if(!(program_flags & NANITE_SHOCK_IMMUNE))
|
||||
if(prob(10))
|
||||
host_mob.investigate_log("[src] nanite program received a software error due to minor shock.", INVESTIGATE_NANITES)
|
||||
software_error()
|
||||
|
||||
/datum/nanite_program/proc/on_death()
|
||||
@@ -273,10 +291,12 @@
|
||||
type = rand(1,is_permanent()? 4 : 5)
|
||||
switch(type)
|
||||
if(1)
|
||||
host_mob.investigate_log("[src] nanite program was deleted by software error.", INVESTIGATE_NANITES)
|
||||
self_destruct() //kill switch
|
||||
return
|
||||
if(2) //deprogram codes
|
||||
if(corruptable)
|
||||
host_mob.investigate_log("[src] nanite program was de-programmed by software error.", INVESTIGATE_NANITES)
|
||||
activation_code = 0
|
||||
deactivation_code = 0
|
||||
kill_code = 0
|
||||
@@ -284,13 +304,16 @@
|
||||
if(3)
|
||||
if(error_flicking)
|
||||
toggle() //enable/disable
|
||||
host_mob.investigate_log("[src] nanite program was toggled by software error.", INVESTIGATE_NANITES)
|
||||
if(4)
|
||||
if(error_flicking && can_trigger)
|
||||
host_mob.investigate_log("[src] nanite program was triggered by software error.", INVESTIGATE_NANITES)
|
||||
trigger()
|
||||
if(5) //Program is scrambled and does something different
|
||||
if(corruptable)
|
||||
var/rogue_type = pick(rogue_types)
|
||||
var/datum/nanite_program/rogue = new rogue_type
|
||||
host_mob.investigate_log("[src] nanite program was converted into [rogue.name] by software error.", INVESTIGATE_NANITES)
|
||||
nanites.add_program(null, rogue, src)
|
||||
self_destruct()
|
||||
|
||||
@@ -315,9 +338,7 @@
|
||||
if(is_permanent())
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
///A nanite program containing a behaviour protocol. Only one protocol of each class can be active at once.
|
||||
//Moved to being 'normally' researched due to lack of B.E.P.I.S.
|
||||
/datum/nanite_program/protocol
|
||||
name = "Nanite Protocol"
|
||||
var/protocol_class = NONE
|
||||
@@ -337,4 +358,3 @@
|
||||
if(nanites)
|
||||
nanites.protocols -= src
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/nanite_program/regenerative
|
||||
name = "Accelerated Regeneration"
|
||||
desc = "The nanites boost the host's natural regeneration, increasing their healing speed. Does not consume nanites if the host is unharmed."
|
||||
desc = "The nanites boost the host's natural regeneration, increasing their healing speed. Will not consume nanites while the host is unharmed."
|
||||
use_rate = 0.5
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/datum/nanite_program/temperature
|
||||
name = "Temperature Adjustment"
|
||||
desc = "The nanites adjust the host's internal temperature to an ideal level."
|
||||
desc = "The nanites adjust the host's internal temperature to an ideal level. Will not consume nanites while the host is at a normal body temperature."
|
||||
use_rate = 3.5
|
||||
rogue_types = list(/datum/nanite_program/skin_decay)
|
||||
|
||||
@@ -53,10 +53,12 @@
|
||||
rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic)
|
||||
|
||||
/datum/nanite_program/purging/check_conditions()
|
||||
. = ..()
|
||||
if(!. || !host_mob.reagents)
|
||||
return FALSE // No trying to purge simple mobs
|
||||
var/foreign_reagent = length(host_mob.reagents?.reagent_list)
|
||||
if(!host_mob.getToxLoss() && !foreign_reagent)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/nanite_program/purging/active_effect()
|
||||
host_mob.adjustToxLoss(-1)
|
||||
@@ -68,7 +70,7 @@
|
||||
|
||||
/datum/nanite_program/brain_heal
|
||||
name = "Neural Regeneration"
|
||||
desc = "The nanites fix neural connections in the host's brain, reversing brain damage and minor traumas."
|
||||
desc = "The nanites fix neural connections in the host's brain, reversing brain damage and minor traumas. Will not consume nanites while it would not have an effect."
|
||||
use_rate = 1.5
|
||||
rogue_types = list(/datum/nanite_program/brain_decay)
|
||||
|
||||
@@ -91,7 +93,7 @@
|
||||
|
||||
/datum/nanite_program/blood_restoring
|
||||
name = "Blood Regeneration"
|
||||
desc = "The nanites stimulate and boost blood cell production in the host."
|
||||
desc = "The nanites stimulate and boost blood cell production in the host. Will not consume nanites while the host has a safe blood level."
|
||||
use_rate = 1
|
||||
rogue_types = list(/datum/nanite_program/suffocating)
|
||||
|
||||
@@ -111,7 +113,7 @@
|
||||
|
||||
/datum/nanite_program/repairing
|
||||
name = "Mechanical Repair"
|
||||
desc = "The nanites fix damage in the host's mechanical limbs."
|
||||
desc = "The nanites fix damage in the host's mechanical limbs. Will not consume nanites while the host's mechanical limbs are undamaged, or while the host has no mechanical limbs."
|
||||
use_rate = 0.5
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
|
||||
@@ -153,13 +155,15 @@
|
||||
rogue_types = list(/datum/nanite_program/suffocating, /datum/nanite_program/necrotic)
|
||||
|
||||
/datum/nanite_program/purging_advanced/check_conditions()
|
||||
. = ..()
|
||||
if(!. || !host_mob.reagents)
|
||||
return FALSE
|
||||
var/foreign_reagent = FALSE
|
||||
for(var/datum/reagent/toxin/R in host_mob.reagents.reagent_list)
|
||||
foreign_reagent = TRUE
|
||||
break
|
||||
if(!host_mob.getToxLoss() && !foreign_reagent)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/nanite_program/purging_advanced/active_effect()
|
||||
host_mob.adjustToxLoss(-1, forced = TRUE)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//Replication Protocols
|
||||
/datum/nanite_program/protocol/kickstart
|
||||
name = "Kickstart Protocol"
|
||||
desc = "Replication Protocol: the nanites focus on early growth, heavily boosting replication rate for a few minutes after the initial implantation."
|
||||
desc = "Replication Protocol: the nanites focus on early growth, heavily boosting replication rate for a few minutes after the initial implantation, \
|
||||
resulting in an additional 420 nanite volume being produced during the first two minutes."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_REPLICATION
|
||||
@@ -17,8 +18,9 @@
|
||||
|
||||
/datum/nanite_program/protocol/factory
|
||||
name = "Factory Protocol"
|
||||
desc = "Replication Protocol: the nanites build a factory matrix within the host, gradually increasing replication speed over time. \
|
||||
The factory decays if the protocol is not active, or if the nanites are disrupted by shocks or EMPs."
|
||||
desc = "Replication Protocol: the nanites build a factory matrix within the host, gradually increasing replication speed over time, \
|
||||
granting a maximum of 2 additional nanite production after roughly 17 minutes. \
|
||||
The factory decays if the protocol is not active, or if the nanites are disrupted by shocks or EMPs."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_REPLICATION
|
||||
@@ -46,43 +48,26 @@
|
||||
factory_efficiency = min(factory_efficiency + 1, max_efficiency)
|
||||
nanites.adjust_nanites(null, round(0.002 * factory_efficiency, 0.1))
|
||||
|
||||
/datum/nanite_program/protocol/tinker
|
||||
name = "Tinker Protocol"
|
||||
desc = "Replication Protocol: the nanites learn to use metallic material in the host's bloodstream to speed up the replication process."
|
||||
/datum/nanite_program/protocol/pyramid
|
||||
name = "Pyramid Protocol"
|
||||
desc = "Replication Protocol: the nanites implement an alternate cooperative replication protocol that is active as long as the nanite saturation level is above 80%, \
|
||||
resulting in an additional volume production of 1.2 per second."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_REPLICATION
|
||||
var/boost = 2
|
||||
var/list/valid_reagents = list(
|
||||
/datum/reagent/iron,
|
||||
/datum/reagent/copper,
|
||||
/datum/reagent/gold,
|
||||
/datum/reagent/silver,
|
||||
/datum/reagent/mercury,
|
||||
/datum/reagent/aluminium,
|
||||
/datum/reagent/silicon)
|
||||
var/boost = 1.2
|
||||
|
||||
/datum/nanite_program/protocol/tinker/check_conditions()
|
||||
if(!nanites.host_mob.reagents)
|
||||
/datum/nanite_program/protocol/pyramid/check_conditions()
|
||||
if((nanites.nanite_volume / nanites.max_nanites) < 0.8)
|
||||
return FALSE
|
||||
|
||||
var/found_reagent = FALSE
|
||||
|
||||
var/datum/reagents/R = nanites.host_mob.reagents
|
||||
for(var/VR in valid_reagents)
|
||||
if(R.has_reagent(VR, 0.5))
|
||||
R.remove_reagent(VR, 0.5)
|
||||
found_reagent = TRUE
|
||||
break
|
||||
if(!found_reagent)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/nanite_program/protocol/tinker/active_effect()
|
||||
/datum/nanite_program/protocol/pyramid/active_effect()
|
||||
nanites.adjust_nanites(null, boost)
|
||||
|
||||
/datum/nanite_program/protocol/offline
|
||||
name = "Offline Production Protocol"
|
||||
name = "Eclipse Protocol"
|
||||
desc = "Replication Protocol: while the host is asleep or otherwise unconcious, the nanites exploit the reduced interference to replicate more quickly."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
@@ -105,7 +90,6 @@
|
||||
|
||||
/datum/nanite_program/protocol/offline/active_effect()
|
||||
nanites.adjust_nanites(null, boost)
|
||||
|
||||
/datum/nanite_program/protocol/synergy
|
||||
name = "Synergy Protocol"
|
||||
desc = "Replication Protocol: the nanites syncronize their tasks and processes within a host, leading to an increase in replication speed proportional to the current nanite volume."
|
||||
@@ -116,3 +100,195 @@
|
||||
|
||||
/datum/nanite_program/protocol/synergy/active_effect()
|
||||
nanites.adjust_nanites(null, round(max_boost * (nanites.nanite_volume / nanites.max_nanites), 0.1))
|
||||
|
||||
/datum/nanite_program/protocol/hive
|
||||
name = "Hive Protocol"
|
||||
desc = "Storage Protocol: the nanites use a more efficient grid arrangment for volume storage, increasing maximum volume to 750."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_STORAGE
|
||||
var/extra_volume = 250
|
||||
|
||||
/datum/nanite_program/protocol/hive/enable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites + extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/hive/disable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites - extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/zip
|
||||
name = "Zip Protocol"
|
||||
desc = "Storage Protocol: the nanites are disassembled and compacted when unused, increasing the maximum volume to 1000. However, the process slows down their replication rate slightly."
|
||||
use_rate = 0.2
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_STORAGE
|
||||
var/extra_volume = 500
|
||||
|
||||
/datum/nanite_program/protocol/zip/enable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites + extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/zip/disable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites - extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/free_range
|
||||
name = "Free-range Protocol"
|
||||
desc = "Storage Protocol: the nanites discard their default storage protocols in favour of a cheaper and more organic approach. Reduces maximum volume to 250, but increases the replication rate by 0.5."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_STORAGE
|
||||
var/boost = 0.5
|
||||
var/extra_volume = -250
|
||||
|
||||
/datum/nanite_program/protocol/free_range/enable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites + extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/free_range/disable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites - extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/free_range/active_effect()
|
||||
nanites.adjust_nanites(null, boost)
|
||||
|
||||
/datum/nanite_program/protocol/unsafe_storage
|
||||
name = "S.L.O. Protocol"
|
||||
desc = "Storage Protocol: 'S.L.O.P.', or Storage Level Override Protocol, completely disables the safety measures normally present in nanites, \
|
||||
allowing them to reach a whopping maximum volume level of 2000, but at the risk of causing damage to the host at nanite concentrations above the standard limit of 500."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
protocol_class = NANITE_PROTOCOL_STORAGE
|
||||
var/extra_volume = 1500
|
||||
var/next_warning = 0
|
||||
var/min_warning_cooldown = 120
|
||||
var/max_warning_cooldown = 350
|
||||
var/volume_warnings_stage_1 = list("You feel a dull pain in your abdomen.",
|
||||
"You feel a tickling sensation in your abdomen.")
|
||||
var/volume_warnings_stage_2 = list("You feel a dull pain in your stomach.",
|
||||
"You feel a dull pain when breathing.",
|
||||
"Your stomach grumbles.",
|
||||
"You feel a tickling sensation in your throat.",
|
||||
"You feel a tickling sensation in your lungs.",
|
||||
"You feel a tickling sensation in your stomach.",
|
||||
"Your lungs feel stiff.")
|
||||
var/volume_warnings_stage_3 = list("You feel a dull pain in your chest.",
|
||||
"You hear a faint buzzing coming from nowhere.",
|
||||
"You hear a faint buzzing inside your head.",
|
||||
"Your head aches.")
|
||||
var/volume_warnings_stage_4 = list("You feel a dull pain in your ears.",
|
||||
"You feel a dull pain behind your eyes.",
|
||||
"You hear a loud, echoing buzz inside your ears.",
|
||||
"You feel dizzy.",
|
||||
"You feel an itch coming from behind your eyes.",
|
||||
"Your eardrums itch.",
|
||||
"You see tiny grey motes drifting in your field of view.")
|
||||
var/volume_warnings_stage_5 = list("You feel sick.",
|
||||
"You feel a dull pain from every part of your body.",
|
||||
"You feel nauseous.")
|
||||
var/volume_warnings_stage_6 = list("Your skin itches and burns.",
|
||||
"Your muscles ache.",
|
||||
"You feel tired.",
|
||||
"You feel something skittering under your skin.",)
|
||||
|
||||
/datum/nanite_program/protocol/unsafe_storage/enable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites + extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/unsafe_storage/disable_passive_effect()
|
||||
. = ..()
|
||||
nanites.set_max_volume(null, nanites.max_nanites - extra_volume)
|
||||
|
||||
/datum/nanite_program/protocol/unsafe_storage/active_effect()
|
||||
if(!iscarbon(host_mob))
|
||||
if(prob(10))
|
||||
host_mob.adjustBruteLoss(((max(nanites.nanite_volume - 450, 0) / 450) ** 2 ) * 0.5) // 0.5 -> 2 -> 4.5 -> 8 damage per successful tick
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = host_mob
|
||||
|
||||
if(nanites.nanite_volume < 500)
|
||||
return
|
||||
|
||||
var/current_stage = 0
|
||||
if(nanites.nanite_volume > 500) //Liver is the main hub of nanite replication and the first to be threatened by excess volume
|
||||
if(prob(10))
|
||||
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver)
|
||||
liver.applyOrganDamage(0.6)
|
||||
current_stage++
|
||||
if(nanites.nanite_volume > 750) //Extra volume spills out in other central organs
|
||||
if(prob(10))
|
||||
var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH)
|
||||
if(stomach)
|
||||
stomach.applyOrganDamage(0.75)
|
||||
if(prob(10))
|
||||
var/obj/item/organ/lungs/lungs = C.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if(lungs)
|
||||
lungs.applyOrganDamage(0.75)
|
||||
current_stage++
|
||||
if(nanites.nanite_volume > 1000) //Extra volume spills out in more critical organs
|
||||
if(prob(10))
|
||||
var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART)
|
||||
if(heart)
|
||||
heart.applyOrganDamage(0.75)
|
||||
if(prob(10))
|
||||
var/obj/item/organ/brain/brain = C.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(brain)
|
||||
brain.applyOrganDamage(0.75)
|
||||
current_stage++
|
||||
if(nanites.nanite_volume > 1250) //Excess nanites start invading smaller organs for more space, including sensory organs
|
||||
if(prob(13))
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(eyes)
|
||||
eyes.applyOrganDamage(0.75)
|
||||
if(prob(13))
|
||||
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
|
||||
if(ears)
|
||||
ears.applyOrganDamage(0.75)
|
||||
current_stage++
|
||||
if(nanites.nanite_volume > 1500) //Nanites start spilling into the bloodstream, causing toxicity
|
||||
if(prob(15))
|
||||
C.adjustToxLoss(0.5, TRUE, forced = TRUE) //Not healthy for slimepeople either
|
||||
current_stage++
|
||||
if(nanites.nanite_volume > 1750) //Nanites have almost reached their physical limit, and the pressure itself starts causing tissue damage
|
||||
if(prob(15))
|
||||
C.adjustBruteLoss(0.75, TRUE)
|
||||
current_stage++
|
||||
|
||||
volume_warning(current_stage)
|
||||
|
||||
/datum/nanite_program/protocol/unsafe_storage/proc/volume_warning(tier)
|
||||
if(world.time < next_warning)
|
||||
return
|
||||
|
||||
var/list/main_warnings
|
||||
var/list/extra_warnings
|
||||
|
||||
switch(tier)
|
||||
if(1)
|
||||
main_warnings = volume_warnings_stage_1
|
||||
extra_warnings = null
|
||||
if(2)
|
||||
main_warnings = volume_warnings_stage_2
|
||||
extra_warnings = volume_warnings_stage_1
|
||||
if(3)
|
||||
main_warnings = volume_warnings_stage_3
|
||||
extra_warnings = volume_warnings_stage_1 + volume_warnings_stage_2
|
||||
if(4)
|
||||
main_warnings = volume_warnings_stage_4
|
||||
extra_warnings = volume_warnings_stage_1 + volume_warnings_stage_2 + volume_warnings_stage_3
|
||||
if(5)
|
||||
main_warnings = volume_warnings_stage_5
|
||||
extra_warnings = volume_warnings_stage_1 + volume_warnings_stage_2 + volume_warnings_stage_3 + volume_warnings_stage_4
|
||||
if(6)
|
||||
main_warnings = volume_warnings_stage_6
|
||||
extra_warnings = volume_warnings_stage_1 + volume_warnings_stage_2 + volume_warnings_stage_3 + volume_warnings_stage_4 + volume_warnings_stage_5
|
||||
|
||||
if(prob(35))
|
||||
to_chat(host_mob, "<span class='warning'>[pick(main_warnings)]</span>")
|
||||
next_warning = world.time + rand(min_warning_cooldown, max_warning_cooldown)
|
||||
else if(islist(extra_warnings))
|
||||
to_chat(host_mob, "<span class='warning'>[pick(extra_warnings)]</span>")
|
||||
next_warning = world.time + rand(min_warning_cooldown, max_warning_cooldown)
|
||||
|
||||
@@ -235,8 +235,7 @@
|
||||
|
||||
/datum/nanite_program/sensor/voice
|
||||
name = "Voice Sensor"
|
||||
desc = "Sends a signal when the nanites hear a determined word or sentence."
|
||||
var/spent = FALSE
|
||||
desc = "The nanites receive a signal when they detect a specific, preprogrammed word or phrase being said."
|
||||
|
||||
/datum/nanite_program/sensor/voice/register_extra_settings()
|
||||
. = ..()
|
||||
@@ -248,16 +247,17 @@
|
||||
RegisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
|
||||
/datum/nanite_program/sensor/voice/on_mob_remove()
|
||||
UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR)
|
||||
|
||||
/datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args)
|
||||
SIGNAL_HANDLER
|
||||
var/datum/nanite_extra_setting/sentence = extra_settings[NES_SENTENCE]
|
||||
var/datum/nanite_extra_setting/inclusive = extra_settings[NES_INCLUSIVE_MODE]
|
||||
if(!sentence.get_value())
|
||||
return
|
||||
if(inclusive.get_value())
|
||||
if(findtextEx(hearing_args[HEARING_RAW_MESSAGE], sentence))
|
||||
if(findtext(hearing_args[HEARING_RAW_MESSAGE], sentence.get_value()))
|
||||
send_code()
|
||||
else
|
||||
if(hearing_args[HEARING_RAW_MESSAGE] == sentence)
|
||||
if(lowertext(hearing_args[HEARING_RAW_MESSAGE]) == lowertext(sentence.get_value()))
|
||||
send_code()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/nanite_program/sleepy
|
||||
name = "Sleep Induction"
|
||||
desc = "The nanites cause rapid narcolepsy when triggered."
|
||||
desc = "The nanites induce rapid narcolepsy when triggered."
|
||||
can_trigger = TRUE
|
||||
trigger_cost = 15
|
||||
trigger_cooldown = 1200
|
||||
@@ -116,13 +116,13 @@
|
||||
//Can receive transmissions from a nanite communication remote for customized messages
|
||||
/datum/nanite_program/comm
|
||||
can_trigger = TRUE
|
||||
var/comm_code = 0
|
||||
var/comm_message = ""
|
||||
|
||||
/datum/nanite_program/comm/register_extra_settings()
|
||||
extra_settings[NES_COMM_CODE] = new /datum/nanite_extra_setting/number(0, 0, 9999)
|
||||
|
||||
/datum/nanite_program/comm/proc/receive_comm_signal(signal_comm_code, comm_message, comm_source)
|
||||
var/datum/nanite_extra_setting/comm_code = extra_settings[NES_COMM_CODE]
|
||||
if(!activated || !comm_code)
|
||||
return
|
||||
if(signal_comm_code == comm_code)
|
||||
@@ -138,7 +138,8 @@
|
||||
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
|
||||
var/static/list/blacklist = list(
|
||||
"*surrender",
|
||||
"*collapse"
|
||||
"*collapse",
|
||||
"*faint",
|
||||
)
|
||||
|
||||
/datum/nanite_program/comm/speech/register_extra_settings()
|
||||
|
||||
@@ -207,24 +207,23 @@
|
||||
|
||||
//Syncs the nanites with the cumulative current mob's access level. Can potentially wipe existing access.
|
||||
/datum/nanite_program/access/on_trigger(comm_message)
|
||||
var/list/new_access = list()
|
||||
var/obj/item/current_item
|
||||
current_item = host_mob.get_active_held_item()
|
||||
if(current_item)
|
||||
new_access += current_item.GetAccess()
|
||||
current_item = host_mob.get_inactive_held_item()
|
||||
if(current_item)
|
||||
new_access += current_item.GetAccess()
|
||||
var/list/potential_items = list()
|
||||
|
||||
potential_items += host_mob.get_active_held_item()
|
||||
potential_items += host_mob.get_inactive_held_item()
|
||||
|
||||
if(ishuman(host_mob))
|
||||
var/mob/living/carbon/human/H = host_mob
|
||||
current_item = H.wear_id
|
||||
if(current_item)
|
||||
new_access += current_item.GetAccess()
|
||||
potential_items += H.wear_id
|
||||
else if(isanimal(host_mob))
|
||||
potential_items += host_mob.pulling
|
||||
var/mob/living/simple_animal/A = host_mob
|
||||
current_item = A.access_card
|
||||
if(current_item)
|
||||
new_access += current_item.GetAccess()
|
||||
potential_items += A.access_card
|
||||
|
||||
var/list/new_access = list()
|
||||
for(var/obj/item/I in potential_items)
|
||||
new_access += I.GetAccess()
|
||||
|
||||
access = new_access
|
||||
|
||||
/datum/nanite_program/spreading
|
||||
@@ -253,6 +252,7 @@
|
||||
//this will potentially take over existing nanites!
|
||||
infectee.AddComponent(/datum/component/nanites, 10)
|
||||
SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
|
||||
SEND_SIGNAL(infectee, COMSIG_NANITE_SET_CLOUD, nanites.cloud_id)
|
||||
infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
|
||||
|
||||
/datum/nanite_program/nanite_sting
|
||||
@@ -277,13 +277,15 @@
|
||||
//unlike with Infective Exo-Locomotion, this can't take over existing nanites, because Nanite Sting only targets non-hosts.
|
||||
infectee.AddComponent(/datum/component/nanites, 5)
|
||||
SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
|
||||
SEND_SIGNAL(infectee, COMSIG_NANITE_SET_CLOUD, nanites.cloud_id)
|
||||
infectee.investigate_log("was infected by a nanite cluster by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
|
||||
to_chat(infectee, "<span class='warning'>You feel a tiny prick.</span>")
|
||||
|
||||
/datum/nanite_program/mitosis
|
||||
name = "Mitosis"
|
||||
desc = "The nanites gain the ability to self-replicate, using bluespace to power the process. Becomes more effective the more nanites are already in the host.\
|
||||
The replication has also a chance to corrupt the nanite programming due to copy faults - cloud sync is highly recommended."
|
||||
desc = "The nanites gain the ability to self-replicate, using bluespace to power the process. Becomes more effective the more nanites are already in the host; \
|
||||
For every 50 nanite volume in the host, the production rate is increased by 0.5. The replication has also a chance to corrupt the nanite programming \
|
||||
due to copy faults - constant cloud sync is highly recommended."
|
||||
use_rate = 0
|
||||
rogue_types = list(/datum/nanite_program/toxic)
|
||||
|
||||
@@ -306,16 +308,14 @@
|
||||
/datum/nanite_program/dermal_button/register_extra_settings()
|
||||
extra_settings[NES_SENT_CODE] = new /datum/nanite_extra_setting/number(1, 1, 9999)
|
||||
extra_settings[NES_BUTTON_NAME] = new /datum/nanite_extra_setting/text("Button")
|
||||
extra_settings[NES_ICON] = new /datum/nanite_extra_setting/type("power", list("one","two","three","four","five","plus","minus","power"))
|
||||
extra_settings[NES_COLOR] = new /datum/nanite_extra_setting/type("green", list("green","red","yellow","blue"))
|
||||
extra_settings[NES_ICON] = new /datum/nanite_extra_setting/type("power", list("blank","one","two","three","four","five","plus","minus","exclamation","question","cross","info","heart","skull","brain","brain_damage","injection","blood","shield","reaction","network","power","radioactive","electricity","magnetism","scan","repair","id","wireless","say","sleep","bomb"))
|
||||
|
||||
/datum/nanite_program/dermal_button/enable_passive_effect()
|
||||
. = ..()
|
||||
var/datum/nanite_extra_setting/bn_name = extra_settings[NES_BUTTON_NAME]
|
||||
var/datum/nanite_extra_setting/bn_icon = extra_settings[NES_ICON]
|
||||
var/datum/nanite_extra_setting/bn_color = extra_settings[NES_COLOR]
|
||||
if(!button)
|
||||
button = new(src, bn_name.get_value(), bn_icon.get_value(), bn_color.get_value())
|
||||
button = new(src, bn_name.get_value(), bn_icon.get_value())
|
||||
button.target = host_mob
|
||||
button.Grant(host_mob)
|
||||
|
||||
@@ -339,14 +339,14 @@
|
||||
name = "Button"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "power_green"
|
||||
button_icon_state = "nanite_power"
|
||||
var/datum/nanite_program/dermal_button/program
|
||||
|
||||
/datum/action/innate/nanite_button/New(datum/nanite_program/dermal_button/_program, _name, _icon, _color)
|
||||
/datum/action/innate/nanite_button/New(datum/nanite_program/dermal_button/_program, _name, _icon)
|
||||
..()
|
||||
program = _program
|
||||
name = _name
|
||||
button_icon_state = "[_icon]_[_color]"
|
||||
button_icon_state = "nanite_[_icon]"
|
||||
|
||||
/datum/action/innate/nanite_button/Activate()
|
||||
program.press()
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
/datum/nanite_program/aggressive_replication
|
||||
name = "Aggressive Replication"
|
||||
desc = "Nanites will consume organic matter to improve their replication rate, damaging the host. The efficiency increases with the volume of nanites, requiring 200 to break even."
|
||||
use_rate = 0
|
||||
desc = "Nanites will consume organic matter to improve their replication rate, damaging the host. The efficiency increases with the volume of nanites, requiring 200 to break even, \
|
||||
and scaling linearly for a net positive of 0.1 production rate per 20 nanite volume beyond that."
|
||||
rogue_types = list(/datum/nanite_program/necrotic)
|
||||
|
||||
/datum/nanite_program/aggressive_replication/active_effect()
|
||||
|
||||
@@ -104,6 +104,6 @@
|
||||
// Default research tech, prevents bricking
|
||||
design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", "desttagger", "handlabel", "packagewrap",
|
||||
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "bepis", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", "paystand",
|
||||
"space_heater", "beaker", "large_beaker", "xlarge_beaker", "bucket", "hypovial", "large_hypovial",
|
||||
"space_heater", "beaker", "large_beaker", "xlarge_beaker", "bucket", "hypovial", "large_hypovial", "syringe", "pillbottle",
|
||||
"sec_shellclip", "sec_beanbag", "sec_rshot", "sec_bshot", "sec_slug", "sec_islug", "sec_dart", "sec_38", "sec_38lethal",
|
||||
"rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
display_name = "Advanced Biotechnology"
|
||||
description = "Advanced Biotechnology"
|
||||
prereq_ids = list("biotech")
|
||||
design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "containmentbodybag")
|
||||
design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "hypospray_mkii", "containmentbodybag")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
|
||||
/datum/techweb_node/bio_process
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(5)
|
||||
api_datum = /datum/tgs_api/v5
|
||||
|
||||
var/datum/tgs_version/max_api_version = TgsMaximumAPIVersion();
|
||||
var/datum/tgs_version/max_api_version = TgsMaximumApiVersion();
|
||||
if(version.suite != null && version.minor != null && version.patch != null && version.deprecated_patch != null && version.deprefixed_parameter > max_api_version.deprefixed_parameter)
|
||||
TGS_ERROR_LOG("Detected unknown API version! Defaulting to latest. Update the DMAPI to fix this problem.")
|
||||
api_datum = /datum/tgs_api/latest
|
||||
@@ -64,10 +64,10 @@
|
||||
TGS_WRITE_GLOBAL(tgs, null)
|
||||
TGS_ERROR_LOG("Failed to activate API!")
|
||||
|
||||
/world/TgsMaximumAPIVersion()
|
||||
/world/TgsMaximumApiVersion()
|
||||
return new /datum/tgs_version("5.x.x")
|
||||
|
||||
/world/TgsMinimumAPIVersion()
|
||||
/world/TgsMinimumApiVersion()
|
||||
return new /datum/tgs_version("3.2.x")
|
||||
|
||||
/world/TgsInitializationComplete()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
comms_key = world.params[SERVICE_WORLD_PARAM]
|
||||
instance_name = world.params[SERVICE_INSTANCE_PARAM]
|
||||
if(!instance_name)
|
||||
instance_name = "TG Station Server" //maybe just upgraded
|
||||
instance_name = "TG Station Server" //maybe just upgraded
|
||||
|
||||
var/list/logs = file2list(".git/logs/HEAD")
|
||||
if(logs.len)
|
||||
@@ -92,14 +92,14 @@
|
||||
if(skip_compat_check && !fexists(SERVICE_INTERFACE_DLL))
|
||||
TGS_ERROR_LOG("Service parameter present but no interface DLL detected. This is symptomatic of running a service less than version 3.1! Please upgrade.")
|
||||
return
|
||||
call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
|
||||
call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
|
||||
return TRUE
|
||||
|
||||
/datum/tgs_api/v3210/OnTopic(T)
|
||||
var/list/params = params2list(T)
|
||||
var/their_sCK = params[SERVICE_CMD_PARAM_KEY]
|
||||
if(!their_sCK)
|
||||
return FALSE //continue world/Topic
|
||||
return FALSE //continue world/Topic
|
||||
|
||||
if(their_sCK != comms_key)
|
||||
return "Invalid comms key!";
|
||||
@@ -160,7 +160,7 @@
|
||||
var/datum/tgs_revision_information/test_merge/tm = new
|
||||
tm.number = text2num(I)
|
||||
var/list/entry = json[I]
|
||||
tm.pull_request_commit = entry["commit"]
|
||||
tm.head_commit = entry["commit"]
|
||||
tm.author = entry["author"]
|
||||
tm.title = entry["title"]
|
||||
. += tm
|
||||
@@ -176,7 +176,7 @@
|
||||
return ri
|
||||
|
||||
/datum/tgs_api/v3210/EndProcess()
|
||||
sleep(world.tick_lag) //flush the buffers
|
||||
sleep(world.tick_lag) //flush the buffers
|
||||
ExportService(SERVICE_REQUEST_KILL_PROCESS)
|
||||
|
||||
/datum/tgs_api/v3210/ChatChannelInfo()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/list/json = cached_json["testMerges"]
|
||||
for(var/entry in json)
|
||||
var/datum/tgs_revision_information/test_merge/tm = new
|
||||
tm.time_merged = text2num(entry["timeMerged"])
|
||||
tm.timestamp = text2num(entry["timeMerged"])
|
||||
|
||||
var/list/revInfo = entry["revision"]
|
||||
if(revInfo)
|
||||
@@ -104,7 +104,7 @@
|
||||
tm.url = entry["url"]
|
||||
tm.author = entry["author"]
|
||||
tm.number = entry["number"]
|
||||
tm.pull_request_commit = entry["pullRequestRevision"]
|
||||
tm.head_commit = entry["pullRequestRevision"]
|
||||
tm.comment = entry["comment"]
|
||||
|
||||
cached_test_merges += tm
|
||||
@@ -118,7 +118,7 @@
|
||||
var/list/params = params2list(T)
|
||||
var/their_sCK = params[TGS4_INTEROP_ACCESS_IDENTIFIER]
|
||||
if(!their_sCK)
|
||||
return FALSE //continue world/Topic
|
||||
return FALSE //continue world/Topic
|
||||
|
||||
if(their_sCK != access_identifier)
|
||||
return "Invalid comms key!";
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
//request a new port
|
||||
export_lock = FALSE
|
||||
var/list/new_port_json = Export(TGS4_COMM_NEW_PORT, list(TGS4_PARAMETER_DATA = "[world.port]"), TRUE) //stringify this on purpose
|
||||
var/list/new_port_json = Export(TGS4_COMM_NEW_PORT, list(TGS4_PARAMETER_DATA = "[world.port]"), TRUE) //stringify this on purpose
|
||||
|
||||
if(!new_port_json)
|
||||
TGS_ERROR_LOG("No new port response from server![TGS4_PORT_CRITFAIL_MESSAGE]")
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
var/port = result[TGS4_PARAMETER_DATA]
|
||||
if(!isnum(port))
|
||||
return //this is valid, server may just want use to reboot
|
||||
return //this is valid, server may just want use to reboot
|
||||
|
||||
if(port == 0)
|
||||
//to byond 0 means any port and "none" means close vOv
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
#define DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES "chatResponses"
|
||||
|
||||
#define DMAPI5_REVISION_INFORMATION_COMMIT_SHA "commitSha"
|
||||
#define DMAPI5_REVISION_INFORMATION_TIMESTAMP "timestamp"
|
||||
#define DMAPI5_REVISION_INFORMATION_ORIGIN_COMMIT_SHA "originCommitSha"
|
||||
|
||||
#define DMAPI5_CHAT_USER_ID "id"
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
var/initialized = FALSE
|
||||
|
||||
/datum/tgs_api/v5/ApiVersion()
|
||||
return new /datum/tgs_version(TGS_DMAPI_VERSION)
|
||||
return new /datum/tgs_version(
|
||||
#include "interop_version.dm"
|
||||
)
|
||||
|
||||
/datum/tgs_api/v5/OnWorldNew(minimum_required_security_level)
|
||||
server_port = world.params[DMAPI5_PARAM_SERVER_PORT]
|
||||
@@ -48,6 +50,7 @@
|
||||
if(istype(revisionData))
|
||||
revision = new
|
||||
revision.commit = revisionData[DMAPI5_REVISION_INFORMATION_COMMIT_SHA]
|
||||
revision.timestamp = revisionData[DMAPI5_REVISION_INFORMATION_TIMESTAMP]
|
||||
revision.origin_commit = revisionData[DMAPI5_REVISION_INFORMATION_ORIGIN_COMMIT_SHA]
|
||||
else
|
||||
TGS_ERROR_LOG("Failed to decode [DMAPI5_RUNTIME_INFORMATION_REVISION] from runtime information!")
|
||||
@@ -63,15 +66,18 @@
|
||||
if(revInfo)
|
||||
tm.commit = revisionData[DMAPI5_REVISION_INFORMATION_COMMIT_SHA]
|
||||
tm.origin_commit = revisionData[DMAPI5_REVISION_INFORMATION_ORIGIN_COMMIT_SHA]
|
||||
tm.timestamp = entry[DMAPI5_REVISION_INFORMATION_TIMESTAMP]
|
||||
else
|
||||
TGS_WARNING_LOG("Failed to decode [DMAPI5_TEST_MERGE_REVISION] from test merge #[tm.number]!")
|
||||
|
||||
tm.time_merged = text2num(entry[DMAPI5_TEST_MERGE_TIME_MERGED])
|
||||
if(!tm.timestamp)
|
||||
tm.timestamp = entry[DMAPI5_TEST_MERGE_TIME_MERGED]
|
||||
|
||||
tm.title = entry[DMAPI5_TEST_MERGE_TITLE_AT_MERGE]
|
||||
tm.body = entry[DMAPI5_TEST_MERGE_BODY_AT_MERGE]
|
||||
tm.url = entry[DMAPI5_TEST_MERGE_URL]
|
||||
tm.author = entry[DMAPI5_TEST_MERGE_AUTHOR]
|
||||
tm.pull_request_commit = entry[DMAPI5_TEST_MERGE_PULL_REQUEST_REVISION]
|
||||
tm.head_commit = entry[DMAPI5_TEST_MERGE_PULL_REQUEST_REVISION]
|
||||
tm.comment = entry[DMAPI5_TEST_MERGE_COMMENT]
|
||||
|
||||
test_merges += tm
|
||||
@@ -98,18 +104,19 @@
|
||||
return json_encode(response)
|
||||
|
||||
/datum/tgs_api/v5/OnTopic(T)
|
||||
if(!initialized)
|
||||
return FALSE //continue world/Topic
|
||||
|
||||
var/list/params = params2list(T)
|
||||
var/json = params[DMAPI5_TOPIC_DATA]
|
||||
if(!json)
|
||||
return FALSE
|
||||
return FALSE // continue to /world/Topic
|
||||
|
||||
var/list/topic_parameters = json_decode(json)
|
||||
if(!topic_parameters)
|
||||
return TopicResponse("Invalid topic parameters json!");
|
||||
|
||||
if(!initialized)
|
||||
TGS_WARNING_LOG("Missed topic due to not being initialized: [T]")
|
||||
return TRUE // too early to handle, but it's still our responsibility
|
||||
|
||||
var/their_sCK = topic_parameters[DMAPI5_PARAMETER_ACCESS_IDENTIFIER]
|
||||
if(their_sCK != access_identifier)
|
||||
return TopicResponse("Failed to decode [DMAPI5_PARAMETER_ACCESS_IDENTIFIER] from: [json]!");
|
||||
@@ -266,7 +273,7 @@
|
||||
|
||||
var/port = result[DMAPI5_BRIDGE_RESPONSE_NEW_PORT]
|
||||
if(!isnum(port))
|
||||
return //this is valid, server may just want use to reboot
|
||||
return //this is valid, server may just want use to reboot
|
||||
|
||||
if(port == 0)
|
||||
//to byond 0 means any port and "none" means close vOv
|
||||
|
||||
1
code/modules/tgs/v5/interop_version.dm
Normal file
1
code/modules/tgs/v5/interop_version.dm
Normal file
@@ -0,0 +1 @@
|
||||
"5.3.0"
|
||||
@@ -79,6 +79,7 @@
|
||||
#undef DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES
|
||||
|
||||
#undef DMAPI5_REVISION_INFORMATION_COMMIT_SHA
|
||||
#undef DMAPI5_REVISION_INFORMATION_TIMESTAMP
|
||||
#undef DMAPI5_REVISION_INFORMATION_ORIGIN_COMMIT_SHA
|
||||
|
||||
#undef DMAPI5_CHAT_USER_ID
|
||||
|
||||
15
code/modules/tgui/states/never.dm
Normal file
15
code/modules/tgui/states/never.dm
Normal file
@@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* Copyright (c) 2021 Arm A. Hammer
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* tgui state: never_state
|
||||
*
|
||||
* Always closes the UI, no matter what. See the ui_state in religious_tool.dm to see an example
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(never_state, /datum/ui_state/never_state, new)
|
||||
|
||||
/datum/ui_state/never_state/can_use_topic(src_object, mob/user)
|
||||
return UI_CLOSE
|
||||
@@ -94,6 +94,8 @@
|
||||
window.send_message("ping")
|
||||
var/flush_queue = window.send_asset(get_asset_datum(
|
||||
/datum/asset/simple/namespaced/fontawesome))
|
||||
flush_queue |= window.send_asset(get_asset_datum(
|
||||
/datum/asset/simple/namespaced/tgfont))
|
||||
for(var/datum/asset/asset in src_object.ui_assets(user))
|
||||
flush_queue |= window.send_asset(asset)
|
||||
if (flush_queue)
|
||||
@@ -241,7 +243,7 @@
|
||||
* Run an update cycle for this UI. Called internally by SStgui
|
||||
* every second or so.
|
||||
*/
|
||||
/datum/tgui/process(force = FALSE)
|
||||
/datum/tgui/process(delta_time, force = FALSE)
|
||||
if(closing)
|
||||
return
|
||||
var/datum/host = src_object.ui_host(user)
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
get_asset_datum(/datum/asset/simple/tgui_panel),
|
||||
))
|
||||
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome))
|
||||
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/tgfont))
|
||||
window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat))
|
||||
// Other setup
|
||||
request_telemetry()
|
||||
addtimer(CALLBACK(src, .proc/on_initialize_timed_out), 5 SECONDS)
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
/obj/vehicle/ridden/scooter/wheelys/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
|
||||
D.vehicle_move_delay = 0
|
||||
D.vehicle_move_delay = 1
|
||||
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
|
||||
D.set_vehicle_dir_layer(NORTH, OBJ_LAYER)
|
||||
D.set_vehicle_dir_layer(EAST, OBJ_LAYER)
|
||||
@@ -280,7 +280,7 @@
|
||||
unbuckle_mob(H)
|
||||
H.throw_at(throw_target, 4, 3)
|
||||
H.DefaultCombatKnockdown(30)
|
||||
H.adjustStaminaLoss(10)
|
||||
H.adjustStaminaLoss(30)
|
||||
var/head_slot = H.get_item_by_slot(SLOT_HEAD)
|
||||
if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat)))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1)
|
||||
|
||||
@@ -276,6 +276,8 @@
|
||||
if(href_list["outsidepick"])
|
||||
var/atom/movable/tgt = locate(href_list["outsidepick"])
|
||||
var/obj/belly/OB = locate(href_list["outsidebelly"])
|
||||
if(!istype(OB))
|
||||
return
|
||||
if(!(tgt in OB)) //Aren't here anymore, need to update menu.
|
||||
return TRUE
|
||||
var/intent = "Examine"
|
||||
|
||||
Reference in New Issue
Block a user