Merge pull request #1 from ParadiseSS13/master

Downstream merge
This commit is contained in:
Bone-White
2015-01-11 17:36:57 +00:00
138 changed files with 10017 additions and 42736 deletions
+3
View File
@@ -134,6 +134,9 @@
/obj/item/tape/attack_paw(mob/user as mob)
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/attack_alien(mob/user as mob)
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
@@ -250,7 +250,7 @@
if(new_slime.client)
if(babies.len)
var/list/candidates = get_slime_candidates()
var/list/candidates = get_candidates(BE_SLIME)
if(candidates.len)
var/mob/dead/observer/picked = pick(candidates)
var/mob/living/carbon/slime/S = pick(babies)
+9 -72
View File
@@ -311,81 +311,18 @@ proc/isInSight(var/atom/A, var/atom/B)
return M
return null
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
/proc/get_active_candidates(var/buffer = 1)
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien
/proc/get_candidates(be_special_flag=0, afk_bracket=3000)
var/list/candidates = list()
// Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000))
while(!candidates.len && afk_bracket < 6000)
for(var/mob/dead/observer/G in player_list)
if(G.client != null)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
if(!G.client.is_afk(afk_bracket) && (G.client.prefs.be_special & be_special_flag))
candidates += G.client
afk_bracket += 600 // Add a minute to the bracket, for every attempt
return candidates
// Same as above but for alien candidates.
/proc/get_alien_candidates()
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if( G.client && G.client.prefs.be_special & BE_ALIEN)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
return candidates
/proc/get_blob_candidates()
var/list/candidates = list() //List of candidate KEYS to assume control of the new blob core ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if( G.client && G.client.prefs.be_special & BE_BLOB)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
return candidates
/proc/get_vox_candidates()
var/list/candidates = list() //List of candidate KEYS to assume control of the new blob core ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if( G.client && G.client.prefs.be_special & BE_VOX)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
return candidates
/proc/get_slime_candidates()
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/G in respawnable_list)
if( G.client && G.client.prefs.be_special & BE_SLIME)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become a slime
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
return candidates
proc/get_candidates(be_special_flag=0)
. = list()
for(var/mob/G in respawnable_list)
if(G)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
. += G.client
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
if(!isobj(O)) O = new /obj/screen/text()
O.maptext = maptext
+3 -1
View File
@@ -43,10 +43,12 @@ var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None")
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
var/global/list/underwear_list = underwear_m + underwear_f
//undershirt
var/global/list/undershirt_t = list("White Shirt", "White Tank top", "Black shirt", "Black Tank top", "Grey Shirt", "Grey tank top", "Lover Shirt", "Blue Ian Shirt", "UK Shirt","I Love NT Shirt", "Peace Shirt", "Band Shirt", "PogoMan Shirt", "Matroska Shirt", "White Short-sleeved shirt", "Purple Short-sleeved shirt", "Blue Short-sleeved shirt", "Green Short-sleeved shirt", "Black Short-Sleeved shirt", "Blue T-Shirt", "Red T-Shirt", "Yellow T-Shirt", "Green T-Shirt", "Blue Polo Shirt", "Red Polo Shirt", "White Polo Shirt", "Gray-Yellow Polo Shirt", "Green Sports Shirt", "Red Sports Shirt", "Blue Sports Shirt", "SS13 Shirt", "Fire Tank Top", "Question Shirt", "Skull Shirt", "Commie Shirt", "Nanotrasen Shirt", "Striped Shirt", "Blue Shirt", "Red Shirt", "Green Shirt", "Meat Shirt", "Tie-Dye Shirt", "Red Jersey", "Blue Jersey", "None")
var/global/list/undershirt_list = undershirt_t
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
+7 -1
View File
@@ -51,7 +51,13 @@ proc/random_facial_hair_style(gender, species = "Human")
proc/random_name(gender, speciesName = "Human")
var/datum/species/S = all_species[speciesName]
return S.makeName(gender)
if(S)
return S.makeName(gender)
else
if(gender==FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
proc/random_skin_tone()
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
+9
View File
@@ -41,6 +41,15 @@
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
index = findtext(t, char)
return t
/proc/readd_quotes(var/t)
var/list/repl_chars = list("&#34;" = "\"")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
index = findtext(t, char)
return t
//Runs byond's sanitization proc along-side sanitize_simple
/proc/sanitize(var/t,var/list/repl_chars = null)
+1 -1
View File
@@ -494,7 +494,7 @@
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
set category = "OOC"
set name = "Toggle hotkey buttons"
set name = "Toggle Hotkey Buttons"
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
if(hud_used.hotkey_ui_hidden)
+1 -1
View File
@@ -132,7 +132,7 @@
var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
var/assistant_maint = 0 //Do assistants get maint access?
var/gateway_delay = 9000 //How long the gateway takes before it activates. Default is half an hour.
var/gateway_delay = 6000 //How long the gateway takes before it activates. Default is half an hour.
var/ghost_interaction = 0
var/comms_password = ""
-2
View File
@@ -60,10 +60,8 @@ datum/controller/game_controller/New()
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
/* //Do we even need this if we only have a single away mission loaded? Don't think so!
spawn(20)
createRandomZlevel()
*/
if(!air_master)
air_master = new /datum/controller/air_system()
+1 -1
View File
@@ -213,7 +213,7 @@ var/global/datum/shuttle_controller/shuttle_controller
"Fore Port Solars" = locate(/area/vox_station/northwest_solars),
"Aft Starboard Solars" = locate(/area/vox_station/southeast_solars),
"Aft Port Solars" = locate(/area/vox_station/southwest_solars),
"Mining asteroid" = locate(/area/vox_station/mining)
"Mining Asteroid" = locate(/area/vox_station/mining)
)
VS.announcer = "NSV Icarus"
+92 -32
View File
@@ -492,27 +492,6 @@ var/list/ghostteleportlocs = list()
name = "\improper Asteroid - Artifact"
icon_state = "cave"
/area/planet/clown
name = "\improper Clown Planet"
icon_state = "honk"
luminosity = 1
lighting_use_dynamic = 0
requires_power = 0
/area/tdome
name = "\improper Thunderdome"
icon_state = "thunder"
@@ -2310,23 +2289,104 @@ area/security/podbay
H << S
spawn(60) .()
////////////////////////AWAY AREAS///////////////////////////////////
/area/awaycontent
name = "space"
////////////////////////CLOWN PLANET///////////////////////////////////
/area/awaycontent/a1
icon_state = "awaycontent1"
/area/awaycontent/a2
icon_state = "awaycontent2"
/area/awaymission/clownplanet/miningtown
name = "\improper Clown Planet - Bananium-o-Rama"
icon_state = "away1"
luminosity = 1
requires_power = 0
/area/awaycontent/a3
icon_state = "awaycontent3"
/area/awaymission/clownplanet/mine
name = "\improper Clown Planet - Bananium-o-Rama Mines"
icon_state = "away2"
luminosity = 1
requires_power = 0
/area/awaycontent/a4
icon_state = "awaycontent4"
/area/awaycontent/a5
icon_state = "awaycontent5"
/area/awaycontent/a6
icon_state = "awaycontent6"
/area/awaycontent/a7
icon_state = "awaycontent7"
/area/awaycontent/a8
icon_state = "awaycontent8"
/area/awaycontent/a9
icon_state = "awaycontent9"
/area/awaycontent/a10
icon_state = "awaycontent10"
/area/awaycontent/a11
icon_state = "awaycontent11"
/area/awaycontent/a11
icon_state = "awaycontent12"
/area/awaycontent/a12
icon_state = "awaycontent13"
/area/awaycontent/a13
icon_state = "awaycontent14"
/area/awaycontent/a14
icon_state = "awaycontent14"
/area/awaycontent/a15
icon_state = "awaycontent15"
/area/awaycontent/a16
icon_state = "awaycontent16"
/area/awaycontent/a17
icon_state = "awaycontent17"
/area/awaycontent/a18
icon_state = "awaycontent18"
/area/awaycontent/a19
icon_state = "awaycontent19"
/area/awaycontent/a20
icon_state = "awaycontent20"
/area/awaycontent/a21
icon_state = "awaycontent21"
/area/awaycontent/a22
icon_state = "awaycontent22"
/area/awaycontent/a23
icon_state = "awaycontent23"
/area/awaycontent/a24
icon_state = "awaycontent24"
/area/awaycontent/a25
icon_state = "awaycontent25"
/area/awaycontent/a26
icon_state = "awaycontent26"
/area/awaycontent/a27
icon_state = "awaycontent27"
/area/awaycontent/a28
icon_state = "awaycontent28"
/area/awaycontent/a29
icon_state = "awaycontent29"
/area/awaycontent/a30
icon_state = "awaycontent30"
/////////////////////////////////////////////////////////////////////
/*
+12
View File
@@ -64,6 +64,18 @@
component_parts += new /obj/item/stack/cable_coil(src, 1)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/dna_scannernew/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonescanner(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module/phasic(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/dna_scannernew/RefreshParts()
scan_level = 0
+1 -1
View File
@@ -181,7 +181,7 @@
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = get_alien_candidates()
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)
+12 -8
View File
@@ -68,12 +68,12 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
//=======//9-8 TILE TELEPORT//=======//
//Click to to teleport 9-10 tiles in direction facing.
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
set name = "Phase Jaunt (500E)"
set name = "Phase Jaunt (750E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 500
var/C = 750
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
@@ -108,12 +108,12 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
//=======//RIGHT CLICK TELEPORT//=======//
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
set name = "Phase Shift (750E)"
set name = "Phase Shift (1500E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
var/C = 750
var/C = 1500
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
@@ -145,29 +145,33 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
//=======//EM PULSE//=======//
//Disables nearby tech equipment.
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
set name = "EM Burst (1,000E)"
set name = "EM Burst (1,500E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 1000
var/C = 1500
if(!ninjacost(C, 1))
var/mob/living/carbon/human/U = affecting
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
emp_proof = 1 // This is a pretty crappy workaround, but the alternative was creating a special EMPulse proc just for Ninjas that doesn't trigger the act on their suits. - Dave
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
s_coold = 2
cell.charge-=(C)
spawn(3)
emp_proof = 0
return
//=======//ENERGY BLADE//=======//
//Summons a blade of energy in active hand.
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
set name = "Energy Blade (200E)"
set name = "Energy Blade (500E)"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 200
var/C = 500
if(!ninjacost(C, 1))
var/mob/living/carbon/human/U = affecting
if(!kamikaze)
+52 -31
View File
@@ -931,10 +931,10 @@ ________________________________________________________________________________
U:gloves.icon_state = "s-ninjas"
U:gloves.item_state = "s-ninjas"
U.regenerate_icons() //update their icons
U << "\blue You are now invisible to normal detection."
U << "\blue You are now partially invisible to normal detection."
for(var/mob/O in oviewers(U))
O.show_message("[U.name] vanishes into thin air!",1)
U.invisibility = INVISIBILITY_OBSERVER
U.alpha = 7
else
U << "\red <b>ERROR</b>: \black You cannot cloak with an active energy blade."
return
@@ -945,7 +945,7 @@ ________________________________________________________________________________
anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir)
s_active=!s_active
U << "\blue You are now visible."
U.invisibility = 0
U.alpha = 255
for(var/mob/O in oviewers(U))
O.show_message("[U.name] appears from thin air!",1)
icon_state = U.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
@@ -991,6 +991,54 @@ ________________________________________________________________________________
else
U << "rrR aa No-- fN 3RRr"
/obj/item/clothing/suit/space/space_ninja/emp_act(severity, var/recursion_level = 0)
if(s_initialized && emp_proof == 0) // If the suit is initialized and vulnerable to EMP, we're in business.
if(s_active) // EMP will always reveal a stealthed Ninja
cancel_stealth()
if(istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/U = src.loc
var/emp_result = rand(1,100)
switch(emp_result)
if(1 to 30) // Blindness, Ninja is blidned for approximately ten seconds.
U << "\red Your mask's visor overloads and blinds you!"
U.eye_blind = 3
U.eye_blurry = 5
U.disabilities |= NEARSIGHTED
spawn(100)
U.disabilities &= ~NEARSIGHTED
return
if(31 to 60) // Slowdown, Ninja moves at standard speeds for approximately thirty seconds.
U << "\red <B>Error</B>: Malfunction detected in movement enhancement systems."
n_shoes.slowdown = -1
spawn(300)
if(s_initialized) // Don't want to reset the shoes to hyperspeed if the suit is off, eh?
n_shoes.slowdown = -2
return
if(61 to 80) // Energy Loss, Ninja loses 1/5 of his energy reserves, or goes to zero if he would have negative energy.
U << "\red <B>Error</B>: Signifigant energy failure detected."
if (cell.charge - (cell.charge / 5) < 0) // Ensures the Ninja does not go into energy-debt.
cell.charge = 0
else
cell.charge -= (cell.charge / 5)
return
if(81 to 90) // System Shutdown, Ninja suit immediately begins shut down. Bad news.
U << "<B>DANGER</B>: Core system reboot forced!"
deinitialize()
return
if(91 to 100) // Double Up, Two EMP acts are proc'd instead of one.
if(recursion_level == 0) // The purpose of the recursion level is to stop a situation in which RNG hates the Ninja a lot, and starts calling absurd amounts of emp_act.
emp_act(2, 1)
emp_act(2, 1)
return
/*
===================================================================================
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<SPACE NINJA GLOVES>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -1130,7 +1178,7 @@ ________________________________________________________________________________
spawn(0)
var/turf/location = get_turf(U)
for(var/mob/living/silicon/ai/AI in player_list)
AI << "\red <b>Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]</b>."
AI << "\red <b>Network Alert: Hacking attempt detected[location?" in [location.loc.name]":". Unable to pinpoint location"]</b>."
if(A:files&&A:files.known_tech.len)
for(var/datum/tech/current_data in S.stored_research)
U << "\blue Checking \the [current_data.name] database."
@@ -1362,33 +1410,6 @@ ________________________________________________________________________________
usr << "<B>[mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
/*
=======================================================================================
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<SPACE NINJA HACKBUG>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
=======================================================================================
*/
/*
Currently WIP, once finished they will, in theory, allow the Ninja to plant bugs on Computers/APCs/SMES units.
Possibly more later, but for now I want to get basic function working.
*/
/obj/item/weapon/hackbug
name = "hack-bug"
desc = "A strange device. Where did this even come from?"
gender = PLURAL
icon = 'icons/obj/ninjaobjects.dmi'
icon_state = "hackbug"
flags = FPRINT | TABLEPASS | USEDELAY
w_class = 1.0
/obj/item/weapon/hackbug/attack(atom/target as obj|turf, mob/user as mob, flag)
if (!flag)
return
if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/machinery/door/airlock/hatch/gamma))
return
user << "Planting bug..."
target.overlays += image('icons/obj/ninjaobjects.dmi', "compoverlay")
/*
===================================================================================
+21 -1
View File
@@ -345,7 +345,7 @@ Implants;
if(BE_REV) roletext="revolutionary"
if(BE_CULTIST) roletext="cultist"
if(BE_NINJA) roletext="ninja"
if(BE_VOX) roletext="vox"
if(BE_RAIDER) roletext="Vox raider"
// Assemble a list of active players without jobbans.
for(var/mob/new_player/player in player_list)
@@ -551,3 +551,23 @@ proc/get_nt_opposed()
dudes += man
if(dudes.len == 0) return null
return pick(dudes)
//Announces objectives/generic antag text.
/proc/show_generic_antag_text(var/datum/mind/player)
if(player.current)
player.current << \
"You are an antagonist! <font color=blue>Within the rules,</font> \
try to act as an opposing force to the crew. Further RP and try to make sure \
other players have <i>fun</i>! If you are confused or at a loss, always adminhelp, \
and before taking extreme actions, please try to also contact the administration! \
Think through your actions and make the roleplay immersive! <b>Please remember all \
rules aside from those without explicit exceptions apply to antagonists.</b>"
/proc/show_objectives(var/datum/mind/player)
if(!player || !player.current) return
var/obj_count = 1
player.current << "\blue Your current objectives:"
for(var/datum/objective/objective in player.objectives)
player.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
+5 -1
View File
@@ -37,6 +37,8 @@ var/global/datum/controller/gameticker/ticker
var/triai = 0//Global holder for Triumvirate
var/initialtpass = 0 //holder for inital autotransfer vote timer
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.
/datum/controller/gameticker/proc/pregame()
login_music = pick(\
@@ -419,7 +421,9 @@ var/global/datum/controller/gameticker/ticker
//call a transfer shuttle vote
spawn(50)
world << "\red The round has ended!"
if(!round_end_announced) // Spam Prevention. Now it should announce only once.
world << "\red The round has ended!"
round_end_announced = 1
vote.autotransfer()
return 1
@@ -2,36 +2,40 @@
VOX HEIST ROUNDTYPE
*/
var/global/list/raider_spawn = list()
var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective. Clumsy, rewrite sometime.
/datum/game_mode/
var/list/datum/mind/raiders = list() //Antags.
var/list/raid_objectives = list() //Raid objectives
/datum/game_mode/vox/heist
/datum/game_mode/heist
name = "heist"
config_tag = "heist"
required_players = 15
required_players_secret = 15
required_players_secret = 25
required_enemies = 4
recommended_enemies = 5
recommended_enemies = 6
votable = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective.
var/list/raid_objectives = list() //Raid objectives.
/datum/game_mode/vox/heist/announce()
/datum/game_mode/heist/announce()
world << "<B>The current game mode is - Heist!</B>"
world << "<B>An unidentified bluespace signature has slipped past the Icarus and is approaching [station_name()]!</B>"
world << "Whoever they are, they're likely up to no good. Protect the crew and station resources against this dastardly threat!"
world << "<B>Raiders:</B> Loot [station_name()] for anything and everything you need."
world << "<B>Personnel:</B> Repel the raiders and their low, low prices and/or crossbows."
world << "<B>Raiders:</B> Loot [station_name()] for anything and everything you need, or choose the peaceful route and attempt to trade with them."
world << "<B>Personnel:</B> Trade with the raiders, or repel them and their low, low prices and/or crossbows."
/datum/game_mode/vox/heist/can_start()
/datum/game_mode/heist/can_start()
if(!..())
return 0
var/list/candidates = get_players_for_role(BE_VOX)
var/list/candidates = get_players_for_role(BE_RAIDER)
var/raider_num = 0
//Check that we have enough vox.
@@ -54,19 +58,10 @@ VOX HEIST ROUNDTYPE
raider.special_role = "Vox Raider"
return 1
/datum/game_mode/vox/heist/pre_setup()
/datum/game_mode/heist/pre_setup()
return 1
/datum/game_mode/vox/heist/post_setup()
//Build a list of spawn points.
var/list/turf/raider_spawn = list()
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
raider_spawn += get_turf(L)
del(L)
continue
/datum/game_mode/heist/post_setup()
//Generate objectives for the group.
raid_objectives = forge_vox_objectives()
@@ -82,37 +77,78 @@ VOX HEIST ROUNDTYPE
raider.current.loc = raider_spawn[index]
index++
var/mob/living/carbon/human/vox = raider.current
raider.name = vox.name
vox.age = rand(12,20)
vox.dna.mutantrace = "vox"
vox.set_species("Vox")
vox.generate_name()
vox.languages = list() // Removing language from chargen.
vox.flavor_text = ""
vox.add_language("Vox-pidgin")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
for(var/datum/organ/external/limb in vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
vox.equip_vox_raider()
vox.regenerate_icons()
raider.objectives = raid_objectives
create_vox(raider)
greet_vox(raider)
if(raid_objectives)
raider.objectives = raid_objectives
spawn (rand(waittime_l, waittime_h))
send_intercept()
/datum/game_mode/proc/create_vox(var/datum/mind/newraider)
/datum/game_mode/vox/heist/proc/forge_vox_objectives()
var/sounds = rand(2,8)
var/i = 0
var/newname = ""
while(i<=sounds)
i++
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))
//Commented out for testing.
/* var/i = 1
var/max_objectives = pick(2,2,2,3,3)
var/mob/living/carbon/human/vox = newraider.current
vox.real_name = capitalize(newname)
vox.name = vox.real_name
newraider.name = vox.name
vox.age = rand(12,20)
vox.dna.mutantrace = "vox"
vox.set_species("Vox")
vox.languages = list() // Removing language from chargen.
vox.flavor_text = ""
vox.add_language("Vox-pidgin")
vox.add_language("Galactic Common")
vox.add_language("Tradeband")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
for(var/datum/organ/external/limb in vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
//Now apply cortical stack.
var/datum/organ/external/E = vox.get_organ("head")
var/obj/item/weapon/implant/cortical/I = new(vox)
I.imp_in = vox
I.implanted = 1
I.part = E
E.implants += I
cortical_stacks += I
vox.equip_vox_raider()
vox.regenerate_icons()
/datum/game_mode/proc/is_raider_crew_safe()
if(cortical_stacks.len == 0)
return 0
for(var/obj/stack in cortical_stacks)
if (get_area(stack) != locate(/area/shuttle/vox/station))
return 0
return 1
/datum/game_mode/proc/is_raider_crew_alive()
for(var/datum/mind/raider in raiders)
if(raider.current)
if(istype(raider.current,/mob/living/carbon/human) && raider.current.stat != 2)
return 1
return 0
/datum/game_mode/proc/forge_vox_objectives()
var/i = 1
var/max_objectives = pick(2,2,2,2,3,3,3,4)
var/list/objs = list()
while(i<= max_objectives)
var/list/goals = list("kidnap","loot","salvage")
@@ -133,32 +169,20 @@ VOX HEIST ROUNDTYPE
//-All- vox raids have these two objectives. Failing them loses the game.
objs += new /datum/objective/heist/inviolate_crew
objs += new /datum/objective/heist/inviolate_death */
objs += new /datum/objective/heist/inviolate_death
if(prob(25))
raid_objectives += new /datum/objective/vox/heist/kidnap
raid_objectives += new /datum/objective/vox/heist/loot
raid_objectives += new /datum/objective/vox/heist/salvage
raid_objectives += new /datum/objective/vox/inviolate_crew
raid_objectives += new /datum/objective/vox/inviolate_death
return objs
for(var/datum/objective/vox/heist/O in raid_objectives)
O.choose_target()
return raid_objectives
/datum/game_mode/vox/heist/proc/greet_vox(var/datum/mind/raider)
/datum/game_mode/proc/greet_vox(var/datum/mind/raider)
raider.current << "\blue <B>You are a Vox Raider, fresh from the Shoal!</b>"
raider.current << "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to Tau Ceti and much of the unexplored galaxy. You and the crew have come to the Exodus for plunder."
raider.current << "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to the frontier and much of the unexplored galaxy. You and the crew have come to the [station_name()] for plunder, trade or both."
raider.current << "\blue Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious."
raider.current << "\blue Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!"
var/obj_count = 1
for(var/datum/objective/objective in raider.objectives)
raider.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
raider.current << "\blue Choose to accomplish your objectives by either raiding the crew and taking what you need, or by attempting to trade with them."
spawn(25)
show_objectives(raider)
/datum/game_mode/vox/heist/declare_completion()
/datum/game_mode/heist/declare_completion()
//No objectives, go straight to the feedback.
if(!(raid_objectives.len)) return ..()
@@ -185,13 +209,13 @@ VOX HEIST ROUNDTYPE
win_group = "Crew"
//Now we modify that result by the state of the vox crew.
if(!is_vox_crew_alive())
if(!is_raider_crew_alive())
win_type = "Major"
win_group = "Crew"
win_msg += "<B>The Vox Raiders have been wiped out!</B>"
else if(!is_vox_crew_safe())
else if(!is_raider_crew_safe())
if(win_group == "Crew" && win_type == "Minor")
win_type = "Major"
@@ -228,7 +252,7 @@ VOX HEIST ROUNDTYPE
datum/game_mode/proc/auto_declare_completion_heist()
if(raiders.len)
var/check_return = 0
if(ticker && istype(ticker.mode,/datum/game_mode/vox/heist))
if(ticker && istype(ticker.mode,/datum/game_mode/heist))
check_return = 1
var/text = "<FONT size = 2><B>The vox raiders were:</B></FONT>"
@@ -253,16 +277,17 @@ datum/game_mode/proc/auto_declare_completion_heist()
world << text
return 1
/datum/game_mode/vox/heist/check_finished()
// DO NOT FORGET TO FIX THIS.
//if (!(is_vox_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
// return 1
/datum/game_mode/heist/check_finished()
var/datum/shuttle/multi_shuttle/skipjack = shuttle_controller.shuttles["Vox Skipjack"]
if (!(is_raider_crew_alive()) || (skipjack && skipjack.returned_home))
return 1
return ..()
/datum/game_mode/vox/heist/proc/is_vox_crew_alive()
for(var/datum/mind/raider in raiders)
if(raider.current)
if(istype(raider.current,/mob/living/carbon/human) && raider.current.stat != 2)
return 1
return 0
/datum/game_mode/heist/cleanup()
//the skipjack and everything in it have left and aren't coming back, so get rid of them.
var/area/skipjack = locate(/area/shuttle/vox/station)
for (var/mob/living/M in skipjack.contents)
//maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that.
del(M)
for (var/obj/O in skipjack.contents)
del(O) //no hiding in lockers or anything
+56 -6
View File
@@ -187,20 +187,70 @@
/datum/game_mode/malfunction/proc/ai_win()
set category = "Malfunction"
set name = "Explode"
set desc = "Station go boom"
if (!ticker.mode:to_nuke_or_not_to_nuke)
set desc = "Engage the self destruct sequence."
if(!ticker.mode:station_captured)
usr << "You are unable to access the self-destruct system as you don't control the station yet."
return
if(ticker.mode:explosion_in_progress || ticker.mode:station_was_nuked)
usr << "The self-destruct countdown is already triggered!"
return
if(!ticker.mode:to_nuke_or_not_to_nuke) //Takeover IS completed, but 60s timer passed.
usr << "You lost control over self-destruct system. It seems to be behind firewall. Unable to hack"
return
usr << "\red Self-destruct sequence initialised!"
ticker.mode:to_nuke_or_not_to_nuke = 0
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
ticker.mode:explosion_in_progress = 1
for(var/mob/M in player_list)
M << 'sound/machines/Alarm.ogg'
world << "Self-destructing in 10"
var/obj/item/device/radio/R = new (src)
var/AN = "Self-Destruct System"
R.autosay("Caution. Self-Destruct sequence has been actived. Self-destructing in Ten..", AN)
for (var/i=9 to 1 step -1)
sleep(10)
world << i
var/msg = ""
switch(i)
if(9)
msg = "Nine.."
if(8)
msg = "Eight.."
if(7)
msg = "Seven.."
if(6)
msg = "Six.."
if(5)
msg = "Five.."
if(4)
msg = "Four.."
if(3)
msg = "Three.."
if(2)
msg = "Two.."
if(1)
msg = "One.."
R.autosay(msg, AN)
sleep(10)
var/msg = ""
var/abort = 0
if(ticker.mode:is_malf_ai_dead()) // That. Was. CLOSE.
msg = "Self-destruct sequence has been cancelled."
abort = 1
else
msg = "Zero. Have a nice day."
R.autosay(msg, AN)
if(abort)
ticker.mode:explosion_in_progress = 0
set_security_level("red") //Delta's over
return
enter_allowed = 0
if(ticker)
ticker.station_explosion_cinematic(0,null)
+183 -1
View File
@@ -737,10 +737,192 @@ datum/objective/blood
else
return 0
// /vg/; Vox Inviolate for humans :V
datum/objective/minimize_casualties
explanation_text = "Minimise casualties."
check_completion()
if(owner.kills.len>5) return 0
return 1
//Vox heist objectives.
datum/objective/heist
proc/choose_target()
return
datum/objective/heist/kidnap
choose_target()
var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
var/list/possible_targets = list()
var/list/priority_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
possible_targets += possible_target
for(var/role in roles)
if(possible_target.assigned_role == role)
priority_targets += possible_target
continue
if(priority_targets.len > 0)
target = pick(priority_targets)
else if(possible_targets.len > 0)
target = pick(possible_targets)
if(target && target.current)
explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take them alive."
else
explanation_text = "Free Objective"
return target
check_completion()
if(target && target.current)
if (target.current.stat == 2)
return 0 // They're dead. Fail.
//if (!target.current.restrained())
// return 0 // They're loose. Close but no cigar.
var/area/shuttle/vox/station/A = locate()
for(var/mob/living/carbon/human/M in A)
if(target.current == M)
return 1 //They're restrained on the shuttle. Success.
else
return 0
datum/objective/heist/loot
choose_target()
var/loot = "an object"
switch(rand(1,8))
if(1)
target = /obj/structure/particle_accelerator
target_amount = 6
loot = "a complete particle accelerator"
if(2)
target = /obj/machinery/the_singularitygen
target_amount = 1
loot = "a gravitational singularity generator"
if(3)
target = /obj/machinery/power/emitter
target_amount = 4
loot = "four emitters"
if(4)
target = /obj/machinery/nuclearbomb
target_amount = 1
loot = "a nuclear bomb"
if(5)
target = /obj/item/weapon/gun
target_amount = 6
loot = "six guns"
if(6)
target = /obj/item/weapon/gun/energy
target_amount = 4
loot = "four energy guns"
if(7)
target = /obj/item/weapon/gun/energy/laser
target_amount = 2
loot = "two laser guns"
if(8)
target = /obj/item/weapon/gun/energy/ionrifle
target_amount = 1
loot = "an ion gun"
explanation_text = "We are lacking in hardware. Steal or trade [loot]."
check_completion()
var/total_amount = 0
for(var/obj/O in locate(/area/shuttle/vox/station))
if(istype(O,target)) total_amount++
for(var/obj/I in O.contents)
if(istype(I,target)) total_amount++
if(total_amount >= target_amount) return 1
var/datum/game_mode/heist/H = ticker.mode
for(var/datum/mind/raider in H.raiders)
if(raider.current)
for(var/obj/O in raider.current.get_contents())
if(istype(O,target)) total_amount++
if(total_amount >= target_amount) return 1
return 0
datum/objective/heist/salvage
choose_target()
switch(rand(1,8))
if(1)
target = "metal"
target_amount = 300
if(2)
target = "glass"
target_amount = 200
if(3)
target = "plasteel"
target_amount = 100
if(4)
target = "solid plasma"
target_amount = 100
if(5)
target = "silver"
target_amount = 50
if(6)
target = "gold"
target_amount = 20
if(7)
target = "uranium"
target_amount = 20
if(8)
target = "diamond"
target_amount = 20
explanation_text = "Ransack or trade with the station and escape with [target_amount] [target]."
check_completion()
var/total_amount = 0
for(var/obj/item/O in locate(/area/shuttle/vox/station))
var/obj/item/stack/sheet/S
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
S = O
total_amount += S.get_amount()
for(var/obj/I in O.contents)
if(istype(I,/obj/item/stack/sheet))
if(I.name == target)
S = I
total_amount += S.get_amount()
var/datum/game_mode/heist/H = ticker.mode
for(var/datum/mind/raider in H.raiders)
if(raider.current)
for(var/obj/item/O in raider.current.get_contents())
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
var/obj/item/stack/sheet/S = O
total_amount += S.get_amount()
if(total_amount >= target_amount) return 1
return 0
datum/objective/heist/inviolate_crew
explanation_text = "Do not leave any Vox behind, alive or dead."
check_completion()
var/datum/game_mode/heist/H = ticker.mode
if(H.is_raider_crew_safe()) return 1
return 0
#define MAX_VOX_KILLS 10 //Number of kills during the round before the Inviolate is broken.
//Would be nice to use vox-specific kills but is currently not feasible.
var/global/vox_kills = 0 //Used to check the Inviolate.
datum/objective/heist/inviolate_death
explanation_text = "Follow the Inviolate. Minimise death and loss of resources."
check_completion()
if(vox_kills > MAX_VOX_KILLS) return 0
return 1
-242
View File
@@ -1,242 +0,0 @@
/*
VOX TRADE ROUNDTYPE
*/
/datum/game_mode/
var/list/datum/mind/traders = list() //Antags.
/datum/game_mode/vox/trade
name = "trade"
config_tag = "trade"
required_players = 15
required_players_secret = 15
required_enemies = 3
recommended_enemies = 3
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/list/trade_objectives = list() //Trade objectives.
/datum/game_mode/vox/trade/announce()
world << "<B>The current game mode is - Traders!</B>"
world << "<B>An unidentified bluespace signature has slipped past the Icarus and is approaching [station_name()]!</B>"
world << "Whoever they are, they're likely up to no good. Protect the crew and station resources against this dastardly threat!"
world << "<B>Traders:</B> Trade with [station_name()] for anything and everything you need."
world << "<B>Personnel:</B> Perform your duties normally, earn extra cash to trade with the Vox."
/datum/game_mode/vox/trade/can_start()
if(!..())
return 0
var/list/candidates = get_players_for_role(BE_VOX)
var/trader_num = 0
//Check that we have enough vox.
if(candidates.len < required_enemies)
return 0
else if(candidates.len < recommended_enemies)
trader_num = candidates.len
else
trader_num = recommended_enemies
//Grab candidates randomly until we have enough.
while(trader_num > 0)
var/datum/mind/new_trader = pick(candidates)
traders += new_trader
candidates -= new_trader
trader_num--
for(var/datum/mind/trader in traders)
trader.assigned_role = "MODE"
trader.special_role = "Vox Traders"
return 1
/datum/game_mode/vox/trade/pre_setup()
return 1
/datum/game_mode/vox/trade/post_setup()
//Build a list of spawn points.
var/list/turf/trader_spawn = list()
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
trader_spawn += get_turf(L)
del(L)
continue
//Generate objectives for the group.
trade_objectives = forge_vox_objectives()
var/index = 1
//Spawn the vox!
for(var/datum/mind/trader in traders)
if(index > trader_spawn.len)
index = 1
trader.current.loc = trader_spawn[index]
index++
var/mob/living/carbon/human/vox = trader.current
trader.name = vox.name
vox.age = rand(12,20)
vox.dna.mutantrace = "vox"
vox.set_species("Vox")
vox.generate_name()
vox.languages = list() // Removing language from chargen.
vox.flavor_text = ""
vox.add_language("Vox-pidgin")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
for(var/datum/organ/external/limb in vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
vox.equip_vox_raider()
vox.regenerate_icons()
trader.objectives = trade_objectives
greet_vox(trader)
spawn (rand(waittime_l, waittime_h))
send_intercept()
/datum/game_mode/vox/trade/proc/forge_vox_objectives()
trade_objectives += new /datum/objective/vox/trade/raw_materials
trade_objectives += new /datum/objective/vox/trade/trade
trade_objectives += new /datum/objective/vox/inviolate_crew
trade_objectives += new /datum/objective/vox/inviolate_death
for(var/datum/objective/vox/trade/O in trade_objectives)
O.choose_target()
return trade_objectives
/datum/game_mode/vox/trade/proc/greet_vox(var/datum/mind/trader)
trader.current << "\blue <B>You are a Vox Trader, fresh from the Shoal!</b>"
trader.current << "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to Tau Ceti and much of the unexplored galaxy. You and the crew have come to the Exodus for trade."
trader.current << "\blue Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious."
trader.current << "\blue Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!"
var/obj_count = 1
for(var/datum/objective/objective in trader.objectives)
trader.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
/datum/game_mode/vox/trade/declare_completion()
//No objectives, go straight to the feedback.
if(!(trade_objectives.len)) return ..()
var/win_type = "Major"
var/win_group = "Crew"
var/win_msg = ""
var/success = trade_objectives.len
//Decrease success for failed objectives.
for(var/datum/objective/O in trade_objectives)
if(!(O.check_completion())) success--
//Set result by objectives.
if(success == trade_objectives.len)
win_type = "Major"
win_group = "Vox"
else if(success > 2)
win_type = "Minor"
win_group = "Vox"
else
win_type = "Minor"
win_group = "Crew"
//Now we modify that result by the state of the vox crew.
if(!is_vox_crew_alive())
win_type = "Major"
win_group = "Crew"
win_msg += "<B>The Vox Traders have been wiped out!</B>"
else if(!is_vox_crew_safe())
if(win_group == "Crew" && win_type == "Minor")
win_type = "Major"
win_group = "Crew"
win_msg += "<B>The Vox Traders have left someone behind!</B>"
else
if(win_group == "Vox")
if(win_type == "Minor")
win_type = "Major"
win_msg += "<B>The Vox Traders escaped the station!</B>"
else
win_msg += "<B>The Vox Traders were repelled!</B>"
world << "\red <FONT size = 3><B>[win_type] [win_group] victory!</B></FONT>"
world << "[win_msg]"
feedback_set_details("round_end_result","trade - [win_type] [win_group]")
var/count = 1
for(var/datum/objective/objective in trade_objectives)
if(objective.check_completion())
world << "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
else
world << "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("traitor_objective","[objective.type]|FAIL")
count++
..()
datum/game_mode/proc/auto_declare_completion_trade()
if(traders.len)
var/check_return = 0
if(ticker && istype(ticker.mode,/datum/game_mode/vox/trade))
check_return = 1
var/text = "<FONT size = 2><B>The vox traders were:</B></FONT>"
for(var/datum/mind/vox in traders)
text += "<br>[vox.key] was [vox.name] ("
if(check_return)
var/obj/stack = traders[vox]
if(get_area(stack) != locate(/area/shuttle/vox/station))
text += "left behind)"
continue
if(vox.current)
if(vox.current.stat == DEAD)
text += "died"
else
text += "survived"
if(vox.current.real_name != vox.name)
text += " as [vox.current.real_name]"
else
text += "body destroyed"
text += ")"
world << text
return 1
/datum/game_mode/vox/trade/check_finished()
// if (!(is_vox_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
// return 1
return ..()
/datum/game_mode/vox/trade/proc/is_vox_crew_alive()
for(var/datum/mind/trader in traders)
if(trader.current)
if(istype(trader.current,/mob/living/carbon/human) && trader.current.stat != 2)
return 1
return 0
-324
View File
@@ -1,324 +0,0 @@
#define MAX_VOX_KILLS 10 //Number of kills during the round before the Inviolate is broken.
//Would be nice to use vox-specific kills but is currently not feasible.
var/global/vox_kills = 0 //Used to check the Inviolate.
/datum/game_mode/
var/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective.
//Vox global procs
/datum/game_mode/vox/proc/is_vox_crew_safe()
if(cortical_stacks.len == 0)
return 0
for(var/obj/stack in cortical_stacks)
if (get_area(stack) != locate(/area/shuttle/vox/station))
return 0
return 1
//Vox global objectives.
datum/objective/vox
proc/choose_target()
return
datum/objective/vox/inviolate_crew
explanation_text = "Do not leave any Vox behind, alive or dead."
check_completion()
var/datum/game_mode/vox/H = ticker.mode
if(H.is_vox_crew_safe()) return 1
return 0
datum/objective/vox/inviolate_death
explanation_text = "Follow the Inviolate. Minimise death and loss of resources."
check_completion()
if(vox_kills>5) return 0
return 1
//Vox heist objectives.
datum/objective/vox/heist/kidnap
choose_target()
var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
var/list/possible_targets = list()
var/list/priority_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
possible_targets += possible_target
for(var/role in roles)
if(possible_target.assigned_role == role)
priority_targets += possible_target
continue
if(priority_targets.len > 0)
target = pick(priority_targets)
else if(possible_targets.len > 0)
target = pick(possible_targets)
if(target && target.current)
explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take them alive."
else
explanation_text = "Free Objective"
return target
check_completion()
if(target && target.current)
if (target.current.stat == 2)
return 0 // They're dead. Fail.
//if (!target.current.restrained())
// return 0 // They're loose. Close but no cigar.
var/area/shuttle/vox/station/A = locate()
for(var/mob/living/carbon/human/M in A)
if(target.current == M)
return 1 //They're restrained on the shuttle. Success.
else
return 0
datum/objective/vox/heist/loot
choose_target()
var/loot = "an object"
switch(rand(1,8))
if(1)
target = /obj/structure/particle_accelerator
target_amount = 6
loot = "a complete particle accelerator"
if(2)
target = /obj/machinery/the_singularitygen
target_amount = 1
loot = "a gravitational singularity generator"
if(3)
target = /obj/machinery/power/emitter
target_amount = 4
loot = "four emitters"
if(4)
target = /obj/machinery/nuclearbomb
target_amount = 1
loot = "a nuclear bomb"
if(5)
target = /obj/item/weapon/gun
target_amount = 6
loot = "six guns"
if(6)
target = /obj/item/weapon/gun/energy
target_amount = 4
loot = "four energy guns"
if(7)
target = /obj/item/weapon/gun/energy/laser
target_amount = 2
loot = "two laser guns"
if(8)
target = /obj/item/weapon/gun/energy/ionrifle
target_amount = 1
loot = "an ion gun"
explanation_text = "We are lacking in hardware. Steal [loot]."
check_completion()
var/total_amount = 0
for(var/obj/O in locate(/area/shuttle/vox/station))
if(istype(O,target)) total_amount++
for(var/obj/I in O.contents)
if(istype(I,target)) total_amount++
if(total_amount >= target_amount) return 1
var/datum/game_mode/vox/heist/H = ticker.mode
for(var/datum/mind/raider in H.raiders)
if(raider.current)
for(var/obj/O in raider.current.get_contents())
if(istype(O,target)) total_amount++
if(total_amount >= target_amount) return 1
return 0
datum/objective/vox/heist/salvage
choose_target()
switch(rand(1,8))
if(1)
target = "metal"
target_amount = 300
if(2)
target = "glass"
target_amount = 200
if(3)
target = "plasteel"
target_amount = 100
if(4)
target = "plasma"
target_amount = 100
if(5)
target = "silver"
target_amount = 50
if(6)
target = "gold"
target_amount = 20
if(7)
target = "uranium"
target_amount = 20
if(8)
target = "diamond"
target_amount = 20
explanation_text = "Ransack the station and escape with [target_amount] [target]."
check_completion()
var/total_amount = 0
for(var/obj/item/O in locate(/area/shuttle/vox/station))
var/obj/item/stack/sheet/S
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
S = O
total_amount += S.amount
for(var/obj/I in O.contents)
if(istype(I,/obj/item/stack/sheet))
if(I.name == target)
S = I
total_amount += S.amount
var/datum/game_mode/vox/heist/H = ticker.mode
for(var/datum/mind/raider in H.raiders)
if(raider.current)
for(var/obj/item/O in raider.current.get_contents())
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
var/obj/item/stack/sheet/S = O
total_amount += S.amount
if(total_amount >= target_amount) return 1
return 0
//Vox Trade Objectives
datum/objective/vox/trade/trade
choose_target()
var/loot = "an object"
switch(rand(1,8))
if(1)
target = /obj/structure/particle_accelerator
target_amount = 6
loot = "a complete particle accelerator"
if(2)
target = /obj/machinery/the_singularitygen
target_amount = 1
loot = "a gravitational singularity generator"
if(3)
target = /obj/machinery/power/emitter
target_amount = 4
loot = "four emitters"
if(4)
target = /obj/machinery/nuclearbomb
target_amount = 1
loot = "a nuclear bomb"
if(5)
target = /obj/item/weapon/gun
target_amount = 6
loot = "six guns"
if(6)
target = /obj/item/weapon/gun/energy
target_amount = 4
loot = "four energy guns"
if(7)
target = /obj/item/weapon/gun/energy/laser
target_amount = 2
loot = "two laser guns"
if(8)
target = /obj/item/weapon/gun/energy/ionrifle
target_amount = 1
loot = "an ion gun"
explanation_text = "We are lacking in hardware. Trade for [loot]."
check_completion()
var/total_amount = 0
for(var/obj/O in locate(/area/shuttle/vox/station))
if(istype(O,target)) total_amount++
for(var/obj/I in O.contents)
if(istype(I,target)) total_amount++
if(total_amount >= target_amount) return 1
var/datum/game_mode/vox/trade/H = ticker.mode
for(var/datum/mind/trader in H.traders)
if(trader.current)
for(var/obj/O in trader.current.get_contents())
if(istype(O,target)) total_amount++
if(total_amount >= target_amount) return 1
return 0
datum/objective/vox/trade/raw_materials
choose_target()
switch(rand(1,8))
if(1)
target = "metal"
target_amount = 300
if(2)
target = "glass"
target_amount = 200
if(3)
target = "plasteel"
target_amount = 100
if(4)
target = "plasma"
target_amount = 100
if(5)
target = "silver"
target_amount = 50
if(6)
target = "gold"
target_amount = 20
if(7)
target = "uranium"
target_amount = 20
if(8)
target = "diamond"
target_amount = 20
explanation_text = "Trade with the crew for [target_amount] [target]."
check_completion()
var/total_amount = 0
for(var/obj/item/O in locate(/area/shuttle/vox/station))
var/obj/item/stack/sheet/S
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
S = O
total_amount += S.amount
for(var/obj/I in O.contents)
if(istype(I,/obj/item/stack/sheet))
if(I.name == target)
S = I
total_amount += S.amount
var/datum/game_mode/vox/trade/H = ticker.mode
for(var/datum/mind/trader in H.traders)
if(trader.current)
for(var/obj/item/O in trader.current.get_contents())
if(istype(O,/obj/item/stack/sheet))
if(O.name == target)
var/obj/item/stack/sheet/S = O
total_amount += S.amount
if(total_amount >= target_amount) return 1
return 0
+1
View File
@@ -105,6 +105,7 @@
//The Syndicate
/var/const/access_syndicate = 150//General Syndicate Access
/var/const/access_syndicate_leader = 151//Nuke Op Leader Access
/var/const/access_vox = 152//Vox Access
//MONEY
/var/const/access_crate_cash = 200
+9
View File
@@ -238,6 +238,15 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/sleeper/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/sleeper/RefreshParts()
var/E
+13
View File
@@ -44,6 +44,19 @@
component_parts += new /obj/item/stack/cable_coil(src, 1)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/clonepod/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module/phasic(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module/phasic(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/clonepod/RefreshParts()
speed_coeff = 0
+1 -1
View File
@@ -7,7 +7,7 @@
explosion_resistance = 25
/obj/machinery/door/poddoor/preopen
icon_state = "open"
icon_state = "pdoor0"
density = 0
opacity = 0
+5
View File
@@ -7,6 +7,11 @@
/obj/machinery/door/poddoor/shutters/New()
..()
layer = 3.1
/obj/machinery/door/poddoor/shutters/preopen
icon_state = "shutter0"
density = 0
opacity = 0
/obj/machinery/door/poddoor/shutters/attackby(obj/item/weapon/C as obj, mob/user as mob)
add_fingerprint(user)
+9
View File
@@ -141,6 +141,15 @@
update_icon()
if(closed_system)
flags &= ~OPENCONTAINER
/obj/machinery/portable_atmospherics/hydroponics/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/hydroponics(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/portable_atmospherics/hydroponics/RefreshParts()
var/tmp_capacity = 0
+11 -1
View File
@@ -49,7 +49,17 @@
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/stack/cable_coil(null, 2)
RefreshParts()
RefreshParts()
/obj/machinery/microwave/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/microwave(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/stack/cable_coil(null, 2)
RefreshParts()
/obj/machinery/microwave/RefreshParts()
var/E
+10 -5
View File
@@ -279,6 +279,16 @@
component_parts += new /obj/item/bluespace_crystal/artificial(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
RefreshParts()
/obj/machinery/teleport/hub/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/teleporter_hub(null)
component_parts += new /obj/item/bluespace_crystal/artificial(null)
component_parts += new /obj/item/bluespace_crystal/artificial(null)
component_parts += new /obj/item/bluespace_crystal/artificial(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
RefreshParts()
/obj/machinery/teleport/hub/initialize()
link_power_station()
@@ -350,11 +360,6 @@
else
icon_state = "tele0"
/obj/machinery/teleport/hub/syndicate/New()
..()
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
RefreshParts()
/obj/machinery/teleport/station
name = "station"
desc = "The power control station for a bluespace teleporter."
+12
View File
@@ -38,6 +38,18 @@
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
recharging_turf = get_step(loc, dir)
/obj/machinery/mech_bay_recharge_port/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mech_recharger(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/mech_bay_recharge_port/RefreshParts()
var/MC
@@ -398,4 +398,27 @@
icon_state = "floor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
/obj/effect/decal/cleanable/blood/old
name = "dried blood"
desc = "Looks like it's been here a while. Eew."
/obj/effect/decal/cleanable/blood/old/New()
..()
icon_state += "-old"
/obj/effect/decal/cleanable/blood/gibs/old
name = "old rotting gibs"
desc = "Oh god, why didn't anyone clean this up? It smells terrible."
/obj/effect/decal/cleanable/blood/gibs/old/New()
..()
icon_state += "-old"
dir = pick(1,2,4,8)
/obj/effect/decal/cleanable/vomit/old
name = "crusty dried vomit"
desc = "You try not to look at the chunks, and fail."
/obj/effect/decal/cleanable/vomit/old/New()
..()
icon_state += "-old"
+3
View File
@@ -78,6 +78,9 @@
if("carpspawn")
carplist += loc
if("voxstart")
raider_spawn += loc
landmarks_list += src
return 1
-2
View File
@@ -208,8 +208,6 @@ move an amendment</a> to the drawing.</p>
return BORDER_2NDTILE
if (locate(/obj/structure/falsewall) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falserwall) in T2)
return BORDER_2NDTILE
return BORDER_NONE
@@ -897,6 +897,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = readd_quotes(t)
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)
@@ -225,9 +225,17 @@
/obj/item/device/paicard/Topic(href, href_list)
var/mob/U = usr
if(!usr || usr.stat)
return
if(pai)
if(!in_range(src, U) || pai.canmove || pai.resting)
U << browse(null, "window=paicard")
usr.unset_machine()
return
if(href_list["setdna"])
if(pai.master_dna)
return
@@ -250,6 +258,10 @@
M << "<font color = #ff4d4d><h3>Byte by byte you lose your sense of self.</h3></font>"
M << "<font color = #ff8787><h4>Your mental faculties leave you.</h4></font>"
M << "<font color = #ffc4c4><h5>oblivion... </h5></font>"
var/mob/living/silicon/pai/P = M
if(istype(P))
if(P.resting || P.canmove)
P.close_up()
M.death(0)
removePersonality()
if(href_list["wires"])
@@ -302,3 +314,8 @@
M.emp_act(severity)
..()
/obj/item/device/paicard/ex_act(severity)
if(pai)
pai.ex_act(severity)
else
del(src)
+3
View File
@@ -185,6 +185,9 @@
usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s."
if(!oldsrc)
break
/obj/item/stack/proc/get_amount()
return amount
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
+15
View File
@@ -60,11 +60,26 @@ var/global/list/moneytypes=list(
icon_state = "cash10"
worth = 10
stack_color = "#663200"
/obj/item/weapon/spacecash/c20
icon_state = "cash10"
worth = 20
stack_color = "#663200"
/obj/item/weapon/spacecash/c50
icon_state = "cash10"
worth = 50
stack_color = "#663200"
/obj/item/weapon/spacecash/c100
icon_state = "cash100"
worth = 100
stack_color = "#663200"
/obj/item/weapon/spacecash/c200
icon_state = "cash100"
worth = 200
stack_color = "#663200"
/obj/item/weapon/spacecash/c500
icon_state = "cash500"
+47
View File
@@ -0,0 +1,47 @@
/obj/structure/curtain
icon = 'icons/obj/curtain.dmi'
name = "curtain"
icon_state = "closed"
layer = MOB_LAYER + 0.1
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = OBJ_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
if(!P.nodamage)
visible_message("<span class='warning'>[P] tears [src] down!</span>")
del(src)
else
..(P, def_zone)
/obj/structure/curtain/attack_hand(mob/user)
playsound(get_turf(loc), "rustle", 15, 1, -5)
toggle()
..()
/obj/structure/curtain/proc/toggle()
opacity = !opacity
if(opacity)
icon_state = "closed"
layer = MOB_LAYER + 0.1
else
icon_state = "open"
layer = OBJ_LAYER
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"
/obj/structure/curtain/medical
name = "plastic curtain"
color = "#B8F5E3"
alpha = 200
/obj/structure/curtain/open/shower
name = "shower curtain"
color = "#ACD1E9"
alpha = 200
+31
View File
@@ -0,0 +1,31 @@
/obj/structure/dresser
name = "dresser"
desc = "A nicely-crafted wooden dresser. It's filled with lots of undies."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "dresser"
density = 1
anchored = 1
/obj/structure/dresser/attack_hand(mob/user as mob)
if(!Adjacent(user))//no tele-grooming
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
if(!Adjacent(user))
return
switch(choice)
if("Underwear")
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
if(new_undies)
H.underwear = new_undies
if("Undershirt")
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
if(new_undershirt)
H.undershirt = new_undershirt
add_fingerprint(H)
H.update_body()
+125 -181
View File
@@ -74,248 +74,185 @@
anchored = 1
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
var/walltype = "metal"
var/opening = 0
canSmoothWith = list(
/turf/simulated/wall,
/obj/structure/falsewall,
/obj/structure/falserwall // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
density = 1
opacity = 1
/obj/structure/falsewall/New()
..()
relativewall()
relativewall_neighbours()
..()
/obj/structure/falsewall/Destroy()
var/temploc = src.loc
var/temploc = loc
loc = null
spawn(10)
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falserwall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
..()
/obj/structure/falsewall/relativewall()
if(!density)
icon_state = "[mineral]fwall_open"
icon_state = "[walltype]fwall_open"
return
var/junction=findSmoothingNeighbors()
icon_state = "[mineral][junction]"
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(walltype == W.walltype)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(walltype == W.walltype)
junction |= get_dir(src,W)
icon_state = "[walltype][junction]"
return
/obj/structure/falsewall/attack_hand(mob/user as mob)
/obj/structure/falsewall/attack_hand(mob/user)
if(opening)
return
opening = 1
if(density)
opening = 1
icon_state = "[mineral]fwall_open"
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
do_the_flick()
sleep(4)
density = 0
SetOpacity(0)
opening = 0
update_icon(0)
else
opening = 1
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
var/srcturf = get_turf(src)
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
opening = 0
return
do_the_flick()
density = 1
sleep(15)
sleep(4)
SetOpacity(1)
src.relativewall()
opening = 0
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
update_icon()
opening = 0
/obj/structure/falsewall/proc/do_the_flick()
if(density)
icon_state = "[mineral]0"
src.relativewall()
flick("[walltype]fwall_opening", src)
else
icon_state = "[mineral]fwall_open"
flick("[walltype]fwall_closing", src)
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/falsewall/update_icon(relativewall = 1)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
if(density)
icon_state = "[walltype]0"
if(relativewall)
relativewall()
else
icon_state = "[walltype]fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
if(!walltype || walltype == "metal")
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[walltype]"))
if(delete)
qdel(src)
return T
/obj/structure/falsewall/attackby(obj/item/weapon/W, mob/user)
if(opening)
user << "\red You must wait until the door has stopped moving."
user << "<span class='warning'>You must wait until the door has stopped moving.</span>"
return
if(density)
var/turf/T = get_turf(src)
if(T.density)
user << "\red The wall is blocked!"
user << "<span class='warning'>[src] is blocked!</span>"
return
if(istype(W, /obj/item/weapon/screwdriver))
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
if(!mineral || mineral == "metal")
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
if (!istype(T, /turf/simulated/floor))
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
return
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
ChangeToWall()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if( WT:welding )
if(!mineral)
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
T = get_turf(src)
T.attackby(W,user)
del(src)
if(WT.remove_fuel(0,user))
dismantle(user)
else
user << "\blue You can't reach, close it first!"
user << "<span class='warning'>You can't reach, close it first!</span>"
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
if(!mineral)
T.ChangeTurf(/turf/simulated/wall)
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/pickaxe/diamonddrill) || istype(W, /obj/item/weapon/melee/energy/blade))
dismantle(user)
/obj/structure/falsewall/proc/dismantle(mob/user)
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
new /obj/structure/girder/displaced(loc)
if(mineral == "metal")
if(istype(src, /obj/structure/falsewall/reinforced))
new /obj/item/stack/sheet/plasteel(loc)
new /obj/item/stack/sheet/plasteel(loc)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")
T = get_turf(src)
T.attackby(W,user)
del(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
if(!mineral)
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
if(!mineral)
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")
T = get_turf(src)
T.attackby(W,user)
del(src)
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
if(density)
icon_state = "[mineral]0"
src.relativewall()
new /obj/item/stack/sheet/metal(loc)
new /obj/item/stack/sheet/metal(loc)
else
icon_state = "[mineral]fwall_open"
var/P = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new P(loc)
new P(loc)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
qdel(src)
/*
* False R-Walls
*/
/obj/structure/falserwall
/obj/structure/falsewall/reinforced
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
anchored = 1
var/mineral = "metal"
var/opening = 0
canSmoothWith = list(
/turf/simulated/wall,
/obj/structure/falsewall,
/obj/structure/falserwall // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falserwall/attack_hand(mob/user as mob)
if(opening)
return
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall/r_wall)
if(delete)
qdel(src)
return T
/obj/structure/falsewall/reinforced/do_the_flick()
if(density)
opening = 1
// Open wall
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
opening = 0
else
opening = 1
icon_state = "r_wall"
flick("frwall_closing", src)
density = 1
sleep(15)
SetOpacity(1)
relativewall()
opening = 0
/obj/structure/falserwall/relativewall()
/obj/structure/falsewall/reinforced/update_icon(relativewall = 1)
if(density)
icon_state = "rwall0"
src.relativewall()
else
icon_state = "frwall_open"
/obj/structure/falsewall/reinforced/relativewall()
if(!density)
icon_state = "frwall_open"
return
var/junction=findSmoothingNeighbors()
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.walltype == W.walltype)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.walltype == W.walltype)
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ChangeTurf(/turf/simulated/wall/r_wall) //Why not make rwall?
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
return
/*
* Uranium Falsewalls
*/
@@ -325,6 +262,7 @@
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = ""
mineral = "uranium"
walltype = "uranium"
var/active = null
var/last_event = 0
@@ -357,24 +295,28 @@
desc = "A wall with gold plating. Swag!"
icon_state = ""
mineral = "gold"
walltype = "gold"
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon_state = ""
mineral = "silver"
walltype = "silver"
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = ""
mineral = "diamond"
walltype = "diamond"
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = ""
mineral = "plasma"
walltype = "plasma"
//-----------wtf?-----------start
/obj/structure/falsewall/clown
@@ -382,10 +324,12 @@
desc = "A wall with bananium plating. Honk!"
icon_state = ""
mineral = "clown"
walltype = "clown"
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = ""
mineral = "sandstone"
walltype = "sandstone"
//------------wtf?------------end
+1 -1
View File
@@ -102,7 +102,7 @@
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
new /obj/structure/falsewall/reinforced (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
+110 -74
View File
@@ -1,88 +1,112 @@
// OKAY I DON'T KNOW WHO THE FUCK ORIGINALLY CODED THIS BUT THEY ARE OFFICIALLY FIRED FOR BEING DRUNK AND STUPID
// FUCK YOU MYSTERY CODERS
// FOR THIS SHIT I'M GOING TO MAKE ALL MY COMMENTS IN CAPS
//Separate dm because it relates to two types of atoms + ease of removal in case it's needed.
//Also assemblies.dm for falsewall checking for this when used.
//I should really make the shuttle wall check run every time it's moved, but centcom uses unsimulated floors so !effort
/atom
var/list/canSmoothWith=list() // TYPE PATHS I CAN SMOOTH WITH~~~~~
/atom/proc/relativewall() //atom because it should be useable both for walls and false walls
if(istype(src,/turf/simulated/floor/vault)||istype(src,/turf/simulated/wall/vault)) //HACK!!!
return
// MOVED INTO UTILITY FUNCTION FOR LESS DUPLICATED CODE.
/atom/proc/findSmoothingNeighbors()
// THIS IS A BITMAP BECAUSE NORTH/SOUTH/ETC ARE ALL BITFLAGS BECAUSE BYOND IS DUMB AND
// DOESN'T FUCKING MAKE SENSE, BUT IT WORKS TO OUR ADVANTAGE
var/junction = 0
for(var/cdir in cardinal)
var/turf/T = get_step(src,cdir)
if(isSmoothableNeighbor(T))
junction |= cdir
continue // NO NEED FOR FURTHER SEARCHING IN THIS TILE
for(var/atom/A in T)
if(isSmoothableNeighbor(A))
junction |= cdir
break // NO NEED FOR FURTHER SEARCHING IN THIS TILE
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
return junction
if(!istype(src,/turf/simulated/shuttle/wall)) //or else we'd have wacky shuttle merging with walls action
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
/atom/proc/isSmoothableNeighbor(var/atom/A)
return is_type_in_list(A,canSmoothWith)
/* Commenting this out for now until we figure out what to do with shuttle smooth walls, if anything.
As they are now, they sort of work screwy and may need further coding. Or just be scrapped.*/
/*else
for(var/turf/simulated/shuttle/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
for(var/obj/machinery/shuttle/W in orange(src,1)) //stuff like engine and propulsion should merge with walls
if(abs(src.x-W.x)-abs(src.y-W.y))
junction |= get_dir(src,W)
for(var/obj/machinery/door/W in orange(src,1)) //doors should not result in diagonal walls, it just looks ugly. checking if area is shuttle so it won't merge with the station
if((abs(src.x-W.x)-abs(src.y-W.y)) && (istype(W.loc.loc,/area/shuttle) || istype(W.loc.loc,/area/supply)))
junction |= get_dir(src,W)
for(var/obj/structure/grille/W in orange(src,1)) //same for grilles. checking if area is shuttle so it won't merge with the station
if((abs(src.x-W.x)-abs(src.y-W.y)) && (istype(W.loc.loc,/area/shuttle) || istype(W.loc.loc,/area/supply)))
junction |= get_dir(src,W)*/
/turf/simulated/wall/isSmoothableNeighbor(var/atom/A)
if(is_type_in_list(A,canSmoothWith))
// COLON OPERATORS ARE TERRIBLE BUT I HAVE NO CHOICE
if(src.mineral == A:mineral)
return 1
return 0
if(istype(src,/turf/simulated/wall))
var/turf/simulated/wall/wall = src
wall.icon_state = "[wall.walltype][junction]"
else if (istype(src,/obj/structure/falsewall))
if(istype(src,/obj/structure/falsewall/reinforced))
icon_state = "rwall[junction]"
else
var/obj/structure/falsewall/fwall = src
fwall.icon_state = "[fwall.mineral][junction]"
/* else if(istype(src,/turf/simulated/shuttle/wall))
var/newicon = icon;
var/newiconstate = icon_state;
if(junction!=5 && junction!=6 && junction!=9 && junction!=10) //if it's not diagonal, all is well, no additional calculations needed
src.icon_state = "swall[junction]"
else //if it's diagonal, we need to figure out if we're using the floor diagonal or the space diagonal sprite
var/is_floor = 0
for(var/turf/unsimulated/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
for(var/turf/simulated/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
for(var/turf/simulated/shuttle/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
if(is_floor) //if is_floor = 1, we use the floor diagonal sprite
src.icon = newicon; //we'll set the floor's icon to the floor next to it and overlay the wall segment. shuttle floor sprites have priority
src.icon_state = newiconstate; //
src.overlays += icon('icons/turf/shuttle.dmi',"swall_f[junction]")
else //otherwise, the space one
src.icon_state = "swall_s[junction]"*/
/**
* WALL SMOOTHING SHIT
*
* IN /ATOM BECAUSE /TURFS ARE /ATOMS AND SO ARE /OBJ/STRUCTURE/FALSEWALLS
* THIS IS STUPID BUT IS FAIRLY ELEGANT FOR BYOND
*
* HOWEVER, INSTEAD OF MAKING ONE BIG GODDAMN MONOLITHIC PROC LIKE A FUCKING
* SHITTY FUNCTIONAL PROGRAMMER, WE WILL BE COOL AND MODERN AND USE INHERITANCE.
*/
/atom/proc/relativewall()
return // DOES JACK SHIT BY DEFAULT. OLD BEHAVIOR WAS TO SPAM LOOPS ANYWAY.
return
/*
* SEE? NOW WE ONLY HAVE TO PROGRAM THIS SHIT INTO WHAT WE WANT TO SMOOTH
* INSTEAD OF BEING DUMB AND HAVING A BIG FUCKING IFTREE WITH TYPECHECKS
* MY GOD, WE COULD EVEN MOVE THE CODE TO BE WITH THE REST OF THE WALL'S CODE!
* HOW FUCKING INNOVATIVE. ISN'T INHERITANCE NICE?
*
* WE COULD STANDARDIZE THIS BUT EVERYONE'S A FUCKING SNOWFLAKE
*/
/turf/simulated/wall/relativewall()
var/junction=findSmoothingNeighbors()
icon_state = "[walltype][junction]" // WHY ISN'T THIS IN UPDATE_ICON OR SIMILAR
// AND NOW WE HAVE TO YELL AT THE NEIGHBORS FOR BEING LOUD AND NOT PAINTING WITH HOA-APPROVED COLORS
/atom/proc/relativewall_neighbours(var/at=null)
if(!at)
at = get_turf(src)
// OPTIMIZE BY NOT CHECKING FOR NEIGHBORS IF WE DON'T FUCKING SMOOTH
if(canSmoothWith.len>0)
for(var/cdir in cardinal)
var/turf/T = get_step(src,cdir)
if(isSmoothableNeighbor(T))
T.relativewall()
for(var/atom/A in T)
if(isSmoothableNeighbor(A))
A.relativewall()
/atom/proc/relativewall_neighbours()
for(var/turf/simulated/wall/W in range(src,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(src,1))
W.relativewall()
W.update_icon()//Refreshes the wall to make sure the icons don't desync
for(var/obj/structure/alien/resin/W in range(src,1))
W.relativewall()
W.update_icon()
return
/turf/simulated/wall/New()
relativewall_neighbours()
..()
/turf/simulated/wall/Destroy()
/*/turf/simulated/shuttle/wall/New()
var/temploc = src.loc
spawn(20) //testing if this will make /obj/machinery/shuttle and /door count - It does, it stays.
if(src.icon_state in list("wall1", "wall", "diagonalWall", "wall_floor", "wall_space")) //so wizard den, syndie shuttle etc will remain black
for(var/turf/simulated/shuttle/wall/W in range(src,1))
W.relativewall()
if(!del_suppress_resmoothing)
spawn(10)
relativewall_neighbours(at=temploc)
..()*/
/turf/simulated/wall/Del()
spawn(10)
for(var/turf/simulated/wall/W in range(src,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(src,1))
W.relativewall()
// JESUS WHY
for(var/direction in cardinal)
for(var/obj/effect/glowshroom/shroom in get_step(src,direction))
if(!shroom.floor) //shrooms drop to the floor
@@ -90,15 +114,27 @@
shroom.icon_state = "glowshroomf"
shroom.pixel_x = 0
shroom.pixel_y = 0
..()
// DE-HACK
/turf/simulated/wall/vault/relativewall()
/turf/simulated/wall/relativewall()
if(istype(src,/turf/simulated/wall/vault)) //HACK!!!
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
var/turf/simulated/wall/wall = src
wall.icon_state = "[wall.walltype][junction]"
return
//Xeno wall smoothing
/obj/structure/alien/resin/relativewall()
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
+9 -5
View File
@@ -154,10 +154,19 @@
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/plating/vox //Vox skipjack plating
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/shuttle/floor4/vox //Vox skipjack floors
name = "skipjack floor"
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
/turf/simulated/floor/beach
name = "Beach"
@@ -238,11 +247,6 @@
/turf/simulated/floor/snow/ex_act(severity)
return
/turf/simulated/shuttle/plating/vox
oxygen=0 // BIRDS HATE OXYGEN FOR SOME REASON
nitrogen = MOLES_O2STANDARD+MOLES_N2STANDARD // So it totals to the same pressure
//icon = 'icons/turf/shuttle-debug.dmi'
// CATWALKS
// Space and plating, all in one buggy fucking turf!
-5
View File
@@ -24,11 +24,6 @@
var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through.
var/engraving, engraving_quality //engraving on the wall
var/del_suppress_resmoothing = 0 // Do not resmooth neighbors on Destroy. (smoothwall.dm)
canSmoothWith = list(
/turf/simulated/wall,
/obj/structure/falsewall,
/obj/structure/falserwall // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
+2 -2
View File
@@ -77,7 +77,7 @@
name = "\improper taser system"
desc = "A weak taser system for space pods, fires electrodes that shock upon impact."
icon_state = "pod_taser"
projectile_type = "/obj/item/projectile/energy/electrode"
projectile_type = "/obj/item/projectile/beam/disabler"
shot_cost = 250
fire_sound = "sound/weapons/Taser.ogg"
@@ -85,7 +85,7 @@
name = "\improper burst taser system"
desc = "A weak taser system for space pods, this one fires 3 at a time."
icon_state = "pod_b_taser"
projectile_type = "/obj/item/projectile/energy/electrode"
projectile_type = "/obj/item/projectile/beam/disabler"
shot_cost = 350
shots_per = 3
fire_sound = "sound/weapons/Taser.ogg"
+1 -1
View File
@@ -177,7 +177,7 @@
set name = "pAI Suicide"
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
if(answer == "Yes")
if(canmove && !resting)
if(canmove || resting)
close_up()
var/obj/item/device/paicard/card = loc
card.removePersonality()
+28 -11
View File
@@ -496,21 +496,38 @@ client/proc/one_click_antag()
var/mob/living/carbon/human/new_vox = new(spawn_location.loc, "Vox")
new_vox.gender = pick(MALE, FEMALE)
new_vox.h_style = "Short Vox Quills"
new_vox.regenerate_icons()
var/sounds = rand(2,8)
var/i = 0
var/newname = ""
while(i<=sounds)
i++
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))
new_vox.real_name = capitalize(newname)
new_vox.name = new_vox.real_name
new_vox.age = rand(12,20)
new_vox.dna.ready_dna(new_vox) // Creates DNA.
new_vox.dna.mutantrace = "vox"
new_vox.set_species("Vox") // Actually makes the vox! How about that.
new_vox.generate_name()
new_vox.set_species("Vox")
new_vox.languages = list() // Removing language from chargen.
new_vox.flavor_text = ""
new_vox.add_language("Vox-pidgin")
new_vox.mind_initialize()
new_vox.mind.assigned_role = "MODE"
new_vox.mind.special_role = "Vox Raider"
new_vox.mutations |= M_NOCLONE //Stops the station crew from messing around with their DNA.
new_vox.add_language("Galactic Common")
new_vox.add_language("Tradeband")
new_vox.h_style = "Short Vox Quills"
new_vox.f_style = "Shaved"
for(var/datum/organ/external/limb in new_vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
//Now apply cortical stack.
var/datum/organ/external/E = new_vox.get_organ("head")
var/obj/item/weapon/implant/cortical/I = new(new_vox)
I.imp_in = new_vox
I.implanted = 1
I.part = E
E.implants += I
cortical_stacks += I
ticker.mode.traitors += new_vox.mind
new_vox.equip_vox_raider()
+1 -1
View File
@@ -55,7 +55,7 @@ var/global/vox_tick = 1
var/obj/item/weapon/card/id/syndicate/W = new(src)
W.name = "[real_name]'s Legitimate Human ID Card"
W.icon_state = "id"
W.access = list(access_syndicate)
W.access = list(access_vox)
W.assignment = "Trader"
W.registered_name = real_name
W.registered_user = src
+14 -11
View File
@@ -5,6 +5,7 @@
icon_state = "off"
density = 1
anchored = 1
unacidable = 1
var/active = 0
@@ -37,7 +38,7 @@
/obj/machinery/gateway/centerstation/initialize()
update_icon()
wait = world.time + config.gateway_delay //+ thirty minutes default
awaygate = locate(/obj/machinery/gateway/centeraway)
awaygate = locate(/obj/machinery/gateway/centeraway) in world
/obj/machinery/gateway/centerstation/update_icon()
@@ -82,8 +83,10 @@ obj/machinery/gateway/centerstation/process()
if(linked.len != 8) return
if(!powered()) return
if(!awaygate)
user << "<span class='notice'>Error: No destination found.</span>"
return
awaygate = locate(/obj/machinery/gateway/centeraway) in world
if(!awaygate)
user << "<span class='notice'>Error: No destination found.</span>"
return
if(world.time < wait)
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
return
@@ -118,15 +121,12 @@ obj/machinery/gateway/centerstation/process()
if(!ready) return
if(!active) return
if(!awaygate) return
if(awaygate.calibrated)
M.loc = get_step(awaygate.loc, SOUTH)
M.dir = SOUTH
return
else
for(var/obj/effect/landmark/L in landmarks_list)
if (L.name != "awaystart")
continue
awaydestinations.Add(L)
var/obj/effect/landmark/dest = pick(awaydestinations)
if(dest)
M.loc = dest.loc
@@ -134,6 +134,7 @@ obj/machinery/gateway/centerstation/process()
use_power(5000)
return
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool))
user << "\black The gate is already calibrated, there is no work for you to do here."
@@ -154,7 +155,7 @@ obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centeraway/initialize()
update_icon()
stationgate = locate(/obj/machinery/gateway/centerstation)
stationgate = locate(/obj/machinery/gateway/centerstation) in world
/obj/machinery/gateway/centeraway/update_icon()
@@ -188,8 +189,10 @@ obj/machinery/gateway/centerstation/process()
if(!ready) return
if(linked.len != 8) return
if(!stationgate)
user << "<span class='notice'>Error: No destination found.</span>"
return
stationgate = locate(/obj/machinery/gateway/centerstation) in world
if(!stationgate)
user << "<span class='notice'>Error: No destination found.</span>"
return
for(var/obj/machinery/gateway/G in linked)
G.active = 1
@@ -234,6 +237,6 @@ obj/machinery/gateway/centerstation/process()
user << "\black The gate is already calibrated, there is no work for you to do here."
return
else
user << "\blue <b>Recalibration successful!</b>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
user << "<span class='boldnotice'>Recalibration successful!</span>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
calibrated = 1
return
@@ -53,11 +53,10 @@ dmm_suite{
*/
verb/load_map(var/dmm_file as file, var/z_offset as num, var/load_speed as num)
verb/load_map(var/dmm_file as file, var/z_offset as num){
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
// load_speed: How many tiles should be loaded per second, defaults to no pause (Optional)
}
verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
// t1: A turf representing one corner of a three dimensional grid (Required).
// t2: Another turf representing the other corner of the same grid (Required).
@@ -0,0 +1,332 @@
///////////////////////////////////////////////////////////////
//SS13 Optimized Map loader
//////////////////////////////////////////////////////////////
//global datum that will preload variables on atoms instanciation
var/global/dmm_suite/preloader/_preloader = null
/**
* Construct the model map and control the loading process
*
* WORKING :
*
* 1) Makes an associative mapping of model_keys with model
* e.g aa = /turf/unsimulated/wall{icon_state = "rock"}
* 2) Read the map line by line, parsing the result (using parse_grid)
*
*/
/dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
if(!z_offset)//what z_level we are creating the map on
z_offset = world.maxz+1
var/quote = ascii2text(34)
var/tfile = file2text(dmm_file)//the map file we're creating
var/tfile_len = length(tfile)
var/lpos = 1 // the models definition index
///////////////////////////////////////////////////////////////////////////////////////
//first let's map model keys (e.g "aa") to their contents (e.g /turf/space{variables})
///////////////////////////////////////////////////////////////////////////////////////
var/list/grid_models = list()
var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))//the length of the model key (e.g "aa" or "aba")
//proceed line by line
for(lpos=1; lpos<tfile_len; lpos=findtext(tfile,"\n",lpos,0)+1)
var/tline = copytext(tfile,lpos,findtext(tfile,"\n",lpos,0))
if(copytext(tline,1,2) != quote)//we reached the map "layout"
break
var/model_key = copytext(tline,2,2+key_len)
var/model_contents = copytext(tline,findtext(tfile,"=")+3,length(tline))
grid_models[model_key] = model_contents
sleep(-1)
///////////////////////////////////////////////////////////////////////////////////////
//now let's fill the map with turf and objects using the constructed model map
///////////////////////////////////////////////////////////////////////////////////////
//position of the currently processed square
var/zcrd=-1
var/ycrd=0
var/xcrd=0
for(var/zpos=findtext(tfile,"\n(1,1,",lpos,0);zpos!=0;zpos=findtext(tfile,"\n(1,1,",zpos+1,0)) //in case there's several maps to load
zcrd++
world.maxz = max(world.maxz, zcrd+z_offset)//create a new z_level if needed
var/zgrid = copytext(tfile,findtext(tfile,quote+"\n",zpos,0)+2,findtext(tfile,"\n"+quote,zpos,0)+1) //copy the whole map grid
var/z_depth = length(zgrid)
//if exceeding the world max x or y, increase it
var/x_depth = length(copytext(zgrid,1,findtext(zgrid,"\n",2,0)))
if(world.maxx<x_depth)
world.maxx=x_depth
var/y_depth = z_depth / (x_depth+1)//x_depth + 1 because we're counting the '\n' characters in z_depth
if(world.maxy<y_depth)
world.maxy=y_depth
//then proceed it line by line, starting from top
ycrd = y_depth
for(var/gpos=1;gpos!=0;gpos=findtext(zgrid,"\n",gpos,0)+1)
var/grid_line = copytext(zgrid,gpos,findtext(zgrid,"\n",gpos,0))
//fill the current square using the model map
xcrd=0
for(var/mpos=1;mpos<=x_depth;mpos+=key_len)
xcrd++
var/model_key = copytext(grid_line,mpos,mpos+key_len)
parse_grid(grid_models[model_key],xcrd,ycrd,zcrd+z_offset)
//reached end of current map
if(gpos+x_depth+1>z_depth)
break
ycrd--
sleep(-1)
//reached End Of File
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len)
break
sleep(-1)
/**
* Fill a given tile with its area/turf/objects/mobs
* Variable model is one full map line (e.g /turf/unsimulated/wall{icon_state = "rock"},/area/mine/explored)
*
* WORKING :
*
* 1) Read the model string, member by member (delimiter is ',')
*
* 2) Get the path of the atom and store it into a list
*
* 3) a) Check if the member has variables (text within '{' and '}')
*
* 3) b) Construct an associative list with found variables, if any (the atom index in members is the same as its variables in members_attributes)
*
* 4) Instanciates the atom with its variables
*
*/
/dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num)
/*Method parse_grid()
- Accepts a text string containing a comma separated list of type paths of the
same construction as those contained in a .dmm file, and instantiates them.
*/
var/list/members = list()//will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/explored)
var/list/members_attributes = list()//will contain lists filled with corresponding variables, if any (in our example : list(icon_state = "rock") and list())
/////////////////////////////////////////////////////////
//Constructing members and corresponding variables lists
////////////////////////////////////////////////////////
var/index=1
var/old_position = 1
var/dpos
do
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/explored)
dpos= find_next_delimiter_position(model,old_position,",","{","}")//find next delimiter (comma here) that's not within {...}
var/full_def = copytext(model,old_position,dpos)//full definition, e.g : /obj/foo/bar{variables=derp}
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))//path definition, e.g /obj/foo/bar
members.Add(atom_def)
old_position = dpos + 1
//transform the variables in text format into a list (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
var/list/fields = list()
var/variables_start = findtext(full_def,"{")
if(variables_start)//if there's any variable
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
fields = text2list(full_def,";")
//then fill the members_attributes list with the corresponding variables
members_attributes.len++
members_attributes[index++] = fields
sleep(-1)
while(dpos != 0)
////////////////
//Instanciation
////////////////
//The next part of the code assumes there's ALWAYS an /area AND a /turf on a given tile
//in case of multiples turfs on one tile,
//will contains the images of all underlying turfs, to simulate the DMM multiple tiles piling
var/list/turfs_underlays = list()
//first instance the /area and remove it from the members list
index = members.len
var/atom/instance
_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
instance = locate(members[index])
instance.contents.Add(locate(xcrd,ycrd,zcrd))
if(_preloader && instance)
_preloader.load(instance)
members.Remove(members[index])
//then instance the /turf and, if multiple tiles are presents, simulates the DMM underlays piling effect
var/first_turf_index = 1
while(!ispath(members[first_turf_index],/turf)) //find first /turf object in members
first_turf_index++
//instanciate the first /turf
var/turf/T = instance_atom(members[first_turf_index],members_attributes[first_turf_index],xcrd,ycrd,zcrd)
//if others /turf are presents, simulates the underlays piling effect
index = first_turf_index + 1
while(index <= members.len)
turfs_underlays.Insert(1,image(T.icon,null,T.icon_state,T.layer,T.dir))//add the current turf image to the underlays list
var/turf/UT = instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)//instance new turf
add_underlying_turf(UT,T,turfs_underlays)//simulates the DMM piling effect
T = UT
index++
//finally instance all remainings objects/mobs
for(index=1,index < first_turf_index,index++)
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
////////////////
//Helpers procs
////////////////
//Instance an atom at (x,y,z) and gives it the variables in attributes
/dmm_suite/proc/instance_atom(var/path,var/list/attributes, var/x, var/y, var/z)
var/atom/instance
_preloader = new(attributes, path)
instance = new path (locate(x,y,z))//first preloader pass
if(_preloader && instance)//second preloader pass, for those atoms that don't ..() in New()
_preloader.load(instance)
return instance
//text trimming (both directions) helper proc
//optionally removes quotes before and after the text (for variable name)
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
while(length(what) && (findtext(what," ",1,2)))
what=copytext(what,2,0)
while(length(what) && (findtext(what," ",length(what),0)))
what=copytext(what,1,length(what))
if(trim_quotes)
while(length(what) && (findtext(what,quote,1,2)))
what=copytext(what,2,0)
while(length(what) && (findtext(what,quote,length(what),0)))
what=copytext(what,1,length(what))
return what
//find the position of the next delimiter,skipping whatever is comprised between opening_escape and closing_escape
//returns 0 if reached the last delimiter
/dmm_suite/proc/find_next_delimiter_position(var/text as text,var/initial_position as num, var/delimiter=",",var/opening_escape=quote,var/closing_escape=quote)
var/position = initial_position
var/next_delimiter = findtext(text,delimiter,position,0)
var/next_opening = findtext(text,opening_escape,position,0)
while((next_opening != 0) && (next_opening < next_delimiter))
position = findtext(text,closing_escape,next_opening + 1,0)+1
next_delimiter = findtext(text,delimiter,position,0)
next_opening = findtext(text,opening_escape,position,0)
return next_delimiter
//build a list from variables in text form (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
//return the filled list
/dmm_suite/proc/text2list(var/text as text,var/delimiter=",")
var/list/to_return = list()
var/position
var/old_position = 1
do
//find next delimiter that is not within "..."
position = find_next_delimiter_position(text,old_position,delimiter)
//check if this is a simple variable (as in list(var1, var2)) or an associative one (as in list(var1="foo",var2=7))
var/equal_position = findtext(text,"=",old_position, position)
var/trim_left = trim_text(copytext(text,old_position,(equal_position ? equal_position : position)),1)//the name of the variable, must trim quotes to build a BYOND compliant associatives list
old_position = position + 1
if(equal_position)//associative var, so do the association
var/trim_right = trim_text(copytext(text,equal_position+1,position))//the content of the variable
//Check for string
if(findtext(trim_right,quote,1,2))
trim_right = copytext(trim_right,2,findtext(trim_right,quote,3,0))
//Check for number
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for null
else if(trim_right == "null")
trim_right = null
//Check for list
else if(copytext(trim_right,1,5) == "list")
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
to_return[trim_left] = trim_right
else//simple var
to_return[trim_left] = null
while(position != 0)
return to_return
//simulates the DM multiple turfs on one tile underlaying
/dmm_suite/proc/add_underlying_turf(var/turf/placed,var/turf/underturf, var/list/turfs_underlays)
if(underturf.density)
placed.density = 1
if(underturf.opacity)
placed.opacity = 1
placed.underlays += turfs_underlays
//atom creation method that preloads variables at creation
/atom/New()
if(_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
_preloader.load(src)
. = ..()
//////////////////
//Preloader datum
//////////////////
/dmm_suite/preloader
parent_type = /datum
var/list/attributes
var/target_path
/dmm_suite/preloader/New(var/list/the_attributes, var/path)
.=..()
if(!the_attributes.len)
Del()
return
attributes = the_attributes
target_path = path
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
what.vars[attribute] = attributes[attribute]
Del()
@@ -89,7 +89,7 @@
swapmap.New()
Create a new map datum, but does not allocate space or assign an
ID (used for loading).
swapmap.Destroy()
swapmap.Del()
Deletes a map but does not save
swapmap.Save()
Saves to map_[id].sav
@@ -174,9 +174,9 @@ swapmap
x2>swapmaps_compiled_maxx)
var/list/areas=new
for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
for(var/obj/O in A) del(O)
for(var/obj/O in A) qdel(O)
for(var/mob/M in A)
if(!M.key) del(M)
if(!M.key) qdel(M)
else M.loc=null
areas[A.loc]=null
del(A)
@@ -286,9 +286,9 @@ swapmap
A.contents+=T
else defarea.contents+=T
// clear the turf
for(var/obj/O in T) del(O)
for(var/obj/O in T) qdel(O)
for(var/mob/M in T)
if(!M.key) del(M)
if(!M.key) qdel(M)
else M.loc=null
// finish the read
T.Read(S)
@@ -0,0 +1,43 @@
//Academy Areas
/area/awaymission/academy
name = "\improper Academy Asteroids"
icon_state = "away"
/area/awaymission/academy/headmaster
name = "\improper Academy Fore Block"
icon_state = "away1"
/area/awaymission/academy/classrooms
name = "\improper Academy Classroom Block"
icon_state = "away2"
/area/awaymission/academy/academyaft
name = "\improper Academy Ship Aft Block"
icon_state = "away3"
/area/awaymission/academy/academygate
name = "\improper Academy Gateway"
icon_state = "away4"
//Academy Items
/obj/machinery/singularity/academy
dissipate = 0
move_self = 0
grav_pull = 1
/obj/machinery/singularity/academy/admin_investigate_setup()
return
/obj/machinery/singularity/academy/process()
eat()
if(prob(1))
mezzer()
/obj/item/clothing/glasses/meson/truesight
name = "The Lens of Truesight"
desc = "I can see forever!"
icon_state = "monocle"
item_state = "headset"
@@ -0,0 +1,22 @@
//Packer Ship Areas
/area/awaymission/BMPship
name = "\improper BMP Asteroids"
icon_state = "away"
luminosity = 0
/area/awaymission/BMPship/Aft
name = "\improper Aft Block"
icon_state = "away1"
requires_power = 1
/area/awaymission/BMPship/Midship
name = "\improper Midship Block"
icon_state = "away2"
requires_power = 1
/area/awaymission/BMPship/Fore
name = "\improper Fore Block"
icon_state = "away3"
requires_power = 1
@@ -0,0 +1,63 @@
//centcomAway areas
/area/awaymission/centcomAway
name = "XCC-P5831"
icon_state = "away"
requires_power = 0
/area/awaymission/centcomAway/general
name = "XCC-P5831"
music = "music/ambigen3.ogg"
/area/awaymission/centcomAway/maint
name = "XCC-P5831 Maintenance"
icon_state = "away1"
music = "music/ambisin1.ogg"
/area/awaymission/centcomAway/thunderdome
name = "XCC-P5831 Thunderdome"
icon_state = "away2"
music = "music/ambisin2.ogg"
/area/awaymission/centcomAway/cafe
name = "XCC-P5831 Kitchen Arena"
icon_state = "away3"
music = "music/ambisin3.ogg"
/area/awaymission/centcomAway/courtroom
name = "XCC-P5831 Courtroom"
icon_state = "away4"
music = "music/ambisin4.ogg"
/area/awaymission/centcomAway/hangar
name = "XCC-P5831 Hangars"
icon_state = "away4"
music = "music/ambigen5.ogg"
//centcomAway items
/obj/item/weapon/paper/pamphlet/ccaInfo
name = "Visitor Info Pamphlet"
info = "<b> XCC-P5831 Visitor Information </b><br>\
Greetings, visitor, to XCC-P5831! As you may know, this outpost was once \
used as Nanotrasen's CENTRAL COMMAND STATION, organizing and coordinating company \
projects across the vastness of space. <br>\
Since the completion of the much more efficient CC-A5831 on March 8, 2553, XCC-P5831 no longer \
acts as NT's base of operations but still plays a very important role its corporate affairs; \
serving as a supply and repair depot, as well as being host to its most important legal proceedings\
and the thrilling pay-per-view broadcasts of <i>PLASTEEL CHEF</i> and <i>THUNDERDOME LIVE</i>.<br> \
We hope you enjoy your stay!"
/obj/item/weapon/paper/ccaMemo
name = "Memo to XCC-P5831 QM"
info = "<b>From: XCC-P5831 Management Office</b><br>\
<b>To: Rolf Ingram, XCC-P5831 Quartermaster</b><br>\
Hey, Rolf, once you pack that gateway into the ferry hangar, <i>make absolutely sure</i> \
to deactivate it! As you may know, SS13 has recently got its network up and running, \
which means that until we get this gate shipped off to the next colonization staging \
area, they'll be able to hop straight in here if its hooked up on our end.<br>\
Obviously, that's something I'd very much rather avoid. Our forensics and medical \
teams never did figure out what happened that last time... and I can't wrap my head \
around it myself. Why would a shuttle full of evacuees all snap and beat each other \
to death the moment they reached safety?<br>\
- D. Cereza"
@@ -0,0 +1,32 @@
//Challenge Areas
/area/awaymission/challenge/start
name = "Where Am I?"
icon_state = "away"
/area/awaymission/challenge/main
name = "\improper Danger Room"
icon_state = "away1"
requires_power = 0
/area/awaymission/challenge/end
name = "Administration"
icon_state = "away2"
requires_power = 0
/obj/machinery/power/emitter/energycannon
name = "Energy Cannon"
desc = "A heavy duty industrial laser"
icon = 'icons/obj/singularity.dmi'
icon_state = "emitter"
anchored = 1
density = 1
use_power = 0
idle_power_usage = 0
active_power_usage = 0
active = 1
locked = 1
state = 2
@@ -0,0 +1,20 @@
//Clown Planet Areas
/area/planet/clown
name = "\improper Clown Planet"
icon_state = "honk"
luminosity = 1
lighting_use_dynamic = 0
requires_power = 0
/area/awaymission/clownplanet/miningtown
name = "\improper Clown Planet - Bananium-o-Rama"
icon_state = "away1"
luminosity = 1
requires_power = 0
/area/awaymission/clownplanet/mine
name = "\improper Clown Planet - Bananium-o-Rama Mines"
icon_state = "away2"
luminosity = 1
requires_power = 0
@@ -0,0 +1,33 @@
//Spacebattle Areas
/area/awaymission/spacebattle
name = "\improper Space Battle"
icon_state = "away"
requires_power = 0
/area/awaymission/spacebattle/cruiser
name = "\improper Nanotrasen Cruiser"
/area/awaymission/spacebattle/syndicate1
name = "\improper Syndicate Assault Ship 1"
/area/awaymission/spacebattle/syndicate2
name = "\improper Syndicate Assault Ship 2"
/area/awaymission/spacebattle/syndicate3
name = "\improper Syndicate Assault Ship 3"
/area/awaymission/spacebattle/syndicate4
name = "\improper Syndicate War Sphere 1"
/area/awaymission/spacebattle/syndicate5
name = "\improper Syndicate War Sphere 2"
/area/awaymission/spacebattle/syndicate6
name = "\improper Syndicate War Sphere 3"
/area/awaymission/spacebattle/syndicate7
name = "\improper Syndicate Fighter"
/area/awaymission/spacebattle/secret
name = "\improper Hidden Chamber"
@@ -0,0 +1,198 @@
/* Station-Collision(sc) away mission map specific stuff
*
* Notes:
* Feel free to use parts of this map, or even all of it for your own project. Just include me in the credits :)
*
* Some of this code unnecessary, but the intent is to add a little bit of everything to serve as examples
* for anyone who wants to make their own stuff.
*
* Contains:
* Areas
* Landmarks
* Guns
* Safe code hints
* Captain's safe
* Modified Nar-Sie
*/
/*
* Areas
*/
//Gateroom gets its own APC specifically for the gate
/area/awaymission/gateroom
//Library, medbay, storage room
/area/awaymission/southblock
//Arrivals, security, hydroponics, shuttles (since they dont move, they dont need specific areas)
/area/awaymission/arrivalblock
//Crew quarters, cafeteria, chapel
/area/awaymission/midblock
//engineering, bridge (not really north but it doesnt really need its own APC)
/area/awaymission/northblock
//That massive research room
/area/awaymission/research
//Syndicate shuttle
/area/awaymission/syndishuttle
/*
* Landmarks - Instead of spawning a new object type, I'll spawn the bible using a landmark!
*/
/obj/effect/landmark/sc_bible_spawner
name = "Safecode hint spawner"
/obj/effect/landmark/sc_bible_spawner/New()
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible/booze(src.loc)
B.name = "The Holy book of the Geometer"
B.deity_name = "Narsie"
B.icon_state = "melted"
B.item_state = "melted"
new /obj/item/weapon/paper/sc_safehint_paper_bible(B)
new /obj/item/weapon/pen(B)
qdel(src)
/*
* Guns - I'm making these specifically so that I dont spawn a pile of fully loaded weapons on the map.
*/
//Captain's retro laser - Fires practice laser shots instead.
obj/item/weapon/gun/energy/laser/retro/sc_retro
name ="retro laser"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
// projectile_type = "/obj/item/projectile/practice"
clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
//Syndicate sub-machine guns.
/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r
/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r/New()
..()
for(var/ammo in magazine.stored_ammo)
if(prob(95)) //95% chance
magazine.stored_ammo -= ammo
//Barman's shotgun
/obj/item/weapon/gun/projectile/shotgun/sc_pump
/obj/item/weapon/gun/projectile/shotgun/sc_pump/New()
..()
for(var/ammo in magazine.stored_ammo)
if(prob(95)) //95% chance
magazine.stored_ammo -= ammo
//Lasers
/obj/item/weapon/gun/energy/laser/practice/sc_laser
name = "Old laser"
desc = "A once potent weapon, years of dust have collected in the chamber and lens of this weapon, weakening the beam significantly."
clumsy_check = 0
/*
* Safe code hints
*/
//These vars hold the code itself, they'll be generated at round-start
var/sc_safecode1 = "[rand(0,9)]"
var/sc_safecode2 = "[rand(0,9)]"
var/sc_safecode3 = "[rand(0,9)]"
var/sc_safecode4 = "[rand(0,9)]"
var/sc_safecode5 = "[rand(0,9)]"
//Pieces of paper actually containing the hints
/obj/item/weapon/paper/sc_safehint_paper_prison
name = "smudged paper"
/obj/item/weapon/paper/sc_safehint_paper_prison/New()
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[sc_safecode1]**[sc_safecode4]*'"
/obj/item/weapon/paper/sc_safehint_paper_hydro
name = "shredded paper"
/obj/item/weapon/paper/sc_safehint_paper_hydro/New()
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[sc_safecode2]'"
/obj/item/weapon/paper/sc_safehint_paper_caf
name = "blood-soaked paper"
//This does not have to be in New() because it is a constant. There are no variables in it i.e. [sc_safcode]
info = "<font color=red><i>This paper is soaked in blood, it is impossible to read any text.</i></font>"
/obj/item/weapon/paper/sc_safehint_paper_bible
name = "hidden paper"
/obj/item/weapon/paper/sc_safehint_paper_bible/New()
info = {"<i>It would appear that the pen hidden with the paper had leaked ink over the paper.
However you can make out the last three digits:</i>'[sc_safecode3][sc_safecode4][sc_safecode5]'
"}
/obj/item/weapon/paper/sc_safehint_paper_shuttle
info = {"<b>Target:</b> Research-station Epsilon<br>
<b>Objective:</b> Prototype weaponry. The captain likely keeps them locked in her safe.<br>
<br>
Our on-board spy has learned the code and has hidden away a few copies of the code around the station. Unfortunatly he has been captured by security
Your objective is to split up, locate any of the papers containing the captain's safe code, open the safe and
secure anything found inside. If possible, recover the imprisioned syndicate operative and recieve the code from him.<br>
<br>
<u>As always, eliminate anyone who gets in the way.</u><br>
<br>
Your assigned ship is designed specifically for penetrating the hull of another station or ship with minimal damage to operatives.
It is completely fly-by-wire meaning you have just have to enjoy the ride and when the red light comes on... find something to hold onto!
"}
/*
* Captain's safe
*/
/obj/item/weapon/storage/secure/safe/sc_ssafe
name = "Captain's secure safe"
/obj/item/weapon/storage/secure/safe/sc_ssafe/New()
..()
l_code = "[sc_safecode1][sc_safecode2][sc_safecode3][sc_safecode4][sc_safecode5]"
l_set = 1
new /obj/item/weapon/gun/energy/mindflayer(src)
new /obj/item/device/soulstone(src)
new /obj/item/clothing/head/helmet/space/cult(src)
new /obj/item/clothing/suit/space/cult(src)
//new /obj/item/weapon/teleportation_scroll(src)
new /obj/item/weapon/ore/diamond(src)
/*
* Modified Nar-Sie
*/
/obj/machinery/singularity/narsie/sc_Narsie
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
move_self = 0 //Contianed narsie does not move!
grav_pull = 0 //Contained narsie does not pull stuff in!
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
/obj/machinery/singularity/narsie/sc_Narsie/admin_investigate_setup()
return
/obj/machinery/singularity/narsie/sc_Narsie/process()
eat()
if(prob(25))
mezzer()
/obj/machinery/singularity/narsie/sc_Narsie/consume(var/atom/A)
if(is_type_in_list(A, uneatable))
return 0
if (istype(A,/mob/living))
var/mob/living/L = A
L.gib()
else if(istype(A,/obj/))
var/obj/O = A
O.ex_act(1.0)
if(O) qdel(O)
else if(isturf(A))
var/turf/T = A
if(T.intact)
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
src.consume(O)
T.ChangeTurf(/turf/space)
return
/obj/machinery/singularity/narsie/sc_Narsie/ex_act()
return
@@ -0,0 +1,195 @@
/* Code for the Wild West map by Brotemis
* Contains:
* Wish Granter
* Meat Grinder
*/
//Wild West Areas
/area/awaymission/wwmines
name = "\improper Wild West Mines"
icon_state = "away1"
luminosity = 1
requires_power = 0
/area/awaymission/wwgov
name = "\improper Wild West Mansion"
icon_state = "away2"
luminosity = 1
requires_power = 0
/area/awaymission/wwrefine
name = "\improper Wild West Refinery"
icon_state = "away3"
luminosity = 1
requires_power = 0
/area/awaymission/wwvault
name = "\improper Wild West Vault"
icon_state = "away3"
luminosity = 0
/area/awaymission/wwvaultdoors
name = "\improper Wild West Vault Doors" // this is to keep the vault area being entirely lit because of requires_power
icon_state = "away2"
requires_power = 0
luminosity = 0
/*
* Wish Granter
*/
/obj/machinery/wish_granter_dark
name = "Wish Granter"
desc = "You're not so sure about this, anymore..."
icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon"
anchored = 1
density = 1
use_power = 0
var/chargesa = 1
var/insistinga = 0
/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user as mob)
usr.set_machine(src)
if(chargesa <= 0)
user << "The Wish Granter lies silent."
return
else if(!istype(user, /mob/living/carbon/human))
user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."
return
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
else if (!insistinga)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insistinga++
else
chargesa--
insistinga = 0
var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
switch(wish)
if("Power")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
user.mutations.Add(M_LASER)
user.mutations.Add(M_RESIST_COLD)
user.mutations.Add(M_XRAY)
user.dna.mutantrace = "shadow"
user.regenerate_icons()
if("Wealth")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
new /obj/structure/closet/syndicate/resources/everything(loc)
user.dna.mutantrace = "shadow"
user.regenerate_icons()
if("Immortality")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
user.verbs += /mob/living/carbon/proc/immortality
user.dna.mutantrace = "shadow"
user.regenerate_icons()
if("To Kill")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart."
ticker.mode.traitors += user.mind
user.mind.special_role = "traitor"
var/datum/objective/hijack/hijack = new
hijack.owner = user.mind
user.mind.objectives += hijack
user << "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>"
var/obj_count = 1
for(var/datum/objective/OBJ in user.mind.objectives)
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
user.dna.mutantrace = "shadow"
user.regenerate_icons()
if("Peace")
user << "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>"
user << "You feel as if you just narrowly avoided a terrible fate..."
for(var/mob/living/simple_animal/hostile/faithless/F in world)
F.health = -10
F.stat = 2
F.icon_state = "faithless_dead"
///////////////Meatgrinder//////////////
/obj/effect/meatgrinder
name = "Meat Grinder"
desc = "What is that thing?"
density = 1
anchored = 1
layer = 3
icon = 'icons/mob/blob.dmi'
icon_state = "blobpod"
var/triggerproc = "explode" //name of the proc thats called when the mine is triggered
var/triggered = 0
/obj/effect/meatgrinder/New()
icon_state = "blobpod"
/obj/effect/meatgrinder/Crossed(AM as mob|obj)
Bumped(AM)
/obj/effect/meatgrinder/Bumped(mob/M as mob|obj)
if(triggered) return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
call(src,triggerproc)(M)
/obj/effect/meatgrinder/proc/triggerrad1(mob)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
for(var/mob/O in viewers(world.view, src.loc))
s.set_up(3, 1, src)
s.start()
explosion(mob, 1, 0, 0, 0)
qdel(src)
/*/obj/effect/meatgrinder
name = "Meat Grinder"
icon_state = "blob"
triggerproc = "triggerrad1"*/
/////For the Wishgranter///////////
/mob/living/carbon/proc/immortality()
set category = "Immortality"
set name = "Resurrection"
var/mob/living/carbon/C = usr
if(!C.stat)
C << "<span class='notice'>You're not dead yet!</span>"
return
C << "<span class='notice'>Death is not your end!</span>"
spawn(rand(800,1200))
if(C.stat == DEAD)
dead_mob_list -= C
living_mob_list += C
C.stat = CONSCIOUS
C.tod = null
C.setToxLoss(0)
C.setOxyLoss(0)
C.setCloneLoss(0)
C.SetParalysis(0)
C.SetStunned(0)
C.SetWeakened(0)
C.radiation = 0
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents()
C << "<span class='notice'>You have regenerated.</span>"
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
C.update_canmove()
return 1
+11 -11
View File
@@ -3,8 +3,9 @@ proc/createRandomZlevel()
return
var/list/potentialRandomZlevels = list()
world << "\red \b Searching for away missions..."
var/list/Lines = file2list("config/fileList.txt")
world << "<span class='userdanger'>Searching for away missions...</span>"
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
if(!Lines.len) return
for (var/t in Lines)
if (!t)
@@ -21,34 +22,33 @@ proc/createRandomZlevel()
// var/value = null
if (pos)
// No, don't do lowertext here, that breaks paths on linux
name = copytext(t, 1, pos)
name = lowertext(copytext(t, 1, pos))
// value = copytext(t, pos + 1)
else
// No, don't do lowertext here, that breaks paths on linux
name = t
name = lowertext(t)
if (!name)
continue
potentialRandomZlevels.Add(name)
potentialRandomZlevels.Add(t)
if(potentialRandomZlevels.len)
world << "\red \b Loading away mission..."
world << "<span class='userdanger'>Loading away mission...</span>"
var/map = pick(potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
maploader.load_map(file, load_speed = 100)
maploader.load_map(file)
world.log << "away mission loaded: [map]"
for(var/obj/effect/landmark/L in landmarks_list)
if (L.name != "awaystart")
continue
awaydestinations.Add(L)
world << "\red \b Away mission loaded."
world << "<span class='userdanger'>Away mission loaded.</span>"
else
world << "\red \b No away missions found."
world << "<span class='userdanger'>No away missions found.</span>"
return
+1 -1
View File
@@ -15,7 +15,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"cultist" = IS_MODE_COMPILED("cult"), // 8
"plant" = 1, // 9
"ninja" = "true", // 10
"vox" = IS_MODE_COMPILED("vox/heist") + IS_MODE_COMPILED("vox/trader"), // 11
"raider" = IS_MODE_COMPILED("heist"), // 11
"slime" = 1, // 12
"vampire" = IS_MODE_COMPILED("vampire"), // 13
"mutineer" = IS_MODE_COMPILED("mutiny"), // 14
@@ -56,6 +56,7 @@
//Ability function variables.
var/s_bombs = 10.0//Number of starting ninja smoke bombs.
var/a_boost = 3.0//Number of adrenaline boosters.
var/emp_proof = 0 // Will the suit react to EMPs? A kind of bad workaround to make Ninjas invulnerable to their own EMPs. - Dave
//Onboard AI related variables.
var/mob/living/silicon/ai/AI//If there is an AI inside the suit.
+1 -1
View File
@@ -26,7 +26,7 @@
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = get_alien_candidates()
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
while(spawncount > 0 && vents.len && candidates.len)
var/obj/vent = pick(vents)
+1 -1
View File
@@ -26,7 +26,7 @@
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
var/list/candidates = get_alien_candidates()
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
while(spawncount > 0 && vents.len && candidates.len)
var/obj/vent = pick_n_take(vents)
var/client/C = pick_n_take(candidates)
+4 -13
View File
@@ -37,19 +37,10 @@ obj/machinery/cooker/proc/checkValid(obj/item/check, mob/user)
if(on)
user << "<span class='notice'>[src] is still active!</span>"
return 0
if(istype(check, /obj/item/weapon/grab) || istype(check, /obj/item/tk_grab))
user << "<span class='warning'>That isn't going to fit.</span>"
return 0
if(istype(check, /obj/item/weapon/reagent_containers/glass))
user << "<span class='warning'>That would probably break [src].</span>"
return 0
if(istype(check, /obj/item/weapon/disk/nuclear))
user << "Central command would kill you if you [thiscooktype] that."
return 0
if(istype(check, /obj/item/flag))
user << "<span class='warning'>That isn't going to fit.</span>"
return 0
return 1
if(istype(check, /obj/item/weapon/reagent_containers/food/snacks))
return 1
user << "<span class ='notice'>You can only process food!</span>"
return 0
obj/machinery/cooker/proc/setIcon(obj/item/copyme, obj/item/copyto)
copyto.color = foodcolor
-325
View File
@@ -1,325 +0,0 @@
dmm_suite
var/debug_file = file("maploader_debug.txt")
load_map(var/dmm_file as file, var/z_offset as num, var/y_offset as num, var/x_offset as num, var/load_speed = 0 as num)
if(!z_offset)
z_offset = world.maxz + 1
//Ensure values are sane.
else if(z_offset < 0)
z_offset = abs(z_offset)
else if(!isnum(z_offset))
z_offset = 0
if(x_offset < 0)
x_offset = abs(x_offset)
else if(!isnum(x_offset))
x_offset = 0
if(y_offset < 0)
y_offset = abs(y_offset)
else if(!isnum(y_offset))
y_offset = 0
debug_file << "Starting Map Load @ ([x_offset], [y_offset], [z_offset]), [load_speed] tiles per second."
//Handle slowed loading.
var/delay_chance = 0
if(load_speed > 0)
//Chance out of 100 every tenth of a second.
delay_chance = 1000 / load_speed
//String holding a quotation mark.
var/quote = ascii2text(34)
var/input_file = file2text(dmm_file)
var/input_file_len = length(input_file)
//Stores the contents of each tile model in the map
var/list/grid_models = list()
//Length of the tile model code. e.g. "aaa" is 3 long.
var/key_len = length(copytext(input_file, 2 ,findtext(input_file, quote, 2)))
//The key of the default tile model. (In SS13 this is: "/turf/space,/area")
var/default_key
debug_file << " Building turf array."
//Iterates through the mapfile to build the model tiles for the map.
for(var/line_position = 1; line_position < input_file_len; line_position = findtext(input_file,"\n", line_position) + 1)
var/next_line = copytext(input_file, line_position, findtext(input_file,"\n", line_position) - 1)
//If the first character in the line is not a quote, the model tiles are all defined.
if(copytext(next_line, 1, 2) != quote)
break
//Copy contents of the model into the grid_models list.
var/model_key = copytext(next_line, 2, findtext(input_file, quote, 2))
var/model_contents = copytext(next_line, findtext(next_line, "=" ) + 3)
if(!default_key && model_contents == "[world.turf],[world.area]")
default_key = model_key
grid_models[model_key] = model_contents
if(prob(delay_chance))
sleep(1)
//Co-ordinates of the tile being loaded.
var/z_coordinate = -1
var/y_coordinate = 0
var/x_coordinate = 0
//Store the
var/y_depth = 0
//Iterate through all z-levels to load the tiles.
for(var/z_position = findtext(input_file, "\n(1,1,"); TRUE; z_position = findtext(input_file, "\n(1,1,", z_position + 1))
//break when there are no more z-levels.
if(z_position == 0)
break
//Increment the z_coordinate and update the world's borders
z_coordinate++
world.maxz = max(world.maxz, z_coordinate + z_offset)
//Here we go!
y_coordinate = 0
y_depth = 0
var/z_level = copytext(input_file, \
findtext(input_file, quote + "\n", z_position) + 2,\
findtext(input_file, "\n" + quote, z_position) + 1)
//Iterate through each line, increasing the y_coordinate.
for(var/grid_position = 1; grid_position != 0; grid_position = findtext(z_level, "\n", grid_position) + 1)
//Grab this line of data.
var/grid_line = copytext(z_level, grid_position, findtext(z_level, "\n", grid_position))
//Compute the size of the z-levels y axis.
if(!y_depth)
y_depth = length(z_level) / (length(grid_line) + 1)
y_depth += y_offset
if(y_depth != round(y_depth, 1))
debug_file << " Warning: y_depth is not a round number"
//And update the worlds variables.
if(world.maxy < y_depth)
world.maxy = y_depth
//The top of the map is the highest "y" co-ordinate, so we start there and iterate downwards
if(!y_coordinate)
y_coordinate = y_depth + 1
//Decrement and load this line of the map.
y_coordinate--
x_coordinate = x_offset
//Iterate through the line loading the model tile data.
for(var/model_position = 1; model_position <= length(grid_line); model_position += key_len)
x_coordinate++
//Find the model key and load that model.
var/model_key = copytext(grid_line, model_position, model_position + key_len)
//If the key is the default one, skip it and save the computation time.
if(model_key == default_key)
continue
if(world.maxx < x_coordinate)
world.maxx = x_coordinate
parse_grid(grid_models[model_key], x_coordinate, y_coordinate, z_coordinate + z_offset)
if(prob(delay_chance))
sleep(1)
//If we hit the last tile in this z-level, we should break out of the loop.
if(grid_position + length(grid_line) + 1 > length(z_level))
break
//Break out of the loop when we hit the end of the file.
if(findtext(input_file, quote + "}", z_position) + 2 >= input_file_len)
break
proc/parse_grid(var/model as text, var/x_coordinate as num, var/y_coordinate as num, var/z_coordinate as num)
//Accepts a text string containing a comma separated list of type paths of the
// same construction as those contained in a .dmm file, and instantiates them.
var/list/text_strings = list()
for(var/index = 1; findtext(model, quote); index++)
/*Loop: Stores quoted portions of text in text_strings, and replaces them with an
index to that list.
- Each iteration represents one quoted section of text.
*/
//Add the next section of quoted text to the list
var/first_quote = findtext(model, quote)
var/second_quote = findtext(model, quote, first_quote + 1)
var/quoted_chunk = copytext(model, first_quote + 1, second_quote)
text_strings += quoted_chunk
//Then remove the quoted section.
model = copytext(model, 1, first_quote) + "~[index]" + copytext(model, second_quote + 1)
var/debug_output = 0
//if(x_coordinate == 86 && y_coordinate == 88 && z_coordinate == 7)
// debug_output = 1
if(debug_output)
debug_file << " Now debugging turf: [model] ([x_coordinate], [y_coordinate], [z_coordinate])"
var/next_position = 1
for(var/data_position = 1, next_position || data_position != 1, data_position = next_position + 1)
next_position = findtext(model, ",/", data_position)
var/full_def = copytext(model, data_position, next_position)
if(debug_output)
debug_file << " Current Line: [full_def] -- ([data_position] - [next_position])"
/*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields.
- Each iteration represents one object's data, including type path and field values.
*/
//Load the attribute data.
var/attribute_position = findtext(full_def,"{")
var/atom_def = text2path(copytext(full_def, 1, attribute_position))
var/list/attributes = list()
if(attribute_position)
full_def = copytext(full_def, attribute_position + 1)
if(debug_output)
debug_file << " Atom Def: [atom_def]"
debug_file << " Parameters: [full_def]"
var/next_attribute = 1
for(attribute_position = 1, next_attribute || attribute_position != 1, attribute_position = next_attribute + 1)
next_attribute = findtext(full_def, ";", attribute_position)
//Loop: Identifies each attribute/value pair, and stores it in attributes[].
attributes += copytext(full_def, attribute_position, next_attribute)
//Construct attributes associative list
var/list/fields = list()
for(var/attribute in attributes)
var/trim_left = trim_text(copytext(attribute, 1, findtext(attribute, "=")))
var/trim_right = trim_text(copytext(attribute, findtext(attribute, "=") + 1))
if(findtext(trim_right, "list("))
trim_right = get_list(trim_right, text_strings)
else if(findtext(trim_right, "~"))//Check for strings
while(findtext(trim_right,"~"))
var/reference_index = copytext(trim_right, findtext(trim_right, "~") + 1)
trim_right = text_strings[text2num(reference_index)]
//Check for numbers
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right, 2, length(trim_right)))
fields[trim_left] = trim_right
sleep(-1)
if(debug_output)
var/return_data = " Debug Fields:"
for(var/item in fields)
return_data += " [item] = [fields[item]];"
debug_file << return_data
//Begin Instanciation
var/atom/instance
if(ispath(atom_def,/area))
instance = locate(atom_def)
if(!istype(instance, atom_def))
instance = new atom_def
instance.contents.Add(locate(x_coordinate,y_coordinate,z_coordinate))
else
instance = new atom_def(locate(x_coordinate,y_coordinate,z_coordinate))
if(instance)
for(var/item in fields)
instance.vars[item] = fields[item]
else if(!(atom_def in borked_paths))
borked_paths += atom_def
var/return_data = " Failure [atom_def] @ ([x_coordinate], [y_coordinate], [z_coordinate]) fields:"
for(var/item in fields)
return_data += " [item] = [fields[item]];"
debug_file << return_data
sleep(-1)
return 1
var/list/borked_paths = list()
proc/trim_text(var/what as text)
while(length(what) && findtext(what, " ", 1, 2))
what = copytext(what, 2)
while(length(what) && findtext(what, " ", length(what)))
what = copytext(what, 1, length(what))
return what
proc/get_list(var/text, var/list/text_strings)
//First, trim the data to just the list contents
var/list_start = findtext(text, "(") + 1
var/list_end = findtext(text, ")", list_start)
var/list_contents = copytext(text, list_start, list_end)
//Then, we seperate it into the individual entries
var/list/entries = list()
var/entry_end = 1
for(var/entry_start = 1, entry_end || entry_start != 1, entry_start = entry_end + 1)
entry_end = findtext(list_contents, ",", entry_start)
entries += copytext(list_contents, entry_start, entry_end)
//Finally, we assemble the completed list.
var/list/final_list = list()
for(var/entry in entries)
var/equals_position = findtext(entry, "=")
if(equals_position)
var/trim_left = trim_text(copytext(entry, 1, equals_position))
var/trim_right = trim_text(copytext(entry, equals_position + 1))
if(findtext(trim_right, "list("))
trim_right = get_list(trim_right, text_strings)
else if(findtext(trim_right, "~"))//Check for strings
while(findtext(trim_right,"~"))
var/reference_index = copytext(trim_right, findtext(trim_right, "~") + 1)
trim_right = text_strings[text2num(reference_index)]
//Check for numbers
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right, 2, length(trim_right)))
if(findtext(trim_left, "~"))//Check for strings
while(findtext(trim_left,"~"))
var/reference_index = copytext(trim_left, findtext(trim_left, "~") + 1)
trim_left = text_strings[text2num(reference_index)]
final_list[trim_left] = trim_right
else
if(findtext(entry, "~"))//Check for strings
while(findtext(entry, "~"))
var/reference_index = copytext(entry, findtext(entry, "~") + 1)
entry = text_strings[text2num(reference_index)]
//Check for numbers
else if(isnum(text2num(entry)))
entry = text2num(entry)
//Check for file
else if(copytext(entry, 1, 2) == "'")
entry = file(copytext(entry, 2, length(entry)))
final_list += entry
return final_list
+2 -2
View File
@@ -93,7 +93,7 @@
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 20 //faster than drill, but cannot dig
digspeed = 15 //faster than drill, but cannot dig
origin_tech = "materials=3;powerstorage=2;engineering=2"
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
@@ -140,7 +140,7 @@
borgdrill
name = "cyborg mining drill"
icon_state = "diamonddrill"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 15
desc = ""
@@ -278,6 +278,9 @@ Des: Removes all infected images from the alien.
/mob/living/carbon/alien/larva/updatePlasmaDisplay()
return
/mob/living/carbon/alien/can_use_vents()
return
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
@@ -53,13 +53,13 @@
/mob/living/carbon/alien/humanoid/movement_delay()
var/tally = 0
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
tally += 4
tally += 5
if (istype(src, /mob/living/carbon/alien/humanoid/drone))
tally += 0
tally += 1
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
tally += 0
tally += 1
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
tally = -2 // hunters go supersuperfast
tally = -1 // hunters go supersuperfast
return (tally + move_delay_add + config.alien_delay)
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
+22 -19
View File
@@ -229,20 +229,16 @@
/mob/living/carbon/proc/eyecheck()
return 0
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
// Stop! ... Hammertime! ~Carn
/mob/living/carbon/proc/getDNA()
return dna
/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
dna = newDNA
// ++++ROCKDTBEN++++ MOB PROCS //END
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
/mob/living/carbon/can_use_vents()
return
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
if(stat)
src << "You must be conscious to do this!"
return
@@ -250,6 +246,11 @@
src << "You can't vent crawl while you're stunned!"
return
var/special_fail_msg = can_use_vents()
if(special_fail_msg)
src << "\red [special_fail_msg]"
return
if(vent_found) // one was passed in, probably from vent/AltClick()
if(vent_found.welded)
src << "That vent is welded shut."
@@ -264,9 +265,11 @@
if(!vent_found)
src << "You'll need a non-welded vent to crawl into!"
return
if(!vent_found.network || !vent_found.network.normal_members.len)
src << "This vent is not connected to anything."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.welded)
@@ -289,16 +292,18 @@
return
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
if(!selection) return
if(!selection) return
if(!vent_found.Adjacent(src))
src << "Never mind, you left."
return
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
if(!ignore_items)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
if(isslime(src))
var/mob/living/carbon/slime/S = src
if(S.Victim)
@@ -317,23 +322,21 @@
spawn(travel_time)
if(!target_vent) return
if(!target_vent) return
for(var/mob/O in hearers(target_vent,null))
O.show_message("You hear something squeezing through the ventilation ducts.",2)
sleep(travel_time)
if(!target_vent) return
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
if(!target_vent) return
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
/mob/living/carbon/clean_blood()
. = ..()
if(ishuman(src))
@@ -112,14 +112,10 @@
callHook("death", list(src, gibbed))
//Check for heist mode kill count.
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/vox/heist) || istype( ticker.mode,/datum/game_mode/vox/trade) ) )
//Check for last assailant's mutantrace.
/*if( LAssailant && ( istype( LAssailant,/mob/living/carbon/human ) ) )
var/mob/living/carbon/human/V = LAssailant
if (V.dna && (V.dna.mutantrace == "vox"))*/ //Not currently feasible due to terrible LAssailant tracking.
//world << "Vox kills: [vox_kills]"
vox_kills++ //Bad vox. Shouldn't be killing humans.
if(ticker && ticker.mode)
if(istype(ticker.mode,/datum/game_mode/heist))
vox_kills++ //Bad vox. Shouldn't be killing humans.
if(ishuman(LAssailant))
var/mob/living/carbon/human/H=LAssailant
if(H.mind)
@@ -23,12 +23,14 @@
mob_list += src
stat = CONSCIOUS
ear_deaf = 0
tod = 0
if (stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
mob_list -= src
dead_mob_list -= src
living_mob_list += src
mob_list += src
ear_deaf = 0
tod = 0
return
/mob/living/carbon/human/getBrainLoss()
@@ -14,13 +14,14 @@
if((M_RUN in mutations)) return -1
var/health_deficiency = (100 - health + staminaloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
if(health_deficiency >= 40)
tally += (health_deficiency / 25)
if(halloss >= 10) tally += (halloss / 10)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50
if (hungry >= 70)
tally += hungry/50
if(wear_suit)
tally += wear_suit.slowdown
@@ -613,6 +613,11 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
Target = null
++Discipline
return
/mob/living/carbon/slime/can_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
..()
/obj/item/slime_extract
name = "slime extract"
+2 -3
View File
@@ -443,10 +443,9 @@
affected.implants += I
I.part = affected
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/vox/heist ) ) )
var/datum/game_mode/vox/heist/M = ticker.mode
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist ) ) )
var/datum/game_mode/heist/M = ticker.mode
M.cortical_stacks += I
M.raiders[H.mind] = I
+3
View File
@@ -757,3 +757,6 @@
else if(!on && floating)
animate(src, pixel_y = initial(pixel_y), time = 10)
floating = 0
/mob/living/proc/can_use_vents()
return "You can't fit into that vent."
+1 -1
View File
@@ -63,7 +63,7 @@ var/list/ai_list = list()
var/obj/item/borg/sight/hud/sec/sechud = null
var/obj/item/borg/sight/hud/med/healthhud = null
var/arrivalmsg = "$name, $rank has arrived on the station."
var/arrivalmsg = "$name, $rank, has arrived on the station."
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
var/list/possibleNames = ai_names
+11 -7
View File
@@ -1,13 +1,15 @@
/mob/living/silicon/pai/death(gibbed)
if(stat == DEAD) return
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2)
var/obj/effect/decal/cleanable/deadpai = new /obj/effect/decal/cleanable/robot_debris(loc)
if(canmove || resting)
deadpai.icon = 'icons/mob/pai.dmi'
deadpai.icon_state = "[chassis]_dead"
del(src)
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
M.show_message("\red [src] emits a dull beep before it loses power and collapses.", 3, "\red You hear a dull beep followed by the sound of glass crunching.", 2)
name = "pAI debris"
desc = "The unfortunate remains of some poor personal AI device."
icon_state = "[chassis]_dead"
else
card.overlays.Cut()
card.overlays += "pai-off"
stat = DEAD
canmove = 0
if(blind) blind.layer = 0
@@ -23,3 +25,5 @@
if(mind) del(mind)
living_mob_list -= src
ghostize()
if(icon_state != "[chassis]_dead")
del(src)
+24 -16
View File
@@ -24,6 +24,7 @@
"Cat" = "cat",
"Mouse" = "mouse",
"Monkey" = "monkey",
"Corgi" = "corgi",
"Fox" = "fox"
)
@@ -80,7 +81,6 @@
if(!card.radio)
card.radio = new /obj/item/device/radio(src.card)
radio = card.radio
//Verbs for pAI mobile form, chassis and Say flavor text
verbs += /mob/living/silicon/pai/proc/choose_chassis
verbs += /mob/living/silicon/pai/proc/choose_verbs
@@ -174,16 +174,16 @@
switch(severity)
if(1.0)
if (src.stat != 2)
adjustBruteLoss(100)
adjustFireLoss(100)
if (src.stat != 2) //Let's not have two of these instantly kill you.
adjustBruteLoss(45)
adjustFireLoss(45)
if(2.0)
if (src.stat != 2)
adjustBruteLoss(60)
adjustFireLoss(60)
adjustBruteLoss(30)
adjustFireLoss(30)
if(3.0)
if (src.stat != 2)
adjustBruteLoss(30)
adjustBruteLoss(20)
src.updatehealth()
@@ -200,8 +200,6 @@
src.updatehealth()
return
//mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -236,8 +234,6 @@
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
///mob/living/silicon/pai/attack_hand(mob/living/carbon/M as mob)
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
if (!C)
@@ -412,19 +408,22 @@
src.updatehealth()
else
visible_message("<span class='warning'>[user.name] bonks [src] harmlessly with [W].</span>")
if(stat != 2) close_up()
spawn(1)
if(stat != 2)
close_up()
return
/mob/living/silicon/pai/attack_hand(mob/user as mob)
if(stat == 2) return
visible_message("<span class='danger'>[user.name] boops [src] on the head.</span>")
close_up()
spawn(1)
close_up()
//I'm not sure how much of this is necessary, but I would rather avoid issues.
/mob/living/silicon/pai/proc/close_up()
last_special = world.time + 200
resting = 0
if(src.loc == card)
return
@@ -443,10 +442,18 @@
canmove = 0
icon_state = "[chassis]"
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
/mob/living/silicon/pai/Bump(atom/movable/AM as mob|obj, yes)
return
/mob/living/silicon/pai/Bumped(AM as mob|obj)
return
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
if(stat || sleeping || paralysis || weakened)
return
if(istype(AM,/obj/item))
src << "<span class='warning'>You are far too small to pull anything!</span>"
return
/mob/living/silicon/pai/examine()
@@ -479,6 +486,7 @@
..(Proj)
updatehealth()
if (stat != 2)
close_up()
spawn(1)
close_up()
return 2
+7 -15
View File
@@ -72,7 +72,7 @@
var/base_icon = ""
var/crisis = 0
var/hiddenborg = 0
var/obj/item/borg/sight/hud/sec/sechud = null
var/obj/item/borg/sight/hud/med/healthhud = null
@@ -188,7 +188,7 @@
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
var/list/modules = list("Standard", "Engineering", "Construction", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security")
var/list/modules = list("Standard", "Engineering", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Security")
if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
@@ -218,7 +218,7 @@
module_sprites["Bro"] = "Brobot"
module_sprites["Rich"] = "maximillion"
module_sprites["Default"] = "Service2"
/*
if("Clerical")
module = new /obj/item/weapon/robot_module/clerical(src)
channels = list("Service" = 1)
@@ -227,7 +227,7 @@
module_sprites["Bro"] = "Brobot"
module_sprites["Rich"] = "maximillion"
module_sprites["Default"] = "Service2"
*/
if("Miner")
module = new /obj/item/weapon/robot_module/miner(src)
channels = list("Supply" = 1)
@@ -275,15 +275,6 @@
module_sprites["Antique"] = "engineerrobot"
module_sprites["Landmate"] = "landmate"
if("Construction")
module = new /obj/item/weapon/robot_module/construction(src)
channels = list("Engineering" = 1)
if(camera && "Robots" in camera.network)
camera.network.Add("Engineering")
module_sprites["Basic"] = "Engineering"
module_sprites["Antique"] = "engineerrobot"
module_sprites["Landmate"] = "landmate"
if("Janitor")
module = new /obj/item/weapon/robot_module/janitor(src)
module_sprites["Basic"] = "JanBot2"
@@ -294,6 +285,7 @@
module = new /obj/item/weapon/robot_module/combat(src)
module_sprites["Combat Android"] = "droid-combat"
channels = list("Security" = 1)
if("Hunter")
updatename(module)
module = new /obj/item/weapon/robot_module/alien/hunter(src)
@@ -458,12 +450,12 @@
else
C.toggled = 1
src << "\red You enable [C.name]."
/mob/living/silicon/robot/verb/control_hud()
set name = "Set Sensor Augmentation"
set desc = "Augment visual feed with internal sensor overlays."
set category = "Robot Commands"
toggle_sensor_mode()
toggle_sensor_mode()
/mob/living/silicon/robot/blob_act()
if (stat != 2)
@@ -68,7 +68,7 @@
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.emag = new /obj/item/weapon/melee/energy/sword(src)
src.emag = new /obj/item/weapon/melee/energy/sword/cyborg(src)
return
/obj/item/weapon/robot_module/surgeon
@@ -155,26 +155,6 @@
..()
/obj/item/weapon/robot_module/construction
name = "construction robot module"
stacktypes = list(
/obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/plasteel = 10,
/obj/item/stack/sheet/rglass = 50
)
New()
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/weapon/rcd/borg(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"
@@ -191,6 +171,7 @@
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/rcd/borg(src)
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
src.modules += new /obj/item/weapon/screwdriver(src)
@@ -222,6 +203,14 @@
W.amount = 50
src.modules += W
var/obj/item/stack/rods/Q = new /obj/item/stack/rods(src)
Q.amount = 15
src.modules += Q
var/obj/item/stack/tile/plasteel/F = new /obj/item/stack/tile/plasteel(src) //floor tiles not regular plasteel, calm down
F.amount = 15
src.modules += F
return
/obj/item/weapon/robot_module/security
@@ -269,6 +258,9 @@
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
src.modules += new /obj/item/weapon/pen(src)
src.modules += new /obj/item/weapon/razor(src)
src.modules += new /obj/item/device/violin(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
@@ -287,8 +279,15 @@
src.emag.name = "Mickey Finn's Special Brew"
return
/obj/item/weapon/robot_module/butler/respawn_consumable(var/mob/living/silicon/robot/R)
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
E.reagents.add_reagent("enzyme", 2)
if(src.emag)
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = src.emag
B.reagents.add_reagent("beer2", 2)
/obj/item/weapon/robot_module/clerical
/*
/obj/item/weapon/robot_module/clerical //Whyyyyy?
name = "clerical robot module"
New()
@@ -300,20 +299,14 @@
src.modules += new /obj/item/weapon/gripper/paperwork(src)
src.emag = new /obj/item/weapon/stamp/denied(src)
/obj/item/weapon/robot_module/butler/respawn_consumable(var/mob/living/silicon/robot/R)
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
E.reagents.add_reagent("enzyme", 2)
if(src.emag)
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = src.emag
B.reagents.add_reagent("beer2", 2)
*/
/obj/item/weapon/robot_module/miner
name = "miner robot module"
New()
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/device/flashlight/lantern(src)
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -321,7 +314,7 @@
src.modules += new /obj/item/weapon/storage/bag/ore(src)
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag = new /obj/item/borg/stun(src)
return
/obj/item/weapon/robot_module/deathsquad
@@ -1,5 +1,5 @@
/mob/living/silicon/robot/Process_Spaceslipping(var/prob_slip)
if(module && (istype(module,/obj/item/weapon/robot_module/construction) || istype(module,/obj/item/weapon/robot_module/drone)))
if(module && (istype(module,/obj/item/weapon/robot_module/drone)))
return 0
..(prob_slip)
@@ -23,4 +23,4 @@
return tally+config.robot_delay
/mob/living/silicon/robot/Move()
..()
..()
+4 -40
View File
@@ -479,48 +479,12 @@ mob/living/simple_animal/borer/proc/detatch()
host.status_flags |= PASSEMOTES
/mob/living/simple_animal/borer/verb/ventcrawl()
set name = "Crawl through Vent"
set name = "Crawl through vent (borer)"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Alien"
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/welded = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
break
else
welded = 1
if(vent_found)
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
loc = target_vent.loc
else
src << "\blue You need to remain still while entering a vent."
else
src << "\blue This vent is not connected to anything."
else if(welded)
src << "\red That vent is welded."
else
src << "\blue You must be standing on or beside an air vent to enter it."
handle_ventcrawl()
/mob/living/simple_animal/borer/can_use_vents()
return
//Procs for grabbing players.
-81
View File
@@ -1,81 +0,0 @@
/mob/living/proc/handle_ventcrawl()
for(var/obj/machinery/atmospherics/unary/vent_pump/V in range(src,1))
if(V.welded) continue
src.Move(V)
return
src << "You can only enter an unwelded vent!"
/obj/machinery/atmospherics/relaymove(mob/user as mob,var/mdir)
if(!anchored)
user.loc = get_turf(src.loc)
return
if(user.stat || !isturf(src.loc))
return
if(!(mdir&initialize_directions))
visible_message(pick("clang","CLANG","Clang","clong","CLONG","Clong","tink","tak","tok","DOK","DAK"))
user << "donk" // find the user and put a donk on it
user.Stun(1)
return
var/turf/T = get_step(loc,mdir)
var/fromdir = turn(mdir,180)
for(var/obj/machinery/atmospherics/OMA in T)
if(!(OMA.initialize_directions&fromdir))
continue
user.Move(OMA)
return
user.Move(T) // broken pipe
/obj/machinery/atmospherics/Entered(mob/M)
if(istype(M) && M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = loc
/obj/machinery/atmospherics/unary/vent_pump/Entered(mob/user, atom/oldloc)
if(istype(oldloc, /obj/machinery/atmospherics)) // this is a unary device, came from a pipe rather than the world
if(welded)
user << "\red [src] is welded shut!"
return ..()
user.Move(loc)
user.visible_message("\blue [user] scrambles out of [src].")
if(user.client)
user.client.perspective = MOB_PERSPECTIVE
user.client.eye = user
return ..()
/obj/machinery/atmospherics/binary/pump/Enter(mob/M,atom/oldloc)
if(stat || !on) return 1
if(get_dir(src,oldloc) == dir) // output
M << "You can't move against the flow of [src]!"
return 0
return 1
/obj/machinery/atmospherics/binary/pump/Entered(mob/living/M as mob)
if(on)
M << "[src] spits you violently out the other side!"
M.apply_damage(5)
src.relaymove(M,dir)
return ..()
/obj/machinery/atmospherics/binary/volume_pump/Enter(mob/M,atom/oldloc)
if(stat || !on) return 1
if(get_dir(src,oldloc) == dir) // output
M << "You can't move against the flow of [src]!"
return 0
return 1
/obj/machinery/atmospherics/binary/volume_pump/Entered(mob/living/M as mob)
if(on)
M << "[src] spits you violently out the other side!"
M.apply_damage(5)
src.relaymove(M,dir)
return ..()
/obj/machinery/atmospherics/valve/Enter(mob/M,atom/oldloc)
if(!stat && !open)
M << "You can't get past [src]."
return 0
return 1
/obj/machinery/atmospherics/Del()
for(var/atom/movable/AM in src)
AM.loc = loc
..()
+2 -2
View File
@@ -1212,9 +1212,9 @@ mob/proc/yank_out_object()
/mob/verb/respawn()
/mob/dead/observer/verb/respawn()
set name = "Respawn as NPC"
set category = "OOC"
set category = "Ghost"
if((usr in respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer)))
var/list/creatures = list("Mouse")
+3 -3
View File
@@ -245,14 +245,14 @@
if("run")
if(mob.drowsyness > 0)
move_delay += 6
move_delay += 1+config.run_speed
move_delay += config.run_speed
if("walk")
move_delay += 7+config.walk_speed
move_delay += config.walk_speed
move_delay += mob.movement_delay()
if(config.Tickcomp)
move_delay -= 1.3
var/tickcomp = ((1/(world.tick_lag))*1.3)
var/tickcomp = (1 / (world.tick_lag)) * 1.3
move_delay = move_delay + tickcomp
if(istype(mob.buckled, /obj/vehicle) || istype(mob.buckled, /obj/structure/stool/bed/chair/cart))
+4 -1
View File
@@ -432,12 +432,13 @@
return 1 //Parrots are no longer unfinished! -Nodrak
if(ispath(MP, /mob/living/simple_animal/pony))
return 1 // ZOMG PONIES WHEEE
if(ispath(MP, /mob/living/simple_animal/fox))
return 1
//Not in here? Must be untested!
return 0
/mob/proc/safe_respawn(var/MP)
//Bad mobs! - Remember to add a comment explaining what's wrong with the mob
if(!MP)
return 0 //Sanity, this should never happen.
@@ -456,6 +457,8 @@
return 1
if(ispath(MP, /mob/living/simple_animal/pony))
return 1
if(ispath(MP, /mob/living/simple_animal/fox))
return 1
//Antag Creatures!
/* if(ispath(MP, /mob/living/simple_animal/hostile/carp))
@@ -3112,7 +3112,7 @@
name = "ice cream cone"
desc = "Delicious ice cream."
icon_state = "icecream_cone"
volume = 500
volume = 50
New()
..()
reagents.add_reagent("nutriment", 2)
@@ -3124,7 +3124,7 @@
name = "chocolate ice cream cone"
desc = "Delicious ice cream."
icon_state = "icecream_cup"
volume = 500
volume = 50
New()
..()
reagents.add_reagent("nutriment", 4)
@@ -3140,7 +3140,7 @@
bitesize = 2
New()
..()
reagents.add_reagent("nutriment", 30)
reagents.add_reagent("nutriment", 3)
/obj/item/weapon/reagent_containers/food/snacks/deepfryholder
name = "Deep Fried Foods Holder Obj"
desc = "If you can see this description the code for the deep fryer fucked up."
@@ -3149,7 +3149,7 @@
bitesize = 2
New()
..()
reagents.add_reagent("nutriment", 30)
reagents.add_reagent("nutriment", 3)
// Flour + egg = dough
/obj/item/weapon/reagent_containers/food/snacks/flour/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -163,7 +163,7 @@
category = list("initial", "Miscellaneous")
/datum/design/prox_sensor
name = "Proximity sensor"
name = "Proximity Sensor"
id = "prox_sensor"
build_type = AUTOLATHE
materials = list("$metal" = 800, "$glass" = 200)
@@ -187,7 +187,7 @@
category = list("initial", "Miscellaneous")
/datum/design/voice_analyser
name = "Voice analyser"
name = "Voice Analyser"
id = "voice_analyser"
build_type = AUTOLATHE
materials = list("$metal" = 500, "$glass" = 50)
@@ -60,7 +60,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/bodyscanner
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/sleep_console
name = "Machine Board (Body Scanner Console)"
@@ -70,7 +70,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/bodyscanner_console
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/clonepod
name = "Machine Board (Cloning Pod)"
@@ -80,7 +80,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/clonepod
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/clonescanner
name = "Machine Board (Cloning Scanner)"
@@ -90,7 +90,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/clonescanner
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/cryotube
name = "Machine Board (Cryotube Board)"
@@ -100,7 +100,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/cryo_tube
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/chem_dispenser
name = "Machine Board (Portable Chem Dispenser)"
@@ -110,7 +110,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/chem_dispenser
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/sleeper
name = "Machine Board (Sleeper)"
@@ -120,7 +120,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/sleeper
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/sleep_console
name = "Machine Board (Sleeper Console)"
@@ -130,7 +130,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/sleep_console
category = list ("Medical Machinery")
category = list("Medical Machinery")
/datum/design/biogenerator
name = "Machine Board (Biogenerator)"
@@ -240,7 +240,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/arcade/battle
category = list ("Misc. Machinery")
category = list("Misc. Machinery")
/datum/design/microwave
name = "Machine Board (Microwave)"
@@ -250,7 +250,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/microwave
category = list ("Misc. Machinery")
category = list("Misc. Machinery")
/datum/design/orion_trail
name = "Machine Board (Orion Trail Arcade Machine)"
@@ -260,7 +260,7 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/arcade/orion_trail
category = list ("Misc. Machinery")
category = list("Misc. Machinery")
/datum/design/vendor
name = "Machine Board (Vendor)"
@@ -270,4 +270,4 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/vendor
category = list ("Misc. Machinery")
category = list("Misc. Machinery")
@@ -7,7 +7,7 @@
desc = "A basic power cell that holds 1000 units of energy"
id = "basic_cell"
req_tech = list("powerstorage" = 1)
build_type = PROTOLATHE | AUTOLATHE |MECHFAB
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
materials = list("$metal" = 700, "$glass" = 50)
build_path = /obj/item/weapon/cell
category = list("Misc","Power")
+1 -1
View File
@@ -1,6 +1,6 @@
/obj/machinery/computer/shuttle_control/multi/vox
name = "skipjack control console"
req_access = list(access_syndicate)
req_access = list(access_vox)
shuttle_tag = "Vox Skipjack"
/obj/machinery/computer/shuttle_control/multi/vox/attack_ai(user as mob)
+4 -1
View File
@@ -3,6 +3,7 @@
var/cloaked = 1
var/at_origin = 1
var/returned_home = 0
var/move_time = 240
var/cooldown = 20
var/last_move = 0 //the time at which we last moved
@@ -21,9 +22,11 @@
..()
if(origin) last_departed = origin
/datum/shuttle/multi_shuttle/move()
/datum/shuttle/multi_shuttle/move(var/area/origin, var/area/destination)
..()
last_move = world.time
if (destination == src.origin)
returned_home = 1
/datum/shuttle/multi_shuttle/proc/announce_departure()
+3 -3
View File
@@ -167,7 +167,7 @@ var/MAX_EXPLOSION_RANGE = 14
#define FLOWFRAC 0.99 // fraction of gas transfered per process
#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up
#define SHOES_SLOWDOWN 0 // How much shoes slow you down by default. Negative values speed you up
//ITEM INVENTORY SLOT BITMASKS
@@ -727,7 +727,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
#define BE_CULTIST 256
#define BE_PLANT 512
#define BE_NINJA 1024
#define BE_VOX 2048
#define BE_RAIDER 2048
#define BE_SLIME 4096
#define BE_VAMPIRE 8192
#define BE_MUTINEER 16384
@@ -745,7 +745,7 @@ var/list/be_special_flags = list(
"Cultist" = BE_CULTIST,
"Plant" = BE_PLANT,
"Ninja" = BE_NINJA,
"Vox" = BE_VOX,
"Vox Raider" = BE_RAIDER,
"Slime" = BE_SLIME,
"Vampire" = BE_VAMPIRE,
"Mutineer" = BE_MUTINEER,