Merge pull request #966 from Erthilo/TGUpdates

TG Updates up to r3420
This commit is contained in:
SkyMarshal
2012-05-02 13:28:26 -07:00
93 changed files with 7511 additions and 5703 deletions
+14 -1
View File
@@ -81,10 +81,14 @@
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/player"
#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/vehicles/airtight"
#define FILE_DIR "code/game/verbs"
#define FILE_DIR "code/js"
#define FILE_DIR "code/modules"
#define FILE_DIR "code/modules/admin"
#define FILE_DIR "code/modules/admin/new"
#define FILE_DIR "code/modules/admin/new/verbs"
#define FILE_DIR "code/modules/admin/verbs"
#define FILE_DIR "code/modules/assembly"
#define FILE_DIR "code/modules/chemical"
@@ -197,7 +201,6 @@
#define FILE_DIR "icons/vending_icons"
#define FILE_DIR "interface"
#define FILE_DIR "maps"
#define FILE_DIR "maps/backup"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
@@ -389,6 +392,7 @@
#include "code\game\vote.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
#include "code\game\asteroid\artifacts.dm"
#include "code\game\events\Event.dm"
#include "code\game\events\EventsMain.dm"
#include "code\game\events\EventProcs\black_hole.dm"
@@ -545,6 +549,7 @@
#include "code\game\machinery\computer\lockdown.dm"
#include "code\game\machinery\computer\medical.dm"
#include "code\game\machinery\computer\Operating.dm"
#include "code\game\machinery\computer\pod.dm"
#include "code\game\machinery\computer\power.dm"
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\robot.dm"
@@ -609,6 +614,7 @@
#include "code\game\objects\bombspawner.dm"
#include "code\game\objects\cleaner.dm"
#include "code\game\objects\closets.dm"
#include "code\game\objects\contraband.dm"
#include "code\game\objects\displaycase.dm"
#include "code\game\objects\door_assembly.dm"
#include "code\game\objects\effect_system.dm"
@@ -761,6 +767,10 @@
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\oxygen.dm"
#include "code\game\player\news.dm"
#include "code\game\vehicles\vehicle.dm"
#include "code\game\vehicles\airtight\airtight.dm"
#include "code\game\vehicles\airtight\land.dm"
#include "code\game\vehicles\airtight\space.dm"
#include "code\game\verbs\AI_status.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\sound.dm"
@@ -998,6 +1008,7 @@
#include "code\modules\mob\living\silicon\robot\robot_defense.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\robot_upgrades.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\new_player\hud.dm"
@@ -1016,7 +1027,9 @@
#include "code\modules\mob\simple_animal\corgi.dm"
#include "code\modules\mob\simple_animal\crab.dm"
#include "code\modules\mob\simple_animal\life.dm"
#include "code\modules\mob\simple_animal\parrot.dm"
#include "code\modules\mob\simple_animal\shade.dm"
#include "code\modules\mob\simple_animal\worm.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\cable.dm"
#include "code\modules\power\cell.dm"
+4
View File
@@ -33,6 +33,7 @@
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/Tensioner_Active = 0 // If the tensioner is running.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/list/mode_names = list()
@@ -234,6 +235,9 @@
if ("feature_object_spell_system")
config.feature_object_spell_system = 1
if ("allow_metadata")
config.allow_Metadata = 1
if ("traitor_scaling")
config.traitor_scaling = 1
+15
View File
@@ -239,6 +239,7 @@ client
body += "<option value='byond://?src=\ref[src];ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
// body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
@@ -497,6 +498,20 @@ client
togglebuildmode(MOB)
href_list["datumrefresh"] = href_list["build_mode"]
/* else if (href_list["direct_control"])
if(!href_list["direct_control"])
return
var/mob/MOB = locate(href_list["direct_control"])
if(!MOB)
return
if(!ismob(MOB))
return
if(!src.holder)
return
if(usr.client)
usr.client.cmd_assume_direct_control(MOB)*/
else if (href_list["delall"])
if(!href_list["delall"])
return
+8
View File
@@ -111,6 +111,10 @@
playSpecials(curturf,effectin,soundin)
// Remove any luminosity etc.
var/prevlum = teleatom.luminosity
teleatom.luminosity = 0
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -118,6 +122,10 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
// Re-Apply lum
teleatom.sd_SetLuminosity(prevlum)
return 1
proc/teleport()
+2 -3
View File
@@ -47,9 +47,8 @@ datum/shuttle_controller
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= 600)
world << "\blue <B>Shuttle is at Centcom. Unable to recall.</B>"
return
world << "\blue <B>Alert: The shuttle is going back!</B>"
captain_announce("The emergency shuttle has been recalled.")
world << sound('shuttlerecalled.ogg')
setdirection(-1)
online = 1
@@ -192,7 +191,7 @@ datum/shuttle_controller
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
world << "<B>The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.</B>"
captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
world << sound('shuttledock.ogg')
return 1
@@ -383,6 +383,24 @@ proc/process_ghost_teleport_locs()
icon_state = "cave"
requires_power = 0
/area/asteroid/artifactroom
name = "Asteroid - Artifact"
icon_state = "cave"
/area/planet/clown
name = "Clown Planet"
icon_state = "honk"
+1 -1
View File
@@ -12,7 +12,7 @@ var/global
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
// list/global_map = null
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
-26
View File
@@ -71,32 +71,6 @@
var/h_b = 245.0
/obj/machinery/computer/pod
name = "Pod Launch Control"
desc = "A control for launching pods."
icon_state = "computer_generic"
var/id = 1.0
var/obj/machinery/mass_driver/connected = null
var/timing = 0.0
var/time = 30.0
/obj/machinery/computer/pod/old
icon_state = "old"
name = "DoorMex Control Computer"
/obj/machinery/computer/pod/old/syndicate
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
/obj/machinery/computer/secure_data
name = "Security Records"
desc = "Used to view and edit personnel's security records"
+10 -22
View File
@@ -365,29 +365,17 @@
var/lastgenlev = -1
/obj/machinery/power/monitor
name = "power monitoring computer"
desc = "It monitors power levels across the station, and can remotely toggle main breakers."
icon = 'computer.dmi'
icon_state = "power"
density = 1
anchored = 1
use_power = 2
idle_power_usage = 20
active_power_usage = 80
var/control = 0
req_access = list(access_engine_equip)
/obj/machinery/cell_charger
name = "cell charger"
desc = "A charging unit for power cells."
icon = 'power.dmi'
icon_state = "ccharger0"
var/obj/item/weapon/cell/charging = null
var/chargelevel = -1
name = "power monitoring computer"
desc = "It monitors power levels across the station, and can remotely toggle main breakers."
icon = 'computer.dmi'
icon_state = "power"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 60
use_power = 2
idle_power_usage = 20
active_power_usage = 80
var/control = 0
req_access = list(access_engine_equip)
/obj/machinery/light_switch
name = "light switch"
+1 -2
View File
@@ -1,6 +1,5 @@
/proc/captain_announce(var/text)
world << "<h1 class='alert'>Captain Announces</h1>"
world << "<h1 class='alert'>Priority Announcement</h1>"
world << "<span class='alert'>[html_encode(text)]</span>"
world << "<br>"
+6
View File
@@ -117,6 +117,12 @@
var/walltype = "wall"
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon_state = "cult"
walltype = "cult"
/turf/simulated/shuttle
name = "shuttle"
icon = 'shuttle.dmi'
+231
View File
@@ -0,0 +1,231 @@
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
// /obj/effect/critter/spesscarp =2,
/obj/effect/critter/spesscarp/elite =2,
// /obj/creature =0,
// /obj/item/weapon/rcd =0,
// /obj/item/weapon/rcd_ammo =0,
// /obj/item/weapon/spacecash =0,
// /obj/item/weapon/cloaking_device =1,
// /obj/item/weapon/gun/energy/teleport_gun =0,
// /obj/item/weapon/rubber_chicken =0,
/obj/item/weapon/melee/energy/sword/pirate =3,
/obj/structure/closet/syndicate/resources =2,
// /obj/machinery/wish_granter =1, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.>
// /obj/item/clothing/glasses/thermal =2, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe.
// /obj/item/weapon/storage/box/stealth/ =2
// =11
)
var/global/list/spawned_surprises = list()
/obj/machinery/wish_granter
name = "Wish Granter"
desc = "You're not so sure about this, anymore..."
icon = 'device.dmi'
icon_state = "syndbeacon"
anchored = 1
density = 1
var
charges = 1
insisting = 0
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.machine = src
if(charges <= 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 (!insisting)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insisting++
else
user << "You speak. [pick("I want the station to disappear","Humanity is corrupt, mankind must be destroyed","I want to be rich", "I want to rule the world","I want immortality.")]. The Wish Granter answers."
user << "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first."
charges--
insisting = 0
if (!(user.mutations & HULK))
user.mutations |= HULK
if (!(user.mutations & LASER))
user.mutations |= LASER
if (!(user.mutations & XRAY))
user.mutations |= XRAY
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = 2
if (!(user.mutations & COLD_RESISTANCE))
user.mutations |= COLD_RESISTANCE
if (!(user.mutations & TK))
user.mutations |= TK
if(!(user.mutations & HEAL))
user.mutations |= HEAL
ticker.mode.traitors += user.mind
user.mind.special_role = "Avatar of the Wish Granter"
var/datum/objective/silence/silence = new
silence.owner = user.mind
user.mind.objectives += silence
var/obj_count = 1
for(var/datum/objective/OBJ in user.mind.objectives)
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
world << "You have a very bad feeling about this."
return
/obj/item/weapon/storage/box/stealth/
name = "Infiltration Gear"
desc = "An old box full of old equipment. It doesn't look like it was ever opened."
/obj/item/weapon/storage/box/stealth/New()
..()
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/clothing/shoes/syndigaloshes(src)
return
// Copied over from asteroid.dm
var/global/max_secret_rooms = 3
proc/make_mining_asteroid_secret(var/size = 5)
var/valid = 0
var/turf/T = null
var/sanity = 0
var/list/room = null
var/list/turfs = null
turfs = get_area_turfs(/area/mine/unexplored)
if(!turfs.len)
return 0
while(!valid)
valid = 1
sanity++
if(sanity > 100)
return 0
T=pick(turfs)
if(!T)
return 0
var/list/surroundings = list()
surroundings += range(7, locate(T.x,T.y,T.z))
surroundings += range(7, locate(T.x+size,T.y,T.z))
surroundings += range(7, locate(T.x,T.y+size,T.z))
surroundings += range(7, locate(T.x+size,T.y+size,T.z))
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
valid = 0
continue
if(locate(/turf/space) in surroundings)
valid = 0
continue
if(locate(/area/asteroid/artifactroom) in surroundings)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
if(!T)
return 0
room = spawn_room(T,size,size,,,1)
if(room)
T = pick(room["floors"])
if(T)
var/surprise = null
valid = 0
while(!valid)
surprise = pickweight(space_surprises)
if(surprise in spawned_surprises)
if(prob(20))
valid++
else
continue
else
valid++
spawned_surprises.Add(surprise)
new surprise(T)
return 1
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)
for(var/x = 0,x<x_size,x++)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
del(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
+112 -23
View File
@@ -1,3 +1,8 @@
var/global/max_secret_rooms = 3
proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon
if(!size)
size = pick(100;2,50;3,35;4,25;6,10;12)
@@ -51,7 +56,8 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
density--
return
//this is terrible! -Pete
/*
/datum/game_mode/proc/setup_sectors()
world << "\blue \b Randomizing space sectors."
var/list/sectors = list(1,3,4,0,0,0,0,0,0)
@@ -95,9 +101,9 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
new /obj/item/weapon/storage/explorers_box(L.loc)
del(L)
return
*/
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
@@ -110,24 +116,45 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
del(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
T = new wall(cur_loc)
room_turfs["walls"] += T
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
proc/admin_spawn_room_at_pos()
var/wall
var/floor
var/x = input("X position","X pos",1)
var/y = input("Y position","Y pos",1)
var/z = input("Z position","Z pos",1)
var/x = input("X position","X pos",usr.x)
var/y = input("Y position","Y pos",usr.y)
var/z = input("Z position","Z pos",usr.z)
var/x_len = input("Desired length.","Length",5)
var/y_len = input("Desired width.","Width",5)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Asteroid wall","Resin wall"))
var/clean = input("Delete existing items in area?" , "Clean area?", 0)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Resin wall"))
if("Reinforced wall")
wall=/turf/simulated/wall/r_wall
if("Regular wall")
@@ -142,21 +169,83 @@ proc/admin_spawn_room_at_pos()
if("Reinforced floor")
floor=/turf/simulated/floor/engine
if(x && y && z && wall && floor && x_len && y_len)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor,clean)
return
var/global/list/space_surprises = list(/obj/item/clothing/mask/facehugger,
/obj/effect/critter/spesscarp,
/obj/effect/critter/spesscarp/elite,
// /obj/creature,
/obj/item/weapon/rcd,
/obj/item/weapon/rcd_ammo,
/obj/item/weapon/spacecash,
// /obj/item/weapon/cloaking_device,
// /obj/item/weapon/gun/energy/teleport_gun,
/obj/item/weapon/rubber_chicken,
/obj/item/weapon/melee/energy/sword/pirate
)
var/global/max_secret_rooms = 6
proc/make_mining_asteroid_secret(var/size = 5)
var/valid = 0
var/turf/T = null
var/sanity = 0
var/list/room = null
var/list/turfs = null
turfs = get_area_turfs(/area/mine/unexplored)
if(!turfs.len)
return 0
while(!valid)
valid = 1
sanity++
if(sanity > 100)
return 0
T=pick(turfs)
if(!T)
return 0
var/list/surroundings = list()
surroundings += range(7, locate(T.x,T.y,T.z))
surroundings += range(7, locate(T.x+size,T.y,T.z))
surroundings += range(7, locate(T.x,T.y+size,T.z))
surroundings += range(7, locate(T.x+size,T.y+size,T.z))
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
valid = 0
continue
if(locate(/turf/space) in surroundings)
valid = 0
continue
if(locate(/area/asteroid/artifactroom) in surroundings)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
if(!T)
return 0
room = spawn_room(T,size,size,,,1)
if(room)
T = pick(room["floors"])
if(T)
var/surprise = null
valid = 0
while(!valid)
surprise = pickweight(space_surprises)
if(surprise in spawned_surprises)
if(prob(20))
valid++
else
continue
else
valid++
spawned_surprises.Add(surprise)
new surprise(T)
return 1
+4 -4
View File
@@ -1070,8 +1070,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.Topic(nhref, params2list(nhref), src, 1)
return
/*/atom/proc/get_global_map_pos()
/*
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null
var/cur_y = null
@@ -1085,8 +1085,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
return 0 */
return 0
*/ //Don't touch this either. DMTG
/atom/proc/checkpass(passflag)
return pass_flags&passflag
@@ -759,18 +759,18 @@
/client/proc/changeling_unstun()
set category = "Changeling"
set name = "Epinephrine Sacs (25)"
set name = "Epinephrine Sacs (45)"
set desc = "Removes all stuns"
if(!usr.changeling)
usr << "\red You're not a changeling, something's wrong!"
return
if(usr.changeling.chem_charges < 25)
if(usr.changeling.chem_charges < 45)
usr << "\red We don't have enough stored chemicals to do that!"
return
usr.changeling.chem_charges -= 25
usr.changeling.chem_charges -= 45
var/mob/living/carbon/human/C = usr
+31 -1
View File
@@ -1355,4 +1355,34 @@ datum
captured_amount+=2
if(captured_amount<target_amount)
return 0
return 1
return 1
datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(emergency_shuttle.location<2)
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/area/pod1 = locate(/area/shuttle/escape_pod1/centcom)
var/area/pod2 = locate(/area/shuttle/escape_pod2/centcom)
var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
for(var/mob/living/player in world)
if (player == owner.current)
continue
if (player.mind)
if (player.stat != 2)
if (get_turf(player) in shuttle)
return 0
if (get_turf(player) in pod1)
return 0
if (get_turf(player) in pod2)
return 0
if (get_turf(player) in pod3)
return 0
if (get_turf(player) in pod4)
return 0
return 1
+5 -5
View File
@@ -188,7 +188,7 @@
if("Librarian") // -- TLE
return list(access_library)
if("Lawyer") //Muskets 160910
return list(access_maint_tunnels, access_lawyer, access_court)
return list(access_lawyer, access_court)
if("Captain")
return get_all_accesses()
if("Security Officer")
@@ -219,9 +219,9 @@
if("Janitor")
return list(access_janitor, access_maint_tunnels)
if("Clown")
return list(access_maint_tunnels, access_clown, access_theatre)
return list(access_clown, access_theatre)
if("Mime")
return list(access_maint_tunnels, access_mime, access_theatre)
return list(access_mime, access_theatre)
if("Chef")
return list(access_kitchen)
if("Roboticist")
@@ -229,7 +229,7 @@
if("Cargo Technician")
return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
if("Shaft Miner")
return list(access_maint_tunnels, access_mining, access_mint, access_mining_station)
return list(access_mining, access_mint, access_mining_station)
if("Quartermaster")
return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining)
if("Chief Engineer")
@@ -239,7 +239,7 @@
access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
if("Research Director")
return list(access_medlab, access_rd,
access_maint_tunnels, access_heads, access_tox,
access_heads, access_tox,
access_tox_storage, access_chemistry, access_teleporter,
access_research, access_robotics, access_xenobiology, access_RC_announce,
access_keycard_auth, access_tcomsat)
+323 -319
View File
@@ -1,274 +1,3 @@
/obj/machinery/autolathe
var/busy = 0
var/max_m_amount = 150000.0
var/max_g_amount = 75000.0
var/outputAmount = 1
var/makeDir = 0
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if(istype(O,/obj/item/weapon/storage/))
usr.before_take_item(O)
O.loc = src
user << "\blue You insert the \icon[O] [O.name] into the autolathe!"
return 0
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user << "\red You can't load the autolathe while it's opened."
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
usr.before_take_item(O)
flick("autolathe_o",src)//plays metal insertion animation
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
spawn(16)
icon_state = "autolathe"
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/autolathe/attack_hand(mob/user as mob)
user.machine = src
interact(user)
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
dat += "<HR>"
var/list/heldContainers = list()
for(var/obj/item/weapon/storage/container in src.contents)
heldContainers += container
if(heldContainers.len)
for(var/obj/item/weapon/storage/container in heldContainers)
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
else
dat += "No held storage containers"
dat += "<HR>"
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
/obj/machinery/autolathe/proc/interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["removeContainer"])
var/obj/item/weapon/storage/container = locate(href_list["removeContainer"])
container.loc = src.loc
container.layer = initial(container.layer)
if(href_list["modifyOutputAmount"])
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
if(!busy)
if(outputAmount < 1)
outputAmount = 1
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
if (!busy)
if(href_list["make"])
var/turf/T = src.loc
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
restart:
if(outputAmount > 0)
if( (src.m_amount >= template.m_amt*multiplier) && (src.g_amount >= template.g_amt*multiplier) )
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
if(!busy)
busy = 1
use_power(power)
flick("autolathe_n",src)
spawn(16)
use_power(power)
flick("autolathe_n",src)
spawn(16)
flick("autolathe_n",src)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(src)
for(var/obj/item/weapon/storage/container in src.contents)
container.attackby(new_item)
if(new_item.loc == container)
break
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
if(new_item in src)
new_item.loc = T
src.updateUsrDialog()
outputAmount -= 1
busy = 0
goto restart
else
for(var/mob/M in view(3,src))
M << "\red\icon[src] has run out of materials."
else
outputAmount = 1
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.equipped(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
var/global/list/autolathe_recipes = list( \
/* screwdriver removed*/ \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
@@ -322,55 +51,330 @@ var/global/list/autolathe_recipes_hidden = list( \
/* new /obj/item/weapon/shield/riot(), */ \
)
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
/obj/machinery/autolathe
var
busy = 0
max_m_amount = 150000.0
max_g_amount = 75000.0
outputAmount = 1
makeDir = 0
proc
wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
dat += "<HR>"
var/list/heldContainers = list()
for(var/obj/item/weapon/storage/container in src.contents)
heldContainers += container
if(heldContainers.len)
for(var/obj/item/weapon/storage/container in heldContainers)
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
else
dat += "No held storage containers"
dat += "<HR>"
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if(istype(O,/obj/item/weapon/storage/))
usr.before_take_item(O)
O.loc = src
user << "\blue You insert the \icon[O] [O.name] into the autolathe!"
return 0
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user.machine = src
interact(user)
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
interact(user)
Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["removeContainer"])
var/obj/item/weapon/storage/container = locate(href_list["removeContainer"])
container.loc = src.loc
container.layer = initial(container.layer)
if(href_list["modifyOutputAmount"])
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
if(!busy)
if(outputAmount < 1)
outputAmount = 1
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
if (!busy)
if(href_list["make"])
var/turf/T = src.loc
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
restart:
if(outputAmount > 0)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
if(!busy)
busy = 1
use_power(power)
spawn(16)
use_power(power)
spawn(16)
flick("autolathe_n",src)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(src)
for(var/obj/item/weapon/storage/container in src.contents)
container.attackby(new_item)
if(new_item.loc == container)
break
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
if(new_item in src)
new_item.loc = T
src.updateUsrDialog()
outputAmount -= 1
busy = 0
goto restart
else
for(var/mob/M in view(3,src))
M << "\red\icon[src] has run out of materials."
else
outputAmount = 1
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.equipped(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
/obj/machinery/autolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/autolathe/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
+14 -5
View File
@@ -613,13 +613,22 @@ Auto Patrol: []"},
return 0
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
threatcount += 4
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if((istype(perp.r_hand, /obj/item/weapon/gun) && !istype(perp.r_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.r_hand, /obj/item/weapon/melee/baton))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
threatcount += 2
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
+13 -3
View File
@@ -588,14 +588,24 @@ Auto Patrol: []"},
if(src.emagged) return 10 //Everyone is a criminal!
if(src.idcheck && !src.allowed(perp))
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
threatcount += 4
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
threatcount += 4
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
threatcount += 2
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
+84 -49
View File
@@ -1,57 +1,92 @@
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/cell))
if(charging)
user << "There is already a cell in the charger."
return
else
user.drop_item()
W.loc = src
charging = W
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
chargelevel = -1
updateicon()
/obj/machinery/cell_charger/proc/updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
if(charging && !(stat & (BROKEN|NOPOWER)) )
var/newlevel = round( charging.percent() * 4.0 / 99 )
//world << "nl: [newlevel]"
if(chargelevel != newlevel)
overlays = null
overlays += image('power.dmi', "ccharger-o[newlevel]")
chargelevel = newlevel
else
overlays = null
/obj/machinery/cell_charger/attack_hand(mob/user)
if(charging)
usr.put_in_hand(charging)
charging.add_fingerprint(user)
charging.updateicon()
src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
/obj/machinery/cell_charger
name = "cell charger"
desc = "It charges power cells."
icon = 'power.dmi'
icon_state = "ccharger0"
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 60
power_channel = EQUIP
var
obj/item/weapon/cell/charging = null
chargelevel = -1
proc
updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
/obj/machinery/cell_charger/attack_ai(mob/user)
return
if(charging && !(stat & (BROKEN|NOPOWER)) )
/obj/machinery/cell_charger/process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) )
var/newlevel = round( charging.percent() * 4.0 / 99 )
//world << "nl: [newlevel]"
if(chargelevel != newlevel)
overlays = null
overlays += image('power.dmi', "ccharger-o[newlevel]")
chargelevel = newlevel
else
overlays = null
examine()
set src in oview(5)
..()
usr << "There's [charging ? "a" : "no"] cell in the charger."
if(charging)
usr << "Current charge: [charging.charge]"
attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/cell) && anchored)
if(charging)
user << "\red There is already a cell in the charger."
return
else
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
if(!isarea(a))
return
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
user << "\red The charger rejects the cell!"
return
user.drop_item()
W.loc = src
charging = W
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
chargelevel = -1
updateicon()
else if(istype(W, /obj/item/weapon/wrench))
if(charging)
user << "\red Remove the cell first!"
return
anchored = !anchored
user << "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground"
playsound(src.loc, 'Ratchet.ogg', 75, 1)
attack_hand(mob/user)
if(charging)
usr.put_in_hand(charging)
charging.add_fingerprint(user)
charging.updateicon()
src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
chargelevel = -1
updateicon()
attack_ai(mob/user)
return
var/added = charging.give(75)
use_power(added / CELLRATE)
process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
return
updateicon()
var/added = charging.give(75)
use_power(added / CELLRATE)
updateicon()
@@ -470,7 +470,7 @@
emergency_shuttle.incall()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
return
@@ -482,10 +482,10 @@
if((ticker.mode.name == "blob")||(ticker.mode.name == "meteor"))
return
emergency_shuttle.recall()
log_game("[key_name(user)] has uncalled the shuttle.")
message_admins("[key_name_admin(user)] has uncalled the shuttle.", 1)
if(emergency_shuttle.direction != -1 && emergency_shuttle.online) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
return
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
@@ -529,7 +529,7 @@
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
..()
@@ -554,7 +554,7 @@
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
..()
-182
View File
@@ -290,193 +290,11 @@ Pod/Blast Doors computer
locked += L
/obj/machinery/computer/pod/proc/alarm()
if(stat & (NOPOWER|BROKEN))
return
if (!( connected ))
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
return
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
spawn( 0 )
M.open()
return
sleep(20)
//connected.drive() *****RM from 40.93.3S
for(var/obj/machinery/mass_driver/M in machines)
if(M.id == id)
M.power = connected.power
M.drive()
sleep(50)
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
spawn( 0 )
M.close()
return
return
/obj/machinery/computer/pod/New()
..()
spawn( 5 )
for(var/obj/machinery/mass_driver/M in machines)
if (M.id == id)
connected = M
else
return
return
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
attack_hand(user)
return
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
if(..())
return
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
user.machine = src
var/d2
if (timing)
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
else
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
var/second = time % 60
var/minute = (time - second) / 60
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
if (connected)
var/temp = ""
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
for(var/t in L)
if (t == connected.power)
temp += text("[] ", t)
else
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
//Foreach goto(172)
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
//*****RM from 40.93.3S
else
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
//*****
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/pod/process()
..()
if (timing)
if (time > 0)
time = round(time) - 1
else
alarm()
time = 0
timing = 0
updateDialog()
return
/obj/machinery/computer/pod/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["power"])
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
if (connected)
connected.power = t
else
if (href_list["alarm"])
alarm()
else
if (href_list["time"])
timing = text2num(href_list["time"])
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
time = min(max(round(time), 0), 120)
else
if (href_list["door"])
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
if(syndicate_station_at_station == 0)
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
return
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
//Foreach goto(298)
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/mass_driver/proc/drive(amount)
if(stat & (BROKEN|NOPOWER))
+222
View File
@@ -0,0 +1,222 @@
/obj/machinery/computer/pod
name = "Pod Launch Control"
desc = "A control for launching pods."
icon_state = "computer_generic"
var
id = 1.0
obj/machinery/mass_driver/connected = null
timing = 0.0
time = 30.0
/obj/machinery/computer/pod/New()
..()
spawn( 5 )
for(var/obj/machinery/mass_driver/M in world)
if (M.id == id)
connected = M
else
return
return
/obj/machinery/computer/pod/proc/alarm()
if(stat & (NOPOWER|BROKEN))
return
if (!( connected ))
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
return
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
spawn( 0 )
M.open()
return
sleep(20)
//connected.drive() *****RM from 40.93.3S
for(var/obj/machinery/mass_driver/M in world)
if(M.id == id)
M.power = connected.power
M.drive()
sleep(50)
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
spawn( 0 )
M.close()
return
return
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
attack_hand(user)
return
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
if(..())
return
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
user.machine = src
var/d2
if (timing)
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
else
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
var/second = time % 60
var/minute = (time - second) / 60
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
if (connected)
var/temp = ""
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
for(var/t in L)
if (t == connected.power)
temp += text("[] ", t)
else
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
//Foreach goto(172)
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
//*****RM from 40.93.3S
else
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
//*****
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/pod/process()
..()
if (timing)
if (time > 0)
time = round(time) - 1
else
alarm()
time = 0
timing = 0
updateDialog()
return
/obj/machinery/computer/pod/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["power"])
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
if (connected)
connected.power = t
else
if (href_list["alarm"])
alarm()
else
if (href_list["time"])
timing = text2num(href_list["time"])
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
time = min(max(round(time), 0), 120)
else
if (href_list["door"])
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
if(syndicate_station_at_station == 0)
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
return
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
//Foreach goto(298)
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/computer/pod/old
icon_state = "old"
name = "DoorMex Control Computer"
/obj/machinery/computer/pod/old/syndicate
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
+1 -1
View File
@@ -264,7 +264,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
..()
if (src.closeOtherId != null)
spawn (5)
for (var/obj/machinery/door/airlock/A in machines)
for (var/obj/machinery/door/airlock/A in world)
if (A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
+9 -3
View File
@@ -70,12 +70,18 @@
continue
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses)) continue
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses))
continue
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
if(!H.head:up) continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice)) continue
if(!H.head:up)
continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice))
continue
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
if (istype(O, /mob/living/silicon/robot))
if(O:flashproof())
continue
O.Weaken(strength)
if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
+2 -3
View File
@@ -89,7 +89,6 @@
flick("[base_state]-spark", src)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
src.last_spark = world.time
@@ -124,12 +123,12 @@
active = 1
icon_state = "launcheract"
for(var/obj/machinery/sparker/M in machines)
for(var/obj/machinery/sparker/M in world)
if (M.id == src.id)
spawn( 0 )
M.ignite()
for(var/obj/machinery/igniter/M in machines)
for(var/obj/machinery/igniter/M in world)
if(M.id == src.id)
use_power(50)
M.on = !( M.on )
+74 -56
View File
@@ -1,5 +1,5 @@
obj/machinery/recharger
anchored = 1.0
anchored = 1
icon = 'stationobjs.dmi'
icon_state = "recharger0"
name = "recharger"
@@ -11,62 +11,80 @@ obj/machinery/recharger
obj/item/weapon/gun/energy/charging = null
obj/item/weapon/melee/baton/charging2 = null
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if (src.charging || src.charging2)
return
if (istype(G, /obj/item/weapon/gun/energy))
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
return
if (istype(G, /obj/item/weapon/gun/energy/staff))
user << "It's a wooden staff, not a gun!"
return
user.drop_item()
G.loc = src
src.charging = G
use_power = 2
if (istype(G, /obj/item/weapon/melee/baton))
user.drop_item()
G.loc = src
src.charging2 = G
use_power = 2
attackby(obj/item/weapon/G as obj, mob/user as mob)
if (istype(G, /obj/item/weapon/gun/energy))
if (src.charging || src.charging2)
return
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
return
if (istype(G, /obj/item/weapon/gun/energy/staff))
user << "It's a wooden staff, not a gun!"
return
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
if(!isarea(a))
return
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
user << "\red The recharger rejects the weapon!"
return
user.drop_item()
G.loc = src
src.charging = G
use_power = 2
else if (istype(G, /obj/item/weapon/melee/baton))
if (src.charging || src.charging2)
return
user.drop_item()
G.loc = src
src.charging2 = G
use_power = 2
else if(istype(G, /obj/item/weapon/wrench))
if (src.charging || src.charging2)
user << "\red Remove the weapon first!"
return
anchored = !anchored
user << "You [anchored ? "attach" : "detach"] the recharger [anchored ? "to" : "from"] the ground"
playsound(src.loc, 'Ratchet.ogg', 75, 1)
/obj/machinery/recharger/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit)
attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit)
return
if (src.charging)
src.charging.update_icon()
src.charging.loc = src.loc
src.charging = null
use_power = 1
if(src.charging2)
src.charging2.update_icon()
src.charging2.loc = src.loc
src.charging2 = null
use_power = 1
attack_paw(mob/user as mob)
if ((ticker && ticker.mode.name == "monkey"))
return src.attack_hand(user)
process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
if (src.charging)
src.charging.update_icon()
src.charging.loc = src.loc
src.charging = null
use_power = 1
if(src.charging2)
src.charging2.update_icon()
src.charging2.loc = src.loc
src.charging2 = null
use_power = 1
/obj/machinery/recharger/attack_paw(mob/user as mob)
if ((ticker && ticker.mode.name == "monkey"))
return src.attack_hand(user)
/obj/machinery/recharger/process()
if ((src.charging) && ! (stat & NOPOWER) )
if (src.charging.power_supply.charge < src.charging.power_supply.maxcharge)
src.charging.power_supply.give(100)
src.icon_state = "recharger1"
use_power(250)
if (src.charging)
if (src.charging.power_supply.charge < src.charging.power_supply.maxcharge)
src.charging.power_supply.give(100)
src.icon_state = "recharger1"
use_power(250)
else
src.icon_state = "recharger2"
else if (src.charging2)
if (src.charging2.charges < src.charging2.maximum_charges)
src.charging2.charges++
src.icon_state = "recharger1"
use_power(250)
else
src.icon_state = "recharger2"
else
src.icon_state = "recharger2"
if ((src.charging2) && ! (stat & NOPOWER) )
if (src.charging2.charges < src.charging2.maximum_charges)
src.charging2.charges++
src.icon_state = "recharger1"
use_power(250)
else
src.icon_state = "recharger2"
else if (!(src.charging || src.charging2))
src.icon_state = "recharger0"
src.icon_state = "recharger0"
+10
View File
@@ -863,6 +863,16 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")
if(href_list["targetid"])
if(!bibledelay)//Taken from the bible code part thing
bibledelay = 60
spawn(0)
while(bibledelay >= 1 && src)
sleep(10)
bibledelay -- // subtract one second to countdown
bibledelay = 0
if(BOOKS_USE_SQL && config.sql_enabled)
var/sqlid = href_list["targetid"]
var/DBConnection/dbcon = new()
+4 -1
View File
@@ -34,6 +34,9 @@ datum/controller/game_controller
setupgenetics()
for(var/i = 0, i < max_secret_rooms, i++)
make_mining_asteroid_secret()
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
syndicate_code_response = generate_code_phrase()
@@ -125,7 +128,7 @@ datum/controller/game_controller
ticker.process()
sleep(world.timeofday+10-start_time)
sleep(world.timeofday+10-start_time) // This is fine for our tick lag. DMTG
spawn process()
+18 -1
View File
@@ -111,6 +111,21 @@
/obj/item/mecha_parts/mecha_equipment/weapon/honker
),
"Cyborg Upgrade Modules" = list(
/obj/item/borg/upgrade/reset,
/obj/item/borg/upgrade/restart,
/obj/item/borg/upgrade/vtec
///obj/item/borg/upgrade/tasercooler
///obj/item/borg/upgrade/flashproof
),
"Misc"=list(/obj/item/mecha_parts/mecha_tracking)
)
@@ -128,6 +143,8 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
// part_sets["Cyborg Upgrade Modules"] = typesof(/obj/item/borg/upgrade/) - /obj/item/borg/upgrade/ // Eh. This does it dymaically, but to support having the items referenced otherwhere in the code but not being constructable, going to do it manaully.
for(var/part_set in part_sets)
convert_part_set(part_set)
files = new /datum/research(src) //Setup the research data holder.
@@ -299,7 +316,7 @@
return
proc/check_resources(var/obj/item/mecha_parts/part)
if(istype(part, /obj/item/robot_parts) || istype(part, /obj/item/mecha_parts))
if(istype(part, /obj/item/robot_parts) || istype(part, /obj/item/mecha_parts) || istype(part,/obj/item/borg/upgrade))
for(var/resource in part.construction_cost)
if(resource in src.resources)
if(src.resources[resource] < get_resource_cost_w_coeff(part,resource))
+49 -1
View File
@@ -19,6 +19,8 @@ var/const
var/strength = 5
var/attached = 0
attack_paw(user as mob) //can be picked up by aliens
if(isalien(user))
attack_hand(user)
@@ -87,6 +89,13 @@ var/const
if(!isliving(M) || isalien(M))
return
if(attached)
return
else
attached++
spawn(MAX_IMPREGNATION_TIME)
attached = 0
var/mob/living/L = M //just so I don't need to use :
if(stat != CONSCIOUS)
@@ -180,7 +189,8 @@ var/const
for(var/mob/living/carbon/alien/alien in world)
var/image/activeIndicator = image('alien.dmi', loc = src, icon_state = "facehugger_active")
activeIndicator.override = 1
alien.client.images += activeIndicator
if(alien && alien.client)
alien.client.images += activeIndicator
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
GoIdle()
@@ -220,3 +230,41 @@ var/const
return
/obj/item/clothing/mask/facehugger/angry
stat = CONSCIOUS
/obj/item/clothing/mask/facehugger/angry/HasProximity(atom/movable/AM as mob|obj)
if(istype(AM , /mob/living/))
Attach(AM)
/*
/obj/item/clothing/mask/facehugger/angry/New()
processing_objects.Add(src)
/obj/item/clothing/mask/facehugger/angry/process()
if(!src || src.stat == (DEAD))
return
for(var/mob/living/carbon/C in range(1,src))
Attach(C)
return
for(var/mob/living/carbon/C in range(5,src))
if(isInSight(C,src))
step_to(src,C,0)
spawn(5)
if(C in range(1,src))
Attach(C)
return
step_rand(src)
return
/obj/item/clothing/mask/facehugger/angry/Attach(var/mob/M as mob)
..(M)
processing_objects.Remove(src)
*/
+212
View File
@@ -0,0 +1,212 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 17
/obj/item/weapon/contraband
name = "contraband item"
desc = "You probably shouldn't be holding this."
icon = 'contraband.dmi'
force = 0
/obj/item/weapon/contraband/poster
name = "rolled-up poster"
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. Its vulgar themes have marked it as Contraband aboard Nanotrasen© Space Facilities."
icon_state = "rolled_poster"
var/serial_number = 0
var/obj/effect/decal/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
if(given_serial==0)
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
src.resulting_poster = new(serial_number)
else
serial_number = given_serial
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
src.name += " - No. [serial_number]"
..(loc)
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
if(src.resulting_poster)
src.resulting_poster.add_fingerprint(user)
..()*/
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
if (istype(A, /turf/simulated/wall))
if(src.resulting_poster == null)
return
else
var/turf/simulated/wall/W = A
var/check = 0
var/stuff_on_wall = 0
for( var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
if(istype(O,/obj/effect/decal/poster))
check = 1
break
stuff_on_wall++
if(stuff_on_wall==3)
check = 1
break
if(check)
user << "<FONT COLOR='RED'>The wall is far too cluttered to place a poster!</FONT>"
return
src.resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
W.contents += src.resulting_poster
del(src)*/
//############################## THE ACTUAL DECALS ###########################
obj/effect/decal/poster
name = "poster"
desc = "A large piece of space-resistant printed paper. It's considered contraband."
icon = 'contraband.dmi'
anchored = 1
var/serial_number //Will hold the value of src.loc if nobody initialises it
var/ruined = 0
obj/effect/decal/poster/New(var/serial)
src.serial_number = serial
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
icon_state = "poster[serial_number]"
switch(serial_number)
if(1)
name += " - Unlucky Space Explorer"
desc += " This particular one depicts a skeletal form within a space suit."
if(2)
name += " - Positronic Logic Conflicts"
desc += " This particular one depicts the cold, unmoving stare of a particular advanced AI."
if(3)
name += " - Paranoia"
desc += " This particular one warns of the dangers of trusting your co-workers too much."
if(4)
name += " - Keep Calm"
desc += " This particular one is of a famous New Earth design, although a bit modified."
if(5)
name += " - Martian Warlord"
desc += " This particular one depicts the cartoony mug of a certain Martial Warmonger."
if(6)
name += " - Technological Singularity"
desc += " This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
if(7)
name += " - Wasteland"
desc += " This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"13\" is visible on their blue jumpsuits."
if(8)
name += " - Pinup Girl Cindy"
desc += " This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
if(9)
name += " - Pinup Girl Amy"
desc += " This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
if(10)
name += " - Don't Panic"
desc += " This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
if(11)
name += " - Underwater Laboratory"
desc += " This particular one is of the fabled last crew of Nanotrasen's previous project before going big on Asteroid mining, Sealab."
if(12)
name += " - Missing Gloves"
desc += " This particular one is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
if(13)
name += " - Rogue AI"
desc += " This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
if(14)
name += " - User of the Arcane Arts"
desc += " This particular one depicts a wizard, casting a spell. You can't really make out if it's an actial photograph or a computer-generated image."
if(15)
name += " - Levitating Skull"
desc += " This particular one is the portrait of a certain flying, friendly and somewhat sex-crazed enchanted skull. Its adventures along with its fabled companion are now fading through history..."
if(16)
name += " - Augmented Legend"
desc += " This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
if(17)
name += " - Dangerous Static"
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
..()
obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/wirecutters) )
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
if(src.ruined)
user << "<FONT COLOR='BLUE'>You remove the remnants of the poster.</FONT>"
del(src)
else
user << "<FONT COLOR='BLUE'>You carefully remove the poster from the wall.</FONT>"
src.roll_and_drop(user.loc)
return
/obj/effect/decal/poster/attack_hand(mob/user as mob)
if(src.ruined)
return
var/temp_loc = user.loc
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
if("Yes")
if(user.loc != temp_loc)
return
for (var/mob/O in hearers(5, src.loc))
O.show_message("<FONT COLOR='RED'>[user.name] rips the [src.name] in a single, decisive motion!</FONT>" )
playsound(src.loc, 'poster_ripped.ogg', 100, 1)
src.ruined = 1
src.icon_state = "poster_ripped"
src.name = "Ripped poster"
src.desc = "You can't make out anything from the poster's original print. It's ruined."
src.add_fingerprint(user)
if("No")
return
/obj/effect/decal/poster/proc/roll_and_drop(turf/loc)
var/obj/item/weapon/contraband/poster/P = new(src,src.serial_number)
P.resulting_poster = src
P.loc = loc
src.loc = P
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
if(!P.resulting_poster) return
var/stuff_on_wall = 0
for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff
if(istype(O,/obj/effect/decal/poster))
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
return
stuff_on_wall++
if(stuff_on_wall==3)
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
return
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
var/obj/effect/decal/poster/D = P.resulting_poster
var/temp_loc = user.loc
flick("poster_being_set",D)
D.loc = src
del(P) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway
playsound(D.loc, 'poster_being_created.ogg', 100, 1)
sleep(17)
if(!D) return
if(istype(src,/turf/simulated/wall) && user && user.loc == temp_loc)//Let's check if everything is still there
user << "<span class='notice'>You place the poster!</span>"
else
D.roll_and_drop(temp_loc)
return
+4 -1
View File
@@ -97,7 +97,10 @@
flashfail = 1
else if(issilicon(M))
M.Weaken(rand(5,10))
if(!M:flashproof())
M.Weaken(rand(5,10))
else
flashfail++
if(isrobot(user))
spawn(0)
+16 -15
View File
@@ -254,21 +254,22 @@ THERMAL GLASSES
/obj/item/clothing/head/helmet/welding/verb/toggle()
set category = "Object"
set name = "Adjust welding mask"
if(src.up)
src.up = !src.up
src.see_face = !src.see_face
src.flags |= HEADCOVERSEYES
flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES
icon_state = "welding"
usr << "You flip the mask down to protect your eyes."
else
src.up = !src.up
src.see_face = !src.see_face
src.flags &= ~HEADCOVERSEYES
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES)
icon_state = "weldingup"
usr << "You push the mask up out of your face."
usr.update_clothing()
if(usr.canmove && usr.stat != 2 && !usr.restrained())
if(src.up)
src.up = !src.up
src.see_face = !src.see_face
src.flags |= HEADCOVERSEYES
flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES
icon_state = "welding"
usr << "You flip the mask down to protect your eyes."
else
src.up = !src.up
src.see_face = !src.see_face
src.flags &= ~HEADCOVERSEYES
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES)
icon_state = "weldingup"
usr << "You push the mask up out of your face."
usr.update_clothing()
/obj/item/clothing/head/cargosoft/dropped()
src.icon_state = "cargosoft"
@@ -231,7 +231,99 @@ ZIPPO
icon_state = "cigarbutt"
/////////////////
//SMOKING PIPES//
/////////////////
/obj/item/clothing/mask/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
icon_state = "cobpipeoff"
throw_speed = 0.5
item_state = "cobpipeoff"
w_class = 1
body_parts_covered = null
var
lit = 0
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
lastHolder = null
smoketime = 100
maxsmoketime = 100 //make sure this is equal to your smoketime
proc
light(var/flavor_text = "[usr] lights the [name].")
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0))
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0))
light("\red After some fiddling, [user] manages to light their [name] with [W].")
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
light("\red [user] lights \his [name] with \his [W].")
return
light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
src.damtype = "fire"
src.icon_state = icon_on
src.item_state = icon_on
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
processing_objects.Add(src)
process()
var/turf/location = get_turf(src)
src.smoketime--
if(src.smoketime < 1)
new /obj/effect/decal/ash(location)
if(ismob(src.loc))
var/mob/living/M = src.loc
M << "\red Your [src.name] goes out, and you empty the ash."
src.lit = 0
src.icon_state = icon_off
src.item_state = icon_off
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
dropped(mob/user as mob)
if(src.lit == 1)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] puts out the [].", user,src.name), 1)
src.lit = 0
src.icon_state = icon_off
src.item_state = icon_off
processing_objects.Remove(src)
return ..()
/obj/item/clothing/mask/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
if(src.smoketime <= 0)
user << "\blue You refill the pipe with tobacco."
smoketime = maxsmoketime
return
/*
/obj/item/clothing/mask/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match))
..()
else
user << "\red The [src] straight out REFUSES to be lit by such means."
*/// Yeah no. DMTG
/obj/item/clothing/mask/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters."
smoketime = 400
maxsmoketime = 400
////////////
//CIG PACK//
@@ -4,6 +4,7 @@ CONTAINS:
Plant-B-Gone
Nettle
Deathnettle
Craftables (Cob pipes, potato batteries, pumpkinheads)
*/
@@ -135,3 +136,32 @@ Deathnettle
else
usr << "All the leaves have fallen off the deathnettle from violent whacking."
del(src)
//Crafting
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
new /obj/item/clothing/mask/pipe/cobpipe (user.loc)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/melee/energy))
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
new /obj/item/clothing/head/helmet/hardhat/pumpkinhead (user.loc)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/cable_coil))
if(W:amount >= 5)
W:amount -= 5
if(!W:amount) del(W)
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
new /obj/item/weapon/cell/potato(user.loc)
del(src)
return
+2 -1
View File
@@ -70,7 +70,7 @@ var/global/list/cached_icons = list()
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'items.dmi'
icon_state = "paint_neutral"
var/color = "neutral"
var/color = "FFFFFF"
item_state = "paintcan"
w_class = 3.0
@@ -109,6 +109,7 @@ var/global/list/cached_icons = list()
color = "FFFFFF"
icon_state = "paint_white"
/obj/item/weapon/paint/anycolor
name = "Any color"
icon_state = "paint_neutral"
+16 -10
View File
@@ -15,6 +15,9 @@
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)
for(var/obj/structure/falserwall/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)
/* 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.*/
@@ -73,24 +76,25 @@
return
/turf/simulated/wall/New()
/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()
for(var/obj/structure/falserwall/W in range(src,1))
W.relativewall()
return
/turf/simulated/wall/New()
relativewall_neighbours()
..()
/obj/structure/falsewall/New()
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()
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/*/turf/simulated/shuttle/wall/New()
@@ -134,6 +138,8 @@
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falserwall/W in range(temploc,1))
W.relativewall()
..()
/*/turf/simulated/shuttle/wall/Del()
@@ -144,4 +150,4 @@
for(var/turf/simulated/shuttle/wall/W in range(temploc,1))
W.relativewall()
..()*/
..()*/
+351 -253
View File
@@ -290,8 +290,8 @@
air_master.tiles_to_update += S
return S
/turf/simulated/wall/New()
..()
//turf/simulated/wall/New()
// ..()
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
@@ -303,6 +303,14 @@
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/plasteel( src )
else if(istype(src,/turf/simulated/wall/cult))
if(!devastated)
playsound(src.loc, 'Welder.ogg', 100, 1)
new /obj/effect/decal/cleanable/blood(src)
else
new /obj/effect/decal/cleanable/blood(src)
new /obj/effect/decal/remains/human(src)
else
if(!devastated)
playsound(src.loc, 'Welder.ogg', 100, 1)
@@ -396,293 +404,371 @@
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
var/turf/T = get_turf(user)
if (!( istype(T, /turf) ))
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
thermitemelt(user)
return
if (thermite)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
var/turf/simulated/floor/F = ReplaceWithPlating()
F.burn_tile()
F.icon_state = "wall_thermite"
user << "\red The thermite melts the wall."
spawn(100) del(O)
F.sd_LumReset()
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
thermitemelt(user)
return
if (W:remove_fuel(0,user))
W:welding = 2
user << "\blue Now disassembling the outer wall plating."
var/turf/T = user.loc //get user's location for delay checks
//DECONSTRUCTION
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
WT.welding = 2
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100)
if (W && istype(src, /turf/simulated/wall))
if ((get_turf(user) == T && user.equipped() == W))
user << "\blue You disassembled the outer wall plating."
dismantle_wall()
W:welding = 1
if( !istype(src, /turf/simulated/wall) || !user || !WT || !T ) return
WT.welding = 1
if( user.loc == T && user.equipped() == WT )
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
else
user << "\blue You need more welding fuel to complete this task."
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
if (thermite)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
var/turf/simulated/floor/F = ReplaceWithPlating()
F.burn_tile()
F.icon_state = "wall_thermite"
user << "\red The thermite melts the wall."
spawn(100) del(O)
F.sd_LumReset()
return
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
else
user << "\blue Now disassembling the outer wall plating."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(60)
if (W && istype(src, /turf/simulated/wall))
if ((get_turf(user) == T && user.equipped() == W))
user << "\blue You disassembled the outer wall plating."
dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced apart."), 2)
return
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = user.loc
user << "\blue Now drilling through wall."
sleep(60)
if (W && istype(src, /turf/simulated/wall))
if ((user.loc == T && user.equipped() == W))
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( user.loc == T && user.equipped() == W )
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
var/turf/T = user.loc
user << "\blue Now slicing through wall."
W:spark_system.start()
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You begin to drill though the wall.</span>"
sleep(60)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( user.loc == T && user.equipped() == W )
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You stab \the [EB] into the wall and begin to slice it apart.</span>"
playsound(src.loc, "sparks", 50, 1)
sleep(70)
if (W && istype(src, /turf/simulated/wall))
if ((user.loc == T && user.equipped() == W))
W:spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
if( user.loc == T && user.equipped() == W )
EB.spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart and sparks flying.</span>", 2)
return
else if(istype(W,/obj/item/apc_frame))
var/obj/item/apc_frame/AH = W
AH.try_build(src)
return
else
return attack_hand(user)
return
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
if(!istype(src, /turf/simulated/wall/r_wall))
return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
W:eyecheck(user)
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
if (thermite)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
var/turf/simulated/floor/F = ReplaceWithPlating()
F.burn_tile()
F.icon_state = "wall_thermite"
user << "\red The thermite melts the wall."
spawn(100) del(O)
F.sd_LumReset()
return
if (src.d_state == 2)
W:welding = 2
user << "\blue Slicing metal cover."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(60)
if ((user.loc == T && user.equipped() == W))
src.d_state = 3
user << "\blue You removed the metal cover."
W:welding = 1
else if (src.d_state == 5)
W:welding = 2
user << "\blue Removing support rods."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100)
if ((user.loc == T && user.equipped() == W))
src.d_state = 6
new /obj/item/stack/rods( src )
user << "\blue You removed the support rods."
W:welding = 1
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
if (thermite)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
var/turf/simulated/floor/F = ReplaceWithPlating()
F.burn_tile()
F.icon_state = "wall_thermite"
user << "\red The thermite melts the wall."
spawn(100) del(O)
F.sd_LumReset()
return
if (src.d_state == 2)
user << "\blue Slicing metal cover."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(40)
if ((user.loc == T && user.equipped() == W))
src.d_state = 3
user << "\blue You removed the metal cover."
else if (src.d_state == 5)
user << "\blue Removing support rods."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(70)
if ((user.loc == T && user.equipped() == W))
src.d_state = 6
new /obj/item/stack/rods( src )
user << "\blue You removed the support rods."
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "\blue This wall is too thick to slice through. You will need to find a different path."
return
else if (istype(W, /obj/item/weapon/wrench))
if (src.d_state == 4)
var/turf/T = user.loc
user << "\blue Detaching support rods."
playsound(src.loc, 'Ratchet.ogg', 100, 1)
sleep(40)
if ((user.loc == T && user.equipped() == W))
src.d_state = 5
user << "\blue You detach the support rods."
else if (istype(W, /obj/item/weapon/wirecutters))
if (src.d_state == 0)
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
src.d_state = 1
new /obj/item/stack/rods( src )
else if (istype(W, /obj/item/weapon/screwdriver))
if (src.d_state == 1)
var/turf/T = user.loc
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
user << "\blue Removing support lines."
sleep(40)
if ((user.loc == T && user.equipped() == W))
src.d_state = 2
user << "\blue You removed the support lines."
else if (istype(W, /obj/item/weapon/crowbar))
if (src.d_state == 3)
var/turf/T = user.loc
user << "\blue Prying cover off."
playsound(src.loc, 'Crowbar.ogg', 100, 1)
sleep(100)
if ((user.loc == T && user.equipped() == W))
src.d_state = 4
user << "\blue You removed the cover."
else if (src.d_state == 6)
var/turf/T = user.loc
user << "\blue Prying outer sheath off."
playsound(src.loc, 'Crowbar.ogg', 100, 1)
sleep(100)
if ((user.loc == T && user.equipped() == W))
user << "\blue You removed the outer sheath."
dismantle_wall()
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
thermitemelt(user)
return
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = user.loc
user << "\blue You begin to drill though, this will take some time."
sleep(200)
if ((user.loc == T && user.equipped() == W))
user << "\blue Your drill tears though the reinforced plating."
dismantle_wall()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
thermitemelt(user)
return
else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state))
var/turf/T = user.loc
user << "\blue Repairing wall."
sleep(100)
if ((user.loc == T && user.equipped() == W))
src.d_state = 0
src.icon_state = initial(src.icon_state)
user << "\blue You repaired the wall."
if (W:amount > 1)
W:amount--
else
del(W)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
if(istype(W,/obj/item/apc_frame))
var/obj/item/apc_frame/AH = W
AH.try_build(src)
EB.spark_system.start()
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "<span class='notice'>This wall is too thick to slice through. You will need to find a different path.</span>"
return
if(src.d_state > 0)
src.icon_state = "r_wall-[d_state]"
var/turf/T = user.loc //get user's location for delay checks
else
//DECONSTRUCTION
switch(d_state)
if(0)
if (istype(W, /obj/item/weapon/wirecutters))
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
src.d_state = 1
src.icon_state = "r_wall-1"
new /obj/item/stack/rods( src )
user << "<span class='notice'>You cut the outer grille.</span>"
return
if(1)
if (istype(W, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin removing the support lines.</span>"
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 1 && user.loc == T && user.equipped() == W )
src.d_state = 2
src.icon_state = "r_wall-2"
user << "<span class='notice'>You remove the support lines.</span>"
return
//REPAIRING (replacing the outer grille for cosmetic damage)
else if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/O = W
src.d_state = 0
src.icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
user << "<span class='notice'>You replace the outer grille.</span>"
if (O.amount > 1)
O.amount--
else
del(O)
return
if(2)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
WT.welding = 2
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(60)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
WT.welding = 1
if( d_state == 2 && user.loc == T && user.equipped() == WT )
src.d_state = 3
src.icon_state = "r_wall-3"
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 2 && user.loc == T && user.equipped() == W )
src.d_state = 3
src.icon_state = "r_wall-3"
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return
if(3)
if (istype(W, /obj/item/weapon/crowbar))
user << "<span class='notice'>You struggle to pry off the cover.</span>"
playsound(src.loc, 'Crowbar.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 3 && user.loc == T && user.equipped() == W )
src.d_state = 4
src.icon_state = "r_wall-4"
user << "<span class='notice'>You pry off the cover.</span>"
return
if(4)
if (istype(W, /obj/item/weapon/wrench))
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame.</span>"
playsound(src.loc, 'Ratchet.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 4 && user.loc == T && user.equipped() == W )
src.d_state = 5
src.icon_state = "r_wall-5"
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
return
if(5)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
WT.welding = 2
user << "<span class='notice'>You begin slicing through the support rods.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
WT.welding = 1
if( d_state == 5 && user.loc == T && user.equipped() == WT )
src.d_state = 6
src.icon_state = "r_wall-6"
new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
user << "<span class='notice'>You begin slicing through the support rods.</span>"
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(70)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 5 && user.loc == T && user.equipped() == W )
src.d_state = 6
src.icon_state = "r_wall-6"
new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
return
if(6)
if( istype(W, /obj/item/weapon/crowbar) )
user << "<span class='notice'>You struggle to pry off the outer sheath.</span>"
playsound(src.loc, 'Crowbar.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( user.loc == T && user.equipped() == W )
user << "<span class='notice'>You pry off the outer sheath.</span>"
dismantle_wall()
return
//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv
//DRILLING
if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You begin to drill though the wall.</span>"
sleep(200)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( user.loc == T && user.equipped() == W )
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
dismantle_wall()
//REPAIRING
else if( istype(W, /obj/item/stack/sheet/metal) && d_state )
var/obj/item/stack/sheet/metal/MS = W
user << "<span class='notice'>You begin patching-up the wall with \a [MS].</span>"
sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
if( user.loc == T && user.equipped() == MS && d_state )
src.d_state = 0
src.icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
user << "<span class='notice'>You repair the last of the damage.</span>"
if (MS.amount > 1)
MS.amount--
else
del(MS)
//APC
else if( istype(W,/obj/item/apc_frame) )
var/obj/item/apc_frame/AH = W
AH.try_build(src)
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)
return
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
var/turf/simulated/floor/F = ReplaceWithPlating()
F.burn_tile()
F.icon_state = "wall_thermite"
user << "<span class='warning'>The thermite melts through the wall.</span>"
spawn(100)
if(O) del(O)
F.sd_LumReset()
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15))
dismantle_wall()
@@ -743,8 +829,9 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
var/n = name //just in case commands rename it in the ..() call
..()
spawn(4)
update_icon()
name = n
if(src)
update_icon()
name = n
grass
name = "Grass patch"
@@ -756,11 +843,12 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
if(src)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/vault
icon_state = "rockvault"
@@ -782,6 +870,11 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
thermal_conductivity = 0.025
heat_capacity = 325000
/turf/simulated/floor/engine/cult
name = "engraved floor"
icon_state = "cult"
/turf/simulated/floor/engine/n20
New()
..()
@@ -929,6 +1022,11 @@ turf/simulated/floor/return_siding_icon_state()
return
if (ismob(user.pulling))
var/mob/M = user.pulling
// if(M==user) //temporary hack to stop runtimes. ~Carn
// user.pulling = null //but...fixed the root of the problem
// return //shoudn't be needed now, unless somebody fucks with pulling again.
var/mob/t = M.pulling
M.pulling = null
step(user.pulling, get_dir(user.pulling.loc, src))
@@ -1432,7 +1530,7 @@ turf/simulated/floor/return_siding_icon_state()
if ((A && A.loc))
A.loc.Entered(A)
return
*/
*/ //Don't touch this either! DMTG
/obj/effect/vaultspawner
var/maxX = 6
var/maxY = 6
+165
View File
@@ -0,0 +1,165 @@
/obj/vehicle/airtight
//inner atmos
var/use_internal_tank = 0
var/internal_tank_valve = ONE_ATMOSPHERE
var/obj/machinery/portable_atmospherics/canister/internal_tank
var/datum/gas_mixture/cabin_air
var/obj/machinery/atmospherics/portables_connector/connected_port = null
var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature
var/datum/global_iterator/pr_give_air //moves air from tank to cabin
/obj/vehicle/airtight/New()
..()
src.add_airtank()
src.add_cabin()
src.add_airtight_iterators()
//######################################### Helpers for airtight vehicles #########################################
/obj/vehicle/airtight/proc/add_cabin()
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air
/obj/vehicle/airtight/proc/add_airtank()
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank
/obj/vehicle/airtight/proc/add_airtight_iterators()
pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src))
pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src))
//######################################### Specific datums for airtight vehicles #################################
/datum/global_iterator/vehicle_preserve_temp //normalizing cabin air temperature to 20 degrees celsium
delay = 20
process(var/obj/vehicle/airtight/V)
if(V.cabin_air && V.cabin_air.return_volume() > 0)
var/delta = V.cabin_air.temperature - T20C
V.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
return
/datum/global_iterator/vehicle_tank_give_air
delay = 15
process(var/obj/vehicle/airtight/V)
if(V.internal_tank)
var/datum/gas_mixture/tank_air = V.internal_tank.return_air()
var/datum/gas_mixture/cabin_air = V.cabin_air
var/release_pressure = V.internal_tank_valve
var/cabin_pressure = cabin_air.return_pressure()
var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2)
var/transfer_moles = 0
if(pressure_delta > 0) //cabin pressure lower than release pressure
if(tank_air.return_temperature() > 0)
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
cabin_air.merge(removed)
else if(pressure_delta < 0) //cabin pressure higher than release pressure
var/datum/gas_mixture/t_air = V.get_turf_air()
pressure_delta = cabin_pressure - release_pressure
if(t_air)
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
if(pressure_delta > 0) //if location pressure is lower than cabin pressure
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles)
if(t_air)
t_air.merge(removed)
else //just delete the cabin gas, we're in space or some shit
del(removed)
else
return stop()
return
//######################################### Atmospherics for vehicles #############################################
/obj/vehicle/proc/get_turf_air()
var/turf/T = get_turf(src)
if(T)
. = T.return_air()
return
/obj/vehicle/airtight/remove_air(amount)
if(use_internal_tank)
return cabin_air.remove(amount)
else
var/turf/T = get_turf(src)
if(T)
return T.remove_air(amount)
return
/obj/vehicle/airtight/return_air()
if(use_internal_tank)
return cabin_air
return get_turf_air()
/obj/vehicle/airtight/proc/return_pressure()
. = 0
if(use_internal_tank)
. = cabin_air.return_pressure()
else
var/datum/gas_mixture/t_air = get_turf_air()
if(t_air)
. = t_air.return_pressure()
return
/obj/vehicle/airtight/proc/return_temperature()
. = 0
if(use_internal_tank)
. = cabin_air.return_temperature()
else
var/datum/gas_mixture/t_air = get_turf_air()
if(t_air)
. = t_air.return_temperature()
return
/obj/vehicle/airtight/proc/connect(obj/machinery/atmospherics/portables_connector/new_port)
//Make sure not already connected to something else
if(connected_port || !new_port || new_port.connected_device)
return 0
//Make sure are close enough for a valid connection
if(new_port.loc != src.loc)
return 0
//Perform the connection
connected_port = new_port
connected_port.connected_device = src
//Actually enforce the air sharing
var/datum/pipe_network/network = connected_port.return_network(src)
if(network && !(internal_tank.return_air() in network.gases))
network.gases += internal_tank.return_air()
network.update = 1
log_message("Vehicle airtank connected to external port.")
return 1
/obj/vehicle/airtight/proc/disconnect()
if(!connected_port)
return 0
var/datum/pipe_network/network = connected_port.return_network(src)
if(network)
network.gases -= internal_tank.return_air()
connected_port.connected_device = null
connected_port = null
src.log_message("Vehicle airtank disconnected from external port.")
return 1
View File
+190
View File
@@ -0,0 +1,190 @@
/obj/vehicle
name = "Vehicle"
icon = 'vehicles.dmi'
density = 1
anchored = 1
unacidable = 1 //To avoid the pilot-deleting shit that came with mechas
layer = MOB_LAYER
//var/can_move = 1
var/mob/living/carbon/occupant = null
//var/step_in = 10 //make a step in step_in/10 sec.
//var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
//var/step_energy_drain = 10
var/health = 300 //health is health
//var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
var/obj/item/weapon/cell/cell //Our power source
var/state = 0
var/list/log = new
var/last_message = 0
var/add_req_access = 1
var/maint_access = 1
//var/dna //dna-locking the mech
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
var/datum/effect/effect/system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
//inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri
//var/use_internal_tank = 0
//var/internal_tank_valve = ONE_ATMOSPHERE
//var/obj/machinery/portable_atmospherics/canister/internal_tank
//var/datum/gas_mixture/cabin_air
//var/obj/machinery/atmospherics/portables_connector/connected_port = null
var/obj/item/device/radio/radio = null
var/max_temperature = 2500
//var/internal_damage_threshold = 50 //health percentage below which internal damage is possible
var/internal_damage = 0 //contains bitflags
var/list/operation_req_access = list()//required access level for mecha operation
var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment
//var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri
var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss
//var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri
var/datum/global_iterator/pr_internal_damage //processes internal damage
var/wreckage
var/list/equipment = new
var/obj/selected
//var/max_equip = 3
var/datum/events/events
/obj/vehicle/New()
..()
events = new
icon_state += "-unmanned"
add_radio()
//add_cabin() //No cabin for non-airtights
spark_system.set_up(2, 0, src)
spark_system.attach(src)
add_cell()
add_iterators()
removeVerb(/obj/mecha/verb/disconnect_from_port)
removeVerb(/atom/movable/verb/pull)
log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.")
loc.Entered(src)
return
//################ Helpers ###########################################################
/obj/vehicle/proc/removeVerb(verb_path)
verbs -= verb_path
/obj/vehicle/proc/addVerb(verb_path)
verbs += verb_path
/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank*/
/obj/vehicle/proc/add_cell(var/obj/item/weapon/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new(src)
cell.charge = 15000
cell.maxcharge = 15000
/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air*/
/obj/vehicle/proc/add_radio()
radio = new(src)
radio.name = "[src] radio"
radio.icon = icon
radio.icon_state = icon_state
radio.subspace_transmission = 1
/obj/vehicle/proc/add_iterators()
pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0)
//pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0)
//pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri
//pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri
/obj/vehicle/proc/check_for_support()
if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src)))
return 1
else
return 0
//################ Logs and messages ############################################
/obj/vehicle/proc/log_message(message as text,red=null)
log.len++
log[log.len] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
return log.len
//################ Global Iterator Datums ######################################
/datum/global_iterator/vehicle_intertial_movement //inertial movement in space
delay = 7
process(var/obj/vehicle/V as obj, direction)
if(direction)
if(!step(V, direction)||V.check_for_support())
src.stop()
else
src.stop()
return
/datum/global_iterator/mecha_internal_damage // processing internal damage
process(var/obj/mecha/mecha)
if(!mecha.hasInternalDamage())
return stop()
if(mecha.hasInternalDamage(MECHA_INT_FIRE))
if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5))
mecha.clearInternalDamage(MECHA_INT_FIRE)
if(mecha.internal_tank)
if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)))
mecha.setInternalDamage(MECHA_INT_TANK_BREACH)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
if(mecha.cabin_air && mecha.cabin_air.return_volume()>0)
mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15))
if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2)
mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire")
if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum
mecha.pr_int_temp_processor.stop()
if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank
if(mecha.internal_tank)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10)
if(mecha.loc && hascall(mecha.loc,"assume_air"))
mecha.loc.assume_air(leaked_gas)
else
del(leaked_gas)
if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
if(mecha.get_charge())
mecha.spark_system.start()
mecha.cell.charge -= min(20,mecha.cell.charge)
mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge)
return
+12 -3
View File
@@ -31,7 +31,7 @@ var/global/BSACooldown = 0
if ((!( ticker ) || emergency_shuttle.location))
return
emergency_shuttle.incall()
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
@@ -41,12 +41,11 @@ var/global/BSACooldown = 0
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if(1)
emergency_shuttle.recall()
world << "\blue <B>Alert: The shuttle is going back!</B>"
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
@@ -59,6 +58,7 @@ var/global/BSACooldown = 0
if (src.rank in list("Badmin", "Game Admin", "Game Master"))
emergency_shuttle.settimeleft( input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num )
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]")
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]", 1)
href_list["secretsadmin"] = "check_antagonist"
else
@@ -1372,11 +1372,19 @@ var/global/BSACooldown = 0
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["quick_create_object"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master"))
return quick_create_object(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_turf"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master"))
return create_turf(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_mob"])
if (src.rank in list("Badmin", "Game Admin", "Game Master"))
return create_mob(usr)
@@ -2519,6 +2527,7 @@ var/global/BSACooldown = 0
if(lvl >= 3 )
dat += "<A href='?src=\ref[src];create_object=1'>Create Object</A><br>"
dat += "<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>"
dat += "<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>"
if(lvl >= 5)
dat += "<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>"
+12 -13
View File
@@ -50,13 +50,9 @@
if ("Trial Admin")
holder.level = 3
if(holder.state == 2) // if observing
// Debug
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/toggleadminhelpsound
// Admin helpers
verbs += /client/proc/toggle_view_range
// Admin game intrusion
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
@@ -65,6 +61,7 @@
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
@@ -74,12 +71,9 @@
holder.level = 2
if(holder.state == 2) // if observing
deadchat = 1
// Settings
verbs += /obj/admins/proc/toggleaban //abandon mob
verbs += /client/proc/deadchat //toggles deadchat
// Admin helpers
verbs += /client/proc/cmd_admin_check_contents
// Admin game intrusion
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
@@ -121,6 +115,8 @@
//Moderator
if (holder.level >= 0)
verbs += /obj/admins/proc/announce
verbs += /obj/admins/proc/startnow
verbs += /obj/admins/proc/toggleAI //Toggle the AI
verbs += /obj/admins/proc/toggleenter //Toggle enterting
// verbs += /obj/admins/proc/toggleguests //Toggle guests entering
@@ -136,8 +132,6 @@
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
verbs += /obj/admins/proc/announce
verbs += /obj/admins/proc/startnow
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
@@ -185,6 +179,8 @@
deadchat = 1
seeprayers = 1
verbs += /obj/admins/proc/view_txt_log
verbs += /obj/admins/proc/view_atk_log
verbs += /obj/admins/proc/toggleaban //abandon mob
verbs += /obj/admins/proc/show_traitor_panel
verbs += /client/proc/cmd_admin_remove_plasma
@@ -196,6 +192,7 @@
verbs += /client/proc/toggleprayers
verbs += /client/proc/deadmin_self
verbs += /client/proc/tension_report
verbs += /client/proc/toggleadminhelpsound
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/admin_deny_shuttle
@@ -230,14 +227,12 @@
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/toggleadminhelpsound
else return
//Game Admin
if (holder.level >= 5)
verbs += /obj/admins/proc/spawn_atom
verbs += /obj/admins/proc/view_txt_log
verbs += /obj/admins/proc/view_atk_log
verbs += /client/proc/cmd_admin_list_open_jobs
verbs += /client/proc/cmd_admin_direct_narrate
verbs += /client/proc/colorooc
@@ -249,6 +244,7 @@
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/kill_airgroup
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
@@ -265,6 +261,7 @@
//verbs += /client/proc/cmd_admin_emp --Merged with view variables
//verbs += /client/proc/give_spell --Merged with view variables
//verbs += /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs += /client/proc/cmd_switch_radio --removed as tcommsat is staying
// Moved over from tg's Game Master:
verbs += /obj/admins/proc/toggle_aliens //toggle aliens
verbs += /obj/admins/proc/toggle_space_ninja //toggle ninjas
@@ -386,7 +383,8 @@
verbs -= /client/proc/cmd_admin_create_centcom_report
verbs -= /client/proc/deadchat //toggles deadchat
verbs -= /client/proc/cmd_admin_mute
verbs -= /client/proc/cmd_admin_pm
verbs -= /client/proc/cmd_admin_pm_context
verbs -= /client/proc/cmd_admin_pm_panel
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_subtle_message
verbs -= /client/proc/warn
@@ -446,6 +444,7 @@
//verbs -= /obj/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/admin_deny_shuttle
verbs -= /client/proc/cmd_admin_christmas
verbs -= /client/proc/editappear
+19
View File
@@ -1,4 +1,5 @@
/var/create_object_html = null
/obj/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
@@ -7,3 +8,21 @@
create_object_html = dd_replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(dd_replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
/obj/admins/proc/quick_create_object(var/mob/user)
var/quick_create_object_html = null
var/pathtext = null
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/machinery")
var path = text2path(pathtext)
if (!quick_create_object_html)
var/objectjs = null
objectjs = dd_list2text(typesof(path), ";")
quick_create_object_html = file2text('create_object.html')
quick_create_object_html = dd_replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(dd_replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
File diff suppressed because it is too large Load Diff
+797
View File
@@ -0,0 +1,797 @@
//GUYS REMEMBER TO ADD A += to UPDATE_ADMINS
//AND A -= TO CLEAR_ADMIN_VERBS
//Some verbs that are still in the code but not used atm
// Debug
// verbs += /client/proc/radio_report //for radio debugging dont think its been used in a very long time
// verbs += /client/proc/fix_next_move //has not been an issue in a very very long time
// Mapping helpers added via enable_debug_verbs verb
// verbs += /client/proc/do_not_use_these
// verbs += /client/proc/camera_view
// verbs += /client/proc/sec_camera_report
// verbs += /client/proc/intercom_view
// verbs += /client/proc/air_status //Air things
// verbs += /client/proc/Cell //More air things
/client/proc/update_admins(var/rank)
if(!holder)
holder = new /obj/admins(src)
holder.rank = rank
if(!holder.state)
var/state = alert("Which state do you want the admin to begin in?", "Admin-state", "Play", "Observe", "Neither")
if(state == "Play")
holder.state = 1
admin_play()
return
else if(state == "Observe")
holder.state = 2
admin_observe()
return
else
del(holder)
return
switch (rank)
if ("Game Master")
holder.level = 6
if ("Senior Game Admin")
holder.level = 5
if ("Game Admin")
holder.level = 4
if ("Secondary Game Admin")
holder.level = 3
if ("Trial Admin")
holder.level = 2
if(holder.state == 2) // if observing
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Temporary Admin")
holder.level = 1
if(holder.state == 2) // if observing
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Moderator")
holder.level = 0
if ("Admin Observer")
holder.level = -1
if ("Banned")
holder.level = -2
del(src)
return
else
del(holder)
return
if (holder) //THE BELOW handles granting powers. The above is for special cases only!
holder.owner = src
//Admin Observer
if (holder.level >= -1)
verbs += /client/proc/cmd_admin_say
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadmin_self
else return
//Moderator
if (holder.level >= 0)
verbs += /obj/admins/proc/announce
verbs += /obj/admins/proc/startnow
verbs += /obj/admins/proc/toggleAI //Toggle the AI
verbs += /obj/admins/proc/toggleenter //Toggle enterting
verbs += /obj/admins/proc/toggleguests //Toggle guests entering
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
verbs += /obj/admins/proc/voteres //toggle votes
verbs += /obj/admins/proc/vmode
verbs += /obj/admins/proc/votekill
verbs += /obj/admins/proc/show_player_panel
verbs += /client/proc/deadchat //toggles deadchat
verbs += /client/proc/cmd_admin_mute
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
verbs += /client/proc/game_panel
verbs += /client/proc/player_panel
verbs += /client/proc/player_panel_new
verbs += /client/proc/unban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/unjobban_panel
verbs += /client/proc/voting
verbs += /client/proc/hide_verbs
verbs += /client/proc/general_report
verbs += /client/proc/air_report
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_admin_prison --Merged with player panel
//verbs += /obj/admins/proc/unprison --Merged with player panel
else return
//Temporary Admin
if (holder.level >= 1)
deadchat = 1
seeprayers = 1
verbs += /obj/admins/proc/toggleaban //abandon mob
verbs += /obj/admins/proc/show_traitor_panel
verbs += /client/proc/cmd_admin_remove_plasma
verbs += /client/proc/admin_call_shuttle
verbs += /client/proc/admin_cancel_shuttle
verbs += /client/proc/cmd_admin_dress
verbs += /client/proc/respawn_character
verbs += /client/proc/spawn_xeno
verbs += /client/proc/toggleprayers
verbs += /client/proc/deadmin_self
verbs += /client/proc/tension_report
verbs += /client/proc/toggleadminhelpsound
verbs += /client/proc/cmd_admin_add_random_ai_law
verbs += /client/proc/secrets
verbs += /client/proc/play_sound
verbs += /client/proc/stealth
verbs += /obj/admins/proc/delay //game start delay
verbs += /obj/admins/proc/immreboot //immediate reboot
verbs += /obj/admins/proc/restart //restart
verbs += /client/proc/cmd_admin_check_contents
verbs += /client/proc/cmd_admin_create_centcom_report
verbs += /client/proc/toggle_hear_deadcast
verbs += /client/proc/toggle_hear_radio
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/deadmin_self
else return
/* //Trial Admin
if (holder.level >= 2)
else return
*/
//Secondary Game Admin
if (holder.level >= 3)
verbs += /obj/admins/proc/view_txt_log
verbs += /obj/admins/proc/view_atk_log
verbs += /obj/admins/proc/spawn_atom
verbs += /client/proc/cmd_admin_list_open_jobs
verbs += /client/proc/cmd_admin_direct_narrate
verbs += /client/proc/kill_air
verbs += /client/proc/cmd_admin_world_narrate
verbs += /client/proc/cmd_debug_del_all
verbs += /client/proc/cmd_debug_tog_aliens
verbs += /client/proc/mapload
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/send_space_ninja
verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/Blobize //I need to remember to move/remove this later
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested)
verbs += /client/proc/toggle_gravity_on
verbs += /client/proc/toggle_gravity_off
verbs += /client/proc/toggle_random_events
verbs += /obj/admins/proc/adrev //toggle admin revives
verbs += /obj/admins/proc/adspawn //toggle admin item spawning
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/Debug2 //debug toggle switch
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_add_random_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/hide_most_verbs
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs += /client/proc/cmd_admin_explosion --Merged with view variables
//verbs += /client/proc/cmd_admin_emp --Merged with view variables
//verbs += /client/proc/give_spell --Merged with view variables
//verbs += /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs += /client/proc/cmd_switch_radio --removed as tcommsat is staying
else return
//Game Admin
if (holder.level >= 4)
verbs += /client/proc/ticklag
else return
//Senior Game admin
if (holder.level >= 5)
verbs += /client/proc/colorooc
verbs += /client/proc/strike_team
verbs += /client/proc/everyone_random
verbs += /client/proc/only_one
verbs += /obj/admins/proc/toggle_aliens //toggle aliens
verbs += /obj/admins/proc/toggle_space_ninja //toggle ninjas
verbs += /client/proc/deadmin_self
else return
//Game Master
if (holder.level >= 6)
verbs += /obj/admins/proc/adjump
verbs += /client/proc/callproc
verbs += /client/proc/triple_ai
verbs += /client/proc/get_admin_state
verbs += /client/proc/reload_admins
verbs += /client/proc/cmd_debug_make_powernets
verbs += /client/proc/object_talk
verbs += /client/proc/enable_debug_verbs
verbs += /client/proc/deadmin_self
else return
return
/client/proc/clear_admin_verbs()
deadchat = 0
verbs -= /obj/admins/proc/vmode
verbs -= /obj/admins/proc/votekill
verbs -= /obj/admins/proc/announce
verbs -= /obj/admins/proc/startnow
verbs -= /obj/admins/proc/toggleAI //Toggle the AI
verbs -= /obj/admins/proc/toggleenter //Toggle enterting
verbs -= /obj/admins/proc/toggleguests //Toggle guests entering
verbs -= /obj/admins/proc/toggleooc //toggle ooc
verbs -= /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
verbs -= /obj/admins/proc/voteres //toggle votes
verbs -= /obj/admins/proc/delay //game start delay
verbs -= /obj/admins/proc/immreboot //immediate reboot
verbs -= /obj/admins/proc/restart //restart
verbs -= /obj/admins/proc/show_traitor_panel
verbs -= /obj/admins/proc/show_player_panel
verbs -= /obj/admins/proc/toggle_aliens //toggle aliens
verbs -= /obj/admins/proc/toggle_space_ninja //toggle ninjas
verbs -= /obj/admins/proc/adjump
verbs -= /obj/admins/proc/view_txt_log
verbs -= /obj/admins/proc/view_atk_log
verbs -= /obj/admins/proc/spawn_atom
verbs -= /obj/admins/proc/adrev //toggle admin revives
verbs -= /obj/admins/proc/adspawn //toggle admin item spawning
verbs -= /obj/admins/proc/toggleaban //abandon mob
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs -= /client/proc/show_verbs
verbs -= /client/proc/colorooc
verbs -= /client/proc/triple_ai
verbs -= /client/proc/get_admin_state
verbs -= /client/proc/reload_admins
verbs -= /client/proc/kill_air
verbs -= /client/proc/cmd_debug_make_powernets
verbs -= /client/proc/object_talk
verbs -= /client/proc/strike_team
verbs -= /client/proc/cmd_admin_list_open_jobs
verbs -= /client/proc/cmd_admin_direct_narrate
verbs -= /client/proc/cmd_admin_world_narrate
verbs -= /client/proc/callproc
verbs -= /client/proc/Cell
verbs -= /client/proc/cmd_debug_del_all
verbs -= /client/proc/cmd_debug_tog_aliens
verbs -= /client/proc/ticklag
verbs -= /client/proc/mapload
verbs -= /client/proc/check_words
verbs -= /client/proc/drop_bomb
verbs -= /client/proc/cmd_admin_grantfullaccess
verbs -= /client/proc/cmd_admin_drop_everything
verbs -= /client/proc/make_sound
verbs -= /client/proc/only_one
verbs -= /client/proc/send_space_ninja
verbs -= /client/proc/debug_variables
verbs -= /client/proc/cmd_modify_ticker_variables
verbs -= /client/proc/Debug2 //debug toggle switch
verbs -= /client/proc/toggle_view_range
verbs -= /client/proc/Getmob
verbs -= /client/proc/Getkey
verbs -= /client/proc/sendmob
verbs -= /client/proc/Jump
verbs -= /client/proc/jumptokey
verbs -= /client/proc/jumptomob
verbs -= /client/proc/jumptoturf
verbs -= /client/proc/cmd_admin_add_freeform_ai_law
verbs -= /client/proc/cmd_admin_add_random_ai_law
verbs -= /client/proc/cmd_admin_rejuvenate
verbs -= /client/proc/cmd_admin_delete
verbs -= /client/proc/toggleadminhelpsound
verbs -= /client/proc/cmd_admin_remove_plasma
verbs -= /client/proc/admin_call_shuttle
verbs -= /client/proc/admin_cancel_shuttle
verbs -= /client/proc/cmd_admin_dress
verbs -= /client/proc/respawn_character
verbs -= /client/proc/spawn_xeno
verbs -= /client/proc/cmd_admin_add_random_ai_law
verbs -= /client/proc/secrets
verbs -= /client/proc/play_sound
verbs -= /client/proc/stealth
verbs -= /client/proc/cmd_admin_check_contents
verbs -= /client/proc/cmd_admin_create_centcom_report
verbs -= /client/proc/deadchat //toggles deadchat
verbs -= /client/proc/cmd_admin_mute
verbs -= /client/proc/cmd_admin_pm_context
verbs -= /client/proc/cmd_admin_pm_panel
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_subtle_message
verbs -= /client/proc/warn
verbs -= /client/proc/dsay
verbs -= /client/proc/admin_play
verbs -= /client/proc/admin_observe
verbs -= /client/proc/game_panel
verbs -= /client/proc/player_panel
verbs -= /client/proc/unban_panel
verbs -= /client/proc/jobbans
verbs -= /client/proc/unjobban_panel
verbs -= /client/proc/voting
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/general_report
verbs -= /client/proc/air_report
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_gib_self
verbs -= /client/proc/restartcontroller
verbs -= /client/proc/play_local_sound
verbs -= /client/proc/enable_debug_verbs
verbs -= /client/proc/toggleprayers
verbs -= /client/proc/Blobize
verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
verbs -= /client/proc/toggle_hear_deadcast
verbs -= /client/proc/toggle_hear_radio
verbs -= /client/proc/tension_report
verbs -= /client/proc/player_panel_new
verbs -= /client/proc/toggle_gravity_on
verbs -= /client/proc/toggle_gravity_off
verbs -= /client/proc/toggle_random_events
verbs -= /client/proc/deadmin_self
verbs -= /client/proc/jumptocoord
verbs -= /client/proc/everyone_random
verbs -= /proc/possess
verbs -= /proc/release
//verbs -= /client/proc/give_spell --Merged with view variables
//verbs -= /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs -= /client/proc/cmd_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_explosion --Merged with view variables
//verbs -= /client/proc/cmd_admin_emp --Merged with view variables
//verbs -= /client/proc/cmd_admin_godmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_gib --Merged with view variables
//verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_attack_log --Merged with view variables
//verbs -= /proc/togglebuildmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_prison --Merged with player panel
//verbs -= /obj/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
return
/client/proc/admin_observe()
set category = "Admin"
set name = "Set Observe"
if(!holder)
alert("You are not an admin")
return
verbs -= /client/proc/admin_play
spawn( 1200 )
verbs += /client/proc/admin_play
var/rank = holder.rank
clear_admin_verbs()
holder.state = 2
update_admins(rank)
if(!istype(mob, /mob/dead/observer))
mob.adminghostize(1)
src << "\blue You are now observing"
/client/proc/admin_play()
set category = "Admin"
set name = "Set Play"
if(!holder)
alert("You are not an admin")
return
verbs -= /client/proc/admin_observe
spawn( 1200 )
verbs += /client/proc/admin_observe
var/rank = holder.rank
clear_admin_verbs()
holder.state = 1
update_admins(rank)
if(istype(mob, /mob/dead/observer))
mob:reenter_corpse()
src << "\blue You are now playing"
/client/proc/get_admin_state()
set name = "Get Admin State"
set category = "Debug"
for(var/mob/M in world)
if(M.client && M.client.holder)
if(M.client.holder.state == 1)
src << "[M.key] is playing - [M.client.holder.state]"
else if(M.client.holder.state == 2)
src << "[M.key] is observing - [M.client.holder.state]"
else
src << "[M.key] is undefined - [M.client.holder.state]"
/client/proc/player_panel()
set name = "Player Panel"
set category = "Admin"
if(holder)
holder.player_panel_old()
return
/client/proc/player_panel_new()
set name = "Player Panel-New"
set category = "Admin"
if(holder)
holder.player_panel_new()
return
/client/proc/jobbans()
set name = "Display Job bans"
set category = "Admin"
if(holder)
holder.Jobbans()
return
/client/proc/unban_panel()
set name = "Unban Panel"
set category = "Admin"
if(holder)
holder.unbanpanel()
return
/client/proc/game_panel()
set name = "Game Panel"
set category = "Admin"
if(holder)
holder.Game()
return
/client/proc/secrets()
set name = "Secrets"
set category = "Admin"
if (holder)
holder.Secrets()
return
/client/proc/voting()
set name = "Voting"
set category = "Admin"
if (holder)
holder.Voting()
/client/proc/colorooc()
set category = "Fun"
set name = "OOC Text Color"
ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color
return
/client/proc/stealth()
set category = "Admin"
set name = "Stealth Mode"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
stealth = !stealth
if(stealth)
var/new_key = trim(input("Enter your desired display name.", "Fake Key", key))
if(!new_key)
stealth = 0
return
new_key = strip_html(new_key)
if(length(new_key) >= 26)
new_key = copytext(new_key, 1, 26)
fakekey = new_key
else
fakekey = null
log_admin("[key_name(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]", 1)
#define AUTOBATIME 10
/client/proc/warn(var/mob/M in world)
set category = "Special Verbs"
set name = "Warn"
set desc = "Warn a player"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if(M.client && M.client.holder && (M.client.holder.level >= holder.level))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if(!M.client.warned)
M << "\red <B>You have been warned by an administrator. This is the only warning you will recieve.</B>"
M.client.warned = 1
message_admins("\blue [ckey] warned [M.ckey].")
else
AddBan(M.ckey, M.computer_id, "Autobanning due to previous warn", ckey, 1, AUTOBATIME)
M << "\red<BIG><B>You have been autobanned by [ckey]. This is what we in the biz like to call a \"second warning\".</B></BIG>"
M << "\red This is a temporary ban; it will automatically be removed in [AUTOBATIME] minutes."
log_admin("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
ban_unban_log_save("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
message_admins("\blue [ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
feedback_inc("ban_warn",1)
del(M.client)
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Special Verbs"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
var/turf/epicenter = mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb")
var/choice = input("What size explosion would you like to produce?") in choices
switch(choice)
if(null)
return 0
if("Small Bomb")
explosion(epicenter, 1, 2, 3, 3)
if("Medium Bomb")
explosion(epicenter, 2, 3, 4, 4)
if("Big Bomb")
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
var/devastation_range = input("Devastation range (in tiles):") as num
var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
var/light_impact_range = input("Light impact range (in tiles):") as num
var/flash_range = input("Flash range (in tiles):") as num
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
/client/proc/give_spell(mob/T as mob in world) // -- Urist
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
if(!S) return
T.spell_list += new S
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Special Verbs"
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
var/message = input("What do you want the message to be?", "Make Sound") as text|null
if(!message)
return
for (var/mob/V in hearers(O))
V.show_message(message, 2)
/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Special Verbs"
if(src.mob)
togglebuildmode(src.mob)
/client/proc/toggleadminhelpsound()
set name = "Toggle Adminhelp Sound"
set category = "Admin"
sound_adminhelp = !sound_adminhelp
if(sound_adminhelp)
usr << "You will now hear a sound when adminhelps arrive"
else
usr << "You will no longer hear a sound when adminhelps arrive"
/client/proc/object_talk(var/msg as text) // -- TLE
set category = "Special Verbs"
set name = "oSay"
set desc = "Display a message to everyone who can hear the target"
if(mob.control_object)
if(!msg)
return
for (var/mob/V in hearers(mob.control_object))
V.show_message("<b>[mob.control_object.name]</b> says: \"" + msg + "\"", 2)
/client/proc/kill_air() // -- TLE
set category = "Debug"
set name = "Kill Air"
set desc = "Toggle Air Processing"
if(kill_air)
kill_air = 0
usr << "<b>Enabled air processing.</b>"
else
kill_air = 1
usr << "<b>Disabled air processing.</b>"
/client/proc/show_verbs()
set name = "Toggle admin verb visibility"
set category = "Admin"
src << "Restoring admin verbs back"
var/temp = deadchat
clear_admin_verbs()
update_admins(holder.rank)
deadchat = temp
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
set name = "Toggle NewClickProc"
set category = "Admin"
if(!holder) return
using_new_click_proc = !using_new_click_proc
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
/client/proc/toggle_hear_deadcast()
set name = "Toggle Hear Deadcast"
set category = "Admin"
if(!holder) return
STFU_ghosts = !STFU_ghosts
usr << "You will now [STFU_ghosts ? "not hear" : "hear"] ghosts"
/client/proc/toggle_hear_radio()
set name = "Toggle Hear Radio"
set category = "Admin"
if(!holder) return
STFU_radio = !STFU_radio
usr << "You will now [STFU_radio ? "not hear" : "hear"] radio chatter from nearby radios or speakers"
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"
if(src.holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
del(holder)
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.", 1)
src.clear_admin_verbs()
src.update_admins(null)
admins.Remove(src.ckey)
usr << "You are now a normal player."
/client/proc/startSinglo()
set name = "Singlo Starter"
set category = "Debug"
set desc = "Starts a self-sustaining, stable singlo. This artifical singlo does not have a gravitational pull."
for(var/obj/machinery/emitter/E in world)
if(E.anchored)
E.active = 1
for(var/obj/machinery/field_generator/F in world)
if(F.anchored)
F.Varedit_start = 1
spawn(30)
for(var/obj/machinery/the_singularitygen/G in world)
if(G.anchored)
var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50)
spawn(0)
del(G)
S.energy = 1750
S.current_size = 7
S.icon = '224x224.dmi'
S.icon_state = "singularity_s7"
S.pixel_x = -96
S.pixel_y = -96
S.grav_pull = 0
//S.consume_range = 3
S.dissipate = 0
//S.dissipate_delay = 10
//S.dissipate_track = 0
//S.dissipate_strength = 10
for(var/obj/machinery/power/rad_collector/Rad in world)
if(Rad.anchored)
if(!Rad.P)
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
Plasma.air_contents.toxins = 70
Rad.drainratio = 0
Rad.P = Plasma
Plasma.loc = Rad
if(!Rad.active)
Rad.toggle_power()
for(var/obj/machinery/power/smes/SMES in world)
if(SMES.anchored)
SMES.chargemode = 1
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
set name = "Toggle most admin verb visibility"
set category = "Admin"
src << "Hiding most admin verbs"
var/temp = deadchat
clear_admin_verbs()
deadchat = temp
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs += /client/proc/show_verbs
if(holder.level >= 5)//Senior Game Admin********************************************************************
verbs += /client/proc/colorooc
if(holder.level >= 3)//Secondary Game admin********************************************************************
verbs += /client/proc/debug_variables
//verbs += /client/proc/cmd_modify_object_variables --merged with view vairiables
verbs += /client/proc/Jump
verbs += /client/proc/jumptoturf
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
verbs += /client/proc/game_panel
verbs += /client/proc/player_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadchat //toggles deadchat
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /client/proc/cmd_admin_say//asay
verbs += /client/proc/toggleadminhelpsound
return
/client/proc/hide_verbs()
set name = "Toggle admin verb visibility"
set category = "Admin"
src << "Hiding almost all admin verbs"
var/temp = deadchat
clear_admin_verbs()
deadchat = temp
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs += /client/proc/show_verbs
verbs += /client/proc/deadchat //toggles deadchat
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /client/proc/cmd_admin_say//asay
return
@@ -0,0 +1,502 @@
var/list/forbidden_varedit_object_types = list(
/obj/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea.
/obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering
/datum/feedback_variable //Prevents people messing with feedback gathering
)
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
set category = "Debug"
set name = "Edit Variables"
set desc="(target) Edit a target item's variables"
src.modify_variables(O)
/client/proc/cmd_modify_ticker_variables()
set category = "Debug"
set name = "Edit Ticker Variables"
if (ticker == null)
src << "Game hasn't started yet."
else
src.modify_variables(ticker)
/client/proc/mod_list_add_ass() //haha
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
var/var_value = null
switch(class)
if("text")
var_value = input("Enter new text:","Text") as null|text
if("num")
var_value = input("Enter new number:","Num") as null|num
if("type")
var_value = input("Enter type:","Type") as null|anything in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in world
if("file")
var_value = input("Pick file:","File") as null|file
if("icon")
var_value = input("Pick icon:","Icon") as null|icon
if("marked datum")
var_value = holder.marked_datum
if(!var_value) return
return var_value
/client/proc/mod_list_add(var/list/L)
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
var/var_value = null
switch(class)
if("text")
var_value = input("Enter new text:","Text") as text
if("num")
var_value = input("Enter new number:","Num") as num
if("type")
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as mob in world
if("file")
var_value = input("Pick file:","File") as file
if("icon")
var_value = input("Pick icon:","Icon") as icon
if("marked datum")
var_value = holder.marked_datum
if(!var_value) return
switch(alert("Would you like to associate a var with the list entry?",,"Yes","No"))
if("Yes")
L += var_value
L[var_value] = mod_list_add_ass() //haha
if("No")
L += var_value
/client/proc/mod_list(var/list/L)
if(!istype(L,/list)) src << "Not a List."
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
var/list/names = sortList(L)
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
if(variable == "(ADD VAR)")
mod_list_add(L)
return
if(!variable)
return
var/default
var/dir
if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
return
if(isnull(variable))
usr << "Unable to determine variable type."
else if(isnum(variable))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
else if(istext(variable))
usr << "Variable appears to be <b>TEXT</b>."
default = "text"
else if(isloc(variable))
usr << "Variable appears to be <b>REFERENCE</b>."
default = "reference"
else if(isicon(variable))
usr << "Variable appears to be <b>ICON</b>."
variable = "\icon[variable]"
default = "icon"
else if(istype(variable,/atom) || istype(variable,/datum))
usr << "Variable appears to be <b>TYPE</b>."
default = "type"
else if(istype(variable,/list))
usr << "Variable appears to be <b>LIST</b>."
default = "list"
else if(istype(variable,/client))
usr << "Variable appears to be <b>CLIENT</b>."
default = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
default = "file"
usr << "Variable contains: [variable]"
if(dir)
switch(variable)
if(1)
dir = "NORTH"
if(2)
dir = "SOUTH"
if(4)
dir = "EAST"
if(8)
dir = "WEST"
if(5)
dir = "NORTHEAST"
if(6)
dir = "SOUTHEAST"
if(9)
dir = "NORTHWEST"
if(10)
dir = "SOUTHWEST"
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
switch(class)
if("list")
mod_list(variable)
if("restore to default")
variable = initial(variable)
if("edit referenced object")
modify_variables(variable)
if("(DELETE FROM LIST)")
L -= variable
return
if("text")
variable = input("Enter new text:","Text",\
variable) as text
if("num")
variable = input("Enter new number:","Num",\
variable) as num
if("type")
variable = input("Enter type:","Type",variable) \
in typesof(/obj,/mob,/area,/turf)
if("reference")
variable = input("Select reference:","Reference",\
variable) as mob|obj|turf|area in world
if("mob reference")
variable = input("Select reference:","Reference",\
variable) as mob in world
if("file")
variable = input("Pick file:","File",variable) \
as file
if("icon")
variable = input("Pick icon:","Icon",variable) \
as icon
if("marked datum")
variable = holder.marked_datum
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
usr << "\red It is forbidden to edit this object's variables."
return
var/class
var/variable
var/var_value
if(param_var_name)
if(!param_var_name in O.vars)
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
return
if (param_var_name == "holder" && holder.rank != "Game Master")
src << "No. Stop being stupid."
return
if (locked.Find(param_var_name) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
src << "Editing this variable requires you to be a game master or game admin."
return
variable = param_var_name
var_value = O.vars[variable]
if(autodetect_class)
if(isnull(var_value))
usr << "Unable to determine variable type."
class = null
autodetect_class = null
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
class = "num"
dir = 1
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
class = "text"
else if(isloc(var_value))
usr << "Variable appears to be <b>REFERENCE</b>."
class = "reference"
else if(isicon(var_value))
usr << "Variable appears to be <b>ICON</b>."
var_value = "\icon[var_value]"
class = "icon"
else if(istype(var_value,/atom) || istype(var_value,/datum))
usr << "Variable appears to be <b>TYPE</b>."
class = "type"
else if(istype(var_value,/list))
usr << "Variable appears to be <b>LIST</b>."
class = "list"
else if(istype(var_value,/client))
usr << "Variable appears to be <b>CLIENT</b>."
class = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
class = "file"
else
var/list/names = list()
for (var/V in O.vars)
names += V
names = sortList(names)
variable = input("Which var?","Var") as null|anything in names
if(!variable)
return
var_value = O.vars[variable]
if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
return
if (variable == "holder" && holder.rank != "Game Master") //Hotfix, a bit ugly but that exploit has been there for ages and now somebody just had to go and tell everyone of it bluh bluh - U
return
if(!autodetect_class)
var/dir
var/default
if(isnull(var_value))
usr << "Unable to determine variable type."
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
default = "text"
else if(isloc(var_value))
usr << "Variable appears to be <b>REFERENCE</b>."
default = "reference"
else if(isicon(var_value))
usr << "Variable appears to be <b>ICON</b>."
var_value = "\icon[var_value]"
default = "icon"
else if(istype(var_value,/atom) || istype(var_value,/datum))
usr << "Variable appears to be <b>TYPE</b>."
default = "type"
else if(istype(var_value,/list))
usr << "Variable appears to be <b>LIST</b>."
default = "list"
else if(istype(var_value,/client))
usr << "Variable appears to be <b>CLIENT</b>."
default = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
default = "file"
usr << "Variable contains: [var_value]"
if(dir)
switch(var_value)
if(1)
dir = "NORTH"
if(2)
dir = "SOUTH"
if(4)
dir = "EAST"
if(8)
dir = "WEST"
if(5)
dir = "NORTHEAST"
if(6)
dir = "SOUTHEAST"
if(9)
dir = "NORTHWEST"
if(10)
dir = "SOUTHWEST"
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
var/original_name
if (!istype(O, /atom))
original_name = "\ref[O] ([O])"
else
original_name = O:name
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
switch(class)
if("list")
mod_list(O.vars[variable])
return
if("restore to default")
O.vars[variable] = initial(O.vars[variable])
if("edit referenced object")
return .(O.vars[variable])
if("text")
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
if(var_new==null) return
O.vars[variable] = var_new
if("num")
if(variable=="luminosity")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return
O.sd_SetLuminosity(var_new)
else
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new==null) return
O.vars[variable] = var_new
if("type")
var/var_new = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf)
if(var_new==null) return
O.vars[variable] = var_new
if("reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob|obj|turf|area in world
if(var_new==null) return
O.vars[variable] = var_new
if("mob reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world
if(var_new==null) return
O.vars[variable] = var_new
if("file")
var/var_new = input("Pick file:","File",O.vars[variable]) as null|file
if(var_new==null) return
O.vars[variable] = var_new
if("icon")
var/var_new = input("Pick icon:","Icon",O.vars[variable]) as null|icon
if(var_new==null) return
O.vars[variable] = var_new
if("marked datum")
O.vars[variable] = holder.marked_datum
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1)
+98
View File
@@ -0,0 +1,98 @@
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
//if(Debug2)
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
var/sound/uploaded_sound = sound(S,0,1,0)
uploaded_sound.channel = 777
uploaded_sound.priority = 255
uploaded_sound.wait = 1
if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin")
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << uploaded_sound
else
if(usr.client.canplaysound)
usr.client.canplaysound = 0
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << uploaded_sound
else
usr << "You already used up your jukebox monies this round!"
del(uploaded_sound)
/client/proc/play_local_sound(S as sound)
set category = "Fun"
set name = "Play Local Sound"
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin")
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
return
/*
/client/proc/cuban_pete()
set category = "Fun"
set name = "Cuban Pete Time"
message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'cubanpetetime.ogg'
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
CP.gib(1)
/client/proc/bananaphone()
set category = "Fun"
set name = "Banana Phone"
message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'bananaphone.ogg'
client/proc/space_asshole()
set category = "Fun"
set name = "Space Asshole"
message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'space_asshole.ogg'
client/proc/honk_theme()
set category = "Fun"
set name = "Honk"
message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'honk_theme.ogg'*/
+26 -1
View File
@@ -202,6 +202,28 @@
//feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
kill_airgroup()
set name = "Kill Local Airgroup"
set desc = "Use this to allow manual manipulation of atmospherics."
set category = "Debug"
if(!holder)
src << "Only administrators may use this command."
return
if(!air_master)
usr << "Cannot find air_system"
return
var/turf/T = get_turf(usr)
if(istype(T, /turf/simulated))
var/datum/air_group/AG = T:parent
AG.next_check = 30
AG.group_processing = 0
else
usr << "Local airgroup is unsimulated!"
//feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
tension_report()
set category = "Debug"
set name = "Show Tension Report"
@@ -254,4 +276,7 @@
"}
usr << browse(output,"window=tensionreport")
for(var/game in tension_master.antagonistmodes)
output += "<font size = 2>Points required/Probability for [game]: [tension_master.antagonistmodes[game]]<br></font>"
usr << browse(output,"window=tensionreport;size=480x480")
feedback_add_details("admin_verb","STR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -780,7 +780,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
emergency_shuttle.incall()
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
//feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
+1 -1
View File
@@ -37,7 +37,6 @@ var/global/sent_strike_team = 0
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
emergency_shuttle.recall()
world << "\blue <B>Alert: The shuttle is going back!</B>"
var/commando_number = commandos_possible //for selecting a leader
var/leader_selected = 0 //when the leader is chosen. The last person spawned.
@@ -186,6 +185,7 @@ var/global/sent_strike_team = 0
L.implanted = 1
var/obj/item/weapon/card/id/W = new(src)
W.name = "[real_name]'s ID Card"
W.icon_state = "centcom"
+23 -16
View File
@@ -1,20 +1,27 @@
/client/proc/ticklag(number as num)
//Merged Doohl's and the existing ticklag as they both had good elements about them ~Carn
/client/proc/ticklag()
set category = "Debug"
set name = "Ticklag"
set desc = "Ticklag"
set hidden = 1
set name = "Set Ticklag"
set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9"
if(Debug2)
if(src.holder)
if(!src.mob)
return
if(src.holder.rank in list("Game Admin", "Game Master"))
world.tick_lag = number
log_admin("[key_name(src.mob)] set tick_lag to [number]")
message_admins("[key_name_admin(usr)] modified world's tick_lag to [number]")
else
alert("Fuck off, no crashing dis server")
return
else
alert("Debugging is disabled")
return
if(!src.mob) return
if(src.holder.rank in list("Game Admin", "Game Master"))
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
//I've used ticks of 2 before to help with serious singulo lags
if(newtick && newtick <= 2 && newtick > 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
//feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
return
src << "\red Error: ticklag(): You are not authorised to use this. Game Admins and higher only."
return
else
src << "\red Error: ticklag(): You must first enable Debugging mode."
return
+15 -10
View File
@@ -5,6 +5,7 @@
origin_tech = "magnets=3;biotech=2"
var
list/icon/current = list() //the current hud icons
proc
process_hud(var/mob/M) return
@@ -88,25 +89,28 @@
var/client/C = M.client
var/icon/tempHud = 'hud.dmi'
for(var/mob/living/carbon/human/perp in view(M))
if(!C) continue
var/perpname = "wot"
if(perp.wear_id)
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
C.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
C.images += image(tempHud,perp,"hudprisoner")
break
else
perpname = perp.name
C.images += image(tempHud,perp,"hudunknown")
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
C.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
C.images += image(tempHud,perp,"hudprisoner")
break
for(var/named in perp.organs)
var/datum/organ/external/E = perp.organs[named]
for(var/obj/item/weapon/implant/I in E.implant)
@@ -116,3 +120,4 @@
if(istype(I,/obj/item/weapon/implant/loyalty))
C.images += image(tempHud,perp,"hud_imp_loyal")
+13 -1
View File
@@ -28,4 +28,16 @@
/obj/item/clothing/head/helmet/hardhat/dblue
icon_state = "hardhat0_dblue"
item_state = "hardhat0_dblue"
color = "dblue"
color = "dblue"
/obj/item/clothing/head/helmet/hardhat/pumpkinhead
name = "carved pumpkin"
desc = "A jack o' lantern! Believed to ward off evil spirits."
icon_state = "hardhat0_pumpkin"
item_state = "hardhat0_pumpkin"
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
brightness_on = 3
see_face = 0.0
color = "pumpkin"
armor = list(melee = 5, bullet = 0, laser = 5,energy = 5, bomb = 5, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
+22 -6
View File
@@ -840,12 +840,13 @@
if(!reagents.total_volume)
var/mob/M = usr
var/obj/item/weapon/paper/paper = locate() in src
M.visible_message( \
"\blue [M] takes a piece of paper from the cookie!", \
"\blue You take a piece of paper from the cookie! Read it!" \
)
M.put_in_hand(paper)
paper.add_fingerprint(M)
if(paper)
M.visible_message( \
"\blue [M] takes a piece of paper from the cookie!", \
"\blue You take a piece of paper from the cookie! Read it!" \
)
M.put_in_hand(paper)
paper.add_fingerprint(M)
/obj/item/weapon/reagent_containers/food/snacks/badrecipe
name = "Burned mess"
@@ -1719,6 +1720,21 @@
icon_state = "applecakeslice"
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie
name = "Pumpkin Pie"
desc = "A delicious treat for the autumn months."
icon_state = "pumpkinpie"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice
slices_num = 5
New()
..()
reagents.add_reagent("nutriment", 29)
/obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice
name = "Pumpkin Pie slice"
desc = "A slice of pumpkin pie, with whipped cream on top. Perfection."
icon_state = "pumpkinpieslice"
bitesize = 2
+10
View File
@@ -996,6 +996,16 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/mysterysoup
/datum/recipe/pumpkinpie
reagents = list("milk" = 5, "sugar" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/egg,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie
//////////////////////////////////////////
// bs12 food port stuff
//////////////////////////////////////////
@@ -14,8 +14,12 @@
if (src.monkeyizing)
return
..()
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
@@ -14,6 +14,8 @@
if (monkeyizing)
return
..()
if (stat != 2) //still breathing
//First, resolve location and get a breath
@@ -4,6 +4,8 @@
set invisibility = 0
set background = 1
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(loc)
environment = loc.return_air()
@@ -509,7 +509,25 @@
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
if (message)
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that.
for(var/mob/M in world)
if (!M.client)
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
M.show_message(message)
if (m_type & 1)
for (var/mob/O in viewers(src, null))
O.show_message(message, m_type)
@@ -1,5 +1,5 @@
/mob/living/carbon/human/examine()
set src in oview()
set src in view()
if(!usr || !src) return
if(((usr.disabilities & 128) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
@@ -524,6 +524,31 @@
// usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
// continue
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
var/criminal = "None"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
//msg += "\[Set Hostile Identification\]\n"
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
msg += "\blue *---------*"
+36 -2
View File
@@ -2425,7 +2425,7 @@ It can still be worn/put on as normal.
var/obj/item/device/pda/pda = wear_id
var/obj/item/weapon/card/id/id = wear_id
if (istype(pda))
if (pda.id)
if (pda.id && istype(pda.id, /obj/item/weapon/card/id))
. = pda.id.assignment
else
. = pda.ownjob
@@ -2582,6 +2582,40 @@ It can still be worn/put on as normal.
spawn( 0 )
O.process()
return
if (href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
var/modified = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
spawn()
H.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
..()
return
@@ -2822,4 +2856,4 @@ It can still be worn/put on as normal.
else
reset_view(0)
remoteobserve = null
src.tkdisable = 0
src.tkdisable = 0
+6 -4
View File
@@ -25,6 +25,8 @@
if(!loc) // Fixing a null error that occurs when the mob isn't found in the world -- TLE
return
..()
//Being buckled to a chair or bed
check_if_buckled()
@@ -125,8 +127,6 @@
if(!currentTurf.sd_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
..() //for organs
src.moved_recently = max(0, moved_recently-1)
/mob/living/carbon/human
@@ -457,8 +457,10 @@
return null
update_canmove()
if(paralysis || resting || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
else canmove = 1
if(paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
canmove = 0
else
canmove = 1
handle_breath(datum/gas_mixture/breath)
if(nodamage || (mutations & mNobreath))
@@ -5,6 +5,7 @@
if (src.monkeyizing)
return
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc)
@@ -23,6 +23,8 @@
if (src.monkeyizing)
return
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc)
environment = loc.return_air()
+36
View File
@@ -1,3 +1,19 @@
/mob/living/Life()
..()
// While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata.
if(!src.storedpreferences)
src.storedpreferences = new
storedpreferences.savefile_load(src, 0)
return
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
@@ -227,6 +243,26 @@
else
density = !lying
/mob/living/proc/Examine_OOC()
set name = "Examine Meta-Info (OOC)"
set category = "OOC"
set src in view()
if(config.allow_Metadata)
usr << "[src]'s Metainfo:"
if(src.storedpreferences)
usr << "[src]'s OOC Notes: [src.storedpreferences.metadata]"
else
usr << "[src] does not have any stored infomation!"
else
usr << "OOC Metadata is not supported by this server!"
return
/mob/living/attack_animal(mob/M)
attack_paw(M) // treat it like a normal non-human attack
+2 -1
View File
@@ -142,8 +142,9 @@
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
if (message_mode)
message = trim(copytext(message, 3))
if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels)))
if (!(ishuman(src) || istype(src, /mob/living/simple_animal)) && (message_mode=="department" || (message_mode in radiochannels)))
message_mode = null //only humans can use headsets
// Check removed so parrots can use headsets!
if (!message)
return
+1 -1
View File
@@ -34,7 +34,7 @@
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
if(explosive)
+20 -2
View File
@@ -551,6 +551,24 @@
if(prob(25))
src << "Hack attempt detected."
return
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
usr << "You must access the borgs internals!"
else if(!src.module && U.require_module)
usr << "The borg must choose a module before he can be upgraded!"
else if(U.locked)
usr << "The upgrade is locked and cannot be used yet!"
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
else
usr << "Upgrade error!"
else
spark_system.start()
return ..()
@@ -1207,9 +1225,9 @@ Frequency:
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
/*/mob/living/silicon/robot/proc/flashproof()
/mob/living/silicon/robot/proc/flashproof()
if(module)
for(var/obj/item/borg/upgrade/flashproof/F in module.modules)
return 1
return 0*/
return 0
@@ -0,0 +1,113 @@
// robot_upgrades.dm
// Contains various borg upgrades.
/obj/item/borg/upgrade/
name = "A borg upgrade module."
desc = "Protected by FRM."
icon = 'module.dmi'
icon_state = "id_mod"
var/construction_time = 120
var/construction_cost = list("metal"=10000)
var/locked = 0
var/require_module = 0
var/installed = 0
/obj/item/borg/upgrade/proc/action()
return
/obj/item/borg/upgrade/reset/
name = "Borg module reset board"
desc = "Used to reset a borg's module. Destroys any other upgrades applied to the borg."
require_module = 1
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
R.uneq_all()
R.hands.icon_state = "nomod"
R.icon_state = "robot"
del(R.module)
R.module = null
R.modtype = "robot"
R.real_name = "Cyborg [R.ident]"
R.name = R.real_name
R.nopush = 0
R.updateicon()
return 1
/obj/item/borg/upgrade/flashproof/
name = "Borg Flash-Supression"
desc = "A highly advanced, complicated system for supressing incoming flashes directed at the borg's optical processing system."
construction_cost = list("metal"=10000,"gold"=2000,"silver"=3000,"glass"=2000, "diamond"=5000)
require_module = 1
/obj/item/borg/upgrade/flashproof/New() // Why the fuck does the fabricator make a new instance of all the items?
//desc = "Sunglasses with duct tape." // Why? D:
/obj/item/borg/upgrade/flashproof/action(var/mob/living/silicon/robot/R)
if(R.module)
R.module += src
return 1
/obj/item/borg/upgrade/restart/
name = "Borg emergancy restart module"
desc = "Used to force a restart of a disabled-but-repaired borg, bringing it back online."
construction_cost = list("metal"=60000 , "glass"=5000)
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
if(!R.key)
for(var/mob/dead/observer/ghost in world)
if(ghost.corpse == R && ghost.client)
ghost.client.mob = ghost.corpse
if(R.health < 0)
usr << "You have to repair the borg before using this module!"
return 0
R.stat = 0
return 1
/obj/item/borg/upgrade/vtec/
name = "Borg VTEC Module"
desc = "Used to kick in a borgs VTEC systems, increasing their speed."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
require_module = 1
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
if(R.speed == -1)
return 0
R.speed--
return 1
/obj/item/borg/upgrade/tasercooler/
name = "Borg Rapid Taser Cooling Module"
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate.."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
require_module = 1
/obj/item/borg/upgrade/tasercooler/action(var/mob/living/silicon/robot/R)
if(R.module != /obj/item/weapon/robot_module/security)
R << "Upgrade mounting error! No suitable hardpoint detected!"
return 0
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R
if(!T)
return 0
if(T.recharge_time <= 2)
R << "Maximum cooling achieved for this hardpoint!"
return 0
else
T.recharge_time = min(2 , T.recharge_time - 4)
return 1
+14 -1
View File
@@ -420,7 +420,7 @@
set src in usr
if(usr != src)
usr << "No."
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Don't metagame!","Flavor Text",html_decode(flavor_text)) as message|null
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
@@ -537,6 +537,19 @@
else
usr << "\blue Now you hear speech only from nearest creatures."
/client/var/ghost_sight = 1
/client/verb/toggle_ghost_sight()
set name = "Ghost sight"
set category = "OOC"
set desc = "Hear emotes from everywhere"
ghost_sight = !ghost_sight
if (ghost_sight)
usr << "\blue Now you hear all emotes in the world"
else
usr << "\blue Now you hear emotes only from nearest creatures."
/mob/verb/observe()
set name = "Observe"
set category = "OOC"
+2 -1
View File
@@ -283,9 +283,10 @@ the mob is also allowed to move without any sort of restriction. For instance, i
var/digitalcamo = 0 // Can they be tracked by the AI?
var/list/organs = list( ) //List of organs.
var/list/organs2 = list()
//Singularity wants you!
var/grav_delay = 0
var/being_strangled = 0
var/datum/preferences/storedpreferences = null
+2
View File
@@ -89,6 +89,8 @@
/obj/item/weapon/grab/proc/s_click(obj/screen/S as obj)
if (!affecting)
return
if (assailant.next_move > world.time)
return
if ((!( assailant.canmove ) || assailant.lying))
@@ -129,6 +129,10 @@ datum/preferences
skill_specialization = null
list/skills = list() // skills can range from 0 to 3
// OOC Metadata:
metadata = ""
New()
hair_style = new/datum/sprite_accessory/hair/short
facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved
@@ -243,6 +247,10 @@ datum/preferences
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_ears=input\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
dat += "<b>Ghost sight:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_sight=input\"><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
if(config.allow_Metadata)
dat += "<b>OOC Notes:</b> <a href='byond://?src=\ref[user];preferences=1;OOC=input'> Edit </a><br>"
if((user.client) && (user.client.holder) && (user.client.holder.rank) && (user.client.holder.rank == "Game Master"))
dat += "<hr><b>OOC</b><br>"
@@ -539,6 +547,8 @@ datum/preferences
proc/process_link(mob/user, list/link_tags)
if(!usr)
return
if(link_tags["occ"])
if(link_tags["cancel"])
user << browse(null, "window=\ref[user]occupation")
@@ -640,6 +650,24 @@ datum/preferences
if("random")
age = rand (minimum_age, maximum_age)
if(link_tags["OOC"])
var/tempnote = ""
tempnote = input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text
var/list/bad_characters = list("_", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
for(var/c in bad_characters)
tempnote = dd_replacetext(tempnote, c, "")
if(length(tempnote) >= 255)
alert("That name is too long. (255 character max, please)")
return
metadata = tempnote
return
if(link_tags["b_type"])
switch(link_tags["b_type"])
if("input")
@@ -783,6 +811,9 @@ datum/preferences
if(link_tags["ghost_ears"])
ghost_ears = !ghost_ears
if(link_tags["ghost_sight"])
ghost_sight = !ghost_sight
if(link_tags["underwear"])
switch(link_tags["underwear"])
if("inputmale")
@@ -991,6 +1022,7 @@ datum/preferences
C.be_syndicate = be_special
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
C.ghost_ears = src.ghost_ears
C.ghost_sight = src.ghost_sight
proc/copydisabilities(mob/living/carbon/human/character)
if(disabilities & 1)
+10
View File
@@ -141,6 +141,7 @@ datum/preferences/proc/savefile_save(mob/user, slot)
F["UI"] << src.UI
F["midis"] << src.midis
F["ghost_ears"] << src.ghost_ears
F["ghost_sight"] << src.ghost_sight
F["pregame_music"] << src.pregame_music
F["ooccolor"] << src.ooccolor
F["lastchangelog"] << src.lastchangelog
@@ -150,6 +151,8 @@ datum/preferences/proc/savefile_save(mob/user, slot)
F["skills"] << src.skills
F["skill_specialization"] << src.skill_specialization
F["OOC_Notes"] << src.metadata
return 1
// loads the savefile corresponding to the mob's ckey
@@ -212,6 +215,8 @@ datum/preferences/proc/savefile_load(mob/user, slot)
F["ghost_ears"] >> src.ghost_ears
if(isnull(ghost_ears)) ghost_ears = 1 //Hotfix
F["pregame_music"] >> src.pregame_music
F["ghost_sight"] >> src.ghost_sight
if(isnull(ghost_sight)) ghost_sight = 1 //Hotfix
F["ooccolor"] >> src.ooccolor
F["lastchangelog"] >> src.lastchangelog
F["UI"] >> src.UI
@@ -244,6 +249,11 @@ datum/preferences/proc/savefile_load(mob/user, slot)
if(!job_alt_titles)
job_alt_titles = new()
F["OOC_Notes"] >> src.metadata
if(isnull(metadata))
metadata = ""
//NOTE: Conversion things go inside this if statement
//When updating the save file remember to add 1 to BOTH the savefile constants
//Also take the old conversion things that no longer apply out of this if
+13 -6
View File
@@ -456,13 +456,16 @@
if("hand")
usr:swap_hand()
if("resist")
if(usr.next_move < world.time)
if(usr.next_move > world.time)
return
usr.next_move = world.time + 20
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
var/resisting = 0
for(var/obj/O in usr.requests)
del(O)
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == 1)
del(G)
else
@@ -477,9 +480,9 @@
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1)
del(G)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
if(resisting)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
var/breakouttime = 1200
var/displaytime = 2
@@ -494,7 +497,8 @@
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 50))
if(!usr:handcuffed || usr:buckled) return
if(!usr:handcuffed || usr:buckled)
return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
usr << "\green You successfully break your handcuffs."
@@ -569,11 +573,14 @@
O.show_message(text("\red <B>[] attempts to unbuckle themself!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:buckled) return
if(!usr:buckled)
return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
usr << "\blue You successfully unbuckle yourself."
usr:buckled.manual_unbuckle(usr)
if("module")
if(issilicon(usr))
if(usr:module)
+1
View File
@@ -12,6 +12,7 @@
emote_see = list("shakes its head", "shivers")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
+2 -5
View File
@@ -18,6 +18,7 @@
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
see_in_dark = 5
var/obj/item/inventory_head
var/obj/item/inventory_back
var/obj/item/inventory_mouth
@@ -392,8 +393,4 @@
dir = i
sleep(1)
else
..()
/obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/corgi
name = "Corgi meat"
desc = "Tastes like... well you know..."
..()
+91
View File
@@ -0,0 +1,91 @@
/mob/living/simple_animal/parrot
name = "\improper Parrot"
desc = "It's a parrot! No dirty words!"
icon = 'mob.dmi'
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
emote_hear = list("squawks","bawks")
emote_see = list("flutters its wings", "glares at you")
speak_chance = 1
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
response_help = "pets the"
response_disarm = "gently moves aside the"
response_harm = "swats the"
ears = new /obj/item/device/radio/headset/heads/ce()
/mob/living/simple_animal/parrot/DrProfessor
name = "Doctor Professor Parrot, PhD"
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE")
response_harm = "is attacked in the face by"
/obj/item/weapon/reagent_containers/food/snacks/cracker/
name = "Cracker"
desc = "It's a salted cracker."
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
user.machine = src
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(ears)
dat += "<br><b>Headset:</b> [ears] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
else
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/parrot/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("ears")
if(ears)
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
ears.loc = src.loc
ears = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//Adding things to inventory
else if(href_list["add_inv"])
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("ears")
if(ears)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
if( !istype(item_to_add, /obj/item/device/radio/headset) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.ears = item_to_add
else
..()
+13 -12
View File
@@ -876,18 +876,19 @@
malfai.malfhack = src
malfai.malfhacking = 1
sleep(600)
if (!src.aidisabled)
malfai.malfhack = null
malfai.malfhacking = 0
if (ticker.mode.config_tag == "malfunction")
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
ticker.mode:apcs++
if(usr:parent)
src.malfai = usr:parent
else
src.malfai = usr
malfai << "Hack complete. The APC is now under your exclusive control."
updateicon()
if(src)
if (!src.aidisabled)
malfai.malfhack = null
malfai.malfhacking = 0
if (ticker.mode.config_tag == "malfunction")
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
ticker.mode:apcs++
if(usr:parent)
src.malfai = usr:parent
else
src.malfai = usr
malfai << "Hack complete. The APC is now under your exclusive control."
updateicon()
else if (href_list["occupyapc"])
malfoccupy(usr)
+17 -2
View File
@@ -595,6 +595,7 @@
var/count = 1000 //*** can travel 1000 steps before going to the mail room (in case of loops)
var/destinationTag = null // changes if contains a delivery container
var/tomail = 0 //changes if contains wrapped package
var/hasmob = 0 //If it contains a mob
// initialize a holder from the contents of a disposal unit
@@ -602,6 +603,20 @@
if(!istype(D, /obj/machinery/disposal/toilet))//So it does not drain gas from a toilet which does not function on it.
gas = D.air_contents// transfer gas resv. into holder object
//Check for any living mobs trigger hasmob.
//hasmob effects whether the package goes to cargo or its tagged destination.
for(var/mob/living/M in D)
if(M && M.stat != 2)
hasmob = 1
//Checks 1 contents level deep. This means that players can be sent through disposals...
//...but it should require a second person to open the package. (i.e. person inside a wrapped locker)
for(var/obj/O in D)
if(O.contents)
for(var/mob/living/M in O.contents)
if(M && M.stat != 2)
hasmob = 1
// now everything inside the disposal gets put into the holder
// note AM since can contain mobs or objs
for(var/atom/movable/AM in D)
@@ -611,10 +626,10 @@
if(H.mutations & FAT) // is a human and fat?
has_fat_guy = 1 // set flag on holder
*/
if(istype(AM, /obj/structure/bigDelivery))
if(istype(AM, /obj/structure/bigDelivery))// && !hasmob) Already have a check for this.
var/obj/structure/bigDelivery/T = AM
src.destinationTag = T.sortTag
else if(istype(AM, /obj/item/smallDelivery))
if(istype(AM, /obj/item/smallDelivery))// && !hasmob) And that. DMTG
var/obj/item/smallDelivery/T = AM
src.destinationTag = T.sortTag
else if (!src.destinationTag)
+2
View File
@@ -1,3 +1,5 @@
#define PI 3.1415
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
#define ONE_ATMOSPHERE 101.325 //kPa
+4
View File
@@ -80,6 +80,10 @@ TRAITOR_SCALING
## If the auto-tensioner is active by default. It creates more tratiors/other antagonists if it consideers the round slowing down.
#TENSIONER_ACTIVE
## If metadata is supported
# ALLOW_METADATA
## allow players to initiate a restart vote
ALLOW_VOTE_RESTART
+67
View File
@@ -49,6 +49,26 @@ should be listed in the changelog upon commit though. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">2nd May 2012</h2>
<h3 class="author">TG updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added carved pumpkins/jackolanterns. Carve them with any of the usual things you use to carve things. They work similarly to hardhats. </li>
<li class="rscadd">Added pumpkin pie and slices. Made with 5 milk, 5 sugar, 1 pumpkin, 1 flour, 1 egg. </li>
<li class="rscadd">Eating corn now makes corn cobs. Carve them with a saw, a knife, or a hatchet to make a corncob pipe. </li>
<li class="rscadd">Added the bit of transparency to biohelmets that they were always supposed to have. </li>
<li class="rscadd">Adds randomlly spawning rooms to the mining asteroid that contain various goodies. </li>
<li class="rscadd">Adds a borg upgrade system. Can be used to reset modules or 'restart' dead cyborgs. </li>
<li class="rscadd">Officers can now use huds to modify humans' criminal statuses on the go. To do this, simply examine a human and at the end should be a clickable link to change the status. </li>
<li class="rscadd">Cell charger and Recharger are now wrenchable to make them moveable </li>
<li class="tweak">Cats and Dogs can see in the dark. </li>
<li class="tweak">Changed around a few access levels; only jobs who need to do maintenance have access to maintenance tunnels. Also the heads and detective. </li>
<li class="tweak">Shuttle call/recall announcements are now more noticeable. </li>
<li class="tweak">Changes changling unstun time to 45 from 25 </li>
<li class="tweak">Can now repair the first stage of deconstruction of rwalls with metal rods. </li>
<li class="tweak">Library machine now has a delay when printing bibles to prevent spam. </li>
<li class="bugfix">Bugfix to the 'resist' button, unless I don't understand how it works. I don't see how it could have ever worked before. </li>
<li class="bugfix">You can no longer toggle the welding helmet when stunned or restrained. </li>
<li class="bugfix">Fix for not being able to use pills as pill-satchels properly. </li>
</ul>
<h3 class="author">Erthilo updated:</h3>
<ul class="changes bgimages16">
<li class="experiment">Increases time between random events happening in low population round to a maximum of double. Random events are more likely to happen up to a limit of around 30 active players. Events now fire at the same rate as previously with around 20~ active players. Please report unusually high or low amounts of events on the bug tracker!</li>
@@ -57,6 +77,10 @@ should be listed in the changelog upon commit though. Thanks. -->
<div class="commit sansserif">
<h2 class="date">1st May 2012</h2>
<h3 class="author">Mloc updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added extra data to ID cards. Fingerprint, blood type, and DNA. Can all be changed in ID computer.</li>
</ul>
<h3 class="author">Erthilo updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">You can now respawn after 30 minutes in any mode where the win/loss condition is not all crew dead.</li>
@@ -69,6 +93,10 @@ should be listed in the changelog upon commit though. Thanks. -->
<div class="commit sansserif">
<h2 class="date">30th April 2012</h2>
<h3 class="author">Mloc updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Due to new NT hiring protocols, characters can now only be between the ages of 20-65 instead of 15-45.</li>
</ul>
<h3 class="author">Erthilo updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Switched to /tg/'s changelog format! Previous updates can be found here: http://baystation12.net/wiki/index.php/Changelog</li>
@@ -77,8 +105,47 @@ should be listed in the changelog upon commit though. Thanks. -->
<li class="imageadd">New ATM sprites.</li>
<li class="tweak">Changes year to 2556 on medical/security records.</li>
</ul>
<h3 class="author">TG updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">The escape shuttle will now spend two minutes travelling to CentCom, woo! Objectives are only complete when the shuttle reaches CentCom, and anyone leaving the shuttle during transit time will be lost in deep space! Also, anyone standing in the way of the shuttle when it arrives will be gibbed.</li>
<li class="rscadd">Added Antimov module. Very dangerous.</li>
<li class="rscadd">Pill bottles now work like ore satchels, click a tile full of pills to pick them all up.</li>
<li class="rscadd">Tower caps can now grow randomly as weeds</li>
<li class="tweak">Using a minihoe on a Hydroponics tray removes all the weeds in the tray at once. Using a bucket on a sink now fills it entirely with water, instead of 10 units at a time.</li>
<li class="tweak">You can no longer take photos of photos.</li>
<li class="tweak">Malf AI's hopping between APCs no longer become longer and longer.</li>
<li class="tweak">Secborgs now have modified tasers, it holds 6 shots and recharges one shot every 10 seconds automatically.</li>
<li class="tweak">Turning off PANIC SYPHON now sets scrubbers to scrubbing (default) instead of off. Vents will not appear in the list instead of a timeout message. They also have a link with sets them back to one atmosphere kPa.</li>
<li class="tweak">You now click on AI modules in-hand to set them, instead of just picking them up.</li>
<li class="bugfix">Fixes the way the safeguard module is written.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">TG</h2>
<h3 class="author">29th April 2012 updated:</h3>
<ul class="changes bgimages16">
<li class="imageadd">Added new sprites for Killer Tomatoes.</li>
<li class="rscadd">Added lasertag vests, guns, projectiles. Sprites for the vests and guns from Muncher. Not actually mapped in. Lasertag guns are only usable if you're wearing the appropriate team vest. Lasertag projectiles will only stun people who are wearing vests belonging to the opposing team.</li>
<li class="rscadd">Adds Holodeck, also not mapped in.</li>
<li class="rscadd">Janitor borgs have been massively upgraded. They now clean as they move around.</li>
<li class="rscadd">Mining shuttle now shunts people where it wants to be. Shuttles now crush people if they fail to move out of where they want to be with the initial shunt. </li>
<li class="rscadd">Adds Halloss (Hallucination Damage) as a damage type weapons can do. Halloss can be healed by sleeping. </li>
<li class="tweak">Windows can only be damaged by weapons that do brute or burn. </li>
<li class="tweak">HUD damage indicator now updates with halloss. Inspecting yourself for organ damage now randomly shows damaged organs if you have halloss. </li>
<li class="tweak">Nuke disk now respawns in all rounds. </li>
<li class="rscadd">Pinpointers now show the remaining time until a nuke goes off if it's been armed when examined. </li>
<li class="tweak">Instead of z-level transition happening when you reach the edge of the map, it will now happen 7 tiles away from the edge. This means that you will no longer see the black edge, transition will likely happen without you even noticing. </li>
<li class="tweak">Slight changes to examine messages. You cannot examine when blind/unconscious. </li>
<li class="imageadd">More new locker sprites! </li>
<li class="bugfix">Fixes glass knock sound having a pop at the end of it. </li>
<li class="bugfix">Telecomm traffic control now has its own circuitboard and doesn't transform into a server when the monitor is disconnected/reconnected. </li>
<li class="bugfix">Using an igniter on a flamethrower that already has one attached no longer uses up the igniter. </li>
<li class="bugfix">NTSL bugfixes.</li>
</ul>
</div>
<!--
Credits Section
-->
Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.