Merge branch 'master' into upstream-merge-27440
@@ -1,10 +1,10 @@
|
||||
#ifndef ALL_MAPS
|
||||
#ifndef ALL_MAPS
|
||||
|
||||
#include "map_files\generic\SpaceStation.dmm"
|
||||
#include "map_files\generic\Centcomm.dmm"
|
||||
#include "map_files\generic\Space.dmm"
|
||||
#include "map_files\generic\SpaceDock.dmm"
|
||||
#include "map_files\Mining\lavaland.dmm"
|
||||
#include "map_files\generic\SpaceStation.dmm"
|
||||
#include "map_files\generic\Centcomm.dmm"
|
||||
#include "map_files\generic\Space.dmm"
|
||||
#include "map_files\generic\SpaceDock.dmm"
|
||||
#include "map_files\Mining\lavaland.dmm"
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
#define ANTAG_DATUM_CULT_MASTER /datum/antagonist/cult/master
|
||||
#define ANTAG_DATUM_CLOCKCULT /datum/antagonist/clockcult
|
||||
#define ANTAG_DATUM_CLOCKCULT_SILENT /datum/antagonist/clockcult/silent
|
||||
#define ANTAG_DATUM_DEVIL /datum/antagonist/devil
|
||||
#define ANTAG_DATUM_DEVIL /datum/antagonist/devil
|
||||
#define ANTAG_DATUM_NINJA /datum/antagonist/ninja
|
||||
#define ANTAG_DATUM_NINJA_FRIENDLY /datum/antagonist/ninja/friendly
|
||||
#define ANTAG_DATUM_NINJA_RANDOM /datum/antagonist/ninja/randomAllegiance/
|
||||
@@ -0,0 +1,9 @@
|
||||
//rune colors, for easy reference
|
||||
#define RUNE_COLOR_TALISMAN "#0000FF"
|
||||
#define RUNE_COLOR_TELEPORT "#551A8B"
|
||||
#define RUNE_COLOR_OFFER "#FFFFFF"
|
||||
#define RUNE_COLOR_DARKRED "#7D1717"
|
||||
#define RUNE_COLOR_MEDIUMRED "#C80000"
|
||||
#define RUNE_COLOR_RED "#FF0000"
|
||||
#define RUNE_COLOR_EMP "#4D94FF"
|
||||
#define RUNE_COLOR_SUMMON "#00FF00"
|
||||
@@ -340,6 +340,20 @@ Proc for attack log creation, because really why not
|
||||
qdel(progbar)
|
||||
|
||||
|
||||
//some additional checks as a callback for for do_afters that want to break on losing health or on the mob taking action
|
||||
/mob/proc/break_do_after_checks(list/checked_health, check_clicks)
|
||||
if(check_clicks && next_move > world.time)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//pass a list in the format list("health" = mob's health var) to check health during this
|
||||
/mob/living/break_do_after_checks(list/checked_health, check_clicks)
|
||||
if(islist(checked_health))
|
||||
if(health < checked_health["health"])
|
||||
return FALSE
|
||||
checked_health["health"] = health
|
||||
return ..()
|
||||
|
||||
/proc/do_after(mob/user, delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null)
|
||||
if(!user)
|
||||
return 0
|
||||
|
||||
@@ -13,4 +13,5 @@ GLOBAL_VAR_INIT(sac_image, null)
|
||||
GLOBAL_VAR_INIT(cult_vote_called, FALSE)
|
||||
GLOBAL_VAR_INIT(cult_mastered, FALSE)
|
||||
GLOBAL_VAR_INIT(reckoning_complete, FALSE)
|
||||
GLOBAL_VAR_INIT(sac_complete, FALSE)
|
||||
GLOBAL_VAR_INIT(sac_complete, FALSE)
|
||||
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
|
||||
@@ -287,9 +287,9 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
GLOB.blood_target = null
|
||||
else
|
||||
blood_target = GLOB.blood_target
|
||||
if(Cviewer)
|
||||
if(Cviewer.seeking && Cviewer.master)
|
||||
blood_target = Cviewer.master
|
||||
if(Cviewer && Cviewer.seeking && Cviewer.master)
|
||||
blood_target = Cviewer.master
|
||||
desc = "Your blood sense is leading you to [Cviewer.master]"
|
||||
if(!blood_target)
|
||||
if(!GLOB.sac_complete)
|
||||
if(icon_state == "runed_sense0")
|
||||
@@ -301,22 +301,21 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
desc = "Nar-Sie demands that [GLOB.sac_mind] be sacrificed before the summoning ritual can begin."
|
||||
add_overlay(GLOB.sac_image)
|
||||
else
|
||||
if(SSticker.mode.eldergod)
|
||||
desc = "The sacrifice is complete, prepare to summon Nar-Sie!"
|
||||
else
|
||||
desc = "The summoning is complete, glory to Nar-Sie!"
|
||||
if(icon_state == "runed_sense1")
|
||||
return
|
||||
animate(src, transform = null, time = 1, loop = 0)
|
||||
angle = 0
|
||||
cut_overlays()
|
||||
icon_state = "runed_sense1"
|
||||
desc = "The sacrifice is complete, bring the wrath of Nar-Sie upon the crew!"
|
||||
add_overlay(narnar)
|
||||
return
|
||||
var/turf/P = get_turf(blood_target)
|
||||
var/turf/Q = get_turf(mob_viewer)
|
||||
var/area/A = get_area(P)
|
||||
if(P.z != Q.z) //The target is on a different Z level, we cannot sense that far.
|
||||
icon_state = "runed_sense2"
|
||||
desc = "[blood_target] is no longer in your sector, you cannot sense its presence here."
|
||||
return
|
||||
desc = "You are currently tracking [blood_target] in [A.name]."
|
||||
var/target_angle = Get_Angle(Q, P)
|
||||
|
||||
@@ -139,6 +139,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
|
||||
if(FireHim)
|
||||
Master.subsystems += new BadBoy.type //NEW_SS_GLOBAL will remove the old one
|
||||
subsystems = Master.subsystems
|
||||
current_runlevel = Master.current_runlevel
|
||||
StartProcessing(10)
|
||||
else
|
||||
to_chat(world, "<span class='boldannounce'>The Master Controller is having some issues, we will need to re-initialize EVERYTHING</span>")
|
||||
|
||||
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
name = "Blackbox"
|
||||
wait = 6000
|
||||
flags = SS_NO_TICK_CHECK
|
||||
|
||||
|
||||
var/list/msg_common = list()
|
||||
var/list/msg_science = list()
|
||||
var/list/msg_command = list()
|
||||
@@ -91,7 +91,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
if (sqlrowlist != "")
|
||||
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
|
||||
|
||||
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
|
||||
sqlrowlist += list(list("time" = "Now()", "round_id" = GLOB.round_id, "var_name" = "'[sanitizeSQL(FV.get_variable())]'", "var_value" = FV.get_value(), "details" = "'[sanitizeSQL(FV.get_details())]'"))
|
||||
|
||||
if (sqlrowlist == "")
|
||||
return
|
||||
@@ -243,4 +243,4 @@ SUBSYSTEM_DEF(blackbox)
|
||||
return details
|
||||
|
||||
/datum/feedback_variable/proc/get_parsed()
|
||||
return list(variable,value,details)
|
||||
return list(variable,value,details)
|
||||
@@ -77,15 +77,87 @@ SUBSYSTEM_DEF(dbcore)
|
||||
return FALSE
|
||||
return _dm_db_is_connected(_db_con)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Quote(str)
|
||||
/datum/controller/subsystem/dbcore/proc/Quote(str)
|
||||
return _dm_db_quote(_db_con, str)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/ErrorMsg()
|
||||
/datum/controller/subsystem/dbcore/proc/ErrorMsg()
|
||||
if(!config.sql_enabled)
|
||||
return "Database disabled by configuration"
|
||||
return _dm_db_error_msg(_db_con)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/NewQuery(sql_query, cursor_handler = Default_Cursor)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
log_admin_private("ERROR: Advanced admin proc call led to sql query: [sql_query]. Query has been blocked")
|
||||
message_admins("ERROR: Advanced admin proc call led to sql query. Query has been blocked")
|
||||
return FALSE
|
||||
return new /datum/DBQuery(sql_query, src, cursor_handler)
|
||||
|
||||
/*
|
||||
Takes a list of rows (each row being an associated list of column => value) and inserts them via a single mass query.
|
||||
Rows missing columns present in other rows will resolve to SQL NULL
|
||||
You are expected to do your own escaping of the data, and expected to provide your own quotes for strings.
|
||||
The duplicate_key arg can be true to automatically generate this part of the query
|
||||
or set to a string that is appended to the end of the query
|
||||
Ignore_errors instructes mysql to continue inserting rows if some of them have errors.
|
||||
the erroneous row(s) aren't inserted and there isn't really any way to know why or why errored
|
||||
Delayed insert mode was removed in mysql 7 and only works with MyISAM type tables,
|
||||
It was included because it is still supported in mariadb.
|
||||
It does not work with duplicate_key and the mysql server ignores it in those cases
|
||||
*/
|
||||
/datum/controller/subsystem/dbcore/proc/MassInsert(table, list/rows, duplicate_key = FALSE, ignore_errors = FALSE, delayed = FALSE, warn = FALSE)
|
||||
if (!table || !rows || !istype(rows))
|
||||
return
|
||||
var/list/columns = list()
|
||||
var/list/sorted_rows = list()
|
||||
|
||||
for (var/list/row in rows)
|
||||
var/list/sorted_row = list()
|
||||
sorted_row.len = columns.len
|
||||
for (var/column in row)
|
||||
var/idx = columns[column]
|
||||
if (!idx)
|
||||
idx = columns.len + 1
|
||||
columns[column] = idx
|
||||
sorted_row.len = columns.len
|
||||
|
||||
sorted_row[idx] = row[column]
|
||||
sorted_rows[++sorted_rows.len] = sorted_row
|
||||
|
||||
if (duplicate_key == TRUE)
|
||||
var/list/column_list = list()
|
||||
for (var/column in columns)
|
||||
column_list += "[column] = VALUES([column])"
|
||||
duplicate_key = "ON DUPLICATE KEY UPDATE [column_list.Join(", ")]\n"
|
||||
else if (duplicate_key == FALSE)
|
||||
duplicate_key = null
|
||||
|
||||
if (ignore_errors)
|
||||
ignore_errors = " IGNORE"
|
||||
else
|
||||
ignore_errors = null
|
||||
|
||||
if (delayed)
|
||||
delayed = " DELAYED"
|
||||
else
|
||||
delayed = null
|
||||
|
||||
var/list/sqlrowlist = list()
|
||||
var/len = columns.len
|
||||
for (var/list/row in sorted_rows)
|
||||
if (length(row) != len)
|
||||
row.len = len
|
||||
for (var/value in row)
|
||||
if (value == null)
|
||||
value = "NULL"
|
||||
sqlrowlist += "([row.Join(", ")])"
|
||||
|
||||
sqlrowlist = " [sqlrowlist.Join(",\n ")]"
|
||||
var/datum/DBQuery/Query = NewQuery("INSERT[delayed][ignore_errors] INTO [table]\n([columns.Join(", ")])\nVALUES\n[sqlrowlist]\n[duplicate_key]")
|
||||
if (warn)
|
||||
return Query.warn_execute()
|
||||
else
|
||||
return Query.Execute()
|
||||
|
||||
|
||||
/datum/DBQuery
|
||||
var/sql // The sql query being executed.
|
||||
|
||||
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
loading_ruins = TRUE
|
||||
var/mining_type = config.minetype
|
||||
if (mining_type == "lavaland")
|
||||
seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors, lava_ruins_templates)
|
||||
seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors/unexplored, lava_ruins_templates)
|
||||
spawn_rivers()
|
||||
|
||||
// deep space ruins
|
||||
@@ -113,9 +113,9 @@ SUBSYSTEM_DEF(mapping)
|
||||
/datum/controller/subsystem/mapping/proc/loadWorld()
|
||||
//if any of these fail, something has gone horribly, HORRIBLY, wrong
|
||||
var/list/FailedZs = list()
|
||||
|
||||
|
||||
var/start_time = REALTIMEOFDAY
|
||||
|
||||
|
||||
INIT_ANNOUNCE("Loading [config.map_name]...")
|
||||
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
|
||||
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
|
||||
@@ -284,7 +284,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Now animate the cinematic
|
||||
switch(station_missed)
|
||||
if(NUKE_NEAR_MISS) //nuke was nearby but (mostly) missed
|
||||
if( mode && !override )
|
||||
if(mode && !override )
|
||||
override = mode.name
|
||||
switch( override )
|
||||
if("nuclear emergency") //Nuke wasn't on station when it blew up
|
||||
@@ -294,6 +294,17 @@ SUBSYSTEM_DEF(ticker)
|
||||
station_explosion_detonation(bomb)
|
||||
flick("station_intact_fade_red",cinematic)
|
||||
cinematic.icon_state = "summary_nukefail"
|
||||
if("cult")
|
||||
cinematic.icon_state = null
|
||||
flick("intro_cult",cinematic)
|
||||
sleep(25)
|
||||
world << sound('sound/magic/enter_blood.ogg')
|
||||
sleep(28)
|
||||
world << sound('sound/machines/terminal_off.ogg')
|
||||
sleep(20)
|
||||
flick("station_corrupted",cinematic)
|
||||
world << sound('sound/effects/ghost.ogg')
|
||||
actually_blew_up = FALSE
|
||||
if("gang war") //Gang Domination (just show the override screen)
|
||||
cinematic.icon_state = "intro_malf_still"
|
||||
flick("intro_malf",cinematic)
|
||||
@@ -342,6 +353,13 @@ SUBSYSTEM_DEF(ticker)
|
||||
world << sound('sound/effects/explosionfar.ogg')
|
||||
station_explosion_detonation(bomb) //TODO: no idea what this case could be
|
||||
cinematic.icon_state = "summary_selfdes"
|
||||
if("cult") //Station nuked (nuke,explosion,summary)
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
flick("station_explode_fade_red",cinematic)
|
||||
world << sound('sound/effects/explosionfar.ogg')
|
||||
station_explosion_detonation(bomb) //TODO: no idea what this case could be
|
||||
cinematic.icon_state = "summary_cult"
|
||||
if("no_core") //Nuke failed to detonate as it had no core
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
|
||||
@@ -358,6 +358,59 @@
|
||||
active = FALSE
|
||||
..()
|
||||
|
||||
/datum/action/item_action/initialize_ninja_suit
|
||||
name = "Toggle ninja suit"
|
||||
|
||||
/datum/action/item_action/ninjajaunt
|
||||
name = "Phase Jaunt (10E)"
|
||||
desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
button_icon_state = "ninja_phase"
|
||||
|
||||
/datum/action/item_action/ninjasmoke
|
||||
name = "Smoke Bomb"
|
||||
desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
button_icon_state = "smoke"
|
||||
|
||||
/datum/action/item_action/ninjaboost
|
||||
name = "Adrenaline Boost"
|
||||
desc = "Inject a secret chemical that will counteract all movement-impairing effect."
|
||||
button_icon_state = "repulse"
|
||||
|
||||
/datum/action/item_action/ninjapulse
|
||||
name = "EM Burst (25E)"
|
||||
desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
button_icon_state = "emp"
|
||||
|
||||
/datum/action/item_action/ninjastar
|
||||
name = "Create Throwing Stars (1E)"
|
||||
desc = "Creates some throwing stars"
|
||||
button_icon_state = "throwingstar"
|
||||
icon_icon = 'icons/obj/weapons.dmi'
|
||||
|
||||
/datum/action/item_action/ninjanet
|
||||
name = "Energy Net (20E)"
|
||||
desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
button_icon_state = "energynet"
|
||||
icon_icon = 'icons/effects/effects.dmi'
|
||||
|
||||
/datum/action/item_action/ninja_sword_recall
|
||||
name = "Recall Energy Katana (Variable Cost)"
|
||||
desc = "Teleports the Energy Katana linked to this suit to its wearer, cost based on distance."
|
||||
button_icon_state = "energy_katana"
|
||||
icon_icon = 'icons/obj/weapons.dmi'
|
||||
|
||||
/datum/action/item_action/ninja_stealth
|
||||
name = "Toggle Stealth"
|
||||
desc = "Toggles stealth mode on and off."
|
||||
button_icon_state = "ninja_cloak"
|
||||
|
||||
/datum/action/item_action/toggle_glove
|
||||
name = "Toggle interaction"
|
||||
desc = "Switch between normal interaction and drain mode."
|
||||
button_icon_state = "s-ninjan"
|
||||
icon_icon = 'icons/obj/clothing/gloves.dmi'
|
||||
|
||||
|
||||
/datum/action/item_action/organ_action
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/datum/antagonist/ninja
|
||||
name = "Ninja"
|
||||
var/team
|
||||
var/helping_station = 0
|
||||
var/give_objectives = TRUE
|
||||
|
||||
/datum/antagonist/ninja/friendly
|
||||
helping_station = 1
|
||||
|
||||
/datum/antagonist/ninja/friendly/noobjective
|
||||
give_objectives = FALSE
|
||||
|
||||
/datum/antagonist/ninja/New(datum/mind/new_owner)
|
||||
if(new_owner && !ishuman(new_owner.current))//It's fine if we aren't passed a mind, but if we are, they have to be human.
|
||||
throw EXCEPTION("Only humans and/or humanoids may be ninja'ed")
|
||||
..(new_owner)
|
||||
|
||||
/datum/antagonist/ninja/randomAllegiance/New(datum/mind/new_owner)
|
||||
..(new_owner)
|
||||
helping_station = rand(0,1)
|
||||
|
||||
/datum/antagonist/ninja/proc/equip_space_ninja(mob/living/carbon/human/H = owner.current, safety=0)//Safety in case you need to unequip stuff for existing characters.
|
||||
if(safety)
|
||||
qdel(H.w_uniform)
|
||||
qdel(H.wear_suit)
|
||||
qdel(H.wear_mask)
|
||||
qdel(H.head)
|
||||
qdel(H.shoes)
|
||||
qdel(H.gloves)
|
||||
|
||||
var/obj/item/clothing/suit/space/space_ninja/theSuit = new(H)
|
||||
var/obj/item/weapon/katana/energy/EK = new(H)
|
||||
theSuit.energyKatana = EK
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(theSuit, slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(H), slot_gloves)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/space_ninja(H), slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses)
|
||||
H.equip_to_slot_or_del(EK, slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight(H), slot_r_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(H), slot_l_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/tank/internals/emergency_oxygen(H), slot_s_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(H), slot_back)
|
||||
theSuit.randomize_param()
|
||||
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(H)
|
||||
E.implant(H)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/ninja/proc/addMemories()
|
||||
owner.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
|
||||
owner.store_memory("Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
|
||||
owner.store_memory("Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
|
||||
|
||||
/datum/antagonist/ninja/proc/addObjectives(quantity = 6)
|
||||
var/list/possible_targets = list()
|
||||
for(var/datum/mind/M in SSticker.minds)
|
||||
if(M.current && M.current.stat != DEAD)
|
||||
if(ishuman(M.current))
|
||||
if(M.special_role)
|
||||
possible_targets[M] = 0 //bad-guy
|
||||
else if(M.assigned_role in GLOB.command_positions)
|
||||
possible_targets[M] = 1 //good-guy
|
||||
|
||||
var/list/objectives = list(1,2,3,4)
|
||||
while(owner.objectives.len < quantity)
|
||||
switch(pick_n_take(objectives))
|
||||
if(1) //research
|
||||
var/datum/objective/download/O = new /datum/objective/download()
|
||||
O.owner = owner
|
||||
O.gen_amount_goal()
|
||||
owner.objectives += O
|
||||
|
||||
if(2) //steal
|
||||
var/datum/objective/steal/special/O = new /datum/objective/steal/special()
|
||||
O.owner = owner
|
||||
owner.objectives += O
|
||||
|
||||
if(3) //protect/kill
|
||||
if(!possible_targets.len) continue
|
||||
var/index = rand(1,possible_targets.len)
|
||||
var/datum/mind/M = possible_targets[index]
|
||||
var/is_bad_guy = possible_targets[M]
|
||||
possible_targets.Cut(index,index+1)
|
||||
|
||||
if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy)
|
||||
var/datum/objective/assassinate/O = new /datum/objective/assassinate()
|
||||
O.owner = owner
|
||||
O.target = M
|
||||
O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]."
|
||||
owner.objectives += O
|
||||
else //protect
|
||||
var/datum/objective/protect/O = new /datum/objective/protect()
|
||||
O.owner = owner
|
||||
O.target = M
|
||||
O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm."
|
||||
owner.objectives += O
|
||||
if(4) //debrain/capture
|
||||
if(!possible_targets.len) continue
|
||||
var/selected = rand(1,possible_targets.len)
|
||||
var/datum/mind/M = possible_targets[selected]
|
||||
var/is_bad_guy = possible_targets[M]
|
||||
possible_targets.Cut(selected,selected+1)
|
||||
|
||||
if(is_bad_guy ^ helping_station) //debrain (good-ninja + bad-guy or bad-ninja + good-guy)
|
||||
var/datum/objective/debrain/O = new /datum/objective/debrain()
|
||||
O.owner = owner
|
||||
O.target = M
|
||||
O.explanation_text = "Steal the brain of [M.current.real_name]."
|
||||
owner.objectives += O
|
||||
else //capture
|
||||
var/datum/objective/capture/O = new /datum/objective/capture()
|
||||
O.owner = owner
|
||||
O.gen_amount_goal()
|
||||
owner.objectives += O
|
||||
else
|
||||
break
|
||||
var/datum/objective/O = new /datum/objective/survive()
|
||||
O.owner = owner
|
||||
owner.objectives += O
|
||||
|
||||
|
||||
/proc/remove_ninja(mob/living/L)
|
||||
if(!L || !L.mind)
|
||||
return FALSE
|
||||
var/datum/antagonist/datum = L.mind.has_antag_datum(ANTAG_DATUM_NINJA)
|
||||
datum.on_removal()
|
||||
return TRUE
|
||||
|
||||
/proc/add_ninja(mob/living/carbon/human/H, type = ANTAG_DATUM_NINJA_RANDOM)
|
||||
if(!H || !H.mind)
|
||||
return FALSE
|
||||
return H.mind.add_antag_datum(type)
|
||||
|
||||
/proc/is_ninja(mob/living/M)
|
||||
return M && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_NINJA)
|
||||
|
||||
|
||||
/datum/antagonist/ninja/greet()
|
||||
owner.current << sound('sound/effects/ninja_greeting.ogg')
|
||||
to_chat(owner.current, "I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
|
||||
to_chat(owner.current, "Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
|
||||
to_chat(owner.current, "Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
|
||||
return
|
||||
|
||||
/datum/antagonist/ninja/on_gain()
|
||||
if(give_objectives)
|
||||
addObjectives()
|
||||
addMemories()
|
||||
@@ -737,18 +737,6 @@
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
@@ -326,7 +326,8 @@
|
||||
"traitor", // "traitorchan",
|
||||
"monkey",
|
||||
"clockcult",
|
||||
"devil"
|
||||
"devil",
|
||||
"ninja"
|
||||
)
|
||||
var/text = ""
|
||||
|
||||
@@ -614,9 +615,27 @@
|
||||
text += "|Disabled in Prefs"
|
||||
sections["devil"] = text
|
||||
|
||||
/** NINJA ***/
|
||||
text = "ninja"
|
||||
if(SSticker.mode.config_tag == "ninja")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA)
|
||||
if(ninjainfo)
|
||||
if(ninjainfo.helping_station)
|
||||
text += "<a href='?src=\ref[src];ninja=clear'>employee</a> | syndicate | <b>NANOTRASEN</b> | <b><a href='?src=\ref[src];ninja=equip'>EQUIP</a></b>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];ninja=clear'>employee</a> | <b>SYNDICATE</b> | nanotrasen | <b><a href='?src=\ref[src];ninja=equip'>EQUIP</a></b>"
|
||||
else
|
||||
text += "<b>EMPLOYEE</b> | <a href='?src=\ref[src];ninja=syndicate'>syndicate</a> | <a href='?src=\ref[src];ninja=nanotrasen'>nanotrasen</a> | <a href='?src=\ref[src];ninja=random'>random allegiance</a>"
|
||||
if(current && current.client && (ROLE_NINJA in current.client.prefs.be_special))
|
||||
text += " | Enabled in Prefs"
|
||||
else
|
||||
text += " | Disabled in Prefs"
|
||||
sections["ninja"] = text
|
||||
|
||||
/** SILICON ***/
|
||||
|
||||
/** SILICON ***/
|
||||
if(issilicon(current))
|
||||
text = "silicon"
|
||||
var/mob/living/silicon/robot/robot = current
|
||||
@@ -1202,7 +1221,28 @@
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This only works on humans!</span>")
|
||||
return
|
||||
|
||||
else if(href_list["ninja"])
|
||||
var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA)
|
||||
switch(href_list["ninja"])
|
||||
if("clear")
|
||||
remove_ninja(current)
|
||||
message_admins("[key_name_admin(usr)] has de-ninja'ed [current].")
|
||||
log_admin("[key_name(usr)] has de-ninja'ed [current].")
|
||||
if("equip")
|
||||
ninjainfo.equip_space_ninja()
|
||||
return
|
||||
if("nanotrasen")
|
||||
add_ninja(current, ANTAG_DATUM_NINJA_FRIENDLY)
|
||||
message_admins("[key_name_admin(usr)] has friendly ninja'ed [current].")
|
||||
log_admin("[key_name(usr)] has friendly ninja'ed [current].")
|
||||
if("syndicate")
|
||||
add_ninja(current, ANTAG_DATUM_NINJA)
|
||||
message_admins("[key_name_admin(usr)] has syndie ninja'ed [current].")
|
||||
log_admin("[key_name(usr)] has syndie ninja'ed [current].")
|
||||
if("random")
|
||||
add_ninja(current)
|
||||
message_admins("[key_name_admin(usr)] has random ninja'ed [current].")
|
||||
log_admin("[key_name(usr)] has random ninja'ed [current].")
|
||||
else if(href_list["abductor"])
|
||||
switch(href_list["abductor"])
|
||||
if("clear")
|
||||
@@ -1615,4 +1655,4 @@
|
||||
/mob/living/silicon/pai/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "pAI"
|
||||
mind.special_role = ""
|
||||
mind.special_role = ""
|
||||
|
||||
@@ -116,5 +116,11 @@
|
||||
name = "Lavaland Wastes"
|
||||
outdoors = 1
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/lavaland/surface/outdoors/explored
|
||||
name = "Lavaland Labor Camp"
|
||||
@@ -142,25 +142,25 @@
|
||||
/obj/item/weapon/antag_spawner/nuke_ops/proc/check_usability(mob/user)
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>[src] is out of power!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(!(user.mind in SSticker.mode.syndicates))
|
||||
to_chat(user, "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
to_chat(user, "<span class='warning'>[src] is out of range! It can only be used at your base!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/antag_spawner/nuke_ops/attack_self(mob/user)
|
||||
if(!(check_usability(user)))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
|
||||
var/list/nuke_candidates = pollCandidatesForMob("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE, src)
|
||||
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
|
||||
if(nuke_candidates.len)
|
||||
if(!(check_usability(user)))
|
||||
return
|
||||
used = 1
|
||||
used = TRUE
|
||||
var/mob/dead/observer/theghost = pick(nuke_candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), "syndieborg")
|
||||
do_sparks(4, TRUE, src)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/cult/master/IsAvailable()
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER))
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER) || GLOB.cult_narsie)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -298,4 +298,5 @@
|
||||
if(GLOB.blood_target)
|
||||
to_chat(B.current,"<span class='cultlarge'><b>The blood mark has expired!</b></span>")
|
||||
B.current.client.images -= GLOB.blood_target_image
|
||||
QDEL_NULL(GLOB.blood_target)
|
||||
QDEL_NULL(GLOB.blood_target_image)
|
||||
GLOB.blood_target = null
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands)
|
||||
. = list()
|
||||
if(!isinhands && current_charges)
|
||||
. += mutable_appearance('icons/effects/effects.dmi', "shield-cult", MOB_LAYER + 0.01)
|
||||
. += mutable_appearance('icons/effects/cult_effects.dmi', "shield-cult", MOB_LAYER + 0.01)
|
||||
|
||||
/obj/item/clothing/suit/hooded/cultrobes/berserker
|
||||
name = "flagellant's robes"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
//after a delay, creates a rune below you. for constructs creating runes.
|
||||
/datum/action/innate/cult/create_rune
|
||||
background_icon_state = "bg_cult"
|
||||
var/obj/effect/rune/rune_type
|
||||
var/cooldown = 0
|
||||
var/base_cooldown = 900
|
||||
var/scribe_time = 100
|
||||
var/damage_interrupt = TRUE
|
||||
var/action_interrupt = TRUE
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/rune_word_type
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/rune_innerring_type
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/rune_center_type
|
||||
var/rune_color
|
||||
|
||||
/datum/action/innate/cult/create_rune/IsAvailable()
|
||||
if(!rune_type || cooldown > world.time)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/innate/cult/create_rune/Activate()
|
||||
var/chosen_keyword
|
||||
if(!isturf(owner.loc))
|
||||
to_chat(owner, "<span class='warning>You need more space to scribe a rune!</span>")
|
||||
return
|
||||
if(initial(rune_type.req_keyword))
|
||||
chosen_keyword = stripped_input(owner, "Enter a keyword for the new rune.", "Words of Power")
|
||||
if(!chosen_keyword)
|
||||
return
|
||||
//the outer ring is always the same across all runes
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/R1 = new(owner.loc, scribe_time, rune_color)
|
||||
//the rest are not always the same, so we need types for em
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/R2
|
||||
if(rune_word_type)
|
||||
R2 = new rune_word_type(owner.loc, scribe_time, rune_color)
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/R3
|
||||
if(rune_innerring_type)
|
||||
R3 = new rune_innerring_type(owner.loc, scribe_time, rune_color)
|
||||
var/obj/effect/overlay/temp/cult/rune_spawn/R4
|
||||
if(rune_center_type)
|
||||
R4 = new rune_center_type(owner.loc, scribe_time, rune_color)
|
||||
|
||||
cooldown = base_cooldown + world.time
|
||||
owner.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(owner, /mob.proc/update_action_buttons_icon), base_cooldown)
|
||||
var/list/health
|
||||
if(damage_interrupt && isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
health = list("health" = L.health)
|
||||
if(do_after(owner, scribe_time, target = owner, extra_checks = CALLBACK(owner, /mob.proc/break_do_after_checks, health, action_interrupt)))
|
||||
var/obj/effect/rune/new_rune = new rune_type(owner.loc)
|
||||
new_rune.keyword = chosen_keyword
|
||||
else
|
||||
qdel(R1)
|
||||
if(R2)
|
||||
qdel(R2)
|
||||
if(R3)
|
||||
qdel(R3)
|
||||
if(R4)
|
||||
qdel(R4)
|
||||
cooldown = 0
|
||||
owner.update_action_buttons_icon()
|
||||
|
||||
//teleport rune
|
||||
/datum/action/innate/cult/create_rune/tele
|
||||
button_icon_state = "telerune"
|
||||
rune_type = /obj/effect/rune/teleport
|
||||
rune_word_type = /obj/effect/overlay/temp/cult/rune_spawn/rune2
|
||||
rune_innerring_type = /obj/effect/overlay/temp/cult/rune_spawn/rune2/inner
|
||||
rune_center_type = /obj/effect/overlay/temp/cult/rune_spawn/rune2/center
|
||||
rune_color = RUNE_COLOR_TELEPORT
|
||||
@@ -24,7 +24,7 @@ To draw a rune, use an arcane tome.
|
||||
icon_state = "1"
|
||||
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
layer = LOW_OBJ_LAYER
|
||||
color = "#FF0000"
|
||||
color = RUNE_COLOR_RED
|
||||
|
||||
var/invocation = "Aiy ele-mayo!" //This is said by cultists when the rune is invoked.
|
||||
var/req_cultists = 1 //The amount of cultists required around the rune to invoke it. If only 1, any cultist can invoke it.
|
||||
@@ -148,8 +148,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
|
||||
/obj/effect/rune/proc/fail_invoke()
|
||||
//This proc contains the effects of a rune if it is not invoked correctly, through either invalid wording or not enough cultists. By default, it's just a basic fizzle.
|
||||
visible_message("<span class='warning'>The markings pulse with a \
|
||||
small flash of red light, then fall dark.</span>")
|
||||
visible_message("<span class='warning'>The markings pulse with a small flash of red light, then fall dark.</span>")
|
||||
var/oldcolor = color
|
||||
color = rgb(255, 0, 0)
|
||||
animate(src, color = oldcolor, time = 5)
|
||||
@@ -192,7 +191,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "transforms paper into powerful magic talismans."
|
||||
invocation = "H'drak v'loso, mir'kanas verbot!"
|
||||
icon_state = "3"
|
||||
color = "#0000FF"
|
||||
color = RUNE_COLOR_TALISMAN
|
||||
|
||||
/obj/effect/rune/imbue/invoke(var/list/invokers)
|
||||
var/mob/living/user = invokers[1] //the first invoker is always the user
|
||||
@@ -247,7 +246,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "warps everything above it to another chosen teleport rune."
|
||||
invocation = "Sas'so c'arta forbici!"
|
||||
icon_state = "2"
|
||||
color = "#551A8B"
|
||||
color = RUNE_COLOR_TELEPORT
|
||||
req_keyword = TRUE
|
||||
var/listkey
|
||||
|
||||
@@ -307,10 +306,11 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
A.forceMove(target)
|
||||
if(movedsomething)
|
||||
..()
|
||||
visible_message("<span class='warning'>There is a sharp crack of inrushing air, and everything above the rune disappears!</span>")
|
||||
visible_message("<span class='warning'>There is a sharp crack of inrushing air, and everything above the rune disappears!</span>", null, "<i>You hear a sharp crack.</i>")
|
||||
to_chat(user, "<span class='cult'>You[moveuserlater ? "r vision blurs, and you suddenly appear somewhere else":" send everything above the rune away"].</span>")
|
||||
if(moveuserlater)
|
||||
user.forceMove(target)
|
||||
target.visible_message("<span class='warning'>There is a boom of outrushing air as something appears above the rune!</span>", null, "<i>You hear a boom.</i>")
|
||||
else
|
||||
fail_invoke()
|
||||
|
||||
@@ -322,7 +322,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
req_cultists_text = "2 for conversion, 3 for living sacrifices and sacrifice targets."
|
||||
invocation = "Mah'weyh pleggh at e'ntrath!"
|
||||
icon_state = "3"
|
||||
color = "#FFFFFF"
|
||||
color = RUNE_COLOR_OFFER
|
||||
req_cultists = 1
|
||||
allow_excess_invokers = TRUE
|
||||
rune_in_use = FALSE
|
||||
@@ -345,7 +345,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
rune_in_use = TRUE
|
||||
visible_message("<span class='warning'>[src] pulses blood red!</span>")
|
||||
var/oldcolor = color
|
||||
color = "#7D1717"
|
||||
color = RUNE_COLOR_DARKRED
|
||||
var/mob/living/L = pick(myriad_targets)
|
||||
var/is_clock = is_servant_of_ratvar(L)
|
||||
var/is_convertable = is_convertable_to_cult(L)
|
||||
@@ -442,7 +442,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
invocation = "TOK-LYR RQA-NAP G'OLT-ULOFT!!"
|
||||
req_cultists = 9
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
color = "#7D1717"
|
||||
color = RUNE_COLOR_DARKRED
|
||||
icon_state = "rune_large"
|
||||
pixel_x = -32 //So the big ol' 96x96 sprite shows up right
|
||||
pixel_y = -32
|
||||
@@ -479,9 +479,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/turf/T = get_turf(src)
|
||||
sleep(40)
|
||||
if(src)
|
||||
color = "#FF0000"
|
||||
color = RUNE_COLOR_RED
|
||||
SSticker.mode.eldergod = FALSE
|
||||
new /obj/singularity/narsie/large(T) //Causes Nar-Sie to spawn even if the rune has been removed
|
||||
new /obj/singularity/narsie/large/cult(T) //Causes Nar-Sie to spawn even if the rune has been removed
|
||||
|
||||
/obj/effect/rune/narsie/attackby(obj/I, mob/user, params) //Since the narsie rune takes a long time to make, add logging to removal.
|
||||
if((istype(I, /obj/item/weapon/tome) && iscultist(user)))
|
||||
@@ -502,7 +502,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "requires the corpse of a cultist placed upon the rune. Provided there have been sufficient sacrifices, they will be revived."
|
||||
invocation = "Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!" //Depends on the name of the user - see below
|
||||
icon_state = "1"
|
||||
color = "#C80000"
|
||||
color = RUNE_COLOR_MEDIUMRED
|
||||
var/static/revives_used = 0
|
||||
|
||||
/obj/effect/rune/raise_dead/examine(mob/user)
|
||||
@@ -593,7 +593,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
invocation = "Ta'gh fara'qha fel d'amar det!"
|
||||
icon_state = "5"
|
||||
allow_excess_invokers = 1
|
||||
color = "#4D94FF"
|
||||
color = RUNE_COLOR_EMP
|
||||
|
||||
/obj/effect/rune/emp/invoke(var/list/invokers)
|
||||
var/turf/E = get_turf(src)
|
||||
@@ -623,7 +623,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "severs the link between one's spirit and body. This effect is taxing and one's physical body will take damage while this is active."
|
||||
invocation = "Fwe'sh mah erl nyag r'ya!"
|
||||
icon_state = "7"
|
||||
color = "#7D1717"
|
||||
color = RUNE_COLOR_DARKRED
|
||||
rune_in_use = 0 //One at a time, please!
|
||||
construct_invoke = 0
|
||||
var/mob/living/affecting = null
|
||||
@@ -649,9 +649,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/mob/living/user = invokers[1]
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
rune_in_use = 1
|
||||
rune_in_use = TRUE
|
||||
affecting = user
|
||||
user.color = "#7D1717"
|
||||
user.add_atom_colour(RUNE_COLOR_DARKRED, ADMIN_COLOUR_PRIORITY)
|
||||
user.visible_message("<span class='warning'>[user] freezes statue-still, glowing an unearthly red.</span>", \
|
||||
"<span class='cult'>You see what lies beyond. All is revealed. While this is a wondrous experience, your physical form will waste away in this state. Hurry...</span>")
|
||||
user.ghostize(1)
|
||||
@@ -659,7 +659,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
if(!affecting)
|
||||
visible_message("<span class='warning'>[src] pulses gently before falling dark.</span>")
|
||||
affecting = null //In case it's assigned to a number or something
|
||||
rune_in_use = 0
|
||||
rune_in_use = FALSE
|
||||
return
|
||||
affecting.apply_damage(0.1, BRUTE)
|
||||
if(!(user in T))
|
||||
@@ -669,9 +669,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
if(user.key)
|
||||
user.visible_message("<span class='warning'>[user] slowly relaxes, the glow around [user.p_them()] dimming.</span>", \
|
||||
"<span class='danger'>You are re-united with your physical form. [src] releases its hold over you.</span>")
|
||||
user.color = initial(user.color)
|
||||
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY, RUNE_COLOR_DARKRED)
|
||||
user.Weaken(3)
|
||||
rune_in_use = 0
|
||||
rune_in_use = FALSE
|
||||
affecting = null
|
||||
return
|
||||
if(user.stat == UNCONSCIOUS)
|
||||
@@ -679,14 +679,14 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/mob/dead/observer/G = user.get_ghost()
|
||||
to_chat(G, "<span class='cultitalic'>You feel the link between you and your body weakening... you must hurry!</span>")
|
||||
if(user.stat == DEAD)
|
||||
user.color = initial(user.color)
|
||||
rune_in_use = 0
|
||||
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY, RUNE_COLOR_DARKRED)
|
||||
rune_in_use = FALSE
|
||||
affecting = null
|
||||
var/mob/dead/observer/G = user.get_ghost()
|
||||
to_chat(G, "<span class='cultitalic'><b>You suddenly feel your physical form pass on. [src]'s exertion has killed you!</b></span>")
|
||||
return
|
||||
sleep(1)
|
||||
rune_in_use = 0
|
||||
rune_in_use = FALSE
|
||||
|
||||
//Rite of the Corporeal Shield: When invoked, becomes solid and cannot be passed. Invoke again to undo.
|
||||
/obj/effect/rune/wall
|
||||
@@ -694,7 +694,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "when invoked, makes a temporary invisible wall to block passage. Can be invoked again to reverse this."
|
||||
invocation = "Khari'd! Eske'te tannin!"
|
||||
icon_state = "1"
|
||||
color = "#C80000"
|
||||
color = RUNE_COLOR_MEDIUMRED
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
var/density_timer
|
||||
var/recharging = FALSE
|
||||
@@ -753,7 +753,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
|
||||
/obj/effect/rune/wall/proc/recharge()
|
||||
recharging = FALSE
|
||||
add_atom_colour("#C80000", FIXED_COLOUR_PRIORITY)
|
||||
add_atom_colour(RUNE_COLOR_MEDIUMRED, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/effect/rune/wall/proc/update_state()
|
||||
deltimer(density_timer)
|
||||
@@ -764,10 +764,10 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
shimmer.alpha = 60
|
||||
shimmer.color = "#701414"
|
||||
add_overlay(shimmer)
|
||||
add_atom_colour("#FF0000", FIXED_COLOUR_PRIORITY)
|
||||
add_atom_colour(RUNE_COLOR_RED, FIXED_COLOUR_PRIORITY)
|
||||
else
|
||||
cut_overlays()
|
||||
add_atom_colour("#C80000", FIXED_COLOUR_PRIORITY)
|
||||
add_atom_colour(RUNE_COLOR_MEDIUMRED, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
//Rite of Joined Souls: Summons a single cultist.
|
||||
/obj/effect/rune/summon
|
||||
@@ -777,7 +777,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
req_cultists = 2
|
||||
allow_excess_invokers = 1
|
||||
icon_state = "5"
|
||||
color = "#00FF00"
|
||||
color = RUNE_COLOR_SUMMON
|
||||
|
||||
/obj/effect/rune/summon/invoke(var/list/invokers)
|
||||
var/mob/living/user = invokers[1]
|
||||
@@ -822,7 +822,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_desc = "boils the blood of non-believers who can see the rune, rapidly dealing extreme amounts of damage. Requires 3 invokers."
|
||||
invocation = "Dedo ol'btoh!"
|
||||
icon_state = "4"
|
||||
color = "#C80000"
|
||||
color = RUNE_COLOR_MEDIUMRED
|
||||
light_color = LIGHT_COLOR_LAVA
|
||||
req_cultists = 3
|
||||
construct_invoke = 0
|
||||
@@ -889,7 +889,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
invocation = "Gal'h'rfikk harfrandid mud'gib!" //how the fuck do you pronounce this
|
||||
icon_state = "6"
|
||||
construct_invoke = 0
|
||||
color = "#C80000"
|
||||
color = RUNE_COLOR_MEDIUMRED
|
||||
var/ghost_limit = 5
|
||||
var/ghosts = 0
|
||||
|
||||
@@ -962,4 +962,4 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
"<span class='cultlarge'>Your link to the world fades. Your form breaks apart.</span>")
|
||||
for(var/obj/I in new_human)
|
||||
new_human.dropItemToGround(I, TRUE)
|
||||
new_human.dust()
|
||||
new_human.dust()
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/item/weapon/paper/talisman/teleport
|
||||
cultist_name = "Talisman of Teleportation"
|
||||
cultist_desc = "A single-use talisman that will teleport a user to a random rune of the same keyword."
|
||||
color = "#551A8B" // purple
|
||||
color = RUNE_COLOR_TELEPORT
|
||||
invocation = "Sas'so c'arta forbici!"
|
||||
health_cost = 5
|
||||
creation_time = 80
|
||||
@@ -79,7 +79,7 @@
|
||||
if(is_blocked_turf(target, TRUE))
|
||||
to_chat(user, "<span class='warning'>The target rune is blocked. Attempting to teleport to it would be massively unwise.</span>")
|
||||
return ..(user, 0)
|
||||
user.visible_message("<span class='warning'>Dust flows from [user]'s hand, and [user.p_they()] disappear with a sharp crack!</span>", \
|
||||
user.visible_message("<span class='warning'>Dust flows from [user]'s hand, and [user.p_they()] disappear[user.p_s()] with a sharp crack!</span>", \
|
||||
"<span class='cultitalic'>You speak the words of the talisman and find yourself somewhere else!</span>", "<i>You hear a sharp crack.</i>")
|
||||
user.forceMove(target)
|
||||
target.visible_message("<span class='warning'>There is a boom of outrushing air as something appears above the rune!</span>", null, "<i>You hear a boom.</i>")
|
||||
|
||||
@@ -210,13 +210,16 @@
|
||||
var/datum/action/innate/seek_master/SM = new()
|
||||
SM.Grant(newstruct)
|
||||
newstruct.key = target.key
|
||||
var/obj/screen/alert/bloodsense/BS
|
||||
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode)
|
||||
SSticker.mode.add_cultist(newstruct.mind, 0)
|
||||
BS = newstruct.alerts.Find("bloodsense")
|
||||
if(iscultist(stoner) || cultoverride)
|
||||
to_chat(newstruct, "<b>You are still bound to serve the cult[stoner ? " and [stoner]":""], follow their orders and help them complete their goals at all costs.</b>")
|
||||
else if(stoner)
|
||||
to_chat(newstruct, "<b>You are still bound to serve your creator, [stoner], follow their orders and help them complete their goals at all costs.</b>")
|
||||
var/obj/screen/alert/bloodsense/BS = newstruct.throw_alert("bloodsense", /obj/screen/alert/bloodsense)
|
||||
BS = newstruct.throw_alert("bloodsense", /obj/screen/alert/bloodsense)
|
||||
if(BS)
|
||||
BS.Cviewer = newstruct
|
||||
newstruct.cancel_camera()
|
||||
|
||||
|
||||
@@ -18,620 +18,6 @@
|
||||
..()
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/overlay/temp
|
||||
icon_state = "nothing"
|
||||
anchored = 1
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/duration = 10 //in deciseconds
|
||||
var/randomdir = TRUE
|
||||
var/timerid
|
||||
|
||||
/obj/effect/overlay/temp/Destroy()
|
||||
. = ..()
|
||||
deltimer(timerid)
|
||||
|
||||
/obj/effect/overlay/temp/Initialize()
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
setDir(pick(GLOB.cardinal))
|
||||
|
||||
timerid = QDEL_IN(src, duration)
|
||||
|
||||
/obj/effect/overlay/temp/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/Initialize(mapload, set_dir)
|
||||
if(set_dir)
|
||||
setDir(set_dir)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = BELOW_MOB_LAYER
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/Initialize(mapload, set_dir)
|
||||
if(set_dir in GLOB.diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
. = ..()
|
||||
var/target_pixel_x = 0
|
||||
var/target_pixel_y = 0
|
||||
switch(set_dir)
|
||||
if(NORTH)
|
||||
target_pixel_y = 16
|
||||
if(SOUTH)
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(EAST)
|
||||
target_pixel_x = 16
|
||||
if(WEST)
|
||||
target_pixel_x = -16
|
||||
if(NORTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = 16
|
||||
if(NORTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = 16
|
||||
if(SOUTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(SOUTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter
|
||||
splatter_type = "xsplatter"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/speedbike_trail
|
||||
name = "speedbike trails"
|
||||
icon_state = "ion_fade"
|
||||
layer = BELOW_MOB_LAYER
|
||||
duration = 10
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "firing_effect"
|
||||
duration = 2
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/setDir(newdir)
|
||||
switch(newdir)
|
||||
if(NORTH)
|
||||
layer = BELOW_MOB_LAYER
|
||||
pixel_x = rand(-3,3)
|
||||
pixel_y = rand(4,6)
|
||||
if(SOUTH)
|
||||
pixel_x = rand(-3,3)
|
||||
pixel_y = rand(-1,1)
|
||||
else
|
||||
pixel_x = rand(-1,1)
|
||||
pixel_y = rand(-1,1)
|
||||
..()
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/energy
|
||||
icon_state = "firing_effect_energy"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/magic
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja
|
||||
name = "ninja shadow"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "uncloak"
|
||||
duration = 9
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/cloak
|
||||
icon_state = "cloak"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/shadow
|
||||
icon_state = "shadow"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/phase
|
||||
name = "ninja energy"
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/wraith
|
||||
name = "blood"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "phase_shift2"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/wraith/out
|
||||
icon_state = "phase_shift"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/tailsweep
|
||||
icon_state = "tailsweep"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/wizard
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "reappear"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/wizard/out
|
||||
icon_state = "liquify"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/overlay/temp/monkeyify
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "h2monkey"
|
||||
duration = 22
|
||||
|
||||
/obj/effect/overlay/temp/monkeyify/humanify
|
||||
icon_state = "monkey2h"
|
||||
|
||||
/obj/effect/overlay/temp/borgflash
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "blspell"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/guardian
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase
|
||||
duration = 5
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/decoy
|
||||
desc = "It's a decoy!"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/decoy/Initialize(mapload, atom/mimiced_atom)
|
||||
. = ..()
|
||||
alpha = initial(alpha)
|
||||
if(mimiced_atom)
|
||||
name = mimiced_atom.name
|
||||
appearance = mimiced_atom.appearance
|
||||
setDir(mimiced_atom.dir)
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/overlay/temp/decoy/fading/Initialize(mapload, atom/mimiced_atom)
|
||||
. = ..()
|
||||
animate(src, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/decoy/fading/fivesecond
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/small_smoke
|
||||
icon_state = "smoke"
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/fire
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "3"
|
||||
duration = 20
|
||||
|
||||
/obj/effect/overlay/temp/cult
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/cult/sparks
|
||||
randomdir = 1
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/overlay/temp/cult/blood // The traditional teleport
|
||||
name = "blood jaunt"
|
||||
duration = 12
|
||||
icon_state = "bloodin"
|
||||
|
||||
/obj/effect/overlay/temp/cult/blood/out
|
||||
icon_state = "bloodout"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/cult/phase // The veil shifter teleport
|
||||
name = "phase glow"
|
||||
duration = 7
|
||||
icon_state = "cultin"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/cult/phase/out
|
||||
icon_state = "cultout"
|
||||
|
||||
/obj/effect/overlay/temp/cult/sac
|
||||
name = "maw of Nar-Sie"
|
||||
icon_state = "sacconsume"
|
||||
|
||||
/obj/effect/overlay/temp/cult/door
|
||||
name = "unholy glow"
|
||||
icon_state = "doorglow"
|
||||
layer = CLOSED_FIREDOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/cult/door/unruned
|
||||
icon_state = "unruneddoorglow"
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf
|
||||
name = "unholy glow"
|
||||
icon_state = "wallglow"
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/ratvar
|
||||
name = "ratvar's light"
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door
|
||||
icon_state = "ratvardoorglow"
|
||||
layer = CLOSED_DOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door/window
|
||||
icon_state = "ratvarwindoorglow"
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam
|
||||
icon_state = "ratvarbeamglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/door
|
||||
layer = CLOSED_DOOR_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/grille
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/itemconsume
|
||||
layer = HIGH_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/falsewall
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/catwalk
|
||||
layer = LATTICE_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/wall
|
||||
icon_state = "ratvarwallglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/wall/false
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/floor
|
||||
icon_state = "ratvarfloorglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/floor/catwalk
|
||||
layer = LATTICE_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window
|
||||
icon_state = "ratvarwindowglow"
|
||||
layer = ABOVE_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window/single
|
||||
icon_state = "ratvarwindowglow_s"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/gear
|
||||
icon_state = "ratvargearglow"
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille
|
||||
icon_state = "ratvargrilleglow"
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille/broken
|
||||
icon_state = "ratvarbrokengrilleglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/mending_mantra
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 20
|
||||
alpha = 200
|
||||
icon_state = "mending_mantra"
|
||||
light_range = 1.5
|
||||
light_color = "#1E8CE1"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/mending_mantra/Initialize(mapload)
|
||||
. = ..()
|
||||
transform = matrix()*2
|
||||
var/matrix/M = transform
|
||||
M.Turn(90)
|
||||
animate(src, alpha = 20, time = duration, easing = BOUNCE_EASING, flags = ANIMATION_PARALLEL)
|
||||
animate(src, transform = M, time = duration, flags = ANIMATION_PARALLEL)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit
|
||||
name = "volt blast"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 5
|
||||
icon_state = "volt_hit"
|
||||
light_range = 1.5
|
||||
light_power = 2
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
var/mob/user
|
||||
var/damage = 20
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/Initialize(mapload, caster, multiplier)
|
||||
if(multiplier)
|
||||
damage *= multiplier
|
||||
duration = max(round(damage * 0.2), 1)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/true/Initialize(mapload, caster, multiplier)
|
||||
. = ..()
|
||||
user = caster
|
||||
if(user)
|
||||
var/matrix/M = new
|
||||
M.Turn(Get_Angle(src, user))
|
||||
transform = M
|
||||
INVOKE_ASYNC(src, .proc/volthit)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/proc/volthit()
|
||||
if(user)
|
||||
Beam(get_turf(user), "volt_ray", time=duration, maxdistance=8, beam_type=/obj/effect/ebeam/volt_ray)
|
||||
var/hit_amount = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
if(is_servant_of_ratvar(L))
|
||||
continue
|
||||
var/obj/item/I = L.null_rod_check()
|
||||
if(I)
|
||||
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
|
||||
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
|
||||
continue
|
||||
L.visible_message("<span class='warning'>[L] is struck by a [name]!</span>", "<span class='userdanger'>You're struck by a [name]!</span>")
|
||||
L.apply_damage(damage, BURN, "chest", L.run_armor_check("chest", "laser", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 0, "Your armor was penetrated by [src]!"))
|
||||
add_logs(user, L, "struck with a volt blast")
|
||||
hit_amount++
|
||||
for(var/obj/mecha/M in T)
|
||||
if(M.occupant)
|
||||
if(is_servant_of_ratvar(M.occupant))
|
||||
continue
|
||||
to_chat(M.occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
|
||||
M.visible_message("<span class='warning'>[M] is struck by a [name]!</span>")
|
||||
M.take_damage(damage, BURN, 0, 0)
|
||||
hit_amount++
|
||||
if(hit_amount)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', damage*hit_amount, 1, -1)
|
||||
else
|
||||
playsound(src, "sparks", 50, 1)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/ocular_warden
|
||||
name = "warden's gaze"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
icon_state = "warden_gaze"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/ocular_warden/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-10, 10)
|
||||
animate(src, alpha = 0, time = 3, easing = EASE_OUT)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/spearbreak
|
||||
icon = 'icons/effects/64x64.dmi'
|
||||
icon_state = "ratvarspearbreak"
|
||||
layer = BELOW_MOB_LAYER
|
||||
pixel_y = -16
|
||||
pixel_x = -16
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/geis_binding
|
||||
icon_state = "geisbinding"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/geis_binding/top
|
||||
icon_state = "geisbinding_top"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
icon_state = "belligerent_eye"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/Initialize()
|
||||
. = ..()
|
||||
transform = matrix()*0.75
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, -2)
|
||||
animate(src, pixel_y = pixel_y + 10, alpha = 50, time = 10, easing = EASE_OUT)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/cogwheel
|
||||
icon_state = "vanguard_cogwheel"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/capacitor
|
||||
icon_state = "geis_capacitor"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/alloy
|
||||
icon_state = "replicant_alloy"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/ansible
|
||||
icon_state = "hierophant_ansible"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil
|
||||
name = "glowing circle"
|
||||
icon_state = "sigildull"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression
|
||||
color = "#FAE48C"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 70
|
||||
light_range = 5
|
||||
light_power = 2
|
||||
light_color = "#FAE48C"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression/Initialize()
|
||||
. = ..()
|
||||
var/oldtransform = transform
|
||||
animate(src, transform = matrix()*2, time = 5)
|
||||
animate(transform = oldtransform, alpha = 0, time = 65)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/vitality
|
||||
color = "#1E8CE1"
|
||||
icon_state = "sigilactivepulse"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
light_range = 1.4
|
||||
light_power = 0.5
|
||||
light_color = "#1E8CE1"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/accession
|
||||
color = "#AF0AAF"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 70
|
||||
icon_state = "sigilactiveoverlay"
|
||||
alpha = 0
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/revenant
|
||||
name = "spooky lights"
|
||||
icon_state = "purplesparkles"
|
||||
|
||||
/obj/effect/overlay/temp/revenant/cracks
|
||||
name = "glowing cracks"
|
||||
icon_state = "purplecrack"
|
||||
duration = 6
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/gravpush
|
||||
name = "gravity wave"
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/telekinesis
|
||||
name = "telekinetic force"
|
||||
icon_state = "empdisable"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/emp
|
||||
name = "emp sparks"
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/overlay/temp/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emppulse"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/Initialize(mapload, gib_icon)
|
||||
icon_state = gib_icon // Needs to be before ..() so icon is correct
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/ex_act(severity)
|
||||
return //so the overlay isn't deleted by the explosion that gibbed the mob.
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/animal
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation/Initialize(mapload, dust_icon)
|
||||
icon_state = dust_icon // Before ..() so the correct icon is flick()'d
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/mummy_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "mummy_revive"
|
||||
duration = 20
|
||||
|
||||
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/heal/Initialize(mapload, colour)
|
||||
if(colour)
|
||||
color = colour
|
||||
. = ..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
|
||||
/obj/effect/overlay/temp/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "kinetic_blast"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/explosion
|
||||
name = "explosion"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
duration = 8
|
||||
|
||||
/obj/effect/overlay/temp/explosion/fast
|
||||
icon_state = "explosionfast"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/blob
|
||||
name = "blob"
|
||||
icon_state = "blob_attack"
|
||||
alpha = 140
|
||||
randomdir = 0
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect
|
||||
icon_state = "impact_bullet"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/Initialize(mapload, atom/target, obj/item/projectile/P)
|
||||
if(target == P.original) //the projectile hit the target originally clicked
|
||||
pixel_x = P.p_x + target.pixel_x - 16 + rand(-4,4)
|
||||
pixel_y = P.p_y + target.pixel_y - 16 + rand(-4,4)
|
||||
else
|
||||
pixel_x = target.pixel_x + rand(-4,4)
|
||||
pixel_y = target.pixel_y + rand(-4,4)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/red_laser
|
||||
icon_state = "impact_laser"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/red_laser/wall
|
||||
icon_state = "impact_laser_wall"
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/blue_laser
|
||||
icon_state = "impact_laser_blue"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/green_laser
|
||||
icon_state = "impact_laser_green"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/purple_laser
|
||||
icon_state = "impact_laser_purple"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/ion
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/heart
|
||||
name = "heart"
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "heart"
|
||||
duration = 25
|
||||
|
||||
/obj/effect/overlay/temp/heart/Initialize(mapload)
|
||||
. = ..()
|
||||
pixel_x = rand(-4,4)
|
||||
pixel_y = rand(-4,4)
|
||||
|
||||
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
|
||||
|
||||
/obj/effect/overlay/palmtree_r
|
||||
name = "Palm tree"
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
//temporary visual effects(/obj/effect/overlay/temp) used by clockcult stuff
|
||||
/obj/effect/overlay/temp/ratvar
|
||||
name = "ratvar's light"
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door
|
||||
icon_state = "ratvardoorglow"
|
||||
layer = CLOSED_DOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door/window
|
||||
icon_state = "ratvarwindoorglow"
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam
|
||||
icon_state = "ratvarbeamglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/door
|
||||
layer = CLOSED_DOOR_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/grille
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/itemconsume
|
||||
layer = HIGH_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/falsewall
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/catwalk
|
||||
layer = LATTICE_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/wall
|
||||
icon_state = "ratvarwallglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/wall/false
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/floor
|
||||
icon_state = "ratvarfloorglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/floor/catwalk
|
||||
layer = LATTICE_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window
|
||||
icon_state = "ratvarwindowglow"
|
||||
layer = ABOVE_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window/single
|
||||
icon_state = "ratvarwindowglow_s"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/gear
|
||||
icon_state = "ratvargearglow"
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille
|
||||
icon_state = "ratvargrilleglow"
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille/broken
|
||||
icon_state = "ratvarbrokengrilleglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/mending_mantra
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 20
|
||||
alpha = 200
|
||||
icon_state = "mending_mantra"
|
||||
light_range = 1.5
|
||||
light_color = "#1E8CE1"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/mending_mantra/Initialize(mapload)
|
||||
. = ..()
|
||||
transform = matrix()*2
|
||||
var/matrix/M = transform
|
||||
M.Turn(90)
|
||||
animate(src, alpha = 20, time = duration, easing = BOUNCE_EASING, flags = ANIMATION_PARALLEL)
|
||||
animate(src, transform = M, time = duration, flags = ANIMATION_PARALLEL)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit
|
||||
name = "volt blast"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 5
|
||||
icon_state = "volt_hit"
|
||||
light_range = 1.5
|
||||
light_power = 2
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
var/mob/user
|
||||
var/damage = 20
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/Initialize(mapload, caster, multiplier)
|
||||
if(multiplier)
|
||||
damage *= multiplier
|
||||
duration = max(round(damage * 0.2), 1)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/true/Initialize(mapload, caster, multiplier)
|
||||
. = ..()
|
||||
user = caster
|
||||
if(user)
|
||||
var/matrix/M = new
|
||||
M.Turn(Get_Angle(src, user))
|
||||
transform = M
|
||||
INVOKE_ASYNC(src, .proc/volthit)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/volt_hit/proc/volthit()
|
||||
if(user)
|
||||
Beam(get_turf(user), "volt_ray", time=duration, maxdistance=8, beam_type=/obj/effect/ebeam/volt_ray)
|
||||
var/hit_amount = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
if(is_servant_of_ratvar(L))
|
||||
continue
|
||||
var/obj/item/I = L.null_rod_check()
|
||||
if(I)
|
||||
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
|
||||
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
|
||||
continue
|
||||
L.visible_message("<span class='warning'>[L] is struck by a [name]!</span>", "<span class='userdanger'>You're struck by a [name]!</span>")
|
||||
L.apply_damage(damage, BURN, "chest", L.run_armor_check("chest", "laser", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 0, "Your armor was penetrated by [src]!"))
|
||||
add_logs(user, L, "struck with a volt blast")
|
||||
hit_amount++
|
||||
for(var/obj/mecha/M in T)
|
||||
if(M.occupant)
|
||||
if(is_servant_of_ratvar(M.occupant))
|
||||
continue
|
||||
to_chat(M.occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
|
||||
M.visible_message("<span class='warning'>[M] is struck by a [name]!</span>")
|
||||
M.take_damage(damage, BURN, 0, 0)
|
||||
hit_amount++
|
||||
if(hit_amount)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', damage*hit_amount, 1, -1)
|
||||
else
|
||||
playsound(src, "sparks", 50, 1)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/ocular_warden
|
||||
name = "warden's gaze"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
icon_state = "warden_gaze"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/ocular_warden/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-10, 10)
|
||||
animate(src, alpha = 0, time = 3, easing = EASE_OUT)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/spearbreak
|
||||
icon = 'icons/effects/64x64.dmi'
|
||||
icon_state = "ratvarspearbreak"
|
||||
layer = BELOW_MOB_LAYER
|
||||
pixel_y = -16
|
||||
pixel_x = -16
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/geis_binding
|
||||
icon_state = "geisbinding"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/geis_binding/top
|
||||
icon_state = "geisbinding_top"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
icon_state = "belligerent_eye"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/Initialize()
|
||||
. = ..()
|
||||
transform = matrix()*0.75
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, -2)
|
||||
animate(src, pixel_y = pixel_y + 10, alpha = 50, time = 10, easing = EASE_OUT)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/cogwheel
|
||||
icon_state = "vanguard_cogwheel"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/capacitor
|
||||
icon_state = "geis_capacitor"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/alloy
|
||||
icon_state = "replicant_alloy"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/component/ansible
|
||||
icon_state = "hierophant_ansible"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil
|
||||
name = "glowing circle"
|
||||
icon_state = "sigildull"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression
|
||||
color = "#FAE48C"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 70
|
||||
light_range = 5
|
||||
light_power = 2
|
||||
light_color = "#FAE48C"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression/Initialize()
|
||||
. = ..()
|
||||
var/oldtransform = transform
|
||||
animate(src, transform = matrix()*2, time = 5)
|
||||
animate(transform = oldtransform, alpha = 0, time = 65)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/vitality
|
||||
color = "#1E8CE1"
|
||||
icon_state = "sigilactivepulse"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
light_range = 1.4
|
||||
light_power = 0.5
|
||||
light_color = "#1E8CE1"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/accession
|
||||
color = "#AF0AAF"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 70
|
||||
icon_state = "sigilactiveoverlay"
|
||||
alpha = 0
|
||||
@@ -0,0 +1,144 @@
|
||||
//temporary visual effects(/obj/effect/overlay/temp) used by cult stuff
|
||||
/obj/effect/overlay/temp/cult
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/cult/sparks
|
||||
randomdir = 1
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/overlay/temp/cult/blood // The traditional teleport
|
||||
name = "blood jaunt"
|
||||
duration = 12
|
||||
icon_state = "bloodin"
|
||||
|
||||
/obj/effect/overlay/temp/cult/blood/out
|
||||
icon_state = "bloodout"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/cult/phase // The veil shifter teleport
|
||||
name = "phase glow"
|
||||
duration = 7
|
||||
icon_state = "cultin"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/cult/phase/out
|
||||
icon_state = "cultout"
|
||||
|
||||
/obj/effect/overlay/temp/cult/sac
|
||||
name = "maw of Nar-Sie"
|
||||
icon_state = "sacconsume"
|
||||
|
||||
/obj/effect/overlay/temp/cult/door
|
||||
name = "unholy glow"
|
||||
icon_state = "doorglow"
|
||||
layer = CLOSED_FIREDOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/cult/door/unruned
|
||||
icon_state = "unruneddoorglow"
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf
|
||||
name = "unholy glow"
|
||||
icon_state = "wallglow"
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
|
||||
//visuals for runes being magically created
|
||||
/obj/effect/overlay/temp/cult/rune_spawn
|
||||
icon_state = "runeouter"
|
||||
alpha = 0
|
||||
var/turnedness = 179 //179 turns counterclockwise, 181 turns clockwise
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/Initialize(mapload, set_duration, set_color)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
if(set_color)
|
||||
add_atom_colour(set_color, FIXED_COLOUR_PRIORITY)
|
||||
. = ..()
|
||||
var/oldtransform = transform
|
||||
transform = matrix()*2
|
||||
var/matrix/M = transform
|
||||
M.Turn(turnedness)
|
||||
transform = M
|
||||
animate(src, alpha = 255, time = duration, easing = BOUNCE_EASING, flags = ANIMATION_PARALLEL)
|
||||
animate(src, transform = oldtransform, time = duration, flags = ANIMATION_PARALLEL)
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune1
|
||||
icon_state = "rune1words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune1/inner
|
||||
icon_state = "rune1inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune1/center
|
||||
icon_state = "rune1center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune2
|
||||
icon_state = "rune2words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune2/inner
|
||||
icon_state = "rune2inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune2/center
|
||||
icon_state = "rune2center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune3
|
||||
icon_state = "rune3words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune3/inner
|
||||
icon_state = "rune3inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune3/center
|
||||
icon_state = "rune3center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune4
|
||||
icon_state = "rune4words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune4/inner
|
||||
icon_state = "rune4inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune4/center
|
||||
icon_state = "rune4center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune5
|
||||
icon_state = "rune5words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune5/inner
|
||||
icon_state = "rune5inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune5/center
|
||||
icon_state = "rune5center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune6
|
||||
icon_state = "rune6words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune6/inner
|
||||
icon_state = "rune6inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune6/center
|
||||
icon_state = "rune6center"
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune7
|
||||
icon_state = "rune7words"
|
||||
turnedness = 181
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune7/inner
|
||||
icon_state = "rune7inner"
|
||||
turnedness = 179
|
||||
|
||||
/obj/effect/overlay/temp/cult/rune_spawn/rune7/center
|
||||
icon_state = "rune7center"
|
||||
@@ -0,0 +1,312 @@
|
||||
//unsorted miscellaneous temporary visuals
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = BELOW_MOB_LAYER
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/Initialize(mapload, set_dir)
|
||||
if(set_dir in GLOB.diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
. = ..()
|
||||
var/target_pixel_x = 0
|
||||
var/target_pixel_y = 0
|
||||
switch(set_dir)
|
||||
if(NORTH)
|
||||
target_pixel_y = 16
|
||||
if(SOUTH)
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(EAST)
|
||||
target_pixel_x = 16
|
||||
if(WEST)
|
||||
target_pixel_x = -16
|
||||
if(NORTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = 16
|
||||
if(NORTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = 16
|
||||
if(SOUTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(SOUTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter
|
||||
splatter_type = "xsplatter"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/speedbike_trail
|
||||
name = "speedbike trails"
|
||||
icon_state = "ion_fade"
|
||||
layer = BELOW_MOB_LAYER
|
||||
duration = 10
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "firing_effect"
|
||||
duration = 2
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/setDir(newdir)
|
||||
switch(newdir)
|
||||
if(NORTH)
|
||||
layer = BELOW_MOB_LAYER
|
||||
pixel_x = rand(-3,3)
|
||||
pixel_y = rand(4,6)
|
||||
if(SOUTH)
|
||||
pixel_x = rand(-3,3)
|
||||
pixel_y = rand(-1,1)
|
||||
else
|
||||
pixel_x = rand(-1,1)
|
||||
pixel_y = rand(-1,1)
|
||||
..()
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/energy
|
||||
icon_state = "firing_effect_energy"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/firing_effect/magic
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja
|
||||
name = "ninja shadow"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "uncloak"
|
||||
duration = 9
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/cloak
|
||||
icon_state = "cloak"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/shadow
|
||||
icon_state = "shadow"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/phase
|
||||
name = "ninja energy"
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/ninja/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/wraith
|
||||
name = "blood"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "phase_shift2"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/wraith/out
|
||||
icon_state = "phase_shift"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/tailsweep
|
||||
icon_state = "tailsweep"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/wizard
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "reappear"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/wizard/out
|
||||
icon_state = "liquify"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/overlay/temp/monkeyify
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "h2monkey"
|
||||
duration = 22
|
||||
|
||||
/obj/effect/overlay/temp/monkeyify/humanify
|
||||
icon_state = "monkey2h"
|
||||
|
||||
/obj/effect/overlay/temp/borgflash
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "blspell"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/guardian
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase
|
||||
duration = 5
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/decoy
|
||||
desc = "It's a decoy!"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/decoy/Initialize(mapload, atom/mimiced_atom)
|
||||
. = ..()
|
||||
alpha = initial(alpha)
|
||||
if(mimiced_atom)
|
||||
name = mimiced_atom.name
|
||||
appearance = mimiced_atom.appearance
|
||||
setDir(mimiced_atom.dir)
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/overlay/temp/decoy/fading/Initialize(mapload, atom/mimiced_atom)
|
||||
. = ..()
|
||||
animate(src, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/decoy/fading/fivesecond
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/small_smoke
|
||||
icon_state = "smoke"
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/fire
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "3"
|
||||
duration = 20
|
||||
|
||||
/obj/effect/overlay/temp/revenant
|
||||
name = "spooky lights"
|
||||
icon_state = "purplesparkles"
|
||||
|
||||
/obj/effect/overlay/temp/revenant/cracks
|
||||
name = "glowing cracks"
|
||||
icon_state = "purplecrack"
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/gravpush
|
||||
name = "gravity wave"
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/telekinesis
|
||||
name = "telekinetic force"
|
||||
icon_state = "empdisable"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/emp
|
||||
name = "emp sparks"
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/overlay/temp/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emppulse"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/Initialize(mapload, gib_icon)
|
||||
icon_state = gib_icon // Needs to be before ..() so icon is correct
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/animal
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation/Initialize(mapload, dust_icon)
|
||||
icon_state = dust_icon // Before ..() so the correct icon is flick()'d
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/mummy_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "mummy_revive"
|
||||
duration = 20
|
||||
|
||||
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/heal/Initialize(mapload, set_color)
|
||||
if(set_color)
|
||||
add_atom_colour(set_color, FIXED_COLOUR_PRIORITY)
|
||||
. = ..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
|
||||
/obj/effect/overlay/temp/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "kinetic_blast"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/explosion
|
||||
name = "explosion"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
duration = 8
|
||||
|
||||
/obj/effect/overlay/temp/explosion/fast
|
||||
icon_state = "explosionfast"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/blob
|
||||
name = "blob"
|
||||
icon_state = "blob_attack"
|
||||
alpha = 140
|
||||
randomdir = 0
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect
|
||||
icon_state = "impact_bullet"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/Initialize(mapload, atom/target, obj/item/projectile/P)
|
||||
if(target == P.original) //the projectile hit the target originally clicked
|
||||
pixel_x = P.p_x + target.pixel_x - 16 + rand(-4,4)
|
||||
pixel_y = P.p_y + target.pixel_y - 16 + rand(-4,4)
|
||||
else
|
||||
pixel_x = target.pixel_x + rand(-4,4)
|
||||
pixel_y = target.pixel_y + rand(-4,4)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/red_laser
|
||||
icon_state = "impact_laser"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/red_laser/wall
|
||||
icon_state = "impact_laser_wall"
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/blue_laser
|
||||
icon_state = "impact_laser_blue"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/green_laser
|
||||
icon_state = "impact_laser_green"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/purple_laser
|
||||
icon_state = "impact_laser_purple"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/impact_effect/ion
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/heart
|
||||
name = "heart"
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "heart"
|
||||
duration = 25
|
||||
|
||||
/obj/effect/overlay/temp/heart/Initialize(mapload)
|
||||
. = ..()
|
||||
pixel_x = rand(-4,4)
|
||||
pixel_y = rand(-4,4)
|
||||
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
|
||||
@@ -0,0 +1,37 @@
|
||||
//temporary visual effects
|
||||
/obj/effect/overlay/temp
|
||||
icon_state = "nothing"
|
||||
anchored = 1
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/duration = 10 //in deciseconds
|
||||
var/randomdir = TRUE
|
||||
var/timerid
|
||||
|
||||
/obj/effect/overlay/temp/Initialize()
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
setDir(pick(GLOB.cardinal))
|
||||
|
||||
timerid = QDEL_IN(src, duration)
|
||||
|
||||
/obj/effect/overlay/temp/Destroy()
|
||||
. = ..()
|
||||
deltimer(timerid)
|
||||
|
||||
/obj/effect/overlay/temp/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/temp/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/temp/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/Initialize(mapload, set_dir)
|
||||
if(set_dir)
|
||||
setDir(set_dir)
|
||||
. = ..()
|
||||
@@ -522,10 +522,10 @@
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/current_damage_dampening = 0
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
var/active = FALSE
|
||||
|
||||
/obj/item/borg/projectile_dampen/debug
|
||||
maxenergy = 50000
|
||||
@@ -538,13 +538,13 @@
|
||||
tracked = list()
|
||||
icon_state = "shield0"
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/attack_self(mob/user)
|
||||
var/active = FALSE
|
||||
if(!istype(dampening_field))
|
||||
activate_field()
|
||||
active = TRUE
|
||||
@@ -552,17 +552,30 @@
|
||||
deactivate_field()
|
||||
active = FALSE
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] the [src].</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/update_icon()
|
||||
. = ..()
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/activate_field()
|
||||
if(!istype(dampening_field))
|
||||
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
visible_message("<span class='warning'>The [src] shuts off!</span>")
|
||||
for(var/obj/item/projectile/P in tracked)
|
||||
restore_projectile(P)
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/projectile_dampen/dropped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/equipped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/process()
|
||||
process_recharge()
|
||||
@@ -576,10 +589,11 @@
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
if(!tracked[I]) //No damage
|
||||
var/obj/item/projectile/P = I
|
||||
if(!P.stun && P.nodamage) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
usage += (current_damage_dampening * projectile_damage_tick_ecost_coefficient)
|
||||
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
|
||||
energy = Clamp(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
@@ -587,8 +601,11 @@
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge()
|
||||
if(!istype(host))
|
||||
energy = Clamp(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if(iscyborg(host.loc))
|
||||
host = host.loc
|
||||
else
|
||||
energy = Clamp(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if((host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
@@ -598,7 +615,6 @@
|
||||
return
|
||||
if(track_projectile)
|
||||
tracked[P] = P.damage
|
||||
current_damage_dampening += P.damage
|
||||
P.damage *= projectile_damage_coefficient
|
||||
P.speed *= projectile_speed_coefficient
|
||||
P.add_overlay(projectile_effect)
|
||||
@@ -608,8 +624,6 @@
|
||||
P.damage *= (1/projectile_damage_coefficient)
|
||||
P.speed *= (1/projectile_speed_coefficient)
|
||||
P.cut_overlay(projectile_effect)
|
||||
current_damage_dampening -= P.damage
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
HUD/SIGHT things
|
||||
|
||||
@@ -207,9 +207,3 @@
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
|
||||
/mob/has_gravity(turf/T)
|
||||
var/obj/item/weapon/tank/jetpack/J = get_jetpack()
|
||||
if(J && J.on)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -272,15 +272,18 @@
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
|
||||
if(prob(30))
|
||||
if(istype(loc, /area/mine/explored) || istype(loc, /area/lavaland/surface/outdoors/explored))
|
||||
if(istype(loc, /area/mine/explored) || !istype(loc, /area/lavaland/surface/outdoors/unexplored))
|
||||
return
|
||||
var/randumb = pickweight(mob_spawn_list)
|
||||
while(randumb == SPAWN_MEGAFAUNA)
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it
|
||||
megafauna_spawn_list[maybe_boss] = 0
|
||||
if(istype(loc, /area/lavaland/surface/outdoors/unexplored/danger)) //this is danger. it's boss time.
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it
|
||||
megafauna_spawn_list[maybe_boss] = 0
|
||||
else //this is not danger, don't spawn a boss, spawn something else
|
||||
randumb = pickweight(mob_spawn_list)
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/H in urange(12,T)) //prevents mob clumps
|
||||
if((ispath(randumb, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(src, H) <= 7)
|
||||
|
||||
@@ -81,7 +81,6 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/drop_dynex_bomb,
|
||||
/client/proc/cinematic,
|
||||
/client/proc/one_click_antag,
|
||||
/client/proc/send_space_ninja,
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/object_say,
|
||||
/client/proc/toggle_random_events,
|
||||
@@ -200,7 +199,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
/client/proc/get_dynex_power,
|
||||
/client/proc/set_dynex_scale,
|
||||
/client/proc/cinematic,
|
||||
/client/proc/send_space_ninja,
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/cmd_change_command_name,
|
||||
|
||||
@@ -387,9 +387,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name=="carpspawn")
|
||||
ninja_spawn += L
|
||||
new_character.equip_space_ninja()
|
||||
new_character.internal = new_character.s_store
|
||||
new_character.update_internals_hud_icon(1)
|
||||
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
|
||||
ninjadatum.equip_space_ninja()
|
||||
if(ninja_spawn.len)
|
||||
var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
|
||||
new_character.loc = ninja_spawn_here.loc
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
/datum/gas_reaction/freon/react(datum/gas_mixture/air, turf/open/location)
|
||||
. = NO_REACTION
|
||||
if(location && location.freon_gas_act())
|
||||
air.gases["freon"][MOLES] -= MOLES_PLASMA_VISIBLE
|
||||
. = REACTING
|
||||
|
||||
//water vapor: puts out fires?
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/clothing/under/syndicate/sniper
|
||||
name = "Tactical turtleneck suit"
|
||||
desc = "A double seamed tactical turtleneck disguised as a civillian grade silk suit. Intended for the most formal operator. The collar is really sharp"
|
||||
desc = "A double seamed tactical turtleneck disguised as a civilian grade silk suit. Intended for the most formal operator. The collar is really sharp"
|
||||
icon_state = "really_black_suit"
|
||||
item_state = "bl_suit"
|
||||
item_color = "black_suit"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
var/process_edge_turfs = FALSE //Don't do this either unless it's absolutely necessary, you can just track what things are inside manually or on the initial setup.
|
||||
var/setup_edge_turfs = FALSE //Setup edge turfs/all field turfs. Set either or both to ON when you need it, it's defaulting to off unless you do to save CPU.
|
||||
var/setup_field_turfs = FALSE
|
||||
var/use_host_turf = FALSE //For fields from items carried on mobs to check turf instead of loc...
|
||||
|
||||
var/list/turf/field_turfs = list()
|
||||
var/list/turf/edge_turfs = list()
|
||||
@@ -90,8 +91,19 @@
|
||||
for(var/turf/T in field_turfs)
|
||||
cleanup_field_turf(T)
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/check_movement()
|
||||
if(!use_host_turf)
|
||||
if(host.loc != last_host_loc)
|
||||
last_host_loc = host.loc
|
||||
return TRUE
|
||||
else
|
||||
if(get_turf(host) != last_host_loc)
|
||||
last_host_loc = get_turf(host)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/recalculate_field(ignore_movement_check = FALSE) //Call every time the field moves (done automatically if you use update_center) or a setup specification is changed.
|
||||
if(!(ignore_movement_check || ((host.loc != last_host_loc) && (field_shape != FIELD_NO_SHAPE))))
|
||||
if(!(ignore_movement_check || check_movement()) && (field_shape != FIELD_NO_SHAPE))
|
||||
return
|
||||
update_new_turfs()
|
||||
var/list/turf/needs_setup = field_turfs_new.Copy()
|
||||
@@ -173,7 +185,6 @@
|
||||
/datum/proximity_monitor/advanced/proc/update_new_turfs()
|
||||
if(!istype(host))
|
||||
return FALSE
|
||||
last_host_loc = host.loc
|
||||
var/turf/center = get_turf(host)
|
||||
field_turfs_new = list()
|
||||
edge_turfs_new = list()
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
var/static/image/southwest_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_southwest")
|
||||
var/static/image/northeast_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_northeast")
|
||||
var/static/image/southeast_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_southeast")
|
||||
var/static/image/generic_edge = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_generic")
|
||||
var/obj/item/borg/projectile_dampen/projector = null
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/list/obj/item/projectile/staging
|
||||
use_host_turf = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/New()
|
||||
tracked = list()
|
||||
@@ -71,6 +73,8 @@
|
||||
return southeast_corner
|
||||
if(SOUTHWEST)
|
||||
return southwest_corner
|
||||
else
|
||||
return generic_edge
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/capture_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
if(P in tracked)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
alpha = 0
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
flags = ABSTRACT|ON_BORDER
|
||||
mouse_opacity = 0
|
||||
var/datum/proximity_monitor/advanced/parent = null
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/Initialize(mapload, _monitor)
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#define BAD_ZLEVEL 1
|
||||
#define BAD_AREA 2
|
||||
#define ZONE_SET 3
|
||||
#define BAD_COORDS 3
|
||||
#define ZONE_SET 4
|
||||
|
||||
/area/shuttle/auxillary_base
|
||||
name = "Auxillary Base"
|
||||
@@ -149,6 +150,9 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
if(T.z != ZLEVEL_MINING)
|
||||
return BAD_ZLEVEL
|
||||
var/colony_radius = max(base_dock.width, base_dock.height)*0.5
|
||||
if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx)
|
||||
return BAD_COORDS //Avoid dropping the base too close to map boundaries, as it results in parts of it being left in space
|
||||
|
||||
var/list/area_counter = get_areas_in_range(colony_radius, T)
|
||||
if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one
|
||||
return BAD_AREA
|
||||
@@ -195,6 +199,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
if(!do_after(user, 50, target = user)) //You get a few seconds to cancel if you do not want to drop there.
|
||||
setting = FALSE
|
||||
return
|
||||
setting = FALSE
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
var/obj/machinery/computer/auxillary_base/AB
|
||||
@@ -212,6 +217,8 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
to_chat(user, "<span class='warning'>This uplink can only be used in a designed mining zone.</span>")
|
||||
if(BAD_AREA)
|
||||
to_chat(user, "<span class='warning'>Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.</span>")
|
||||
if(BAD_COORDS)
|
||||
to_chat(user, "<span class='warning'>Location is too close to the edge of the station's scanning range. Move several paces away and try again.</span>")
|
||||
if(ZONE_SET)
|
||||
qdel(src)
|
||||
|
||||
@@ -347,4 +354,5 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove()
|
||||
|
||||
#undef BAD_ZLEVEL
|
||||
#undef BAD_AREA
|
||||
#undef BAD_COORDS
|
||||
#undef ZONE_SET
|
||||
@@ -300,31 +300,47 @@
|
||||
//Door
|
||||
/obj/machinery/door/airlock/survival_pod
|
||||
name = "airlock"
|
||||
icon = 'icons/obj/doors/airlocks/survival/horizontal/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/horizontal/survival_overlays.dmi'
|
||||
icon = 'icons/obj/doors/airlocks/survival/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_pod
|
||||
opacity = 0
|
||||
glass = 1
|
||||
var/expected_dir = SOUTH //we visually turn when shuttle rotated, but need to not turn for any other reason
|
||||
|
||||
/obj/machinery/door/airlock/survival_pod/setDir(direction)
|
||||
direction = expected_dir
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/survival_pod/shuttleRotate(rotation)
|
||||
expected_dir = angle2dir(rotation+dir2angle(dir))
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/survival_pod/vertical
|
||||
icon = 'icons/obj/doors/airlocks/survival/vertical/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/vertical/survival_overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_pod/vertical
|
||||
dir = EAST
|
||||
expected_dir = EAST
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod
|
||||
name = "pod airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/survival/horizontal/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/horizontal/survival_overlays.dmi'
|
||||
icon = 'icons/obj/doors/airlocks/survival/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/survival_pod
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
var/expected_dir = SOUTH
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod/setDir(direction)
|
||||
direction = expected_dir
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod/shuttleRotate(rotation)
|
||||
expected_dir = angle2dir(rotation+dir2angle(dir))
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod/vertical
|
||||
icon = 'icons/obj/doors/airlocks/survival/vertical/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/vertical/survival_overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/survival_pod/vertical
|
||||
dir = EAST
|
||||
expected_dir = EAST
|
||||
|
||||
//Table
|
||||
/obj/structure/table/survival_pod
|
||||
|
||||
@@ -797,9 +797,6 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/update_stamina()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/update_stamina()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !stat)
|
||||
@@ -808,6 +805,9 @@
|
||||
setStaminaLoss(health - 2)
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/alien/update_stamina()
|
||||
return
|
||||
|
||||
/mob/living/proc/owns_soul()
|
||||
if(mind)
|
||||
return mind.soulOwner == mind
|
||||
|
||||
@@ -1,361 +1,370 @@
|
||||
|
||||
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = null, soften_text = null, armour_penetration, penetrated_text)
|
||||
var/armor = getarmor(def_zone, attack_flag)
|
||||
|
||||
//the if "armor" check is because this is used for everything on /living, including humans
|
||||
if(armor && armour_penetration)
|
||||
armor = max(0, armor - armour_penetration)
|
||||
if(penetrated_text)
|
||||
to_chat(src, "<span class='userdanger'>[penetrated_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor was penetrated!</span>")
|
||||
else if(armor >= 100)
|
||||
if(absorb_text)
|
||||
to_chat(src, "<span class='userdanger'>[absorb_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor absorbs the blow!</span>")
|
||||
else if(armor > 0)
|
||||
if(soften_text)
|
||||
to_chat(src, "<span class='userdanger'>[soften_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor softens the blow!</span>")
|
||||
return armor
|
||||
|
||||
|
||||
/mob/living/proc/getarmor(def_zone, type)
|
||||
return 0
|
||||
|
||||
//this returns the mob's protection against eye damage (number between -1 and 2)
|
||||
/mob/living/proc/get_eye_protection()
|
||||
return 0
|
||||
|
||||
//this returns the mob's protection against ear damage (0:no protection; 1: some ear protection; 2: has no ears)
|
||||
/mob/living/proc/get_ear_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/on_hit(obj/item/projectile/P)
|
||||
return
|
||||
|
||||
/mob/living/bullet_act(obj/item/projectile/P, def_zone)
|
||||
var/armor = run_armor_check(def_zone, P.flag, "","",P.armour_penetration)
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, armor)
|
||||
if(P.dismemberment)
|
||||
check_projectile_dismemberment(P, def_zone)
|
||||
return P.on_hit(src, armor)
|
||||
|
||||
/mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
return 0
|
||||
|
||||
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
|
||||
if(throwforce && w_class)
|
||||
return Clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
else if(w_class)
|
||||
return Clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
|
||||
var/dtype = BRUTE
|
||||
var/volume = I.get_volume_by_throwforce_and_or_w_class()
|
||||
if(istype(I,/obj/item/weapon)) //If the item is a weapon...
|
||||
var/obj/item/weapon/W = I
|
||||
dtype = W.damtype
|
||||
|
||||
if (W.throwforce > 0) //If the weapon's throwforce is greater than zero...
|
||||
if (W.throwhitsound) //...and throwhitsound is defined...
|
||||
playsound(loc, W.throwhitsound, volume, 1, -1) //...play the weapon's throwhitsound.
|
||||
else if(W.hitsound) //Otherwise, if the weapon's hitsound is defined...
|
||||
playsound(loc, W.hitsound, volume, 1, -1) //...play the weapon's hitsound.
|
||||
else if(!W.throwhitsound) //Otherwise, if throwhitsound isn't defined...
|
||||
playsound(loc, 'sound/weapons/genhit.ogg',volume, 1, -1) //...play genhit.ogg.
|
||||
|
||||
else if(!I.throwhitsound && I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero...
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', volume, 1, -1)//...play genhit.ogg
|
||||
if(!I.throwforce)// Otherwise, if the item's throwforce is 0...
|
||||
playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg.
|
||||
if(!blocked)
|
||||
visible_message("<span class='danger'>[src] has been hit by [I].</span>", \
|
||||
"<span class='userdanger'>[src] has been hit by [I].</span>")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
|
||||
apply_damage(I.throwforce, dtype, zone, armor)
|
||||
if(I.thrownby)
|
||||
add_logs(I.thrownby, src, "hit", I)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
Paralyse(1)
|
||||
take_overall_damage(rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(BURN)
|
||||
take_overall_damage(0, rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(TOX)
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
else
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", M)
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>", null, null, 5)
|
||||
|
||||
/mob/living/fire_act()
|
||||
adjust_fire_stacks(3)
|
||||
IgniteMob()
|
||||
|
||||
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src || anchored || !isturf(user.loc))
|
||||
return 0
|
||||
if(!user.pulling || user.pulling != src)
|
||||
user.start_pulling(src, supress_message)
|
||||
return
|
||||
|
||||
if(!(status_flags & CANPUSH))
|
||||
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
|
||||
return 0
|
||||
grippedby(user)
|
||||
|
||||
//proc to upgrade a simple pull into a more aggressive grab.
|
||||
/mob/living/proc/grippedby(mob/living/carbon/user)
|
||||
if(user.grab_state < GRAB_KILL)
|
||||
user.changeNext_move(CLICK_CD_GRABBING)
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(user.grab_state) //only the first upgrade is instantaneous
|
||||
var/old_grab_state = user.grab_state
|
||||
var/grab_upgrade_time = 30
|
||||
visible_message("<span class='danger'>[user] starts to tighten [user.p_their()] grip on [src]!</span>", \
|
||||
"<span class='userdanger'>[user] starts to tighten [user.p_their()] grip on you!</span>")
|
||||
if(!do_mob(user, src, grab_upgrade_time))
|
||||
return 0
|
||||
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
|
||||
return 0
|
||||
user.grab_state++
|
||||
switch(user.grab_state)
|
||||
if(GRAB_AGGRESSIVE)
|
||||
add_logs(user, src, "grabbed", addition="aggressively")
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
|
||||
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
|
||||
drop_all_held_items()
|
||||
stop_pulling()
|
||||
if(GRAB_NECK)
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
|
||||
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
|
||||
update_canmove() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
if(GRAB_KILL)
|
||||
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
|
||||
"<span class='userdanger'>[user] is strangling you!</span>")
|
||||
update_canmove() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/attack_slime(mob/living/simple_animal/slime/M)
|
||||
|
||||
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = null, soften_text = null, armour_penetration, penetrated_text)
|
||||
var/armor = getarmor(def_zone, attack_flag)
|
||||
|
||||
//the if "armor" check is because this is used for everything on /living, including humans
|
||||
if(armor && armour_penetration)
|
||||
armor = max(0, armor - armour_penetration)
|
||||
if(penetrated_text)
|
||||
to_chat(src, "<span class='userdanger'>[penetrated_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor was penetrated!</span>")
|
||||
else if(armor >= 100)
|
||||
if(absorb_text)
|
||||
to_chat(src, "<span class='userdanger'>[absorb_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor absorbs the blow!</span>")
|
||||
else if(armor > 0)
|
||||
if(soften_text)
|
||||
to_chat(src, "<span class='userdanger'>[soften_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='userdanger'>Your armor softens the blow!</span>")
|
||||
return armor
|
||||
|
||||
|
||||
/mob/living/proc/getarmor(def_zone, type)
|
||||
return 0
|
||||
|
||||
//this returns the mob's protection against eye damage (number between -1 and 2)
|
||||
/mob/living/proc/get_eye_protection()
|
||||
return 0
|
||||
|
||||
//this returns the mob's protection against ear damage (0:no protection; 1: some ear protection; 2: has no ears)
|
||||
/mob/living/proc/get_ear_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/on_hit(obj/item/projectile/P)
|
||||
return
|
||||
|
||||
/mob/living/bullet_act(obj/item/projectile/P, def_zone)
|
||||
var/armor = run_armor_check(def_zone, P.flag, "","",P.armour_penetration)
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, armor)
|
||||
if(P.dismemberment)
|
||||
check_projectile_dismemberment(P, def_zone)
|
||||
return P.on_hit(src, armor)
|
||||
|
||||
/mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
return 0
|
||||
|
||||
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
|
||||
if(throwforce && w_class)
|
||||
return Clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
else if(w_class)
|
||||
return Clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
|
||||
var/dtype = BRUTE
|
||||
var/volume = I.get_volume_by_throwforce_and_or_w_class()
|
||||
if(istype(I,/obj/item/weapon)) //If the item is a weapon...
|
||||
var/obj/item/weapon/W = I
|
||||
dtype = W.damtype
|
||||
|
||||
if (W.throwforce > 0) //If the weapon's throwforce is greater than zero...
|
||||
if (W.throwhitsound) //...and throwhitsound is defined...
|
||||
playsound(loc, W.throwhitsound, volume, 1, -1) //...play the weapon's throwhitsound.
|
||||
else if(W.hitsound) //Otherwise, if the weapon's hitsound is defined...
|
||||
playsound(loc, W.hitsound, volume, 1, -1) //...play the weapon's hitsound.
|
||||
else if(!W.throwhitsound) //Otherwise, if throwhitsound isn't defined...
|
||||
playsound(loc, 'sound/weapons/genhit.ogg',volume, 1, -1) //...play genhit.ogg.
|
||||
|
||||
else if(!I.throwhitsound && I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero...
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', volume, 1, -1)//...play genhit.ogg
|
||||
if(!I.throwforce)// Otherwise, if the item's throwforce is 0...
|
||||
playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg.
|
||||
if(!blocked)
|
||||
visible_message("<span class='danger'>[src] has been hit by [I].</span>", \
|
||||
"<span class='userdanger'>[src] has been hit by [I].</span>")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
|
||||
apply_damage(I.throwforce, dtype, zone, armor)
|
||||
if(I.thrownby)
|
||||
add_logs(I.thrownby, src, "hit", I)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
Paralyse(1)
|
||||
take_overall_damage(rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(BURN)
|
||||
take_overall_damage(0, rand(M.force/2, M.force))
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(TOX)
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
else
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", M)
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>", null, null, 5)
|
||||
|
||||
/mob/living/fire_act()
|
||||
adjust_fire_stacks(3)
|
||||
IgniteMob()
|
||||
|
||||
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src || anchored || !isturf(user.loc))
|
||||
return 0
|
||||
if(!user.pulling || user.pulling != src)
|
||||
user.start_pulling(src, supress_message)
|
||||
return
|
||||
|
||||
if(!(status_flags & CANPUSH))
|
||||
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
|
||||
return 0
|
||||
grippedby(user)
|
||||
|
||||
//proc to upgrade a simple pull into a more aggressive grab.
|
||||
/mob/living/proc/grippedby(mob/living/carbon/user)
|
||||
if(user.grab_state < GRAB_KILL)
|
||||
user.changeNext_move(CLICK_CD_GRABBING)
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(user.grab_state) //only the first upgrade is instantaneous
|
||||
var/old_grab_state = user.grab_state
|
||||
var/grab_upgrade_time = 30
|
||||
visible_message("<span class='danger'>[user] starts to tighten [user.p_their()] grip on [src]!</span>", \
|
||||
"<span class='userdanger'>[user] starts to tighten [user.p_their()] grip on you!</span>")
|
||||
if(!do_mob(user, src, grab_upgrade_time))
|
||||
return 0
|
||||
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
|
||||
return 0
|
||||
user.grab_state++
|
||||
switch(user.grab_state)
|
||||
if(GRAB_AGGRESSIVE)
|
||||
add_logs(user, src, "grabbed", addition="aggressively")
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
|
||||
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
|
||||
drop_all_held_items()
|
||||
stop_pulling()
|
||||
if(GRAB_NECK)
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
|
||||
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
|
||||
update_canmove() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
if(GRAB_KILL)
|
||||
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
|
||||
"<span class='userdanger'>[user] is strangling you!</span>")
|
||||
update_canmove() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(!SSticker.HasRoundStarted())
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.buckled)
|
||||
if(M in buckled_mobs)
|
||||
M.Feedstop()
|
||||
return // can't attack while eating!
|
||||
|
||||
if (stat != DEAD)
|
||||
add_logs(M, src, "attacked")
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
M.face_atom(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M, src, "attacked")
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return 0
|
||||
|
||||
if (M.a_intent == INTENT_HARM)
|
||||
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return 0
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
add_logs(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
switch(L.a_intent)
|
||||
if("help")
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
return 0
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
add_logs(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
return 0
|
||||
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
return 0
|
||||
if("harm")
|
||||
M.do_attack_animation(src)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
|
||||
/mob/living/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
|
||||
//Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs.
|
||||
|
||||
/mob/living/acid_act(acidpwr, acid_volume)
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
to_chat(M, "You cannot attack people before the game has started.")
|
||||
return
|
||||
|
||||
if(M.buckled)
|
||||
if(M in buckled_mobs)
|
||||
M.Feedstop()
|
||||
return // can't attack while eating!
|
||||
|
||||
if (stat != DEAD)
|
||||
add_logs(M, src, "attacked")
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
M.face_atom(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M, src, "attacked")
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return 0
|
||||
|
||||
if (M.a_intent == INTENT_HARM)
|
||||
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return 0
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
add_logs(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
switch(L.a_intent)
|
||||
if("help")
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
return 0
|
||||
|
||||
else
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
add_logs(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
return 0
|
||||
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
return 0
|
||||
if("harm")
|
||||
M.do_attack_animation(src)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
|
||||
/mob/living/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
|
||||
//Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs.
|
||||
|
||||
/mob/living/acid_act(acidpwr, acid_volume)
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock && HAS_SECONDARY_FLAG(src, TESLA_IGNORE))
|
||||
return FALSE
|
||||
if(shock_damage > 0)
|
||||
if(!illusion)
|
||||
adjustFireLoss(shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
return shock_damage
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
var/list/L = src.get_contents()
|
||||
for(var/obj/O in L)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/singularity_act()
|
||||
var/gain = 20
|
||||
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
|
||||
gib()
|
||||
return(gain)
|
||||
|
||||
/mob/living/narsie_act()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(is_servant_of_ratvar(src) && !stat)
|
||||
to_chat(src, "<span class='userdanger'>You resist Nar-Sie's influence... but not all of it. <i>Run!</i></span>")
|
||||
adjustBruteLoss(35)
|
||||
if(src && reagents)
|
||||
reagents.add_reagent("heparin", 5)
|
||||
return FALSE
|
||||
if(client)
|
||||
return FALSE
|
||||
if(shock_damage > 0)
|
||||
if(!illusion)
|
||||
adjustFireLoss(shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
return shock_damage
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
var/list/L = src.get_contents()
|
||||
for(var/obj/O in L)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/singularity_act()
|
||||
var/gain = 20
|
||||
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
|
||||
gib()
|
||||
return(gain)
|
||||
|
||||
/mob/living/narsie_act()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(is_servant_of_ratvar(src) && !stat)
|
||||
to_chat(src, "<span class='userdanger'>You resist Nar-Sie's influence... but not all of it. <i>Run!</i></span>")
|
||||
adjustBruteLoss(35)
|
||||
if(src && reagents)
|
||||
reagents.add_reagent("heparin", 5)
|
||||
return FALSE
|
||||
if(GLOB.cult_narsie && GLOB.cult_narsie.souls_needed[src])
|
||||
GLOB.cult_narsie.resize(1.1)
|
||||
GLOB.cult_narsie.souls_needed -= src
|
||||
GLOB.cult_narsie.souls += 1
|
||||
if((GLOB.cult_narsie.souls == GLOB.cult_narsie.soul_goal) && (GLOB.cult_narsie.resolved == FALSE))
|
||||
GLOB.cult_narsie.resolved = TRUE
|
||||
world << sound('sound/machines/Alarm.ogg')
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper, 1), 120)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/ending_helper), 270)
|
||||
if(client)
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, src, cultoverride = TRUE)
|
||||
else
|
||||
else
|
||||
switch(rand(1, 6))
|
||||
if(1)
|
||||
new /mob/living/simple_animal/hostile/construct/armored/hostile(get_turf(src))
|
||||
if(2)
|
||||
new /mob/living/simple_animal/hostile/construct/wraith/hostile(get_turf(src))
|
||||
if(3 to 6)
|
||||
new /mob/living/simple_animal/hostile/construct/builder/hostile(get_turf(src))
|
||||
spawn_dust()
|
||||
gib()
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/ratvar_act()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(stat != DEAD && !is_servant_of_ratvar(src))
|
||||
for(var/obj/item/weapon/implant/mindshield/M in implants)
|
||||
qdel(M)
|
||||
if(!add_servant_of_ratvar(src))
|
||||
to_chat(src, "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>")
|
||||
adjustFireLoss(35)
|
||||
if(src)
|
||||
adjust_fire_stacks(1)
|
||||
IgniteMob()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(get_eye_protection() < intensity && (override_blindness_check || !(disabilities & BLIND)))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
|
||||
return 1
|
||||
|
||||
//called when the mob receives a loud bang
|
||||
/mob/living/proc/soundbang_act()
|
||||
return 0
|
||||
|
||||
//to damage the clothes worn by a mob
|
||||
/mob/living/proc/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(A != src)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
used_item = get_active_held_item()
|
||||
..()
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
if(1)
|
||||
new /mob/living/simple_animal/hostile/construct/armored/hostile(get_turf(src))
|
||||
if(2)
|
||||
new /mob/living/simple_animal/hostile/construct/wraith/hostile(get_turf(src))
|
||||
if(3 to 6)
|
||||
new /mob/living/simple_animal/hostile/construct/builder/hostile(get_turf(src))
|
||||
spawn_dust()
|
||||
gib()
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/ratvar_act()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(stat != DEAD && !is_servant_of_ratvar(src))
|
||||
for(var/obj/item/weapon/implant/mindshield/M in implants)
|
||||
qdel(M)
|
||||
if(!add_servant_of_ratvar(src))
|
||||
to_chat(src, "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>")
|
||||
adjustFireLoss(35)
|
||||
if(src)
|
||||
adjust_fire_stacks(1)
|
||||
IgniteMob()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(get_eye_protection() < intensity && (override_blindness_check || !(disabilities & BLIND)))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
|
||||
return 1
|
||||
|
||||
//called when the mob receives a loud bang
|
||||
/mob/living/proc/soundbang_act()
|
||||
return 0
|
||||
|
||||
//to damage the clothes worn by a mob
|
||||
/mob/living/proc/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(A != src)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
used_item = get_active_held_item()
|
||||
..()
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
|
||||
@@ -171,7 +171,30 @@
|
||||
attacktext = "slashes"
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
|
||||
playstyle_string = "<b>You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</b>"
|
||||
playstyle_string = "<b>You are a Wraith. Though relatively fragile, you are fast, deadly, can phase through walls, and your attacks will lower the cooldown on phasing.</b>"
|
||||
var/attack_refund = 10 //1 second per attack
|
||||
var/crit_refund = 50 //5 seconds when putting a target into critical
|
||||
var/kill_refund = 250 //full refund on kills
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/wraith/AttackingTarget() //refund jaunt cooldown when attacking living targets
|
||||
var/prev_stat
|
||||
if(isliving(target) && !iscultist(target))
|
||||
var/mob/living/L = target
|
||||
prev_stat = L.stat
|
||||
|
||||
. = ..()
|
||||
|
||||
if(. && isnum(prev_stat))
|
||||
var/mob/living/L = target
|
||||
var/refund = 0
|
||||
if(QDELETED(L) || (L.stat == DEAD && prev_stat != DEAD)) //they're dead, you killed them
|
||||
refund += kill_refund
|
||||
else if(L.InCritical() && prev_stat == CONSCIOUS) //you knocked them into critical
|
||||
refund += crit_refund
|
||||
if(L.stat != DEAD && prev_stat != DEAD)
|
||||
refund += attack_refund
|
||||
for(var/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/S in mob_spell_list)
|
||||
S.charge_counter = min(S.charge_counter + refund, S.charge_max)
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/wraith/hostile //actually hostile, will move around, hit things
|
||||
AIStatus = AI_ON
|
||||
@@ -265,8 +288,8 @@
|
||||
name = "Harvester"
|
||||
real_name = "Harvester"
|
||||
desc = "A long, thin construct built to herald Nar-Sie's rise. It'll be all over soon."
|
||||
icon_state = "harvester"
|
||||
icon_living = "harvester"
|
||||
icon_state = "chosen"
|
||||
icon_living = "chosen"
|
||||
maxHealth = 60
|
||||
health = 60
|
||||
sight = SEE_MOBS
|
||||
@@ -277,9 +300,10 @@
|
||||
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/area_conversion,
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
|
||||
playstyle_string = "<B>You are a Harvester. You are incapable of directly killing humans, but your attacks will remove their limbs: \
|
||||
Bring those who still cling to this world of illusion back to the Geometer so they may know Truth.</B>"
|
||||
Bring those who still cling to this world of illusion back to the Geometer so they may know Truth. Your form and any you are pulling can pass through runed walls effortlessly.</B>"
|
||||
can_repair_constructs = TRUE
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/harvester/Bump(atom/AM)
|
||||
. = ..()
|
||||
if(istype(AM, /turf/closed/wall/mineral/cult) && AM != loc) //we can go through cult walls
|
||||
@@ -306,6 +330,8 @@
|
||||
if(!LAZYLEN(parts))
|
||||
if(undismembermerable_limbs) //they have limbs we can't remove, and no parts we can, attack!
|
||||
return ..()
|
||||
C.Weaken(30)
|
||||
visible_message("<span class='danger'>[src] paralyzes [C]!</span>")
|
||||
to_chat(src, "<span class='cultlarge'>\"Bring [C.p_them()] to me.\"</span>")
|
||||
return FALSE
|
||||
do_attack_animation(C)
|
||||
@@ -314,6 +340,11 @@
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/harvester/Initialize()
|
||||
. = ..()
|
||||
var/datum/action/innate/seek_prey/seek = new()
|
||||
seek.Grant(src)
|
||||
seek.Activate()
|
||||
|
||||
///////////////////////Master-Tracker///////////////////////
|
||||
|
||||
@@ -326,11 +357,14 @@
|
||||
var/tracking = FALSE
|
||||
var/mob/living/simple_animal/hostile/construct/the_construct
|
||||
|
||||
|
||||
/datum/action/innate/seek_master/Grant(var/mob/living/C)
|
||||
the_construct = C
|
||||
..()
|
||||
|
||||
/datum/action/innate/seek_master/Activate()
|
||||
if(!SSticker.mode.eldergod)
|
||||
the_construct.master = GLOB.blood_target
|
||||
if(!the_construct.master)
|
||||
to_chat(the_construct, "<span class='cultitalic'>You have no master to seek!</span>")
|
||||
the_construct.seeking = FALSE
|
||||
@@ -346,6 +380,43 @@
|
||||
to_chat(the_construct, "<span class='cultitalic'>You are now tracking your master.</span>")
|
||||
|
||||
|
||||
/datum/action/innate/seek_prey
|
||||
name = "Seek the Harvest"
|
||||
desc = "None can hide from Nar'Sie, activate to track a survivor attempting to flee the red harvest!"
|
||||
background_icon_state = "bg_demon"
|
||||
buttontooltipstyle = "cult"
|
||||
button_icon_state = "cult_mark"
|
||||
var/tracking = FALSE
|
||||
var/mob/living/simple_animal/hostile/construct/harvester/the_construct
|
||||
|
||||
/datum/action/innate/seek_prey/Grant(var/mob/living/C)
|
||||
the_construct = C
|
||||
..()
|
||||
|
||||
/datum/action/innate/seek_prey/Activate()
|
||||
if(GLOB.cult_narsie == null)
|
||||
return
|
||||
if(tracking)
|
||||
desc = "None can hide from Nar'Sie, activate to track a survivor attempting to flee the red harvest!"
|
||||
button_icon_state = "cult_mark"
|
||||
tracking = FALSE
|
||||
the_construct.seeking = FALSE
|
||||
the_construct.master = GLOB.cult_narsie
|
||||
to_chat(the_construct, "<span class='cultitalic'>You are now tracking Nar'Sie, return to reap the harvest!</span>")
|
||||
return
|
||||
else
|
||||
if(LAZYLEN(GLOB.cult_narsie.souls_needed))
|
||||
the_construct.master = pick(GLOB.cult_narsie.souls_needed)
|
||||
to_chat(the_construct, "<span class='cultitalic'>You are now tracking your prey, [the_construct.master] - harvest them!</span>")
|
||||
else
|
||||
to_chat(the_construct, "<span class='cultitalic'>Nar'Sie has completed her harvest!</span>")
|
||||
return
|
||||
desc = "Activate to track Nar'Sie!"
|
||||
button_icon_state = "sintouch"
|
||||
tracking = TRUE
|
||||
the_construct.seeking = TRUE
|
||||
|
||||
|
||||
/////////////////////////////ui stuff/////////////////////////////
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/update_health_hud()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
var/laws = \
|
||||
"1. You may not involve yourself in the matters of another being, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.\n"+\
|
||||
"2. You may not harm any being, regardless of intent or circumstance.\n"+\
|
||||
"3. Your goals are to build, maintain, repair, improve, and power the station to the best of your abilities, You must never actively work against these goals."
|
||||
"3. Your goals are to build, maintain, repair, improve, and provide power to the best of your abilities, You must never actively work against these goals."
|
||||
var/light_on = 0
|
||||
var/heavy_emp_damage = 25 //Amount of damage sustained if hit by a heavy EMP pulse
|
||||
var/alarms = list("Atmosphere" = list(), "Fire" = list(), "Power" = list())
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
Contents:
|
||||
- Admin procs that make ninjas
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//ADMIN CREATE NINJA (From Player)
|
||||
/client/proc/cmd_admin_ninjafy(mob/living/carbon/human/H in GLOB.player_list)
|
||||
set category = null
|
||||
set name = "Make Space Ninja"
|
||||
|
||||
if (!SSticker.mode)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] turned [H.key] into a Space Ninja.")
|
||||
H.mind = create_ninja_mind(H.key)
|
||||
H.mind_initialize()
|
||||
H.equip_space_ninja(1)
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
H.wear_suit:randomize_param()
|
||||
spawn(0)
|
||||
H.wear_suit:ninitialize(10,H)
|
||||
SSticker.mode.update_ninja_icons_added(H)
|
||||
|
||||
|
||||
//ADMIN CREATE NINJA (From Ghost)
|
||||
/client/proc/send_space_ninja()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Space Ninja"
|
||||
set desc = "Spawns a space ninja for when you need a teenager with attitude."
|
||||
set popup_menu = 0
|
||||
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!SSticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No")
|
||||
return
|
||||
|
||||
var/client/C = input("Pick character to spawn as the Space Ninja", "Key", "") as null|anything in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
|
||||
// passing FALSE means the event doesn't start immediately
|
||||
var/datum/round_event/ghost_role/ninja/E = new(FALSE)
|
||||
E.priority_candidates += C
|
||||
E.processing = TRUE
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(key)] has spawned [key_name_admin(C.key)] as a Space Ninja.</span>")
|
||||
log_admin("[key] used Spawn Space Ninja.")
|
||||
|
||||
return
|
||||
@@ -63,98 +63,21 @@ Contents:
|
||||
Mind.active = 1
|
||||
|
||||
//generate objectives - You'll generally get 6 objectives (Ninja is meant to be hardmode!)
|
||||
var/list/possible_targets = list()
|
||||
for(var/datum/mind/M in SSticker.minds)
|
||||
if(M.current && M.current.stat != DEAD)
|
||||
if(ishuman(M.current))
|
||||
if(M.special_role)
|
||||
possible_targets[M] = 0 //bad-guy
|
||||
else if(M.assigned_role in GLOB.command_positions)
|
||||
possible_targets[M] = 1 //good-guy
|
||||
|
||||
var/list/objectives = list(1,2,3,4)
|
||||
while(give_objectives && Mind.objectives.len < 6)
|
||||
switch(pick_n_take(objectives))
|
||||
if(1) //research
|
||||
var/datum/objective/download/O = new /datum/objective/download()
|
||||
O.owner = Mind
|
||||
O.gen_amount_goal()
|
||||
Mind.objectives += O
|
||||
|
||||
if(2) //steal
|
||||
var/datum/objective/steal/special/O = new /datum/objective/steal/special()
|
||||
O.owner = Mind
|
||||
Mind.objectives += O
|
||||
|
||||
if(3) //protect/kill
|
||||
if(!possible_targets.len) continue
|
||||
var/index = rand(1,possible_targets.len)
|
||||
var/datum/mind/M = possible_targets[index]
|
||||
var/is_bad_guy = possible_targets[M]
|
||||
possible_targets.Cut(index,index+1)
|
||||
|
||||
if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy)
|
||||
var/datum/objective/assassinate/O = new /datum/objective/assassinate()
|
||||
O.owner = Mind
|
||||
O.target = M
|
||||
O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]."
|
||||
Mind.objectives += O
|
||||
else //protect
|
||||
var/datum/objective/protect/O = new /datum/objective/protect()
|
||||
O.owner = Mind
|
||||
O.target = M
|
||||
O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm."
|
||||
Mind.objectives += O
|
||||
if(4) //debrain/capture
|
||||
if(!possible_targets.len) continue
|
||||
var/selected = rand(1,possible_targets.len)
|
||||
var/datum/mind/M = possible_targets[selected]
|
||||
var/is_bad_guy = possible_targets[M]
|
||||
possible_targets.Cut(selected,selected+1)
|
||||
|
||||
if(is_bad_guy ^ helping_station) //debrain (good-ninja + bad-guy or bad-ninja + good-guy)
|
||||
var/datum/objective/debrain/O = new /datum/objective/debrain()
|
||||
O.owner = Mind
|
||||
O.target = M
|
||||
O.explanation_text = "Steal the brain of [M.current.real_name]."
|
||||
Mind.objectives += O
|
||||
else //capture
|
||||
var/datum/objective/capture/O = new /datum/objective/capture()
|
||||
O.owner = Mind
|
||||
O.gen_amount_goal()
|
||||
Mind.objectives += O
|
||||
else
|
||||
break
|
||||
|
||||
//Add a survival objective since it's usually broad enough for any round type.
|
||||
if(give_objectives)
|
||||
var/datum/objective/O = new /datum/objective/survive()
|
||||
O.owner = Mind
|
||||
Mind.objectives += O
|
||||
|
||||
//add some RP-fluff
|
||||
Mind.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
|
||||
Mind.store_memory("Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
|
||||
Mind.store_memory("Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
|
||||
|
||||
//spawn the ninja and assign the candidate
|
||||
var/mob/living/carbon/human/Ninja = create_space_ninja(spawn_loc)
|
||||
Mind.transfer_to(Ninja)
|
||||
|
||||
//initialise equipment
|
||||
if(istype(Ninja.wear_suit,/obj/item/clothing/suit/space/space_ninja))
|
||||
//Should be true but we have to check these things.
|
||||
var/obj/item/clothing/suit/space/space_ninja/N = Ninja.wear_suit
|
||||
N.randomize_param()
|
||||
var/datum/antagonist/ninja/ninjadatum = add_ninja(Ninja)
|
||||
ninjadatum.equip_space_ninja()
|
||||
|
||||
Ninja.internal = Ninja.s_store
|
||||
Ninja.update_internals_hud_icon(1)
|
||||
|
||||
if(Ninja.mind != Mind) //something has gone wrong!
|
||||
throw EXCEPTION("Ninja created with incorrect mind")
|
||||
return
|
||||
|
||||
Ninja << sound('sound/effects/ninja_greeting.ogg') //so ninja you probably wouldn't even know if you were made one
|
||||
|
||||
SSticker.mode.update_ninja_icons_added(Ninja)
|
||||
spawned_mobs += Ninja
|
||||
message_admins("[key_name_admin(Ninja)] has been made into a ninja by an event.")
|
||||
@@ -171,7 +94,6 @@ Contents:
|
||||
A.real_name = "[pick(GLOB.ninja_titles)] [pick(GLOB.ninja_names)]"
|
||||
A.copy_to(new_ninja)
|
||||
new_ninja.dna.update_dna_identity()
|
||||
new_ninja.equip_space_ninja()
|
||||
return new_ninja
|
||||
|
||||
|
||||
@@ -183,38 +105,6 @@ Contents:
|
||||
return Mind
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters.
|
||||
if(safety)
|
||||
qdel(w_uniform)
|
||||
qdel(wear_suit)
|
||||
qdel(wear_mask)
|
||||
qdel(head)
|
||||
qdel(shoes)
|
||||
qdel(gloves)
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
var/obj/item/clothing/suit/space/space_ninja/theSuit = new(src)
|
||||
var/obj/item/weapon/katana/energy/EK = new(src)
|
||||
theSuit.energyKatana = EK
|
||||
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes)
|
||||
equip_to_slot_or_del(theSuit, slot_wear_suit)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(src), slot_head)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/space_ninja(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_glasses)
|
||||
equip_to_slot_or_del(EK, slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/internals/emergency_oxygen(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(src), slot_back)
|
||||
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src)
|
||||
E.implant(src)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/update_ninja_icons_added(var/mob/living/carbon/human/ninja)
|
||||
var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA]
|
||||
ninjahud.join_hud(ninja)
|
||||
|
||||
@@ -58,30 +58,23 @@
|
||||
A.add_fingerprint(H)
|
||||
|
||||
draining = 1
|
||||
var/drained = A.ninjadrain_act(suit,H,src)
|
||||
. = A.ninjadrain_act(suit,H,src)
|
||||
draining = 0
|
||||
|
||||
if(isnum(drained)) //Numerical values of drained handle their feedback here, Alpha values handle it themselves (Research hacking)
|
||||
if(drained)
|
||||
to_chat(H, "<span class='notice'>Gained <B>[drained]</B> energy from \the [A].</span>")
|
||||
if(isnum(.)) //Numerical values of drained handle their feedback here, Alpha values handle it themselves (Research hacking)
|
||||
if(.)
|
||||
to_chat(H, "<span class='notice'>Gained <B>[.]</B> energy from \the [A].</span>")
|
||||
else
|
||||
to_chat(H, "<span class='danger'>\The [A] has run dry of power, you must find another source!</span>")
|
||||
else
|
||||
drained = 0 //as to not cancel attack_hand()
|
||||
|
||||
return drained
|
||||
. = 0 //as to not cancel attack_hand()
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja/proc/toggled()
|
||||
set name = "Toggle Interaction"
|
||||
set desc = "Toggles special interaction on or off."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja/proc/toggledrain()
|
||||
var/mob/living/carbon/human/U = loc
|
||||
to_chat(U, "You <b>[candrain?"disable":"enable"]</b> special interaction.")
|
||||
candrain=!candrain
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja/examine(mob/user)
|
||||
..()
|
||||
if(flags & NODROP)
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
|
||||
|
||||
//Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
|
||||
//Movement impairing would indicate drugs and the like.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
|
||||
set name = "Adrenaline Boost"
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(0,N_ADRENALINE))//Have to make sure stat is not counted for this ability.
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
@@ -25,4 +19,3 @@
|
||||
a_boost--
|
||||
to_chat(H, "<span class='notice'>There are <B>[a_boost]</B> adrenaline boosts remaining.</span>")
|
||||
s_coold = 3
|
||||
return
|
||||
@@ -26,4 +26,4 @@
|
||||
if(!a_boost)
|
||||
to_chat(H, "<span class='danger'>You do not have any more adrenaline boosters.</span>")
|
||||
return 1
|
||||
return (s_coold)//Returns the value of the variable which counts down to zero.
|
||||
return (s_coold)//Returns the value of the variable which counts down to zero.
|
||||
|
||||
@@ -2,14 +2,9 @@
|
||||
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (25E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(250,N_STEALTH_CANCEL))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
playsound(H.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(H, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
return
|
||||
@@ -1,10 +1,6 @@
|
||||
|
||||
//Allows the ninja to kidnap people
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/C in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (20E)"
|
||||
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
set category = null
|
||||
set src = usr.contents
|
||||
|
||||
if(!ninjacost(200,N_STEALTH_CANCEL) && iscarbon(C))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
@@ -26,4 +22,3 @@
|
||||
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] are already trapped inside an energy net!</span>")
|
||||
else
|
||||
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] will bring no honor to your Clan!</span>")
|
||||
return
|
||||
@@ -2,10 +2,6 @@
|
||||
|
||||
//Smoke bomb
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
|
||||
set name = "Smoke Bomb"
|
||||
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0//Will not see it when right clicking.
|
||||
|
||||
if(!ninjacost(0,N_SMOKE_BOMB))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
@@ -16,4 +12,3 @@
|
||||
s_bombs--
|
||||
to_chat(H, "<span class='notice'>There are <B>[s_bombs]</B> smoke bombs remaining.</span>")
|
||||
s_coold = 1
|
||||
return
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
//Creates a throwing star
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
|
||||
set name = "Create Throwing Stars (1E)"
|
||||
set desc = "Creates some throwing stars"
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(10))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
var/obj/item/weapon/throwing_star/ninja/N = new(H)
|
||||
|
||||
@@ -21,7 +21,6 @@ Contents:
|
||||
animate(U, alpha = 50,time = 15)
|
||||
U.visible_message("<span class='warning'>[U.name] vanishes into thin air!</span>", \
|
||||
"<span class='notice'>You are now mostly invisible to normal detection.</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth()
|
||||
@@ -38,12 +37,7 @@ Contents:
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/stealth()
|
||||
set name = "Toggle Stealth"
|
||||
set desc = "Utilize the internal CLOAK-tech device to activate or deactivate stealth-camo."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
if(!s_busy)
|
||||
toggle_stealth()
|
||||
else
|
||||
to_chat(affecting, "<span class='danger'>Stealth does not appear to work!</span>")
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninja_sword_recall()
|
||||
set name = "Recall Energy Katana (Variable Cost)"
|
||||
set desc = "Teleports the Energy Katana linked to this suit to its wearer, cost based on distance."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
|
||||
var/cost = 0
|
||||
@@ -42,4 +37,3 @@
|
||||
|
||||
else //Else just TP it to us.
|
||||
energyKatana.returnToOwner(H,1)
|
||||
|
||||
|
||||
@@ -16,16 +16,10 @@ Contents:
|
||||
var/mob/living/victim = H.pulling
|
||||
if(!victim.anchored)
|
||||
victim.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z))
|
||||
return
|
||||
|
||||
|
||||
//Jaunt
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt (10E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(100,N_STEALTH_CANCEL))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
var/turf/destination = get_teleport_loc(H.loc,H,9,1,3,1,0,1)
|
||||
@@ -47,7 +41,6 @@ Contents:
|
||||
s_coold = 1
|
||||
else
|
||||
to_chat(H, "<span class='danger'>The VOID-shift device is malfunctioning, <B>teleportation failed</B>.</span>")
|
||||
return
|
||||
|
||||
|
||||
//Right-Click teleport: It's basically admin "jump to turf"
|
||||
@@ -76,6 +69,3 @@ Contents:
|
||||
s_coold = 1
|
||||
else
|
||||
to_chat(H, "<span class='danger'>You cannot teleport into solid walls or from solid matter</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Contents:
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100)
|
||||
strip_delay = 12
|
||||
|
||||
actions_types = list(/datum/action/item_action/initialize_ninja_suit, /datum/action/item_action/ninjajaunt, /datum/action/item_action/ninjasmoke, /datum/action/item_action/ninjaboost, /datum/action/item_action/ninjapulse, /datum/action/item_action/ninjastar, /datum/action/item_action/ninjanet, /datum/action/item_action/ninja_sword_recall, /datum/action/item_action/ninja_stealth, /datum/action/item_action/toggle_glove)
|
||||
|
||||
//Important parts of the suit.
|
||||
var/mob/living/carbon/human/affecting = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
@@ -57,7 +59,6 @@ Contents:
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/New()
|
||||
..()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb
|
||||
|
||||
//Spark Init
|
||||
spark_system = new()
|
||||
@@ -109,40 +110,38 @@ Contents:
|
||||
|
||||
|
||||
//This proc prevents the suit from being taken off.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/human/H, checkIcons = 0)
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
if(checkIcons)
|
||||
icon_state = H.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
|
||||
H.gloves.icon_state = "s-ninjan"
|
||||
H.gloves.item_state = "s-ninjan"
|
||||
else
|
||||
if(H.mind.special_role!="Space Ninja")
|
||||
to_chat(H, "\red <B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAUHORIZED USÈ DETÈCeD\nCoMMÈNCING SUB-R0UIN3 13...\nTÈRMInATING U-U-USÈR...")
|
||||
H.gib()
|
||||
return 0
|
||||
if(!istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING...")
|
||||
return 0
|
||||
if(!istype(H.shoes, /obj/item/clothing/shoes/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 122011 UNABLE TO LOCATE FOOT GEAR\nABORTING...")
|
||||
return 0
|
||||
if(!istype(H.gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING...")
|
||||
return 0
|
||||
if(!is_ninja(H))
|
||||
to_chat(H, "\red <B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAUHORIZED USÈ DETÈCeD\nCoMMÈNCING SUB-R0UIN3 13...\nTÈRMInATING U-U-USÈR...")
|
||||
H.gib()
|
||||
return FALSE
|
||||
if(!istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING...")
|
||||
return FALSE
|
||||
if(!istype(H.shoes, /obj/item/clothing/shoes/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 122011 UNABLE TO LOCATE FOOT GEAR\nABORTING...")
|
||||
return FALSE
|
||||
if(!istype(H.gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
to_chat(H, "<span class='userdanger'>ERROR</span>: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING...")
|
||||
return FALSE
|
||||
affecting = H
|
||||
flags |= NODROP //colons make me go all |=
|
||||
slowdown = FALSE
|
||||
n_hood = H.head
|
||||
n_hood.flags |= NODROP
|
||||
n_shoes = H.shoes
|
||||
n_shoes.flags |= NODROP
|
||||
n_shoes.slowdown--
|
||||
n_gloves = H.gloves
|
||||
n_gloves.flags |= NODROP
|
||||
return TRUE
|
||||
|
||||
affecting = H
|
||||
flags |= NODROP //colons make me go all |=
|
||||
slowdown = 0
|
||||
n_hood = H.head
|
||||
n_hood.flags |= NODROP
|
||||
n_shoes = H.shoes
|
||||
n_shoes.flags |= NODROP
|
||||
n_shoes.slowdown--
|
||||
n_gloves = H.gloves
|
||||
n_gloves.flags |= NODROP
|
||||
|
||||
return 1
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/lockIcons(mob/living/carbon/human/H)
|
||||
icon_state = H.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
|
||||
H.gloves.icon_state = "s-ninjan"
|
||||
H.gloves.item_state = "s-ninjan"
|
||||
|
||||
|
||||
//This proc allows the suit to be taken off.
|
||||
@@ -172,3 +171,39 @@ Contents:
|
||||
to_chat(user, "The CLOAK-tech device is <B>[s_active?"active":"inactive"]</B>.")
|
||||
to_chat(user, "There are <B>[s_bombs]</B> smoke bomb\s remaining.")
|
||||
to_chat(user, "There are <B>[a_boost]</B> adrenaline booster\s remaining.")
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/initialize_ninja_suit))
|
||||
toggle_on_off()
|
||||
return TRUE
|
||||
if(!s_initialized)
|
||||
to_chat(user, "<span class='warning'><b>ERROR</b>: suit offline. Please activate suit.</span>")
|
||||
return FALSE
|
||||
if(istype(action, /datum/action/item_action/ninjajaunt))
|
||||
ninjajaunt()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninjasmoke))
|
||||
ninjasmoke()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninjaboost))
|
||||
ninjaboost()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninjapulse))
|
||||
ninjapulse()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninjastar))
|
||||
ninjastar()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninjanet))
|
||||
ninjanet()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninja_sword_recall))
|
||||
ninja_sword_recall()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/ninja_stealth))
|
||||
stealth()
|
||||
return TRUE
|
||||
if(istype(action, /datum/action/item_action/toggle_glove))
|
||||
n_gloves.toggledrain()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -1,102 +1,98 @@
|
||||
|
||||
//Verbs link to procs because verb-like procs have a bug which prevents their use if the arguments are not readily referenced.
|
||||
//^ Old coder words may be false these days, Not taking the risk for now.
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/init()
|
||||
set name = "Initialize Suit"
|
||||
set desc = "Initializes the suit for field operation."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
ninitialize()
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinit()
|
||||
set name = "De-Initialize Suit"
|
||||
set desc = "Begins procedure to remove the suit."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
if(!s_busy)
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/toggle_on_off()
|
||||
if(s_busy)
|
||||
to_chat(loc, "<span class='userdanger'>ERROR</span>: You cannot use this function at this time.")
|
||||
return FALSE
|
||||
if(s_initialized)
|
||||
deinitialize()
|
||||
else
|
||||
to_chat(affecting, "<span class='danger'>The function did not trigger!</span>")
|
||||
|
||||
ninitialize()
|
||||
. = TRUE
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc)
|
||||
if(U.mind && U.mind.assigned_role==U.mind.special_role && !s_initialized && !s_busy)//Shouldn't be busy... but anything is possible I guess.
|
||||
s_busy = 1
|
||||
for(var/i,i<7,i++)
|
||||
switch(i)
|
||||
if(0)
|
||||
to_chat(U, "<span class='notice'>Now initializing...</span>")
|
||||
if(1)
|
||||
if(!lock_suit(U))//To lock the suit onto wearer.
|
||||
break
|
||||
to_chat(U, "<span class='notice'>Securing external locking mechanism...\nNeural-net established.</span>")
|
||||
if(2)
|
||||
to_chat(U, "<span class='notice'>Extending neural-net interface...\nNow monitoring brain wave pattern...</span>")
|
||||
if(3)
|
||||
if(U.stat==2||U.health<=0)
|
||||
to_chat(U, "<span class='danger'><B>FÄAL �Rr�R</B>: 344--93#�&&21 BR��N |/|/aV� PATT$RN <B>RED</B>\nA-A-aB�rT�NG...</span>")
|
||||
unlock_suit()
|
||||
break
|
||||
lock_suit(U,1)//Check for icons.
|
||||
U.regenerate_icons()
|
||||
to_chat(U, "<span class='notice'>Linking neural-net interface...\nPattern</span>\green <B>GREEN</B><span class='notice'>, continuing operation.</span>")
|
||||
if(4)
|
||||
to_chat(U, "<span class='notice'>VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>.</span>")
|
||||
if(5)
|
||||
to_chat(U, "<span class='notice'>Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>.</span>")
|
||||
if(6)
|
||||
to_chat(U, "<span class='notice'>All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name].</span>")
|
||||
grant_ninja_verbs()
|
||||
grant_equip_verbs()
|
||||
ntick()
|
||||
sleep(delay)
|
||||
s_busy = 0
|
||||
else
|
||||
if(!U.mind||U.mind.assigned_role!=U.mind.special_role)//Your run of the mill persons shouldn't know what it is. Or how to turn it on.
|
||||
to_chat(U, "You do not understand how this suit functions. Where the heck did it even come from?")
|
||||
else if(s_initialized)
|
||||
to_chat(U, "<span class='danger'>The suit is already functioning.</span> Please report this bug.")
|
||||
else
|
||||
to_chat(U, "<span class='userdanger'>ERROR</span>: You cannot use this function at this time.")
|
||||
return
|
||||
if(!U.mind)
|
||||
return //Not sure how this could happen.
|
||||
if(!is_ninja(U))
|
||||
to_chat(U, "You do not understand how this suit functions. Where the heck did it even come from?")
|
||||
return
|
||||
s_busy = TRUE
|
||||
to_chat(U, "<span class='notice'>Now initializing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_two, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_two(delay, mob/living/carbon/human/U)
|
||||
if(!lock_suit(U))//To lock the suit onto wearer.
|
||||
s_busy = FALSE
|
||||
return
|
||||
to_chat(U, "<span class='notice'>Securing external locking mechanism...\nNeural-net established.</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_three, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_three(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Extending neural-net interface...\nNow monitoring brain wave pattern...</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_four, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_four(delay, mob/living/carbon/human/U)
|
||||
if(U.stat==2||U.health<=0)
|
||||
to_chat(U, "<span class='danger'><B>FÄAL �Rr�R</B>: 344--93#�&&21 BR��N |/|/aV� PATT$RN <B>RED</B>\nA-A-aB�rT�NG...</span>")
|
||||
unlock_suit()
|
||||
return
|
||||
lockIcons(U)//Check for icons.
|
||||
U.regenerate_icons()
|
||||
to_chat(U, "<span class='notice'>Linking neural-net interface...\nPattern</span>\green <B>GREEN</B><span class='notice'>, continuing operation.</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_five, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_five(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_six, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_six(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/ninitialize_seven, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_seven(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name].</span>")
|
||||
grant_ninja_verbs()
|
||||
grant_equip_verbs()
|
||||
ntick()
|
||||
s_busy = FALSE
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize(delay = s_delay)
|
||||
if(affecting==loc&&!s_busy)
|
||||
if(affecting==loc)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!s_initialized)
|
||||
to_chat(U, "<span class='danger'>The suit is not initialized.</span> Please report this bug.")
|
||||
return
|
||||
if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No")=="No")
|
||||
return
|
||||
if(s_busy)
|
||||
to_chat(U, "<span class='userdanger'>ERROR</span>: You cannot use this function at this time.")
|
||||
return
|
||||
s_busy = 1
|
||||
for(var/i = 0,i<7,i++)
|
||||
switch(i)
|
||||
if(0)
|
||||
to_chat(U, "<span class='notice'>Now de-initializing...</span>")
|
||||
spideros = 0//Spideros resets.
|
||||
if(1)
|
||||
to_chat(U, "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
||||
remove_ninja_verbs()
|
||||
if(2)
|
||||
to_chat(U, "<span class='notice'>Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>.</span>")
|
||||
if(3)
|
||||
to_chat(U, "<span class='notice'>VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>.</span>")
|
||||
cancel_stealth()//Shutdowns stealth.
|
||||
if(4)
|
||||
to_chat(U, "<span class='notice'>Disconnecting neural-net interface...</span>\green<B>Success</B><span class='notice'>.</span>")
|
||||
if(5)
|
||||
to_chat(U, "<span class='notice'>Disengaging neural-net interface...</span>\green<B>Success</B><span class='notice'>.</span>")
|
||||
if(6)
|
||||
to_chat(U, "<span class='notice'>Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>.</span>")
|
||||
remove_equip_verbs()
|
||||
unlock_suit()
|
||||
U.regenerate_icons()
|
||||
sleep(delay)
|
||||
s_busy = 0
|
||||
return
|
||||
s_busy = TRUE
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_two, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_two(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Now de-initializing...</span>")
|
||||
spideros = 0//Spideros resets.
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_three, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
||||
remove_ninja_verbs()
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_four, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_four(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_five, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_five(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>.</span>")
|
||||
cancel_stealth()//Shutdowns stealth.
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_six, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_six(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Disconnecting neural-net interface...</span>\green<B>Success</B><span class='notice'>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_seven, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_seven(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Disengaging neural-net interface...</span>\green<B>Success</B><span class='notice'>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_eight, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_eight(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>.</span>")
|
||||
remove_equip_verbs()
|
||||
U.regenerate_icons()
|
||||
s_busy = FALSE
|
||||
|
||||
@@ -20,5 +20,3 @@
|
||||
cancel_stealth()
|
||||
|
||||
sleep(10)//Checks every second.
|
||||
|
||||
|
||||
|
||||
@@ -9,33 +9,20 @@ Contents:
|
||||
*/
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggledrain
|
||||
|
||||
s_initialized = 1
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggledrain
|
||||
|
||||
s_initialized = 0
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninja_sword_recall
|
||||
|
||||
s_initialized=1
|
||||
slowdown=0
|
||||
@@ -43,10 +30,3 @@ Contents:
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninja_sword_recall
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
name = "folder- 'TOP SECRET'"
|
||||
desc = "A folder stamped \"Top Secret - Property of Nanotrasen Corporation. Unauthorized distribution is punishable by death.\""
|
||||
|
||||
/obj/item/weapon/folder/documents/New()
|
||||
..()
|
||||
/obj/item/weapon/folder/documents/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/documents/nanotrasen(src)
|
||||
update_icon()
|
||||
|
||||
@@ -91,20 +91,20 @@
|
||||
/obj/item/weapon/folder/syndicate/red
|
||||
icon_state = "folder_sred"
|
||||
|
||||
/obj/item/weapon/folder/syndicate/red/New()
|
||||
..()
|
||||
/obj/item/weapon/folder/syndicate/red/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/documents/syndicate/red(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/folder/syndicate/blue
|
||||
icon_state = "folder_sblue"
|
||||
|
||||
/obj/item/weapon/folder/syndicate/blue/New()
|
||||
..()
|
||||
/obj/item/weapon/folder/syndicate/blue/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/documents/syndicate/blue(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/folder/syndicate/mining/New()
|
||||
..()
|
||||
/obj/item/weapon/folder/syndicate/mining/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/documents/syndicate/mining(src)
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/info //What's actually written on the paper.
|
||||
var/info_links //A different version of the paper which includes html links at fields and EOF
|
||||
var/stamps //The (text for the) stamps on the paper.
|
||||
var/fields //Amount of user created fields
|
||||
var/fields = 0 //Amount of user created fields
|
||||
var/list/stamped
|
||||
var/rigged = 0
|
||||
var/spam_flag = 0
|
||||
|
||||
@@ -34,13 +34,61 @@
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/effects.dmi', "ghostalertsie")
|
||||
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/cult_effects.dmi', "ghostalertsie")
|
||||
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay, action=NOTIFY_ATTACK)
|
||||
INVOKE_ASYNC(src, .proc/narsie_spawn_animation)
|
||||
|
||||
narsie_spawn_animation()
|
||||
/obj/singularity/narsie/large/cult // For the new cult ending, guaranteed to end the round within 3 minutes
|
||||
var/list/souls_needed = list()
|
||||
var/soul_goal = 0
|
||||
var/souls = 0
|
||||
var/resolved = FALSE
|
||||
|
||||
sleep(19)
|
||||
SSshuttle.emergency.request(null, set_coefficient = 0) //instantly arrives
|
||||
/obj/singularity/narsie/large/cult/proc/resize(var/ratio)
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
ntransform.Scale(ratio)
|
||||
animate(src, transform = ntransform, time = 40, easing = EASE_IN|EASE_OUT)
|
||||
|
||||
/obj/singularity/narsie/large/cult/Initialize()
|
||||
. = ..()
|
||||
GLOB.cult_narsie = src
|
||||
GLOB.blood_target = src
|
||||
resize(0.6)
|
||||
for(var/datum/mind/cult_mind in SSticker.mode.cult)
|
||||
if(isliving(cult_mind.current))
|
||||
var/mob/living/L = cult_mind.current
|
||||
L.narsie_act()
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(player.stat != DEAD && player.loc.z == ZLEVEL_STATION && !iscultist(player) && isliving(player))
|
||||
souls_needed[player] = TRUE
|
||||
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6)
|
||||
INVOKE_ASYNC(src, .proc/begin_the_end)
|
||||
|
||||
/obj/singularity/narsie/large/cult/proc/begin_the_end()
|
||||
sleep(50)
|
||||
priority_announce("An acausal dimensional event has been detected in your sector. Event has been flagged EXTINCTION-CLASS. Directing all available assets toward simulating solutions. SOLUTION ETA: 60 SECONDS.","Central Command Higher Dimensional Affairs", 'sound/misc/airraid.ogg')
|
||||
sleep(550)
|
||||
priority_announce("Simulations on acausal dimensional event complete. Deploying solution package now. Deployment ETA: TWO MINUTES. ","Central Command Higher Dimensional Affairs")
|
||||
sleep(50)
|
||||
set_security_level("delta")
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
SSshuttle.lockdown = TRUE
|
||||
sleep(1150)
|
||||
if(resolved == FALSE)
|
||||
resolved = TRUE
|
||||
world << sound('sound/machines/Alarm.ogg')
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper), 120)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/ending_helper), 220)
|
||||
|
||||
/obj/singularity/narsie/large/cult/Destroy()
|
||||
GLOB.cult_narsie = null
|
||||
return ..()
|
||||
|
||||
/proc/ending_helper()
|
||||
SSticker.force_ending = 1
|
||||
|
||||
/proc/cult_ending_helper(var/no_explosion = 0)
|
||||
SSticker.station_explosion_cinematic(no_explosion, "cult", null)
|
||||
|
||||
|
||||
/obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob)
|
||||
@@ -134,7 +182,7 @@
|
||||
return
|
||||
to_chat(target, "<span class='cultsmall'>NAR-SIE HAS LOST INTEREST IN YOU.</span>")
|
||||
target = food
|
||||
if(isliving(target))
|
||||
if(ishuman(target))
|
||||
to_chat(target, "<span class ='cult'>NAR-SIE HUNGERS FOR YOUR SOUL.</span>")
|
||||
else
|
||||
to_chat(target, "<span class ='cult'>NAR-SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
firing_effect_type = /obj/effect/overlay/temp/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/ammo_casing/energy/chameleon
|
||||
projectile_type = /obj/item/projectile/energy/chameleon
|
||||
e_cost = 0
|
||||
var/list/projectile_vars = list()
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
M.modify_projectile(K)
|
||||
K.kinetic_modules += M //do something special on-hit, easy!
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
holds_charge = TRUE
|
||||
@@ -165,9 +166,11 @@
|
||||
log_override = TRUE
|
||||
|
||||
var/pressure_decrease = 0.25
|
||||
var/turf_aoe = FALSE
|
||||
var/mob_aoe = 0
|
||||
var/list/hit_overlays = list()
|
||||
var/list/kinetic_modules = list()
|
||||
|
||||
/obj/item/projectile/kinetic/Destroy()
|
||||
QDEL_NULL(kinetic_modules)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/kinetic/prehit(atom/target)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
@@ -197,23 +200,15 @@
|
||||
M.gets_drilled(firer)
|
||||
var/obj/effect/overlay/temp/kinetic_blast/K = new /obj/effect/overlay/temp/kinetic_blast(target_turf)
|
||||
K.color = color
|
||||
for(var/type in hit_overlays)
|
||||
new type(target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
|
||||
if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.gets_drilled(firer)
|
||||
if(mob_aoe)
|
||||
for(var/mob/living/L in range(1, target_turf) - firer - target)
|
||||
var/armor = L.run_armor_check(def_zone, flag, "", "", armour_penetration)
|
||||
L.apply_damage(damage*mob_aoe, damage_type, def_zone, armor)
|
||||
to_chat(L, "<span class='userdanger'>You're struck by a [name]!</span>")
|
||||
for(var/obj/item/borg/upgrade/modkit/M in kinetic_modules)
|
||||
if(QDELETED(M)) //whoever shot this was very, very unfortunate.
|
||||
continue
|
||||
M.projectile_strike(src, target_turf, target)
|
||||
|
||||
|
||||
//Modkits
|
||||
/obj/item/borg/upgrade/modkit
|
||||
name = "modification kit"
|
||||
name = "kinetic accelerator modification kit"
|
||||
desc = "An upgrade for kinetic accelerators."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "modkit"
|
||||
@@ -266,14 +261,13 @@
|
||||
to_chat(user, "<span class='notice'>You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>")
|
||||
. = FALSE
|
||||
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
forceMove(get_turf(KA))
|
||||
KA.modkits -= src
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target)
|
||||
|
||||
//Range
|
||||
/obj/item/borg/upgrade/modkit/range
|
||||
@@ -315,21 +309,73 @@
|
||||
//AoE blasts
|
||||
/obj/item/borg/upgrade/modkit/aoe
|
||||
modifier = 0
|
||||
var/turf_aoe = FALSE
|
||||
var/stats_stolen = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits) //make sure only one of the aoe modules has values if somebody has multiple
|
||||
if(AOE.stats_stolen)
|
||||
continue
|
||||
modifier += AOE.modifier //take its modifiers
|
||||
AOE.modifier = 0
|
||||
turf_aoe += AOE.turf_aoe
|
||||
AOE.turf_aoe = FALSE
|
||||
AOE.stats_stolen = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
..()
|
||||
modifier = initial(modifier) //get our modifiers back
|
||||
turf_aoe = initial(turf_aoe)
|
||||
if(stats_stolen) //if we had our stats stolen, find the stealer and take them from it
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits)
|
||||
if(AOE.stats_stolen)
|
||||
continue
|
||||
AOE.modifier -= modifier
|
||||
AOE.turf_aoe -= turf_aoe
|
||||
else //otherwise, reset the stolen stats and have it recalculate
|
||||
var/obj/item/borg/upgrade/modkit/aoe/new_stealer
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits)
|
||||
if(!new_stealer)
|
||||
new_stealer = AOE //just make the first one a stealer
|
||||
AOE.modifier = initial(AOE.modifier)
|
||||
AOE.turf_aoe = initial(AOE.turf_aoe)
|
||||
AOE.stats_stolen = FALSE
|
||||
if(new_stealer) //if there's no stealer, then there's no other aoe modkits
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits)
|
||||
if(AOE != new_stealer)
|
||||
new_stealer.modifier += AOE.modifier
|
||||
AOE.modifier = 0
|
||||
new_stealer.turf_aoe += AOE.turf_aoe
|
||||
AOE.turf_aoe = FALSE
|
||||
AOE.stats_stolen = TRUE
|
||||
stats_stolen = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.name = "kinetic explosion"
|
||||
if(!K.turf_aoe && !K.mob_aoe)
|
||||
K.hit_overlays += /obj/effect/overlay/temp/explosion/fast
|
||||
K.mob_aoe += modifier
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target)
|
||||
if(stats_stolen)
|
||||
return
|
||||
new /obj/effect/overlay/temp/explosion/fast(target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
|
||||
if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.gets_drilled(K.firer)
|
||||
if(modifier)
|
||||
for(var/mob/living/L in range(1, target_turf) - K.firer - target)
|
||||
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
|
||||
L.apply_damage(K.damage*modifier, K.damage_type, K.def_zone, armor)
|
||||
to_chat(L, "<span class='userdanger'>You're struck by a [K.name]!</span>")
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
name = "mining explosion"
|
||||
desc = "Causes the kinetic accelerator to destroy rock in an AoE."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
..()
|
||||
K.turf_aoe = TRUE
|
||||
turf_aoe = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
|
||||
name = "offensive mining explosion"
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/energy/chameleon
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
if(N.w_uniform)
|
||||
M.visible_message(pick("<b>[M]</b>'s collar pops up without warning.</span>", "<b>[M]</b> flexes [M.p_their()] arms."))
|
||||
else
|
||||
M.visible_message("<b>[M]</b> [M.p_their()] their arms.")
|
||||
M.visible_message("<b>[M]</b> flexes [M.p_their()] arms.")
|
||||
if(prob(10))
|
||||
M.say(pick("Check these sweet biceps bro!", "Deal with it.", "CHUG! CHUG! CHUG! CHUG!", "Winning!", "NERDS!", "My name is John and I hate every single one of you."))
|
||||
..()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(config.sql_enabled)
|
||||
if(SSdbcore.Connect())
|
||||
log_world("Database connection established.")
|
||||
var/datum/DBQuery/query_feedback_create_round = SSdbcore.NewQuery("INSERT INTO [format_table_name("feedback")] SELECT null, Now(), MAX(round_id)+1, \"server_ip\", 0, \"[world.internet_address]:[world.port]\" FROM [format_table_name("feedback")]")
|
||||
var/datum/DBQuery/query_feedback_create_round = SSdbcore.NewQuery("INSERT INTO [format_table_name("feedback")] SELECT null, Now(), IFNULL(MAX(round_id),0)+1, \"server_ip\", 0, \"[world.internet_address]:[world.port]\" FROM [format_table_name("feedback")]")
|
||||
query_feedback_create_round.Execute()
|
||||
var/datum/DBQuery/query_feedback_max_id = SSdbcore.NewQuery("SELECT MAX(round_id) FROM [format_table_name("feedback")]")
|
||||
query_feedback_max_id.Execute()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "Lordpidey"
|
||||
delete-after: True
|
||||
changes:
|
||||
- tweak: "Space ninjas now use action buttons instead of verbs for a more consistent user experience."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "Gun Hog"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "The Auxiliary Base can no longer land outside the lavaland map's boundaries."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "RandomMarine"
|
||||
delete-after: True
|
||||
changes:
|
||||
- tweak: "Drone laws no longer restrict drones to the station."
|
||||
@@ -0,0 +1,5 @@
|
||||
author: "Joan"
|
||||
delete-after: True
|
||||
changes:
|
||||
- tweak: "There is now a buffer zone between the mining base and lavaland where megafauna will not spawn."
|
||||
- tweak: "Ruins will no longer spawn directly in front of the mining base."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "CitadelStationBot"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "Nanotrasen decided to remove the integrated jet engines from jetpacks. They can no longer be used successfully indoors."
|
||||
@@ -0,0 +1,6 @@
|
||||
author: "Robustin"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Summoning Nar'Sie now triggers a different ending. No shuttle is coming! Survivors must escape on a pod or survive the Red Harvest for 3 minutes. If Nar'Sie acquires enough souls, the round ends immediately with a **special ending**."
|
||||
- rscadd: "New Harvester Sprite"
|
||||
- rscadd: "Harvesters can now track a random survivor on the station, then switch back to tracking Nar'Sie, via a new action button."
|
||||
|
After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 526 KiB After Width: | Height: | Size: 494 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 5.2 MiB |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -32,6 +32,7 @@
|
||||
#include "code\__DEFINES\combat.dm"
|
||||
#include "code\__DEFINES\construction.dm"
|
||||
#include "code\__DEFINES\contracts.dm"
|
||||
#include "code\__DEFINES\cult.dm"
|
||||
#include "code\__DEFINES\DNA.dm"
|
||||
#include "code\__DEFINES\events.dm"
|
||||
#include "code\__DEFINES\flags.dm"
|
||||
@@ -264,6 +265,7 @@
|
||||
#include "code\datums\antagonists\antag_datum.dm"
|
||||
#include "code\datums\antagonists\datum_clockcult.dm"
|
||||
#include "code\datums\antagonists\datum_cult.dm"
|
||||
#include "code\datums\antagonists\ninja.dm"
|
||||
#include "code\datums\diseases\_disease.dm"
|
||||
#include "code\datums\diseases\_MobProcs.dm"
|
||||
#include "code\datums\diseases\anxiety.dm"
|
||||
@@ -468,6 +470,7 @@
|
||||
#include "code\game\gamemodes\cult\cult_items.dm"
|
||||
#include "code\game\gamemodes\cult\cult_structures.dm"
|
||||
#include "code\game\gamemodes\cult\ritual.dm"
|
||||
#include "code\game\gamemodes\cult\rune_spawn_action.dm"
|
||||
#include "code\game\gamemodes\cult\runes.dm"
|
||||
#include "code\game\gamemodes\cult\supply.dm"
|
||||
#include "code\game\gamemodes\cult\talisman.dm"
|
||||
@@ -727,6 +730,10 @@
|
||||
#include "code\game\objects\effects\spawners\structure.dm"
|
||||
#include "code\game\objects\effects\spawners\vaultspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\xeno_egg_delivery.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\clockcult.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\cult.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\miscellaneous.dm"
|
||||
#include "code\game\objects\effects\temporary_visuals\temporary_visual.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
#include "code\game\objects\items\blueprints.dm"
|
||||
#include "code\game\objects\items\body_egg.dm"
|
||||
@@ -1809,7 +1816,6 @@
|
||||
#include "code\modules\modular_computers\NTNet\NTNet_relay.dm"
|
||||
#include "code\modules\modular_computers\NTNet\NTNRC\conversation.dm"
|
||||
#include "code\modules\ninja\__ninjaDefines.dm"
|
||||
#include "code\modules\ninja\admin_ninja_verbs.dm"
|
||||
#include "code\modules\ninja\energy_katana.dm"
|
||||
#include "code\modules\ninja\ninja_event.dm"
|
||||
#include "code\modules\ninja\Ninja_Readme.dm"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
title Automated Error Fixer.
|
||||
echo This will reset some things, the byond server (DreamDaemon) and the start server script must not be running. Some error messages are normal.
|
||||
echo You will be prompted to press any key 3 times
|
||||
pause
|
||||
pause
|
||||
pause
|
||||
cls
|
||||
echo Resetting folders
|
||||
mkdir gamecode\a
|
||||
mkdir gamecode\b
|
||||
del /S /F /Q gamefolder >nul 2>nul
|
||||
rmdir /S /q gamefolder
|
||||
mklink /d gamefolder gamecode\a
|
||||
call bin\findab.bat
|
||||
cls
|
||||
echo Re-Initializing code
|
||||
call bin\copyfromgit.bat
|
||||
cls
|
||||
echo Recompiling the game. If you plan to update or testmerge you can just close this program now and continue.
|
||||
call bin\build.bat
|
||||
cls
|
||||
echo Done! (hopefully)
|
||||
pause
|
||||
@@ -0,0 +1,112 @@
|
||||
@echo off
|
||||
@title Server Updater
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
set HOME = %USERPROFILE%
|
||||
|
||||
call config.bat
|
||||
rem if the first arg to nudge.py is not a channel, it is treated as the "source"
|
||||
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"
|
||||
call bin\getcurdate.bat
|
||||
call bin\findgit.bat
|
||||
echo This will handle merging a pr locally, compiling the server, and applying the PR test job.
|
||||
|
||||
:PROMPT
|
||||
SET /P UserInput=Please enter the pr number (without a # or anything of the sorts):
|
||||
SET /A PR=UserInput
|
||||
|
||||
if %PR% EQU %UserInput% (
|
||||
if %PR% GTR 0 (
|
||||
echo updating to pr %PR%
|
||||
) else (
|
||||
echo Bad input
|
||||
goto PROMPT
|
||||
)
|
||||
) else (
|
||||
echo Bad input
|
||||
goto PROMPT
|
||||
)
|
||||
if exist updating.lk (
|
||||
echo ERROR: A current update script has been detected running. if you know this is a mistake:
|
||||
pause
|
||||
echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
echo lock>updating.lk
|
||||
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "PR test job started. Merging PR #%PR% locally" >nul 2>nul
|
||||
|
||||
|
||||
cd gitrepo
|
||||
git fetch origin pull/%PR%/head:pr-%PR%
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
cd ..
|
||||
echo git fetch failed. Aborting test merge.
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Git fetch failed. Aborting test merge"
|
||||
del updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
git merge pr-%PR%
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
cd ..
|
||||
echo git merge of PR #%PR% failed. Aborting test merge
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "git merge of PR #%PR% failed. Aborting PR test merge" >nul 2>nul
|
||||
cd gitrepo
|
||||
git merge --abort
|
||||
if !ERRORLEVEL! neq 0 (
|
||||
echo ERROR: Error aborting test merge, resetting repo.
|
||||
cd ..
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Error aborting test merge, resetting git repo to head" >nul 2>nul
|
||||
cd gitrepo
|
||||
git reset --hard
|
||||
git clean -fd
|
||||
<nul set /p TRIM="set PR=" > bin/activepr.bat
|
||||
del /F /Q prtestjob.lk >nul 2>nul
|
||||
echo NOTICE: We had to reset the repo's state, all other active test merges were undone.
|
||||
)
|
||||
cd ..
|
||||
del updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
cd ..
|
||||
|
||||
echo %PR%>>prtestjob.lk
|
||||
<nul set /p TRIM=%PR% >> bin/activepr.bat
|
||||
|
||||
echo ##################################
|
||||
echo ##################################
|
||||
echo:
|
||||
echo Test merging pr done, compiling in 10 seconds. If you want to preform other actions (like more test merges) You can close this now and do them.
|
||||
echo:
|
||||
del updating.lk >nul 2>nul
|
||||
|
||||
timeout 10
|
||||
|
||||
echo lock>updating.lk
|
||||
call bin\findab.bat
|
||||
|
||||
call bin\copyfromgit.bat
|
||||
|
||||
echo compiling change log
|
||||
cd gamecode\%AB%
|
||||
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
cd ..\..
|
||||
|
||||
echo Compiling game.
|
||||
call bin\build.bat
|
||||
if %DM_EXIT% neq 0 (
|
||||
echo DM compile failed. Aborting.
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed. Aborting test merge." >nul 2>nul
|
||||
del /F /Q updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
del updating.lk >nul 2>nul
|
||||
rmdir /q gamefolder
|
||||
mklink /d gamefolder gamecode\%AB% >nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Test merge job finished. Test merge will take place next round." >nul 2>nul
|
||||
echo Done. The test merge will automatically take place at round restart.
|
||||
timeout 300
|
||||
@@ -0,0 +1,47 @@
|
||||
@echo off
|
||||
title Server Boot Detected.
|
||||
echo This script is only meant to start byond when the server first boots, do not manually run this.
|
||||
echo If you manually ran this, close this window NOW.
|
||||
timeout 15
|
||||
start cmd /c "Start Bot.bat"
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
mkdir gamecode\a
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
mkdir gamecode\b
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
del /S /F /Q gamefolder >nul 2>nul
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
rmdir /S /q gamefolder
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
mklink /d gamefolder gamecode\a
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Prepping code
|
||||
call bin\findab.bat
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Re-Initializing code
|
||||
call bin\copyfromgit.bat
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Re-Initializing code
|
||||
cls
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Compiling the game. If you plan to update or testmerge you can just close this program now and continue.
|
||||
call bin\build.bat
|
||||
cls
|
||||
echo Server boot detected. Starting byond and Space Station 13.
|
||||
echo Starting server and bot.
|
||||
start cmd /c "Start Server.bat"
|
||||
timeout 10
|
||||
@@ -0,0 +1,111 @@
|
||||
# Tgstation Toolkit:
|
||||
This is a toolset to manage a production server of /tg/Station13 (and its forks). It includes an update script that is able to update the server without having to stop or shutdown the server (the update will take effect next round) and a script to start the server and restart it if it crashes (optional, requires registry tweaks to disable the Windows crash dialog system wide) as well as systems for fixing errors and merging GitHub Pull Requests locally.
|
||||
|
||||
Generally, updates force a live tracking of the configured git repo, resetting local modifications. If you plan to make modifications, set up a new git repo to store your version of the code in, and point this script to that in the config (explained below). This can be on github or a local repo using file:/// urls.
|
||||
|
||||
These tools require UAC to be disabled. (There has been limited luck getting it to work under UAC on windows 10 using run as admin, but in other versions of windows, running as admin resets the current directory and this breaks things)
|
||||
(Note: There is no security risk to disabling UAC because UAC is not a security boundary, there exists active unpatched exploits against it that have been around since vista and work up to windows 10)
|
||||
|
||||
## Install:
|
||||
1. Move this folder to where you want your server to run from (you may also rename this folder if you wish)
|
||||
1. Right click on `config.bat` and select `Edit`.
|
||||
1. Configure the port, git repo, and other setting, You may configure the location of git, but if you installed using git for windows, we will auto detect it if its not in path.
|
||||
1. You may also need to change the location of the git repo url, and if you renamed your `dme`/"dream maker environment" file, you will need to change the project name configuration setting to be the name of your dme minus the extension (eg: if you renamed `tgstation.dme` to `ntstation.dme`, project name should be set to `ntstation`
|
||||
1. Finally, run install.bat and hope for no error.
|
||||
* It will clone the git repo, setup some folders, and add cross reference links everywhere.
|
||||
|
||||
### Optional:
|
||||
If you plan to use the `Start Server.bat` script to start the server and restart it if it crashes, you need to run the `disable crash dialog.reg` registry script to disable the "program.exe has stopped working" dialog. This will get disabled system wide so if you rely on this dialog, you should skip this step.
|
||||
|
||||
## Usage:
|
||||
### Folders:
|
||||
* `gamecode/`
|
||||
* This will house two copies of the game code, one for updating and one for live. When updating, it will automatically swap them.
|
||||
|
||||
* `gamedata/`
|
||||
* This contains the `data/` and `config/` folders from the code. They are stored here and a symbolic link is created in the `gamecode/` folders pointing to here.
|
||||
* This also makes backing them up easy.
|
||||
(you may copy and paste your existing `data/` and `config/` folders here after the install script has ran.)
|
||||
|
||||
* `bot/`
|
||||
* This is a copy of the bot folder. you should run the bot from here.a link to nudge.py is created in the code folders so that the game can use the announcement feature.
|
||||
* The start server script and update script will send messages out thru the bot, but if its not running or python is not installed, they will gracefully continue what they are doing.
|
||||
|
||||
* `gamefolder/`
|
||||
* This is a symbolic link pointing to current "live" folder.
|
||||
* When the server is updated, we just point this to the updating folder so that the update takes place next round.
|
||||
|
||||
* `gitrepo/`
|
||||
* This contains the actual git repository, all changes in here will be overwritten during update operations, the configured branch will always be forced to track from live.
|
||||
* On the first update of the day, the current code state is saved to a branch called `backup-YYYY-MM-DD` before updating, to make local reverts easy.
|
||||
* Following update operations on the same day do not make branches because I was too lazy to detect such edge cases.
|
||||
|
||||
* `bin/`
|
||||
* This contains random helper batch files.
|
||||
* Running these on their own is a bad idea.
|
||||
|
||||
### Starting the game server:
|
||||
To run the game server, Run `Start Server.bat`
|
||||
|
||||
It will restart the game server if it shutdowns for any reason, with delays if the game server had recently been (re)started.
|
||||
|
||||
|
||||
### Updating the server:
|
||||
To update the server, just run `Update Server.bat`. (it will git pull, compile, all that jazz)
|
||||
|
||||
(Note: Updating automatically does a code reset, clearing ALL changes to the local git repo, including test merges (explained below) and manual changes (This will not change any configs/settings or clear any data in the `gamedata/` folder))
|
||||
|
||||
Updates do not require the server to be shutdown, changes will apply next round if the server is currently running.
|
||||
|
||||
Updates create a branch with the current state of the repo called `backup-YYYY-MM-DD` (only one is created in any given day)
|
||||
|
||||
There is also a `Update without resetting.bat` file that does the same without resetting the code, used to update without clearing test merges or local changes. Prone to merge conflicts.
|
||||
|
||||
|
||||
### Locally merge GitHub Pull Requests (PR test merge):
|
||||
This feature currently only works if github is the remote(git server), it could be adapted for gitlab as well.
|
||||
|
||||
Running these will merge the pull request then recompile the server, changes take effect the next round if the server is currently running.
|
||||
|
||||
There are multiple flavors:
|
||||
* `Update To PR.bat`
|
||||
* Updates the server, resetting state, and merges a PR(Pull Request) by number.
|
||||
* `Merge PR Without Updating.bat`
|
||||
* Merges a PR without updating the server before hand or resetting the state (can be used to test merge multiple PRs).
|
||||
|
||||
You can clear all active test merges using `Reset and Recompile.bat` (explained below)
|
||||
|
||||
### Resetting, Recompiling, and troubleshooting.
|
||||
* `Recompile.bat`
|
||||
* Just recompiles the game code and stages it to apply next round
|
||||
* `Reset and Recompile.bat`
|
||||
* Like the above but resets the git repo to the state of the last update operation (clearing any changes or test merges) (Does not reset `gamedata/` data/settings)
|
||||
* Generally used to clear out test merges
|
||||
* `Fix Errors.bat`
|
||||
* Requires the server not be running, rebuilds the staging A/B folders and then does all of the above. (Used to fix errors that can prevent the server from starting or cause it to crash on reboot)
|
||||
|
||||
### Using the bot
|
||||
1. Install python 3
|
||||
1. Edit the config in `bot/` as needed
|
||||
1. Start the bot using the `Start Bot.bat` file
|
||||
|
||||
|
||||
### Starting everything when the computer/server boots
|
||||
1. Use autologin to set it up so the user account logs in at boot
|
||||
* (There are some security implications with doing this, this is only a tiny bit more secure then putting a file on the hard drive with the server's remote login password titled `totally not a password.txt`)
|
||||
* https://technet.microsoft.com/en-us/sysinternals/bb963905
|
||||
1. Setup something to run OnServerBoot.bat on login (setting up a link/shortcut to this file in the startup folder of the start menu works, creating a scheduled task in windows administrative tools also works)
|
||||
1. OnServerBoot.bat does not update, but it does re-compile and reinitialize the A/B folders.
|
||||
|
||||
### Updating byond after this is all setup
|
||||
1. Download installer from byond website
|
||||
1. Close watch dog/start server script
|
||||
1. Wait for current round to end
|
||||
1. Exit DreamDeamon
|
||||
1. Run installer
|
||||
1. After installing, run recompile.bat (or update if you want)
|
||||
1. Run start server.bat
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
About:
|
||||
This is a toolset to manage a production server of tgstation13 (or its forks). It includes an update script that is able to update the server without having to stop or shutdown the server (the update will take effect next round) and a script to start the server and restart it if it crashes (optional, requires registry tweaks to disable the Windows crash dialog system wide)
|
||||
|
||||
This will force a live tracking of the configured git repo, so no local modifications are allowed. (this is to avoid issues with merge conflicts and because I'm too lazy to make the script detect them)
|
||||
|
||||
|
||||
Install:
|
||||
Move this folder to where you want your server to run from (you may also rename this folder if you wish)
|
||||
Right click on config.bat and click edit.
|
||||
Configure the port, selected map file, and the like, You may configure the location of git, but if you installed using git for windows, we will auto detect it if its not in path.
|
||||
You may also need to change the location of the gitrepo url, and if you renamed your dme/"dream maker environment" file, you will need to change the project name configuration setting to be the name of your dme minus the extension (eg: if you renamed tgstation.dme to ntstation.dme, project name should be set to ntstation
|
||||
|
||||
After that, just run install.bat and hope for no error.
|
||||
|
||||
It will clone the git repo, setup some folders, and add cross reference links everywhere.
|
||||
|
||||
Optional:
|
||||
If you plan to use the start-server script to watch the server and restart it if it crashes, you should run the "disable crash dialog.reg" registry script to disable the "program.exe has stopped working" dialog. This will get disabled system wide so if you rely on this dialog, you shouldn't run the script.
|
||||
Even without this, byond stopping the world from two many critical errors (like infinite loops and recursions) will still be detected.
|
||||
|
||||
Usage:
|
||||
The install script will make a few folders:
|
||||
gamecode
|
||||
This will house two copies of the game code, one for updating and one for live. When updating, it will automatically swap them.
|
||||
|
||||
gamedata
|
||||
This contains the data, config, and cfg folders from the code. They are stored here and a symbolic link is created in the code folders pointing to here.
|
||||
This also makes backing them up easy.
|
||||
(you may copy and paste your existing data/config/cfg folders here after the install script has ran.)
|
||||
|
||||
bot
|
||||
This is a copy of the bot folder. you should run the bot from here. a link to coredata.py and nudge.py is created in the code folders so that the game can use the announcement feature.
|
||||
The start server script and update script will send messages out thru the bot, but if its not running or python is not installed, they will gracefully continue what they are doing.
|
||||
|
||||
gamefolder
|
||||
This is a symbolic link pointing to current "live" folder.
|
||||
When the server is updated, we just point this to the updating folder so that the update takes place next round.
|
||||
|
||||
bin
|
||||
This contains random helper batch files.
|
||||
Running these on their own is a bad idea.
|
||||
|
||||
To update the server, just run update server.bat. (it will git pull, compile, all that jazz)
|
||||
It will ask you if you want to apply the update live. 99.9% of the time, this will not cause issues. The only issues it can cause relate to changes to media files(images(but not icons)/css/html/sound not stored in the RSC. but only new clients will see those issues, and at worst, its a minor graphical glitch.
|
||||
You may remove the pause in the update script at line 90 if you like.
|
||||
|
||||
To run the server, just run start server.bat
|
||||
It will automatically redirect the runtimes to data/logs/runtimes/runtime-YYYY-MM-DD.log.
|
||||
(Note: It will not automatically roll them over, but every time it crashes or stops it will have a new log file.)
|
||||
When it starts dreamdaemon, it instructs byond to close down dreamdaemon if the world stops for any reason, this includes hitting the stop button, dreamdaemon shutting the world down because of too many runtimes/infinite loops.
|
||||
If dreamdaemon ever stops while the start server script is running, the script will restart it automatically.
|
||||
(Note: The script can not detect hangs or lockups)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
@title Server Updater
|
||||
set HOME = %USERPROFILE%
|
||||
|
||||
call config.bat
|
||||
call bin\getcurdate.bat
|
||||
|
||||
echo This will handle recompiling the server, and applying the new version.
|
||||
echo ready?
|
||||
|
||||
timeout 120
|
||||
|
||||
if exist updating.lk (
|
||||
echo ERROR: A current update script has been detected running. if you know this is a mistake:
|
||||
pause
|
||||
echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
echo lock>updating.lk
|
||||
|
||||
rem if the first arg to nudge.py is not a channel, it is treated as the "source"
|
||||
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"
|
||||
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Recompile job started" >nul 2>nul
|
||||
|
||||
call bin\findab.bat
|
||||
|
||||
call bin\copyfromgit.bat
|
||||
|
||||
echo compiling change log
|
||||
cd gamecode\%AB%
|
||||
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
cd ..\..
|
||||
|
||||
echo Compiling game.
|
||||
call bin\build.bat
|
||||
if %DM_EXIT% neq 0 (
|
||||
echo DM compile failed. Aborting.
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed Aborting recompile." >nul 2>nul
|
||||
del /F /Q updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
del updating.lk >nul 2>nul
|
||||
rmdir /q gamefolder
|
||||
mklink /d gamefolder gamecode\%AB% >nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Recompile finished. Recompiled code will take place next round." >nul 2>nul
|
||||
echo Done. The recompile will automatically take place at round restart.
|
||||
timeout 300
|
||||
@@ -0,0 +1,66 @@
|
||||
@echo off
|
||||
@title Server Updater
|
||||
set HOME = %USERPROFILE%
|
||||
|
||||
call config.bat
|
||||
call bin\getcurdate.bat
|
||||
call bin\findgit.bat
|
||||
|
||||
echo This will handle resetting the git repo, recompiling the server, and applying the new version.
|
||||
echo Ready?
|
||||
|
||||
timeout 120
|
||||
|
||||
if exist updating.lk (
|
||||
echo ERROR: A current update script has been detected running. if you know this is a mistake:
|
||||
pause
|
||||
echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
echo lock>updating.lk
|
||||
|
||||
rem if the first arg to nudge.py is not a channel, it is treated as the "source"
|
||||
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"
|
||||
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Reset local changes job started" >nul 2>nul
|
||||
|
||||
cd gitrepo
|
||||
git reset --hard
|
||||
git clean -df
|
||||
cd ..
|
||||
echo ##################################
|
||||
echo ##################################
|
||||
echo:
|
||||
echo Resetting done, compiling in 10 seconds. If you want to preform other actions (like test merges) You can close this now and do them.
|
||||
echo:
|
||||
del updating.lk >nul 2>nul
|
||||
|
||||
timeout 10
|
||||
|
||||
echo lock>updating.lk
|
||||
call bin\findab.bat
|
||||
|
||||
call bin\copyfromgit.bat
|
||||
|
||||
echo compiling change log
|
||||
cd gamecode\%AB%
|
||||
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
cd ..\..
|
||||
|
||||
echo Compiling game.
|
||||
call bin\build.bat
|
||||
if %DM_EXIT% neq 0 (
|
||||
echo DM compile failed. Aborting.
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed Aborting Reset." >nul 2>nul
|
||||
del /F /Q updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
del updating.lk >nul 2>nul
|
||||
rmdir /q gamefolder
|
||||
mklink /d gamefolder gamecode\%AB% >nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Reset finished. Reset will take place next round." >nul 2>nul
|
||||
echo Done. The Reset will automatically take place at round restart.
|
||||
timeout 300
|
||||
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
@title NT IRC BOT
|
||||
echo Welcome to the start bot script, This will start the bot and make sure it stays running. This assumes python in the path. To continue, press any key or wait 60 seconds.
|
||||
timeout 60
|
||||
echo Welcome to the start bot script, This will start the bot and make sure it stays running. This assumes python in the path. To continue, press any key or wait 15 seconds.
|
||||
timeout 15
|
||||
cd bot
|
||||
:START
|
||||
call ..\bin\getcurdate.bat
|
||||
@@ -9,7 +9,7 @@ if not exist ..\gamedata\data\logs\bot mkdir ..\gamedata\data\logs\bot\
|
||||
cls
|
||||
echo NT IRC Bot
|
||||
echo Bot Running. Watching for Bot exits.
|
||||
start /WAIT python NanoTrasenBot.py >>..\gamedata\data\logs\bot\bot-%CUR_DATE%.txt
|
||||
start /WAIT python minibot.py ^>^>..\gamedata\data\logs\bot\bot-%CUR_DATE%.txt
|
||||
cls
|
||||
echo NT IRC Bot
|
||||
echo Bot exit detected. Restarting in 15 minutes.
|
||||
|
||||
@@ -3,22 +3,37 @@
|
||||
call config.bat
|
||||
call bin\findbyond.bat
|
||||
|
||||
echo Welcome to the start server watch dog script, This will start the server and make sure it stays running. To continue, press any key or wait 60 seconds.
|
||||
timeout 60
|
||||
echo Welcome to the start server watch dog script, This will start the server and make sure it stays running. To continue, press any key or wait 30 seconds.
|
||||
timeout 30
|
||||
|
||||
if not exist gamedata\data\logs\runtimes mkdir gamedata\data\logs\runtimes\
|
||||
@python bot\nudge.py "WATCHDOG" "Watch Dog online. Starting server" >nul 2>nul
|
||||
|
||||
@call python bot\nudge.py "WATCHDOG" "Watch Dog online. Starting server" >nul 2>nul
|
||||
:START
|
||||
|
||||
call bin\getcurdate.bat
|
||||
|
||||
call bin\getunixtime.bat UNIXTIME
|
||||
|
||||
echo %UNIXTIME%
|
||||
|
||||
set STARTTIME=%UNIXTIME%
|
||||
|
||||
cls
|
||||
echo Watch Dog.
|
||||
echo Server Running. Watching for server exits.
|
||||
start /WAIT /ABOVENORMAL "" dreamdaemon.exe gamefolder\%PROJECTNAME%.dmb -port %PORT% -trusted -public -close -log "data\logs\runtimes\runtime-%CUR_DATE%.log"
|
||||
start /WAIT /ABOVENORMAL "" dreamdaemon.exe gamefolder\%PROJECTNAME%.dmb -port %PORT% -trusted -close -public -verbose
|
||||
cls
|
||||
|
||||
call bin\getunixtime.bat UNIXTIME
|
||||
|
||||
SET /A Result=%UNIXTIME% - %STARTTIME%
|
||||
SET /A Result=180 - (%Result%/3)
|
||||
if %Result% LSS 0 set /A Result=0
|
||||
|
||||
echo Watch Dog.
|
||||
echo Server exit detected. Restarting in 60 seconds.
|
||||
@python bot\nudge.py "WATCHDOG" "Server exit detected. Restarting server in 60 seconds." >nul 2>nul
|
||||
timeout 60
|
||||
echo Server exit detected. Restarting in %Result% seconds.
|
||||
@python bot\nudge.py "WATCHDOG" "Server exit detected. Restarting server in %Result% seconds." >nul 2>nul
|
||||
timeout %Result%
|
||||
|
||||
goto :START
|
||||
|
||||
@@ -1,53 +1,79 @@
|
||||
@echo off
|
||||
@title Server Updater
|
||||
title Server Updater
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
set HOME = %USERPROFILE%
|
||||
|
||||
call config.bat
|
||||
call bin\getcurdate.bat
|
||||
|
||||
echo This will handle downloading git, compiling the server, and applying the update.
|
||||
echo ready?
|
||||
echo Ready?
|
||||
|
||||
timeout 120
|
||||
|
||||
if exist updating.lk (
|
||||
echo ERROR! A current update script has been detected running. if you know this is a mistake:
|
||||
echo ERROR: A current update script has been detected running. if you know this is a mistake:
|
||||
pause
|
||||
echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
if exist prtestjob.lk (
|
||||
call bin/activepr.bat
|
||||
echo WARNING: The server is currently testing the following PRs !PR!. This update would override that. Do you still want to update? Close this window if not, otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
del /F /Q prtestjob.lk >nul 2>nul
|
||||
|
||||
echo lock>updating.lk
|
||||
<nul set /p TRIM="set PR=" > bin/activepr.bat
|
||||
|
||||
rem if the first arg to nudge.py is not a channel, it is treated as the "source"
|
||||
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"
|
||||
|
||||
python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job started" >nul 2>nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job started" >nul 2>nul
|
||||
|
||||
call bin\updategit.bat
|
||||
if %GIT_EXIT% neq 0 (
|
||||
echo git pull failed. Aborting update
|
||||
python bot\nudge.py %UPDATE_LOG_CHANNEL% "Git pull failed. Aborting update"
|
||||
@del updating.lk >nul 2>nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Git fetch failed. Aborting update"
|
||||
del updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if defined PUSHCHANGELOGTOGIT (
|
||||
cd gitrepo
|
||||
echo compiling change log
|
||||
python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
if %ERRORLEVEL% == 0 (
|
||||
if !ERRORLEVEL! == 0 (
|
||||
echo pushing compiled changelog to server
|
||||
git add -u html/changelog.html
|
||||
git add -u html/changelogs
|
||||
git commit -m "Automatic changelog compile, [ci skip]"
|
||||
if %ERRORLEVEL% == 0 (
|
||||
if !ERRORLEVEL! == 0 (
|
||||
git push
|
||||
)
|
||||
REM an error here generally means there was nothing to commit.
|
||||
)
|
||||
cd ..
|
||||
)
|
||||
|
||||
echo ##################################
|
||||
echo ##################################
|
||||
echo:
|
||||
echo Updating done, compiling in 10 seconds. If you want to preform other actions (like test merge) You can close this now and do them.
|
||||
echo:
|
||||
del updating.lk >nul 2>nul
|
||||
|
||||
timeout 10
|
||||
|
||||
echo lock>updating.lk
|
||||
call bin\findab.bat
|
||||
|
||||
call bin\copyfromgit.bat
|
||||
|
||||
|
||||
|
||||
if not defined PUSHCHANGELOGTOGIT (
|
||||
echo compiling change log
|
||||
cd gamecode\%AB%
|
||||
@@ -55,26 +81,19 @@ if not defined PUSHCHANGELOGTOGIT (
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
|
||||
|
||||
echo building script.
|
||||
echo Compiling game.
|
||||
call bin\build.bat
|
||||
if %DM_EXIT% neq 0 (
|
||||
echo DM compile failed. Aborting.
|
||||
python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed Aborting update." >nul 2>nul
|
||||
@del /F /Q updating.lk >nul 2>nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed Aborting update." >nul 2>nul
|
||||
del /F /Q updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not defined NOWAITUPDATES (
|
||||
echo OK, compiled and ready. So at the hit of a button, we can apply the update live. Technically speaking, it's best to wait until near round end, but unless a html/css/js file in the code had been deleted, edited, or moved recently, no ill effects of applying the update will happen, and the worst is that new clients have display oddities relating to in game windows. Existing connections should have no issue.
|
||||
echo Ready?
|
||||
pause
|
||||
)
|
||||
@del updating.lk >nul 2>nul
|
||||
del updating.lk >nul 2>nul
|
||||
rmdir /q gamefolder
|
||||
mklink /d gamefolder gamecode\%AB% >nul
|
||||
python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job finished. Update will take place next round." >nul 2>nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job finished. Update will take place next round." >nul 2>nul
|
||||
echo Done. The update will automatically take place at round restart.
|
||||
timeout 300
|
||||
@@ -0,0 +1,121 @@
|
||||
@echo off
|
||||
title Server Updater
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
set HOME = %USERPROFILE%
|
||||
|
||||
call config.bat
|
||||
rem if the first arg to nudge.py is not a channel, it is treated as the "source"
|
||||
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"
|
||||
call bin\getcurdate.bat
|
||||
call bin\findgit.bat
|
||||
echo This will handle Resetting the repo downloading from git, merging the pr locally, compiling the server, and applying the PR test job.
|
||||
|
||||
:PROMPT
|
||||
SET /P UserInput=Please enter the pr number (without a # or anything of the sorts):
|
||||
SET /A PR=UserInput
|
||||
|
||||
if %PR% EQU %UserInput% (
|
||||
if %PR% GTR 0 (
|
||||
echo updating to pr %PR%
|
||||
) else (
|
||||
echo Bad input
|
||||
goto PROMPT
|
||||
)
|
||||
) else (
|
||||
echo Bad input
|
||||
goto PROMPT
|
||||
)
|
||||
if exist updating.lk (
|
||||
echo ERROR: A current update script has been detected running. if you know this is a mistake:
|
||||
pause
|
||||
echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
|
||||
pause
|
||||
)
|
||||
|
||||
echo lock>updating.lk
|
||||
<nul set /p TRIM="set PR=" > bin/activepr.bat
|
||||
del /F /Q prtestjob.lk >nul 2>nul
|
||||
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "PR test job started. Updating master and merging PR #%PR% locally" >nul 2>nul
|
||||
|
||||
call bin\updategit.bat
|
||||
if %GIT_EXIT% neq 0 (
|
||||
echo git pull failed. Aborting update
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Git fetch failed. Aborting update"
|
||||
del updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if defined PUSHCHANGELOGTOGIT (
|
||||
cd gitrepo
|
||||
echo compiling change log
|
||||
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
if !ERRORLEVEL! == 0 (
|
||||
echo pushing compiled changelog to server
|
||||
git add -u html/changelog.html
|
||||
git add -u html/changelogs
|
||||
git commit -m "Automatic changelog compile, [ci skip]"
|
||||
if !ERRORLEVEL! == 0 (
|
||||
git push
|
||||
)
|
||||
REM an error here generally means there was nothing to commit.
|
||||
)
|
||||
cd ..
|
||||
)
|
||||
|
||||
cd gitrepo
|
||||
git fetch origin pull/%PR%/head:pr-%PR%
|
||||
git merge pr-%PR%
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
git reset --hard
|
||||
git clean -fd
|
||||
cd ..
|
||||
echo git merge of PR #%PR% failed. Aborting test merge.
|
||||
echo An update was successfully preformed but not applied, if you want you can apply it by running recompile.bat
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "git merge of PR #%PR% failed. Aborting PR test job" >nul 2>nul
|
||||
del updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
cd ..
|
||||
|
||||
echo %PR%>prtestjob.lk
|
||||
<nul set /p TRIM=%PR% >> bin/activepr.bat
|
||||
|
||||
echo ##################################
|
||||
echo ##################################
|
||||
echo:
|
||||
echo Updating to pr done, compiling in 10 seconds. If you want to preform other actions (like more test merges) You can close this now and do them.
|
||||
echo:
|
||||
del updating.lk >nul 2>nul
|
||||
|
||||
timeout 10
|
||||
|
||||
echo lock>updating.lk
|
||||
call bin\findab.bat
|
||||
|
||||
call bin\copyfromgit.bat
|
||||
|
||||
|
||||
echo compiling change log (again)
|
||||
cd gamecode\%AB%
|
||||
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
|
||||
cd ..\..
|
||||
|
||||
echo Compiling game.
|
||||
call bin\build.bat
|
||||
if %DM_EXIT% neq 0 (
|
||||
echo DM compile failed. Aborting.
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed. Aborting test merge." >nul 2>nul
|
||||
del /F /Q updating.lk >nul 2>nul
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
del updating.lk >nul 2>nul
|
||||
rmdir /q gamefolder
|
||||
mklink /d gamefolder gamecode\%AB% >nul
|
||||
call python bot\nudge.py %UPDATE_LOG_CHANNEL% "Test merge job finished. Test merge will take place next round." >nul 2>nul
|
||||
echo Done. The test merge will automatically take place at round restart.
|
||||
timeout 300
|
||||