mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
File restructuring: ohgodihopenothingbroke edition.
All /world/ stuff that I've found is now in code/world.dm instead of being scattered throughout the code in 6-7 files. *****IMPORTANT***** This means that hub.dm is now part of world.dm. Server hosts using the hub will likely have to redo the hub/password variables! Again, that stuff is now located in code/world.dm ******************* The tester list has been removed as it is not in use. /code/defines - Moved atom.dm code into /code/game/atom.dm and atom_movable.dm - Moved hub.dm code into /code/world.dm - Moved the /defines/tanning into objects/item/sheets/leather.dm - Moved /defines/area/ into game/area/ - Moved turf.dm code into the code/game/turfs folder and divided it up into meaningful places A lot of the files in /code/game were placed in new areas since they really didn't have a reason to be there. - algorithm.dm: - - The world stuff is in world.dm. - - countJob() and AutoUpdateTK() were removed entirely (unused). - - AutoUpdateAI() is now in /mob/living/silicon/ai.dm - atom_procs.dm was split into atom.dm and atom_movable.dm - cellautomata.dm - - World stuff was moved into world.dm - - Atom stuff was moved into atom.dm and atom_movable.dm - - Atom verbs were moved into code/game/verbs/atom_verbs.dm - chemistry.dm - - Beaker box code was moved into storage/misc.dm - - The trash can and 'alechemy' paper were removed. (unused) - Landmarks.dm was moved into /objects/effects/landmarks.dm - prisonshuttle.dm, specops_shuttle.dm, syndicate_shuttle.dm and syndicate_specops_shuttle.dm have been moved into game/machinery/computer/ - status.dm and topic.dm code were moved into world.dm - step_triggers.dm are now in objects/effects/step_triggers.dm - throwing.dm was split into appropriate files (carbon mob code, atom_movable.dm, ect) - vote.dm is now in code/datums /code/game/asteroid was split up. - turf.dm was moved into game/turfs/simulated/asteroid.dm - artifacts were split up - - Wish granter is now in game/machinery - - The stealth box is gone (unused) - - The list of 'space suprises' was moved into astroid.dm - asteroid.dm, being the only file left, was moved into /code/game and finally... modules/mob/organs files are now in code/datums/organs git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4659 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -5,3 +5,349 @@
|
||||
var/mode = 0 // 0 = restart vote, 1 = mode vote
|
||||
// modes which can be voted for
|
||||
var/winner = null // the vote winner
|
||||
|
||||
/datum/vote/New()
|
||||
|
||||
nextvotetime = world.timeofday // + 10*config.vote_delay
|
||||
|
||||
|
||||
/datum/vote/proc/canvote()//marker1
|
||||
var/excess = world.timeofday - vote.nextvotetime
|
||||
|
||||
if(excess < -10000) // handle clock-wrapping problems - very long delay (>20 hrs) if wrapped
|
||||
vote.nextvotetime = world.timeofday
|
||||
return 1
|
||||
return (excess >= 0)
|
||||
|
||||
/datum/vote/proc/nextwait()
|
||||
return timetext( round( (nextvotetime - world.timeofday)/10) )
|
||||
|
||||
/datum/vote/proc/endwait()
|
||||
return timetext( round( (votetime - world.timeofday)/10) )
|
||||
|
||||
/datum/vote/proc/timetext(var/interval)
|
||||
var/minutes = round(interval / 60)
|
||||
var/seconds = round(interval % 60)
|
||||
|
||||
var/tmin = "[minutes>0?num2text(minutes)+"min":null]"
|
||||
var/tsec = "[seconds>0?num2text(seconds)+"sec":null]"
|
||||
|
||||
if(tmin && tsec) // hack to skip inter-space if either field is blank
|
||||
return "[tmin] [tsec]"
|
||||
else
|
||||
if(!tmin && !tsec) // return '0sec' if 0 time left
|
||||
return "0sec"
|
||||
return "[tmin][tsec]"
|
||||
|
||||
/datum/vote/proc/getvotes()
|
||||
var/list/L = list()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
|
||||
L[M.client.vote] += 1
|
||||
|
||||
return L
|
||||
|
||||
|
||||
/datum/vote/proc/endvote()
|
||||
|
||||
if(!voting) // means that voting was aborted by an admin
|
||||
return
|
||||
|
||||
world << "\red <B>***Voting has closed.</B>"
|
||||
|
||||
log_vote("Voting closed, result was [winner]")
|
||||
voting = 0
|
||||
nextvotetime = world.timeofday + 10*config.vote_delay
|
||||
|
||||
for(var/mob/M in player_list) // clear vote window from all clients
|
||||
if(M.client)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
|
||||
calcwin()
|
||||
|
||||
if(mode)
|
||||
if(!ticker)
|
||||
if(!going)
|
||||
world << "<B>The game will start soon.</B>"
|
||||
going = 1
|
||||
var/wintext = capitalize(winner)
|
||||
if(winner=="default")
|
||||
world << "Result is \red No change."
|
||||
return
|
||||
|
||||
// otherwise change mode
|
||||
|
||||
|
||||
world << "Result is change to \red [wintext]"
|
||||
world.save_mode(winner)
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
world <<"\red <B>World will reboot in 10 seconds</B>"
|
||||
|
||||
feedback_set_details("end_error","mode vote - [winner]")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(100)
|
||||
log_game("Rebooting due to mode vote")
|
||||
world.Reboot()
|
||||
else
|
||||
master_mode = winner
|
||||
|
||||
else
|
||||
|
||||
if(winner=="default")
|
||||
world << "Result is \red No restart."
|
||||
return
|
||||
|
||||
world << "Result is \red Restart round."
|
||||
|
||||
world <<"\red <B>World will reboot in 5 seconds</B>"
|
||||
|
||||
feedback_set_details("end_error","restart vote")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(50)
|
||||
log_game("Rebooting due to restart vote")
|
||||
world.Reboot()
|
||||
return
|
||||
|
||||
|
||||
/datum/vote/proc/calcwin()
|
||||
|
||||
var/list/votes = getvotes()
|
||||
|
||||
if(vote.mode)
|
||||
var/best = -1
|
||||
|
||||
for(var/v in votes)
|
||||
if(v=="none")
|
||||
continue
|
||||
if(best < votes[v])
|
||||
best = votes[v]
|
||||
|
||||
|
||||
var/list/winners = list()
|
||||
|
||||
for(var/v in votes)
|
||||
if(votes[v] == best)
|
||||
winners += v
|
||||
|
||||
var/ret = ""
|
||||
|
||||
|
||||
for(var/w in winners)
|
||||
if(lentext(ret) > 0)
|
||||
ret += "/"
|
||||
if(w=="default")
|
||||
winners = list("default")
|
||||
ret = "No change"
|
||||
break
|
||||
else
|
||||
ret += capitalize(w)
|
||||
|
||||
|
||||
|
||||
if(winners.len != 1)
|
||||
ret = "Tie: " + ret
|
||||
|
||||
|
||||
if(winners.len == 0)
|
||||
vote.winner = "default"
|
||||
ret = "No change"
|
||||
else
|
||||
vote.winner = pick(winners)
|
||||
|
||||
return ret
|
||||
else
|
||||
|
||||
if(votes["default"] < votes["restart"])
|
||||
|
||||
vote.winner = "restart"
|
||||
return "Restart"
|
||||
else
|
||||
vote.winner = "default"
|
||||
return "No restart"
|
||||
|
||||
|
||||
/mob/verb/vote()
|
||||
set category = "OOC"
|
||||
set name = "Vote"
|
||||
usr.client.showvote = 1
|
||||
|
||||
|
||||
var/text = "<HTML><HEAD><TITLE>Voting</TITLE></HEAD><BODY scroll=no>"
|
||||
|
||||
var/footer = "<HR><A href='?src=\ref[vote];vclose=1'>Close</A></BODY></HTML>"
|
||||
|
||||
|
||||
if(config.vote_no_dead && usr.stat == 2)
|
||||
text += "Voting while dead has been disallowed."
|
||||
text += footer
|
||||
usr << browse(text, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
usr.client.vote = "none"
|
||||
return
|
||||
|
||||
if(vote.voting)
|
||||
// vote in progress, do the current
|
||||
|
||||
text += "Vote to [vote.mode?"change mode":"restart round"] in progress.<BR>"
|
||||
text += "[vote.endwait()] until voting is closed.<BR>"
|
||||
|
||||
var/list/votes = vote.getvotes()
|
||||
|
||||
if(vote.mode) // true if changing mode
|
||||
|
||||
text += "Current game mode is: <B>[master_mode]</B>.<BR>Select the mode to change to:<UL>"
|
||||
|
||||
for(var/md in config.votable_modes)
|
||||
var/disp = capitalize(md)
|
||||
if(md=="default")
|
||||
disp = "No change"
|
||||
|
||||
//world << "[md]|[disp]|[src.client.vote]|[votes[md]]"
|
||||
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
text += "</UL>"
|
||||
|
||||
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
|
||||
|
||||
text += footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
else // voting to restart
|
||||
|
||||
text += "Restart the world?<BR><UL>"
|
||||
|
||||
var/list/VL = list("default","restart")
|
||||
|
||||
for(var/md in VL)
|
||||
var/disp = (md=="default"? "No":"Yes")
|
||||
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
text += "</UL>"
|
||||
|
||||
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
|
||||
|
||||
text += footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
|
||||
else //no vote in progress
|
||||
|
||||
if(shuttlecoming == 1)
|
||||
usr << "\blue Cannot start Vote - Shuttle has been called."
|
||||
return
|
||||
|
||||
if(!config.allow_vote_restart && !config.allow_vote_mode)
|
||||
text += "<P>Player voting is disabled.</BODY></HTML>"
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
return
|
||||
|
||||
if(!vote.canvote()) // not time to vote yet
|
||||
if(config.allow_vote_restart) text+="Voting to restart is enabled.<BR>"
|
||||
if(config.allow_vote_mode) text+="Voting to change mode is enabled.<BR>"
|
||||
|
||||
text+="<BR><P>Next vote can begin in [vote.nextwait()]."
|
||||
text+=footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
else // voting can begin
|
||||
if(config.allow_vote_restart)
|
||||
text += "<A href='?src=\ref[vote];vmode=1'>Begin restart vote.</A><BR>"
|
||||
if(config.allow_vote_mode)
|
||||
text += "<A href='?src=\ref[vote];vmode=2'>Begin change mode vote.</A><BR>"
|
||||
|
||||
text += footer
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
spawn(20)
|
||||
if(usr.client && usr.client.showvote)
|
||||
usr.vote()
|
||||
else
|
||||
usr << browse(null, "window=vote")
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/vote/Topic(href, href_list)
|
||||
..()
|
||||
//world << "[usr] has activated the vote Topic"
|
||||
|
||||
if(href_list["voter"])
|
||||
world << "[usr.ckey] has attempted to bypass the voting system." //ckey is easy key
|
||||
return
|
||||
|
||||
if(href_list["vclose"])
|
||||
|
||||
if(usr)
|
||||
usr << browse(null, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
return
|
||||
|
||||
if(href_list["vmode"])
|
||||
if(vote.voting)
|
||||
return
|
||||
|
||||
if(!vote.canvote() ) // double check even though this shouldn't happen
|
||||
return
|
||||
|
||||
vote.mode = text2num(href_list["vmode"])-1 // hack to yield 0=restart, 1=changemode
|
||||
if(!ticker && vote.mode == 1)
|
||||
if(going)
|
||||
world << "<B>The game start has been delayed.</B>"
|
||||
going = 0
|
||||
vote.voting = 1 // now voting
|
||||
vote.votetime = world.timeofday + config.vote_period*10 // when the vote will end
|
||||
|
||||
spawn(config.vote_period*10)
|
||||
vote.endvote()
|
||||
|
||||
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [usr.key].</B>"
|
||||
world << "\red You have [vote.timetext(config.vote_period)] to vote."
|
||||
|
||||
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [usr.name]/[usr.key]")
|
||||
|
||||
for(var/mob/CM in player_list)
|
||||
if(CM.client)
|
||||
if( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) )
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
if(usr) usr.vote()
|
||||
return
|
||||
|
||||
|
||||
return
|
||||
|
||||
if(href_list["vote"] && vote.voting)
|
||||
if(usr)
|
||||
usr.client.vote = href_list["vote"]
|
||||
|
||||
//world << "Setting client [usr.key]'s vote to: [href_list["vote"]]."
|
||||
|
||||
usr.vote()
|
||||
return
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
/atom
|
||||
layer = 2
|
||||
var/level = 2
|
||||
var/flags = FPRINT
|
||||
var/list/fingerprints
|
||||
var/list/fingerprintshidden
|
||||
var/fingerprintslast = null
|
||||
var/list/blood_DNA
|
||||
var/last_bumped = 0
|
||||
var/pass_flags = 0
|
||||
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
//var/chem_is_open_container = 0
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
proc/assume_air(datum/air_group/giver)
|
||||
del(giver)
|
||||
return null
|
||||
|
||||
proc/remove_air(amount)
|
||||
return null
|
||||
|
||||
proc/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
|
||||
// Convenience proc to see if a container is open for chemistry handling
|
||||
// returns true if open
|
||||
// false if closed
|
||||
proc/is_open_container()
|
||||
return flags & OPENCONTAINER
|
||||
|
||||
/*//Convenience proc to see whether a container can be accessed in a certain way.
|
||||
|
||||
proc/can_subract_container()
|
||||
return flags & EXTRACT_CONTAINER
|
||||
|
||||
proc/can_add_container()
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
obj
|
||||
assume_air(datum/air_group/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
return null
|
||||
|
||||
remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
return null
|
||||
|
||||
return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/atom/proc/meteorhit(obj/meteor as obj)
|
||||
return
|
||||
|
||||
/atom/proc/allow_drop()
|
||||
return 1
|
||||
|
||||
/atom/proc/CheckExit()
|
||||
return 1
|
||||
|
||||
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/emp_act(var/severity)
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
|
||||
return 0
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
if(ispath(container))
|
||||
if(istype(src.loc, container))
|
||||
return 1
|
||||
else if(src in container)
|
||||
return 1
|
||||
return
|
||||
|
||||
/*
|
||||
* atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
* Recursevly searches all atom contens (including contents contents and so on).
|
||||
*
|
||||
* ARGS: path - search atom contents for atoms of this type
|
||||
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
|
||||
*
|
||||
* RETURNS: list of found atoms
|
||||
*/
|
||||
|
||||
/atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
var/list/found = list()
|
||||
for(var/atom/A in src)
|
||||
if(istype(A, path))
|
||||
found += A
|
||||
if(filter_path)
|
||||
var/pass = 0
|
||||
for(var/type in filter_path)
|
||||
pass |= istype(A, type)
|
||||
if(!pass)
|
||||
continue
|
||||
if(A.contents.len)
|
||||
found += A.search_contents_for(path,filter_path)
|
||||
return found
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
if (src.master)
|
||||
return src.master.attackby(a, b)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_paw(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_paw(a, b, c)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_hand(a, b, c)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/New()
|
||||
for(var/x in src.verbs)
|
||||
src.verbs -= x
|
||||
return
|
||||
|
||||
|
||||
/atom/movable
|
||||
layer = 3
|
||||
var/last_move = null
|
||||
var/anchored = 0
|
||||
// var/elevation = 2 - not used anywhere
|
||||
var/move_speed = 10
|
||||
var/l_move_time = 1
|
||||
var/m_flag = 1
|
||||
var/throwing = 0
|
||||
var/throw_speed = 2
|
||||
var/throw_range = 7
|
||||
var/moved_recently = 0
|
||||
|
||||
/atom/movable/overlay
|
||||
var/atom/master = null
|
||||
anchored = 1
|
||||
|
||||
/atom/movable/Move()
|
||||
var/atom/A = src.loc
|
||||
. = ..()
|
||||
src.move_speed = world.timeofday - src.l_move_time
|
||||
src.l_move_time = world.timeofday
|
||||
src.m_flag = 1
|
||||
if ((A != src.loc && A && A.z == src.z))
|
||||
src.last_move = get_dir(A, src.loc)
|
||||
return
|
||||
|
||||
/*
|
||||
Beam code by Gunbuddy
|
||||
|
||||
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
|
||||
once at a time per source will cause graphical errors.
|
||||
Also, the icon used for the beam will have to be vertical and 32x32.
|
||||
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
|
||||
its easier to just keep the beam vertical.
|
||||
*/
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10)
|
||||
//BeamTarget represents the target for the beam, basically just means the other end.
|
||||
//Time is the duration to draw the beam
|
||||
//Icon is obviously which icon to use for the beam, default is beam.dmi
|
||||
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
|
||||
//Maxdistance is the longest range the beam will persist before it gives up.
|
||||
var/EndTime=world.time+time
|
||||
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
|
||||
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
|
||||
//of range or to another z-level, then the beam will stop. Otherwise it will
|
||||
//continue to draw.
|
||||
|
||||
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
|
||||
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
|
||||
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
|
||||
del O //pieces to a new orientation.
|
||||
var/Angle=round(Get_Angle(src,BeamTarget))
|
||||
var/icon/I=new(icon,icon_state)
|
||||
I.Turn(Angle)
|
||||
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
|
||||
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
|
||||
var/N=0
|
||||
var/length=round(sqrt((DX)**2+(DY)**2))
|
||||
for(N,N<length,N+=32)
|
||||
var/obj/effect/overlay/beam/X=new(loc)
|
||||
X.BeamSource=src
|
||||
if(N+32>length)
|
||||
var/icon/II=new(icon,icon_state)
|
||||
II.DrawBox(null,1,(length-N),32,32)
|
||||
II.Turn(Angle)
|
||||
X.icon=II
|
||||
else X.icon=I
|
||||
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
|
||||
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
|
||||
if(DX==0) Pixel_x=0
|
||||
if(DY==0) Pixel_y=0
|
||||
if(Pixel_x>32)
|
||||
for(var/a=0, a<=Pixel_x,a+=32)
|
||||
X.x++
|
||||
Pixel_x-=32
|
||||
if(Pixel_x<-32)
|
||||
for(var/a=0, a>=Pixel_x,a-=32)
|
||||
X.x--
|
||||
Pixel_x+=32
|
||||
if(Pixel_y>32)
|
||||
for(var/a=0, a<=Pixel_y,a+=32)
|
||||
X.y++
|
||||
Pixel_y-=32
|
||||
if(Pixel_y<-32)
|
||||
for(var/a=0, a>=Pixel_y,a-=32)
|
||||
X.y--
|
||||
Pixel_y+=32
|
||||
X.pixel_x=Pixel_x
|
||||
X.pixel_y=Pixel_y
|
||||
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
|
||||
//I've found that 3 ticks provided a nice balance for my use.
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
|
||||
|
||||
atom/movable/proc/forceMove(atom/destination)
|
||||
if(destination)
|
||||
if(loc)
|
||||
loc.Exited(src)
|
||||
loc = destination
|
||||
loc.Entered(src)
|
||||
return 1
|
||||
return 0
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
world
|
||||
hub = "Exadv1.spacestation13"
|
||||
hub_password = "SORRYNOPASSWORD"
|
||||
name = "/tg/ Station 13"
|
||||
|
||||
/*
|
||||
This is for any host that would like their server to appear on the main SS13 hub.
|
||||
To use it, simply replace the password above, with the password found below, and it should work.
|
||||
If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.
|
||||
|
||||
hub = "Exadv1.spacestation13"
|
||||
hub_password = "kMZy3U5jJHSiBQjr"
|
||||
name = "Space Station 13"
|
||||
|
||||
*/
|
||||
@@ -252,4 +252,19 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
|
||||
//returns only NORTH, SOUTH, EAST, or WEST
|
||||
var/dx = finish.x - start.x
|
||||
var/dy = finish.y - start.y
|
||||
if(abs(dy) > abs (dx)) //slope is above 1:1 (move horizontally in a tie)
|
||||
if(dy > 0)
|
||||
return get_step(start, SOUTH)
|
||||
else
|
||||
return get_step(start, NORTH)
|
||||
else
|
||||
if(dx > 0)
|
||||
return get_step(start, WEST)
|
||||
else
|
||||
return get_step(start, EAST)
|
||||
@@ -1,444 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/turf
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
|
||||
|
||||
level = 1.0
|
||||
|
||||
//Properties for open tiles (/floor)
|
||||
var/oxygen = 0
|
||||
var/carbon_dioxide = 0
|
||||
var/nitrogen = 0
|
||||
var/toxins = 0
|
||||
|
||||
//Properties for airtight tiles (/wall)
|
||||
var/thermal_conductivity = 0.05
|
||||
var/heat_capacity = 1
|
||||
|
||||
//Properties for both
|
||||
var/temperature = T20C
|
||||
|
||||
var/blocks_air = 0
|
||||
var/icon_old = null
|
||||
var/pathweight = 1
|
||||
|
||||
proc/is_plating()
|
||||
return 0
|
||||
proc/is_asteroid_floor()
|
||||
return 0
|
||||
proc/is_plasteel_floor()
|
||||
return 0
|
||||
proc/is_light_floor()
|
||||
return 0
|
||||
proc/is_grass_floor()
|
||||
return 0
|
||||
proc/is_wood_floor()
|
||||
return 0
|
||||
proc/return_siding_icon_state() //used for grass floors, which have siding.
|
||||
return 0
|
||||
|
||||
/turf/Entered(atom/A as mob|obj)
|
||||
..()
|
||||
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
|
||||
for(var/obj/effect/beam/i_beam/I in src)
|
||||
spawn( 0 )
|
||||
if (I)
|
||||
I.hit()
|
||||
return
|
||||
return
|
||||
|
||||
/turf/space
|
||||
icon = 'icons/turf/space.dmi'
|
||||
name = "\proper space"
|
||||
icon_state = "placeholder"
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 700000
|
||||
|
||||
/turf/space/transit
|
||||
var/pushdirection // push things that get caught in the transit tile this direction
|
||||
|
||||
//Overwrite because we dont want people building rods in space.
|
||||
/turf/space/transit/attackby(obj/O as obj, mob/user as mob)
|
||||
return
|
||||
|
||||
/turf/space/transit/north // moving to the north
|
||||
|
||||
pushdirection = SOUTH // south because the space tile is scrolling south
|
||||
|
||||
//IF ANYONE KNOWS A MORE EFFICIENT WAY OF MANAGING THESE SPRITES, BE MY GUEST.
|
||||
shuttlespace_ns1
|
||||
icon_state = "speedspace_ns_1"
|
||||
shuttlespace_ns2
|
||||
icon_state = "speedspace_ns_2"
|
||||
shuttlespace_ns3
|
||||
icon_state = "speedspace_ns_3"
|
||||
shuttlespace_ns4
|
||||
icon_state = "speedspace_ns_4"
|
||||
shuttlespace_ns5
|
||||
icon_state = "speedspace_ns_5"
|
||||
shuttlespace_ns6
|
||||
icon_state = "speedspace_ns_6"
|
||||
shuttlespace_ns7
|
||||
icon_state = "speedspace_ns_7"
|
||||
shuttlespace_ns8
|
||||
icon_state = "speedspace_ns_8"
|
||||
shuttlespace_ns9
|
||||
icon_state = "speedspace_ns_9"
|
||||
shuttlespace_ns10
|
||||
icon_state = "speedspace_ns_10"
|
||||
shuttlespace_ns11
|
||||
icon_state = "speedspace_ns_11"
|
||||
shuttlespace_ns12
|
||||
icon_state = "speedspace_ns_12"
|
||||
shuttlespace_ns13
|
||||
icon_state = "speedspace_ns_13"
|
||||
shuttlespace_ns14
|
||||
icon_state = "speedspace_ns_14"
|
||||
shuttlespace_ns15
|
||||
icon_state = "speedspace_ns_15"
|
||||
|
||||
/turf/space/transit/east // moving to the east
|
||||
|
||||
pushdirection = WEST
|
||||
|
||||
shuttlespace_ew1
|
||||
icon_state = "speedspace_ew_1"
|
||||
shuttlespace_ew2
|
||||
icon_state = "speedspace_ew_2"
|
||||
shuttlespace_ew3
|
||||
icon_state = "speedspace_ew_3"
|
||||
shuttlespace_ew4
|
||||
icon_state = "speedspace_ew_4"
|
||||
shuttlespace_ew5
|
||||
icon_state = "speedspace_ew_5"
|
||||
shuttlespace_ew6
|
||||
icon_state = "speedspace_ew_6"
|
||||
shuttlespace_ew7
|
||||
icon_state = "speedspace_ew_7"
|
||||
shuttlespace_ew8
|
||||
icon_state = "speedspace_ew_8"
|
||||
shuttlespace_ew9
|
||||
icon_state = "speedspace_ew_9"
|
||||
shuttlespace_ew10
|
||||
icon_state = "speedspace_ew_10"
|
||||
shuttlespace_ew11
|
||||
icon_state = "speedspace_ew_11"
|
||||
shuttlespace_ew12
|
||||
icon_state = "speedspace_ew_12"
|
||||
shuttlespace_ew13
|
||||
icon_state = "speedspace_ew_13"
|
||||
shuttlespace_ew14
|
||||
icon_state = "speedspace_ew_14"
|
||||
shuttlespace_ew15
|
||||
icon_state = "speedspace_ew_15"
|
||||
|
||||
|
||||
/turf/space/New()
|
||||
// icon = 'icons/turf/space.dmi'
|
||||
if(!istype(src, /turf/space/transit))
|
||||
icon_state = "[pick(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)]"
|
||||
|
||||
|
||||
|
||||
/turf/simulated
|
||||
name = "station"
|
||||
var/wet = 0
|
||||
var/image/wet_overlay = null
|
||||
|
||||
var/thermite = 0
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/wall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
|
||||
|
||||
var/walltype = "metal"
|
||||
|
||||
/turf/simulated/wall/r_wall
|
||||
name = "r wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon_state = "r_wall"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
walltype = "rwall"
|
||||
|
||||
var/d_state = 0
|
||||
|
||||
/turf/simulated/wall/mineral
|
||||
name = "mineral wall"
|
||||
desc = "This shouldn't exist"
|
||||
icon_state = ""
|
||||
var/last_event = 0
|
||||
var/active = null
|
||||
|
||||
/turf/simulated/wall/mineral/New()
|
||||
switch(mineral)
|
||||
if("gold")
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon_state = "gold0"
|
||||
walltype = "gold"
|
||||
// var/electro = 1
|
||||
// var/shocked = null
|
||||
if("silver")
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny!"
|
||||
icon_state = "silver0"
|
||||
walltype = "silver"
|
||||
// var/electro = 0.75
|
||||
// var/shocked = null
|
||||
if("diamond")
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon_state = "diamond0"
|
||||
walltype = "diamond"
|
||||
if("uranium")
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon_state = "uranium0"
|
||||
walltype = "uranium"
|
||||
if("plasma")
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = "plasma0"
|
||||
walltype = "plasma"
|
||||
if("clown")
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon_state = "clown0"
|
||||
walltype = "clown"
|
||||
if("sandstone")
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = "sandstone0"
|
||||
walltype = "sandstone"
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
for(var/mob/living/L in range(3,src))
|
||||
L.apply_effect(12,IRRADIATE,0)
|
||||
for(var/turf/simulated/wall/mineral/T in range(3,src))
|
||||
if(T.mineral == "uranium")
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
|
||||
/*/turf/simulated/wall/mineral/proc/shock()
|
||||
if (electrocute_mob(user, C, src))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
*/
|
||||
|
||||
/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 = 'icons/turf/shuttle.dmi'
|
||||
thermal_conductivity = 0.05
|
||||
heat_capacity = 0
|
||||
layer = 2
|
||||
|
||||
/turf/simulated/shuttle/wall
|
||||
name = "wall"
|
||||
icon_state = "wall1"
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
|
||||
/turf/simulated/shuttle/floor
|
||||
name = "floor"
|
||||
icon_state = "floor"
|
||||
|
||||
/turf/simulated/shuttle/plating
|
||||
name = "plating"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "plating"
|
||||
|
||||
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
|
||||
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
|
||||
icon_state = "floor4"
|
||||
|
||||
/turf/unsimulated
|
||||
intact = 1
|
||||
name = "command"
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
|
||||
/turf/unsimulated/floor
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "Floor3"
|
||||
|
||||
/turf/unsimulated/wall
|
||||
name = "wall"
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "riveted"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
turf/unsimulated/wall/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = 'icons/misc/fullscreen.dmi'
|
||||
icon_state = "title"
|
||||
layer = FLY_LAYER
|
||||
|
||||
/turf/unsimulated/wall/other
|
||||
icon_state = "r_wall"
|
||||
|
||||
/turf/proc/AdjacentTurfs()
|
||||
var/L[] = new()
|
||||
for(var/turf/simulated/t in oview(src,1))
|
||||
if(!t.density)
|
||||
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
|
||||
L.Add(t)
|
||||
return L
|
||||
/turf/proc/Distance(turf/t)
|
||||
if(get_dist(src,t) == 1)
|
||||
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
|
||||
cost *= (pathweight+t.pathweight)/2
|
||||
return cost
|
||||
else
|
||||
return get_dist(src,t)
|
||||
/turf/proc/AdjacentTurfsSpace()
|
||||
var/L[] = new()
|
||||
for(var/turf/t in oview(src,1))
|
||||
if(!t.density)
|
||||
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
|
||||
L.Add(t)
|
||||
return L
|
||||
|
||||
|
||||
/*
|
||||
/turf/simulated/wall/mineral
|
||||
icon = 'icons/turf/mineral_walls.dmi'
|
||||
walltype = "iron"
|
||||
|
||||
var/oreAmount = 1
|
||||
var/hardness = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
name = "[walltype] wall"
|
||||
|
||||
dismantle_wall(devastated = 0)
|
||||
if(!devastated)
|
||||
var/ore = text2path("/obj/item/weapon/ore/[walltype]")
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(src)
|
||||
ReplaceWithFloor()
|
||||
else
|
||||
ReplaceWithSpace()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
dismantle_wall()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/mineral/iron
|
||||
walltype = "iron"
|
||||
hardness = 3
|
||||
|
||||
/turf/simulated/wall/mineral/silver
|
||||
walltype = "silver"
|
||||
hardness = 3
|
||||
|
||||
/turf/simulated/wall/mineral/uranium
|
||||
walltype = "uranium"
|
||||
hardness = 3
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(3)
|
||||
|
||||
/turf/simulated/wall/mineral/gold
|
||||
walltype = "gold"
|
||||
|
||||
/turf/simulated/wall/mineral/sand
|
||||
walltype = "sand"
|
||||
hardness = 0.5
|
||||
|
||||
/turf/simulated/wall/mineral/transparent
|
||||
opacity = 0
|
||||
|
||||
/turf/simulated/wall/mineral/transparent/diamond
|
||||
walltype = "diamond"
|
||||
hardness = 10
|
||||
|
||||
/turf/simulated/wall/mineral/transparent/plasma
|
||||
walltype = "plasma"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
return TemperatureAct(100)
|
||||
..()
|
||||
|
||||
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
var/toxinsToDeduce = temperature/10
|
||||
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 400+T0C
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
|
||||
hardness -= toxinsToDeduce/100
|
||||
CheckHardness()
|
||||
*/
|
||||
@@ -1,17 +0,0 @@
|
||||
world
|
||||
mob = /mob/new_player
|
||||
turf = /turf/space
|
||||
area = /area
|
||||
view = "15x15"
|
||||
|
||||
|
||||
Topic(href, href_list[])
|
||||
// world << "Received a Topic() call!"
|
||||
// world << "[href]"
|
||||
// for(var/a in href_list)
|
||||
// world << "[a]"
|
||||
// if(href_list["hello"])
|
||||
// world << "Hello world!"
|
||||
// return "Hello world!"
|
||||
// world << "End of Topic() call."
|
||||
// ..()
|
||||
@@ -1,74 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
#define RECOMMENDED_VERSION 494
|
||||
|
||||
/world/New()
|
||||
..()
|
||||
if(byond_version < RECOMMENDED_VERSION)
|
||||
world.log << "Your server's byond version does not meet the recommended requirements for TGstation code. Please update BYOND"
|
||||
|
||||
diary = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")].log")
|
||||
diary << {"
|
||||
|
||||
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
---------------------
|
||||
"}
|
||||
|
||||
diaryofmeanpeople = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] Attack.log")
|
||||
diaryofmeanpeople << {"
|
||||
|
||||
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
---------------------
|
||||
"}
|
||||
|
||||
href_logfile = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] hrefs.html")
|
||||
|
||||
jobban_loadbanfile()
|
||||
jobban_updatelegacybans()
|
||||
LoadBans()
|
||||
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
|
||||
process_teleport_locs() //Sets up the wizard teleport locations
|
||||
process_ghost_teleport_locs() //Sets up ghost teleport locations.
|
||||
sleep_offline = 1
|
||||
|
||||
spawn(3000) //so we aren't adding to the round-start lag
|
||||
if(config.ToRban)
|
||||
ToRban_autoupdate()
|
||||
if(config.kick_inactive)
|
||||
KickInactiveClients()
|
||||
|
||||
#undef RECOMMENDED_VERSION
|
||||
#define INACTIVITY_KICK 6000 //10 minutes in ticks (approx.)
|
||||
/world/proc/KickInactiveClients()
|
||||
for(var/client/C)
|
||||
if( !C.holder && (C.inactivity >= INACTIVITY_KICK) )
|
||||
if(C.mob)
|
||||
if(!istype(C.mob, /mob/dead/))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "\red You have been inactive for more than 10 minutes and have been disconnected."
|
||||
del(C)
|
||||
spawn(3000) KickInactiveClients()//more or less five minutes
|
||||
#undef INACTIVITY_KICK
|
||||
|
||||
/// EXPERIMENTAL STUFF
|
||||
|
||||
// This function counts a passed job.
|
||||
proc/countJob(rank)
|
||||
var/jobCount = 0
|
||||
for(var/mob/H in player_list)
|
||||
if(H.mind && H.mind.assigned_role == rank)
|
||||
jobCount++
|
||||
return jobCount
|
||||
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
if (subject!=null)
|
||||
for(var/mob/living/silicon/ai/M in player_list)
|
||||
if ((M.client && M.machine == subject))
|
||||
subject.attack_ai(M)
|
||||
|
||||
/proc/AutoUpdateTK(obj/subject)
|
||||
if (subject!=null)
|
||||
for(var/obj/item/tk_grab/T in world)
|
||||
if (T.host)
|
||||
var/mob/M = T.host
|
||||
if(M.client && M.machine == subject)
|
||||
subject.attack_hand(M)
|
||||
@@ -1,109 +1,22 @@
|
||||
|
||||
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
|
||||
/obj/item/weapon/pickaxe/silver =4,
|
||||
/obj/item/weapon/pickaxe/drill =4,
|
||||
/obj/item/weapon/pickaxe/jackhammer =4,
|
||||
/mob/living/simple_animal/carp =3,
|
||||
/obj/item/weapon/pickaxe/diamond =3,
|
||||
/obj/item/weapon/pickaxe/diamonddrill =3,
|
||||
/obj/item/weapon/pickaxe/gold =3,
|
||||
/obj/item/weapon/pickaxe/plasmacutter =2,
|
||||
/obj/structure/closet/syndicate/resources =2,
|
||||
/obj/item/weapon/melee/energy/sword/pirate =1,
|
||||
/obj/mecha/working/ripley/mining =1
|
||||
)
|
||||
|
||||
var/global/list/spawned_surprises = list()
|
||||
|
||||
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)
|
||||
if(start_loc.x - size < 5 || start_loc.x + size >= world.maxx - 5 || start_loc.y - size < 5 || start_loc.y + size > world.maxy -5)
|
||||
return 0
|
||||
if(!type)
|
||||
type = pick(50;1,2,3)
|
||||
if(!richness)
|
||||
richness = rand(10,40)
|
||||
// world << "Asteroid size: [size]; Asteroid type: [type]"
|
||||
var/list/turfs = circlerangeturfs(start_loc,size)
|
||||
if(!islist(turfs) || isemptylist(turfs))
|
||||
return 0
|
||||
var/area/asteroid/AstAr = new
|
||||
AstAr.name = "Asteroid #[start_loc.x][start_loc.y][start_loc.z]"
|
||||
for(var/turf/T in turfs)
|
||||
var/dist = get_dist(start_loc,T)
|
||||
if(abs(GaussRand(dist))<size) //prob(100-(dist*rand(2,4))))//I'm terrible at generating random things.
|
||||
var/turf/simulated/wall/asteroid/A
|
||||
if(type > 1 && prob(richness))
|
||||
switch(type)
|
||||
if(2)
|
||||
A = new /turf/simulated/wall/asteroid/iron(T)
|
||||
if(3)
|
||||
A = new /turf/simulated/wall/asteroid/silicon(T)
|
||||
else
|
||||
A = new /turf/simulated/wall/asteroid(T)
|
||||
A.opacity = 0
|
||||
A.sd_NewOpacity(1)
|
||||
AstAr.contents += A
|
||||
|
||||
if(max_secret_rooms && size >= 10)
|
||||
var/x_len = rand(4,size)
|
||||
var/y_len = pick(4,size)
|
||||
var/st_l = locate(start_loc.x-round(x_len/2),start_loc.y-round(y_len/2),start_loc.z)
|
||||
if(st_l)
|
||||
spawn_room(st_l,x_len,y_len)
|
||||
max_secret_rooms--
|
||||
|
||||
return 1
|
||||
*/
|
||||
/*
|
||||
/proc/populate_w_asteroids(var/z,var/density=null)
|
||||
if(!density)
|
||||
density = pick(10,20,40)
|
||||
while(density)
|
||||
var/x = rand(1,world.maxx)
|
||||
var/y = rand(1,world.maxy)
|
||||
// world << "Asteroid coords: [x], [y], [z]"
|
||||
var/start_loc = locate(x,y,z)
|
||||
if(start_loc && spawn_asteroid(start_loc))
|
||||
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)
|
||||
var/length = sectors.len/3
|
||||
global_map = new/list(length,length)//3x3 map
|
||||
var/x
|
||||
var/y
|
||||
|
||||
for(x=1,x<=length,x++)
|
||||
for(y=1,y<=length,y++)
|
||||
var/sector
|
||||
if(sectors.len)
|
||||
sector = pick(sectors)
|
||||
sectors -= sector
|
||||
if(sector == 0)
|
||||
sector = ++world.maxz
|
||||
populate_w_asteroids(sector)
|
||||
global_map[x][y] = sector
|
||||
else
|
||||
break
|
||||
world << "\blue \b Randomization complete."
|
||||
|
||||
//debug
|
||||
for(x=1,x<=global_map.len,x++)
|
||||
var/list/y_arr = global_map[x]
|
||||
for(y=1,y<=y_arr.len,y++)
|
||||
var/t = ""
|
||||
switch(y_arr[y])
|
||||
if(1) t = "SS13"
|
||||
if(3) t = "AI Satellite"
|
||||
if(4) t = "Derelict"
|
||||
else t = "Empty Cold Space"
|
||||
world << "Global map [x] - [y] contains [t] (Z = [y_arr[y]])"
|
||||
//debug
|
||||
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/spawn_exporation_packs()
|
||||
for (var/obj/effect/landmark/L in world)
|
||||
if (L.tag == "landmark*ExplorationPack")
|
||||
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 , var/clean = 0 , var/name)
|
||||
var/list/room_turfs = list("walls"=list(),"floors"=list())
|
||||
|
||||
@@ -145,7 +58,6 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
|
||||
|
||||
return room_turfs
|
||||
|
||||
|
||||
proc/admin_spawn_room_at_pos()
|
||||
var/wall
|
||||
var/floor
|
||||
@@ -1,15 +1,215 @@
|
||||
//Movable atoms
|
||||
/atom/movable
|
||||
var/mob/pulledby = null
|
||||
/atom
|
||||
layer = 2
|
||||
var/level = 2
|
||||
var/flags = FPRINT
|
||||
var/list/fingerprints
|
||||
var/list/fingerprintshidden
|
||||
var/fingerprintslast = null
|
||||
var/list/blood_DNA
|
||||
var/last_bumped = 0
|
||||
var/pass_flags = 0
|
||||
var/throwpass = 0
|
||||
|
||||
/atom/movable/verb/pull()
|
||||
set name = "Pull"
|
||||
set category = "IC"
|
||||
set src in oview(1)
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
usr.start_pulling(src)
|
||||
//var/chem_is_open_container = 0
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
/atom/proc/throw_impact(atom/hit_atom)
|
||||
if(istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.visible_message("\red [hit_atom] has been hit by [src].")
|
||||
if(isobj(src))//Hate typecheckin for a child object but this is just fixing crap another guy broke so if someone wants to put the time in and make this proper feel free.
|
||||
M.take_organ_damage(src:throwforce)
|
||||
|
||||
|
||||
else if(isobj(hit_atom))
|
||||
var/obj/O = hit_atom
|
||||
if(!O.anchored)
|
||||
step(O, src.dir)
|
||||
O.hitby(src)
|
||||
|
||||
else if(isturf(hit_atom))
|
||||
var/turf/T = hit_atom
|
||||
if(T.density)
|
||||
spawn(2)
|
||||
step(src, turn(src.dir, 180))
|
||||
if(istype(src,/mob/living))
|
||||
var/mob/living/M = src
|
||||
M.take_organ_damage(20)
|
||||
|
||||
|
||||
/atom/proc/assume_air(datum/air_group/giver)
|
||||
del(giver)
|
||||
return null
|
||||
|
||||
/atom/proc/remove_air(amount)
|
||||
return null
|
||||
|
||||
/atom/proc/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/atom/proc/check_eye(user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai))
|
||||
return 1
|
||||
return
|
||||
|
||||
/atom/proc/on_reagent_change()
|
||||
return
|
||||
|
||||
/atom/proc/Bumped(AM as mob|obj)
|
||||
return
|
||||
|
||||
// Convenience proc to see if a container is open for chemistry handling
|
||||
// returns true if open
|
||||
// false if closed
|
||||
/atom/proc/is_open_container()
|
||||
return flags & OPENCONTAINER
|
||||
|
||||
/*//Convenience proc to see whether a container can be accessed in a certain way.
|
||||
|
||||
proc/can_subract_container()
|
||||
return flags & EXTRACT_CONTAINER
|
||||
|
||||
proc/can_add_container()
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
|
||||
/atom/proc/meteorhit(obj/meteor as obj)
|
||||
return
|
||||
|
||||
/atom/proc/allow_drop()
|
||||
return 1
|
||||
|
||||
/atom/proc/CheckExit()
|
||||
return 1
|
||||
|
||||
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/emp_act(var/severity)
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
|
||||
return 0
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
if(ispath(container))
|
||||
if(istype(src.loc, container))
|
||||
return 1
|
||||
else if(src in container)
|
||||
return 1
|
||||
return
|
||||
|
||||
/*
|
||||
* atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
* Recursevly searches all atom contens (including contents contents and so on).
|
||||
*
|
||||
* ARGS: path - search atom contents for atoms of this type
|
||||
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
|
||||
*
|
||||
* RETURNS: list of found atoms
|
||||
*/
|
||||
|
||||
/atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
var/list/found = list()
|
||||
for(var/atom/A in src)
|
||||
if(istype(A, path))
|
||||
found += A
|
||||
if(filter_path)
|
||||
var/pass = 0
|
||||
for(var/type in filter_path)
|
||||
pass |= istype(A, type)
|
||||
if(!pass)
|
||||
continue
|
||||
if(A.contents.len)
|
||||
found += A.search_contents_for(path,filter_path)
|
||||
return found
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Beam code by Gunbuddy
|
||||
|
||||
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
|
||||
once at a time per source will cause graphical errors.
|
||||
Also, the icon used for the beam will have to be vertical and 32x32.
|
||||
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
|
||||
its easier to just keep the beam vertical.
|
||||
*/
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10)
|
||||
//BeamTarget represents the target for the beam, basically just means the other end.
|
||||
//Time is the duration to draw the beam
|
||||
//Icon is obviously which icon to use for the beam, default is beam.dmi
|
||||
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
|
||||
//Maxdistance is the longest range the beam will persist before it gives up.
|
||||
var/EndTime=world.time+time
|
||||
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
|
||||
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
|
||||
//of range or to another z-level, then the beam will stop. Otherwise it will
|
||||
//continue to draw.
|
||||
|
||||
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
|
||||
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
|
||||
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
|
||||
del O //pieces to a new orientation.
|
||||
var/Angle=round(Get_Angle(src,BeamTarget))
|
||||
var/icon/I=new(icon,icon_state)
|
||||
I.Turn(Angle)
|
||||
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
|
||||
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
|
||||
var/N=0
|
||||
var/length=round(sqrt((DX)**2+(DY)**2))
|
||||
for(N,N<length,N+=32)
|
||||
var/obj/effect/overlay/beam/X=new(loc)
|
||||
X.BeamSource=src
|
||||
if(N+32>length)
|
||||
var/icon/II=new(icon,icon_state)
|
||||
II.DrawBox(null,1,(length-N),32,32)
|
||||
II.Turn(Angle)
|
||||
X.icon=II
|
||||
else X.icon=I
|
||||
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
|
||||
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
|
||||
if(DX==0) Pixel_x=0
|
||||
if(DY==0) Pixel_y=0
|
||||
if(Pixel_x>32)
|
||||
for(var/a=0, a<=Pixel_x,a+=32)
|
||||
X.x++
|
||||
Pixel_x-=32
|
||||
if(Pixel_x<-32)
|
||||
for(var/a=0, a>=Pixel_x,a-=32)
|
||||
X.x--
|
||||
Pixel_x+=32
|
||||
if(Pixel_y>32)
|
||||
for(var/a=0, a<=Pixel_y,a+=32)
|
||||
X.y++
|
||||
Pixel_y-=32
|
||||
if(Pixel_y<-32)
|
||||
for(var/a=0, a>=Pixel_y,a-=32)
|
||||
X.y--
|
||||
Pixel_y+=32
|
||||
X.pixel_x=Pixel_x
|
||||
X.pixel_y=Pixel_y
|
||||
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
|
||||
//I've found that 3 ticks provided a nice balance for my use.
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
|
||||
|
||||
|
||||
//All atoms
|
||||
/atom/verb/examine()
|
||||
set name = "Examine"
|
||||
@@ -349,36 +549,6 @@
|
||||
del(blood_DNA)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/clean_blood()
|
||||
. = ..()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.gloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0)
|
||||
else
|
||||
if(H.bloody_hands)
|
||||
H.bloody_hands = 0
|
||||
H.update_inv_gloves(0)
|
||||
update_icons() //apply the now updated overlays to the mob
|
||||
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
overlays.Remove(blood_overlay)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
/*
|
||||
/turf/simulated/clean_blood()
|
||||
. = ..()
|
||||
if(icon_old)
|
||||
var/icon/I = new /icon(icon_old, icon_state)
|
||||
icon = I
|
||||
else
|
||||
icon = initial(icon)
|
||||
*/
|
||||
|
||||
|
||||
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
|
||||
@@ -1187,77 +1357,4 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
return 0
|
||||
|
||||
/atom/proc/checkpass(passflag)
|
||||
return pass_flags&passflag
|
||||
|
||||
|
||||
//Could not find object proc defines and this could almost be an atom level one.
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
|
||||
/*Really why was this in the click proc of all the places you could put it
|
||||
if (usr:a_intent == "help")
|
||||
// ------- YOU HAVE THE HELP INTENT SELECTED -------
|
||||
if(istype(src, /mob/living/carbon))
|
||||
// ------- YOUR TARGET IS LIVING CARBON CREATURE (NOT AI OR CYBORG OR SIMPLE ANIMAL) -------
|
||||
var/mob/living/carbon/C = src
|
||||
if(HEAL in usr:mutations)
|
||||
// ------- YOU ARE HUMAN, WITH THE HELP INTENT TARGETING A HUMAN AND HAVE THE 'HEAT' GENETIC MUTATION -------
|
||||
|
||||
if(C.stat != 2)
|
||||
// ------- THE PERSON YOU'RE TOUCHING IS NOT DEAD -------
|
||||
|
||||
var/t_him = "it"
|
||||
if (src.gender == MALE)
|
||||
t_him = "his"
|
||||
else if (src.gender == FEMALE)
|
||||
t_him = "her"
|
||||
var/u_him = "it"
|
||||
if (usr.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (usr.gender == FEMALE)
|
||||
t_him = "her"
|
||||
|
||||
if(src != usr)
|
||||
usr.visible_message( \
|
||||
"\blue <i>[usr] places [u_him] palms on [src], healing [t_him]!</i>", \
|
||||
"\blue You place your palms on [src] and heal [t_him].", \
|
||||
)
|
||||
else
|
||||
usr.visible_message( \
|
||||
"\blue <i>[usr] places [u_him] palms on [u_him]self and heals.</i>", \
|
||||
"\blue You place your palms on yourself and heal.", \
|
||||
)
|
||||
|
||||
C.adjustOxyLoss(-25)
|
||||
C.adjustToxLoss(-25)
|
||||
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
// ------- YOUR TARGET IS HUMAN -------
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/datum/organ/external/affecting = H.get_organ(check_zone(usr:zone_sel:selecting))
|
||||
if(affecting && affecting.heal_damage(25, 25))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
C.heal_organ_damage(25, 25)
|
||||
C.adjustCloneLoss(-25)
|
||||
C.stunned = max(0, C.stunned-5)
|
||||
C.paralysis = max(0, C.paralysis-5)
|
||||
C.stuttering = max(0, C.stuttering-5)
|
||||
C.drowsyness = max(0, C.drowsyness-5)
|
||||
C.weakened = max(0, C.weakened-5)
|
||||
usr:nutrition -= rand(1,10)
|
||||
usr.next_move = world.time + 6
|
||||
else
|
||||
// ------- PERSON YOU'RE TOUCHING IS ALREADY DEAD -------
|
||||
usr << "\red [src] is dead and can't be healed."
|
||||
return
|
||||
|
||||
// ------- IF YOU DON'T HAVE THE SILLY ABILITY ABOVE OR FAIL ON ANY OTHER CHECK, THEN YOU'RE CLICKING ON SOMETHING WITH AN EMPTY HAND. ATTACK_HAND IT IS THEN -------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
return pass_flags&passflag
|
||||
179
code/game/atoms_movable.dm
Normal file
179
code/game/atoms_movable.dm
Normal file
@@ -0,0 +1,179 @@
|
||||
/atom/movable
|
||||
layer = 3
|
||||
var/last_move = null
|
||||
var/anchored = 0
|
||||
// var/elevation = 2 - not used anywhere
|
||||
var/move_speed = 10
|
||||
var/l_move_time = 1
|
||||
var/m_flag = 1
|
||||
var/throwing = 0
|
||||
var/throw_speed = 2
|
||||
var/throw_range = 7
|
||||
var/moved_recently = 0
|
||||
var/mob/pulledby = null
|
||||
|
||||
/atom/movable/Move()
|
||||
var/atom/A = src.loc
|
||||
. = ..()
|
||||
src.move_speed = world.timeofday - src.l_move_time
|
||||
src.l_move_time = world.timeofday
|
||||
src.m_flag = 1
|
||||
if ((A != src.loc && A && A.z == src.z))
|
||||
src.last_move = get_dir(A, src.loc)
|
||||
return
|
||||
|
||||
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
|
||||
if(src.throwing)
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
spawn( 0 )
|
||||
if ((A && yes))
|
||||
A.last_bumped = world.time
|
||||
A.Bumped(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/atom/movable/proc/forceMove(atom/destination)
|
||||
if(destination)
|
||||
if(loc)
|
||||
loc.Exited(src)
|
||||
loc = destination
|
||||
loc.Entered(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/atom/movable/proc/hit_check()
|
||||
if(src.throwing)
|
||||
for(var/atom/A in get_turf(src))
|
||||
if(A == src) continue
|
||||
if(istype(A,/mob/living))
|
||||
if(A:lying) continue
|
||||
src.throw_impact(A)
|
||||
if(src.throwing == 1)
|
||||
src.throwing = 0
|
||||
if(isobj(A))
|
||||
if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed)
|
||||
if(!target || !src) return 0
|
||||
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
|
||||
|
||||
src.throwing = 1
|
||||
|
||||
if(usr)
|
||||
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
src.throwing = 2 // really strong throw!
|
||||
|
||||
var/dist_x = abs(target.x - src.x)
|
||||
var/dist_y = abs(target.y - src.y)
|
||||
|
||||
var/dx
|
||||
if (target.x > src.x)
|
||||
dx = EAST
|
||||
else
|
||||
dx = WEST
|
||||
|
||||
var/dy
|
||||
if (target.y > src.y)
|
||||
dy = NORTH
|
||||
else
|
||||
dy = SOUTH
|
||||
var/dist_travelled = 0
|
||||
var/dist_since_sleep = 0
|
||||
var/area/a = get_area(src.loc)
|
||||
if(dist_x > dist_y)
|
||||
var/error = dist_x/2 - dist_y
|
||||
|
||||
|
||||
|
||||
while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
a = get_area(src.loc)
|
||||
else
|
||||
var/error = dist_y/2 - dist_x
|
||||
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
|
||||
a = get_area(src.loc)
|
||||
|
||||
//done throwing, either because it hit something or it finished moving
|
||||
src.throwing = 0
|
||||
if(isobj(src)) src:throw_impact(get_turf(src))
|
||||
|
||||
|
||||
//Overlays
|
||||
/atom/movable/overlay
|
||||
var/atom/master = null
|
||||
anchored = 1
|
||||
|
||||
/atom/movable/overlay/New()
|
||||
for(var/x in src.verbs)
|
||||
src.verbs -= x
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
if (src.master)
|
||||
return src.master.attackby(a, b)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_paw(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_paw(a, b, c)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_hand(a, b, c)
|
||||
return
|
||||
@@ -1,186 +0,0 @@
|
||||
/world/proc/load_mode()
|
||||
var/text = file2text("data/mode.txt")
|
||||
if (text)
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
if (lines[1])
|
||||
master_mode = lines[1]
|
||||
diary << "Saved mode is '[master_mode]'"
|
||||
|
||||
/world/proc/save_mode(var/the_mode)
|
||||
var/F = file("data/mode.txt")
|
||||
fdel(F)
|
||||
F << the_mode
|
||||
|
||||
/world/proc/load_motd()
|
||||
join_motd = file2text("config/motd.txt")
|
||||
|
||||
|
||||
/world/proc/load_admins()
|
||||
var/text = file2text("config/admins.txt")
|
||||
if (!text)
|
||||
diary << "Failed to load config/admins.txt\n"
|
||||
else
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
if (!line)
|
||||
continue
|
||||
|
||||
if (copytext(line, 1, 2) == ";")
|
||||
continue
|
||||
|
||||
var/pos = findtext(line, " - ", 1, null)
|
||||
if (pos)
|
||||
var/m_key = copytext(line, 1, pos)
|
||||
var/a_lev = copytext(line, pos + 3, length(line) + 1)
|
||||
admins[m_key] = a_lev
|
||||
diary << ("ADMIN: [m_key] = [a_lev]")
|
||||
|
||||
/world/proc/load_testers()
|
||||
var/text = file2text("config/testers.txt")
|
||||
if (!text)
|
||||
diary << "Failed to load config/testers.txt\n"
|
||||
else
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
if (!line)
|
||||
continue
|
||||
|
||||
if (copytext(line, 1, 2) == ";")
|
||||
continue
|
||||
|
||||
var/pos = findtext(line, " - ", 1, null)
|
||||
if (pos)
|
||||
var/m_key = copytext(line, 1, pos)
|
||||
var/a_lev = copytext(line, pos + 3, length(line) + 1)
|
||||
admins[m_key] = a_lev
|
||||
|
||||
|
||||
/world/proc/load_configuration()
|
||||
config = new /datum/configuration()
|
||||
config.load("config/config.txt")
|
||||
config.load("config/game_options.txt","game_options")
|
||||
config.loadsql("config/dbconfig.txt")
|
||||
config.loadforumsql("config/forumdbconfig.txt")
|
||||
// apply some settings from config..
|
||||
abandon_allowed = config.respawn
|
||||
|
||||
/world/New()
|
||||
src.load_configuration()
|
||||
|
||||
if (config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
// dumb and hardcoded but I don't care~
|
||||
config.server_name += " #[(world.port % 1000) / 100]"
|
||||
|
||||
src.load_mode()
|
||||
src.load_motd()
|
||||
src.load_admins()
|
||||
investigate_reset()
|
||||
if (config.usewhitelist)
|
||||
load_whitelist()
|
||||
LoadBansjob()
|
||||
Get_Holiday() //~Carn, needs to be here when the station is named so :P
|
||||
src.update_status()
|
||||
makepowernets()
|
||||
|
||||
sun = new /datum/sun()
|
||||
vote = new /datum/vote()
|
||||
radio_controller = new /datum/controller/radio()
|
||||
data_core = new /obj/effect/datacore()
|
||||
paiController = new /datum/paiController()
|
||||
|
||||
..()
|
||||
|
||||
sleep(50)
|
||||
|
||||
plmaster = new /obj/effect/overlay( )
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = 0
|
||||
|
||||
slmaster = new /obj/effect/overlay( )
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = 0
|
||||
|
||||
src.update_status()
|
||||
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
spawn(-1)
|
||||
master_controller.setup()
|
||||
lighting_controller.Initialize()
|
||||
return
|
||||
|
||||
//Crispy fullban
|
||||
/world/Reboot(var/reason)
|
||||
spawn(0)
|
||||
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy
|
||||
//if(prob(40))
|
||||
// for(var/mob/M in world)
|
||||
// if(M.client)
|
||||
// M << sound('sound/AI/newroundsexy.ogg')
|
||||
//else
|
||||
// for(var/mob/M in world)
|
||||
// if(M.client)
|
||||
// M << sound('sound/misc/apcdestroyed.ogg')
|
||||
|
||||
for(var/client/C)
|
||||
if (config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[config.server]")
|
||||
else
|
||||
C << link("byond://[world.address]:[world.port]")
|
||||
|
||||
// sleep(10) // wait for sound to play
|
||||
..(reason)
|
||||
|
||||
/atom/proc/check_eye(user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai))
|
||||
return 1
|
||||
return
|
||||
|
||||
/atom/proc/on_reagent_change()
|
||||
return
|
||||
|
||||
/atom/proc/Bumped(AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
|
||||
spawn( 0 )
|
||||
if ((A && yes))
|
||||
A.last_bumped = world.time
|
||||
A.Bumped(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
// **** Note in 40.93.4, split into obj/mob/turf point verbs, no area
|
||||
|
||||
/atom/verb/point()
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
set src in oview()
|
||||
var/atom/this = src//detach proc from src
|
||||
src = null
|
||||
|
||||
if(!usr || !isturf(usr.loc))
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(usr.status_flags & FAKEDEATH)
|
||||
return
|
||||
|
||||
var/tile = get_turf(this)
|
||||
if (!tile)
|
||||
return
|
||||
|
||||
var/P = new /obj/effect/decal/point(tile)
|
||||
spawn (20)
|
||||
if(P) del(P)
|
||||
|
||||
usr.visible_message("<b>[usr]</b> points to [this]")
|
||||
|
||||
/obj/effect/decal/point/point()
|
||||
set src in oview()
|
||||
set hidden = 1
|
||||
return
|
||||
@@ -1,104 +0,0 @@
|
||||
#define REGULATE_RATE 5
|
||||
|
||||
/obj/item/weapon/storage/beakerbox
|
||||
name = "Beaker Box"
|
||||
icon_state = "beaker"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/beakerbox/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
|
||||
/obj/item/weapon/paper/alchemy/
|
||||
name = "paper- 'Chemistry Information'"
|
||||
|
||||
/obj/item/weapon/storage/trashcan
|
||||
name = "disposal unit"
|
||||
w_class = 4.0
|
||||
anchored = 1.0
|
||||
density = 1.0
|
||||
var/processing = null
|
||||
var/locked = 1
|
||||
req_access = list(access_janitor)
|
||||
desc = "A compact incineration device, used to dispose of garbage."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "trashcan"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
/obj/item/weapon/storage/trashcan/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
//..()
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
user << "The trashcan is full!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/disk/nuclear)||istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "This is far too important to throw away!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/storage/))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
user << "You cannot fit the person inside."
|
||||
return
|
||||
var/t
|
||||
for(var/obj/item/weapon/O in src)
|
||||
t += O.w_class
|
||||
//Foreach goto(46)
|
||||
t += W.w_class
|
||||
if (t > 30)
|
||||
user << "You cannot fit the item inside. (Remove the larger items first)"
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("\blue [user] has put [W] in [src]!")
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
src.locked = 1
|
||||
src.icon_state = "trashcan1"
|
||||
spawn (200)
|
||||
if (src.contents.len < 7)
|
||||
src.locked = 0
|
||||
src.icon_state = "trashcan"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/trashcan/attack_hand(mob/user as mob)
|
||||
if(src.allowed(usr))
|
||||
locked = !locked
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
if (src.processing)
|
||||
return
|
||||
if (src.contents.len >= 7)
|
||||
user << "\blue You begin the emptying procedure."
|
||||
var/area/A = src.loc.loc // make sure it's in an area
|
||||
if(!A || !isarea(A))
|
||||
return
|
||||
// var/turf/T = src.loc
|
||||
A.use_power(250, EQUIP)
|
||||
src.processing = 1
|
||||
src.contents.len = 0
|
||||
src.icon_state = "trashmelt"
|
||||
if (istype(loc, /turf))
|
||||
loc:hotspot_expose(1000,10)
|
||||
sleep (60)
|
||||
src.icon_state = "trashcan"
|
||||
src.processing = 0
|
||||
return
|
||||
else
|
||||
src.icon_state = "trashcan"
|
||||
user << "\blue Due to conservation measures, the unit is unable to start until it is completely filled."
|
||||
return
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/obj/effect/landmark/New()
|
||||
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
invisibility = 101
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("shuttle")
|
||||
shuttle_z = z
|
||||
del(src)
|
||||
|
||||
if("airtunnel_stop")
|
||||
airtunnel_stop = x
|
||||
|
||||
if("airtunnel_start")
|
||||
airtunnel_start = x
|
||||
|
||||
if("airtunnel_bottom")
|
||||
airtunnel_bottom = y
|
||||
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
del(src)
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
del(src)
|
||||
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
del(src)
|
||||
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
del(src)
|
||||
|
||||
//prisoners
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
del(src)
|
||||
// if("mazewarp")
|
||||
// mazewarp += loc
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
//not prisoners
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
del(src)
|
||||
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
del(src)
|
||||
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
tag = "start*[name]"
|
||||
invisibility = 101
|
||||
|
||||
return 1
|
||||
@@ -1,218 +1,218 @@
|
||||
//config stuff
|
||||
#define SYNDICATE_DOCKZ 5 //Z-level of the Dock.
|
||||
#define SYNDICATE_STATIONZ 1 //Z-level of the Station.
|
||||
#define SYNDICATE_MOVETIME 150 //Time to station is milliseconds.
|
||||
#define SYNDICATE_STATION_AREATYPE "/area/syndicate_station/start" //Type of for station
|
||||
#define SYNDICATE_DOCK_AREATYPE 0 //Type of area for dock
|
||||
|
||||
var/syndicate_station_moving_to_station = 0
|
||||
var/syndicate_station_moving_to_space = 0
|
||||
var/syndicate_station_at_station = 0
|
||||
var/syndicate_station_can_send = 1
|
||||
var/syndicate_station_time = 0
|
||||
var/syndicate_station_timeleft = 0
|
||||
var/area/syndicate_loc = null
|
||||
var/syndicate_out_of_moves = 0
|
||||
var/bomb_set = 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station
|
||||
name = "Syndicate Station Terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list()
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
var/syndicate_break = 0
|
||||
|
||||
/proc/syndicate_begin()
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
syndicate_loc = locate(/area/syndicate_station/one)
|
||||
if(2)
|
||||
syndicate_loc = locate(/area/syndicate_station/two)
|
||||
if(3)
|
||||
syndicate_loc = locate(/area/syndicate_station/three)
|
||||
if(4)
|
||||
syndicate_loc = locate(/area/syndicate_station/four)
|
||||
if(5)
|
||||
syndicate_loc = locate(/area/syndicate_station/five)
|
||||
if(6)
|
||||
syndicate_loc = locate(/area/syndicate_station/six)
|
||||
|
||||
/proc/syndicate_process()
|
||||
while(syndicate_station_time - world.timeofday > 0)
|
||||
var/ticksleft = syndicate_station_time - world.timeofday
|
||||
|
||||
if(ticksleft > 1e5)
|
||||
syndicate_station_time = world.timeofday + 10 // midnight rollover
|
||||
|
||||
|
||||
syndicate_station_timeleft = (ticksleft / 10)
|
||||
sleep(5)
|
||||
syndicate_station_moving_to_station = 0
|
||||
syndicate_station_moving_to_space = 0
|
||||
|
||||
switch(syndicate_station_at_station)
|
||||
if(0)
|
||||
syndicate_station_at_station = 1
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = locate(/area/syndicate_station/start)
|
||||
var/area/end_location = syndicate_loc
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
bomb_set = 0
|
||||
|
||||
|
||||
|
||||
if(1)
|
||||
syndicate_station_at_station = 0
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = syndicate_loc
|
||||
var/area/end_location = locate(/area/syndicate_station/start)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
syndicate_out_of_moves = 1
|
||||
|
||||
/proc/syndicate_can_move()
|
||||
//world << "moving_to_station = [syndicate_station_moving_to_station]; moving_to_space = [syndicate_station_moving_to_space]; out_of_moves = [syndicate_out_of_moves]; bomb_set = [bomb_set]; "
|
||||
if(syndicate_station_moving_to_station || syndicate_station_moving_to_space) return 0
|
||||
if(syndicate_out_of_moves) return 0
|
||||
if(!bomb_set) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue Nothing happens."
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(var/mob/user as mob)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access Denied."
|
||||
return
|
||||
|
||||
if(syndicate_break)
|
||||
user << "\red Unable to locate shuttle."
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = src.temp
|
||||
else
|
||||
dat += {"<BR><B>Syndicate Shuttle</B><HR>
|
||||
\nLocation: [syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "Moving to station ([syndicate_station_timeleft] Secs.)":syndicate_station_at_station ? "Station":"Space"]<BR>
|
||||
[syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "\n*Shuttle already called*<BR>\n<BR>":syndicate_station_at_station ? "\n<A href='?src=\ref[src];sendtospace=1'>Send to space</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["sendtospace"])
|
||||
if(!syndicate_station_at_station|| syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(PRISON_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_space = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(syndicate_station_at_station || syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(SYNDICATE_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_station = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
src.temp = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
//config stuff
|
||||
#define SYNDICATE_DOCKZ 5 //Z-level of the Dock.
|
||||
#define SYNDICATE_STATIONZ 1 //Z-level of the Station.
|
||||
#define SYNDICATE_MOVETIME 150 //Time to station is milliseconds.
|
||||
#define SYNDICATE_STATION_AREATYPE "/area/syndicate_station/start" //Type of for station
|
||||
#define SYNDICATE_DOCK_AREATYPE 0 //Type of area for dock
|
||||
|
||||
var/syndicate_station_moving_to_station = 0
|
||||
var/syndicate_station_moving_to_space = 0
|
||||
var/syndicate_station_at_station = 0
|
||||
var/syndicate_station_can_send = 1
|
||||
var/syndicate_station_time = 0
|
||||
var/syndicate_station_timeleft = 0
|
||||
var/area/syndicate_loc = null
|
||||
var/syndicate_out_of_moves = 0
|
||||
var/bomb_set = 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station
|
||||
name = "Syndicate Station Terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list()
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
var/syndicate_break = 0
|
||||
|
||||
/proc/syndicate_begin()
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
syndicate_loc = locate(/area/syndicate_station/one)
|
||||
if(2)
|
||||
syndicate_loc = locate(/area/syndicate_station/two)
|
||||
if(3)
|
||||
syndicate_loc = locate(/area/syndicate_station/three)
|
||||
if(4)
|
||||
syndicate_loc = locate(/area/syndicate_station/four)
|
||||
if(5)
|
||||
syndicate_loc = locate(/area/syndicate_station/five)
|
||||
if(6)
|
||||
syndicate_loc = locate(/area/syndicate_station/six)
|
||||
|
||||
/proc/syndicate_process()
|
||||
while(syndicate_station_time - world.timeofday > 0)
|
||||
var/ticksleft = syndicate_station_time - world.timeofday
|
||||
|
||||
if(ticksleft > 1e5)
|
||||
syndicate_station_time = world.timeofday + 10 // midnight rollover
|
||||
|
||||
|
||||
syndicate_station_timeleft = (ticksleft / 10)
|
||||
sleep(5)
|
||||
syndicate_station_moving_to_station = 0
|
||||
syndicate_station_moving_to_space = 0
|
||||
|
||||
switch(syndicate_station_at_station)
|
||||
if(0)
|
||||
syndicate_station_at_station = 1
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = locate(/area/syndicate_station/start)
|
||||
var/area/end_location = syndicate_loc
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
bomb_set = 0
|
||||
|
||||
|
||||
|
||||
if(1)
|
||||
syndicate_station_at_station = 0
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = syndicate_loc
|
||||
var/area/end_location = locate(/area/syndicate_station/start)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
syndicate_out_of_moves = 1
|
||||
|
||||
/proc/syndicate_can_move()
|
||||
//world << "moving_to_station = [syndicate_station_moving_to_station]; moving_to_space = [syndicate_station_moving_to_space]; out_of_moves = [syndicate_out_of_moves]; bomb_set = [bomb_set]; "
|
||||
if(syndicate_station_moving_to_station || syndicate_station_moving_to_space) return 0
|
||||
if(syndicate_out_of_moves) return 0
|
||||
if(!bomb_set) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue Nothing happens."
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(var/mob/user as mob)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access Denied."
|
||||
return
|
||||
|
||||
if(syndicate_break)
|
||||
user << "\red Unable to locate shuttle."
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = src.temp
|
||||
else
|
||||
dat += {"<BR><B>Syndicate Shuttle</B><HR>
|
||||
\nLocation: [syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "Moving to station ([syndicate_station_timeleft] Secs.)":syndicate_station_at_station ? "Station":"Space"]<BR>
|
||||
[syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "\n*Shuttle already called*<BR>\n<BR>":syndicate_station_at_station ? "\n<A href='?src=\ref[src];sendtospace=1'>Send to space</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["sendtospace"])
|
||||
if(!syndicate_station_at_station|| syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(PRISON_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_space = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(syndicate_station_at_station || syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(SYNDICATE_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_station = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
src.temp = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
@@ -1,40 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
|
||||
// /obj/item/weapon/pickaxe/hammer =4, //Waiting on a sprite
|
||||
/obj/item/weapon/pickaxe/silver =4,
|
||||
/obj/item/weapon/pickaxe/drill =4,
|
||||
/obj/item/weapon/pickaxe/jackhammer =4,
|
||||
/mob/living/simple_animal/carp =3,
|
||||
/obj/item/weapon/pickaxe/diamond =3,
|
||||
/obj/item/weapon/pickaxe/diamonddrill =3,
|
||||
/obj/item/weapon/pickaxe/gold =3,
|
||||
/obj/item/weapon/pickaxe/plasmacutter =2,
|
||||
/obj/structure/closet/syndicate/resources =2,
|
||||
/obj/item/weapon/melee/energy/sword/pirate =1,
|
||||
/obj/mecha/working/ripley/mining =1
|
||||
|
||||
// /obj/creature =0,
|
||||
// /obj/item/weapon/rcd =0,
|
||||
// /obj/item/weapon/rcd_ammo =0,
|
||||
// /obj/item/weapon/spacecash =0,
|
||||
// /obj/item/weapon/cloaking_device =0,
|
||||
// /obj/item/weapon/gun/energy/teleport_gun =0,
|
||||
// /obj/item/weapon/rubber_chicken =0,
|
||||
// /obj/machinery/wish_granter =0, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.>
|
||||
// /obj/item/clothing/glasses/thermal =0, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe.
|
||||
// /obj/item/weapon/storage/box/stealth/ =0
|
||||
// =11
|
||||
)
|
||||
|
||||
var/global/list/spawned_surprises = list()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/wish_granter
|
||||
name = "Wish Granter"
|
||||
desc = "You're not so sure about this, anymore..."
|
||||
@@ -107,18 +70,4 @@ var/global/list/spawned_surprises = list()
|
||||
|
||||
user << "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
|
||||
return
|
||||
@@ -6,6 +6,11 @@
|
||||
layer = 16.0
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/point/point()
|
||||
set src in oview()
|
||||
set hidden = 1
|
||||
return
|
||||
|
||||
// Used for spray that you spray at walls, tables, hydrovats etc
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
|
||||
@@ -5,12 +5,84 @@
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
|
||||
/obj/effect/landmark/New()
|
||||
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
invisibility = 101
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("shuttle")
|
||||
shuttle_z = z
|
||||
del(src)
|
||||
|
||||
if("airtunnel_stop")
|
||||
airtunnel_stop = x
|
||||
|
||||
if("airtunnel_start")
|
||||
airtunnel_start = x
|
||||
|
||||
if("airtunnel_bottom")
|
||||
airtunnel_bottom = y
|
||||
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
del(src)
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
del(src)
|
||||
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
del(src)
|
||||
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
del(src)
|
||||
|
||||
//prisoners
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
del(src)
|
||||
// if("mazewarp")
|
||||
// mazewarp += loc
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
//not prisoners
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
del(src)
|
||||
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
del(src)
|
||||
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
tag = "start*[name]"
|
||||
invisibility = 101
|
||||
|
||||
return 1
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
|
||||
26
code/game/objects/effects/spawners/vaultspawner.dm
Normal file
26
code/game/objects/effects/spawners/vaultspawner.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/obj/effect/vaultspawner
|
||||
var/maxX = 6
|
||||
var/maxY = 6
|
||||
var/minX = 2
|
||||
var/minY = 2
|
||||
|
||||
/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
|
||||
if(!type)
|
||||
type = pick("sandstone","rock","alien")
|
||||
|
||||
var/lowBoundX = location.x
|
||||
var/lowBoundY = location.y
|
||||
|
||||
var/hiBoundX = location.x + rand(lX,uX)
|
||||
var/hiBoundY = location.y + rand(lY,uY)
|
||||
|
||||
var/z = location.z
|
||||
|
||||
for(var/i = lowBoundX,i<=hiBoundX,i++)
|
||||
for(var/j = lowBoundY,j<=hiBoundY,j++)
|
||||
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
|
||||
new /turf/simulated/wall/vault(locate(i,j,z),type)
|
||||
else
|
||||
new /turf/simulated/floor/vault(locate(i,j,z),type)
|
||||
|
||||
del(src)
|
||||
@@ -640,4 +640,12 @@
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= BLIND
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
overlays.Remove(blood_overlay)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
@@ -4,6 +4,7 @@
|
||||
* Candle Packs
|
||||
* Snap Pop Box
|
||||
* Crayon Box
|
||||
* Beaker Box
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -101,4 +102,23 @@
|
||||
if("rainbow")
|
||||
usr << "This crayon is too powerful to be contained in this box."
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
/*
|
||||
* Beaker Box
|
||||
*/
|
||||
/obj/item/weapon/storage/beakerbox
|
||||
name = "Beaker Box"
|
||||
icon_state = "beaker"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/beakerbox/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
@@ -12,6 +12,28 @@
|
||||
var/throwforce = 1
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
/obj/assume_air(datum/air_group/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
@@ -36,7 +58,7 @@
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
//AutoUpdateTK(src)
|
||||
|
||||
if (istype(usr, /mob/living/carbon/human))
|
||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
||||
if(!(usr in nearby))
|
||||
@@ -49,7 +71,7 @@
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
AutoUpdateAI(src)
|
||||
//AutoUpdateTK(src)
|
||||
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
37
code/game/objects/structures/shuttle_engines.dm
Normal file
37
code/game/objects/structures/shuttle_engines.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
/obj/structure/shuttle
|
||||
name = "shuttle"
|
||||
icon = 'icons/turf/shuttle.dmi'
|
||||
|
||||
/obj/structure/shuttle/engine
|
||||
name = "engine"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/shuttle/engine/heater
|
||||
name = "heater"
|
||||
icon_state = "heater"
|
||||
|
||||
/obj/structure/shuttle/engine/platform
|
||||
name = "platform"
|
||||
icon_state = "platform"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion
|
||||
name = "propulsion"
|
||||
icon_state = "propulsion"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst
|
||||
name = "burst"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst/left
|
||||
name = "left"
|
||||
icon_state = "burst_l"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst/right
|
||||
name = "right"
|
||||
icon_state = "burst_r"
|
||||
|
||||
/obj/structure/shuttle/engine/router
|
||||
name = "router"
|
||||
icon_state = "router"
|
||||
@@ -1,59 +0,0 @@
|
||||
/world/proc/update_status()
|
||||
var/s = ""
|
||||
|
||||
if (config && config.server_name)
|
||||
s += "<b>[config.server_name]</b> — "
|
||||
|
||||
s += "<b>[station_name()]</b>";
|
||||
s += " ("
|
||||
s += "<a href=\"http://\">" //Change this to wherever you want the hub to link to.
|
||||
// s += "[game_version]"
|
||||
s += "Default" //Replace this with something else. Or ever better, delete it and uncomment the game version.
|
||||
s += "</a>"
|
||||
s += ")"
|
||||
|
||||
var/list/features = list()
|
||||
|
||||
if (!ticker)
|
||||
features += "<b>STARTING</b>"
|
||||
|
||||
if (ticker && master_mode)
|
||||
features += master_mode
|
||||
|
||||
if (!enter_allowed)
|
||||
features += "closed"
|
||||
|
||||
if (abandon_allowed)
|
||||
features += abandon_allowed ? "respawn" : "no respawn"
|
||||
|
||||
if (config && config.allow_vote_mode)
|
||||
features += "vote"
|
||||
|
||||
if (config && config.allow_ai)
|
||||
features += "AI allowed"
|
||||
|
||||
var/n = 0
|
||||
for (var/mob/M in player_list)
|
||||
if (M.client)
|
||||
n++
|
||||
|
||||
if (n > 1)
|
||||
features += "~[n] players"
|
||||
else if (n > 0)
|
||||
features += "~[n] player"
|
||||
|
||||
/*
|
||||
is there a reason for this? the byond site shows 'hosted by X' when there is a proper host already.
|
||||
if (host)
|
||||
features += "hosted by <b>[host]</b>"
|
||||
*/
|
||||
|
||||
if (!host && config && config.hostedby)
|
||||
features += "hosted by <b>[config.hostedby]</b>"
|
||||
|
||||
if (features)
|
||||
s += ": [dd_list2text(features, ", ")]"
|
||||
|
||||
/* does this help? I do not know */
|
||||
if (src.status != s)
|
||||
src.status = s
|
||||
@@ -1,243 +0,0 @@
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
var/obj/item/W = get_active_hand()
|
||||
if( !W )//Not holding anything
|
||||
if( client && (TK in mutations) )
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
put_in_active_hand(O)
|
||||
O.host = src
|
||||
return
|
||||
|
||||
if( istype(W,/obj/item/tk_grab) )
|
||||
if(hand) del(l_hand)
|
||||
else del(r_hand)
|
||||
return
|
||||
|
||||
if (src.in_throw_mode)
|
||||
throw_mode_off()
|
||||
else
|
||||
throw_mode_on()
|
||||
|
||||
/mob/living/carbon/proc/throw_mode_off()
|
||||
src.in_throw_mode = 0
|
||||
src.throw_icon.icon_state = "act_throw_off"
|
||||
|
||||
/mob/living/carbon/proc/throw_mode_on()
|
||||
src.in_throw_mode = 1
|
||||
src.throw_icon.icon_state = "act_throw_on"
|
||||
|
||||
/mob/living/carbon/proc/throw_item(atom/target)
|
||||
src.throw_mode_off()
|
||||
if(usr.stat || !target)
|
||||
return
|
||||
if(target.type == /obj/screen) return
|
||||
|
||||
var/atom/movable/item = src.get_active_hand()
|
||||
|
||||
if(!item) return
|
||||
|
||||
if (istype(item, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = item
|
||||
item = G.throw() //throw the person instead of the grab
|
||||
if(ismob(item))
|
||||
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
|
||||
var/turf/end_T = get_turf(target)
|
||||
if(start_T && end_T)
|
||||
var/mob/M = item
|
||||
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
|
||||
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
|
||||
item.loc = src.loc
|
||||
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
|
||||
//actually throw it!
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
src.visible_message("\red [src] has thrown [item].")
|
||||
|
||||
if(!src.lastarea)
|
||||
src.lastarea = get_area(src.loc)
|
||||
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
|
||||
|
||||
/*
|
||||
if(istype(src.loc, /turf/space) || (src.flags & NOGRAV)) //they're in space, move em one space in the opposite direction
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed)
|
||||
|
||||
|
||||
|
||||
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
|
||||
//returns only NORTH, SOUTH, EAST, or WEST
|
||||
var/dx = finish.x - start.x
|
||||
var/dy = finish.y - start.y
|
||||
if(abs(dy) > abs (dx)) //slope is above 1:1 (move horizontally in a tie)
|
||||
if(dy > 0)
|
||||
return get_step(start, SOUTH)
|
||||
else
|
||||
return get_step(start, NORTH)
|
||||
else
|
||||
if(dx > 0)
|
||||
return get_step(start, WEST)
|
||||
else
|
||||
return get_step(start, EAST)
|
||||
|
||||
/atom/movable/proc/hit_check()
|
||||
if(src.throwing)
|
||||
for(var/atom/A in get_turf(src))
|
||||
if(A == src) continue
|
||||
if(istype(A,/mob/living))
|
||||
if(A:lying) continue
|
||||
src.throw_impact(A)
|
||||
if(src.throwing == 1)
|
||||
src.throwing = 0
|
||||
if(isobj(A))
|
||||
if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
//In some cases it's desirable to be able to throw stuff over dense objects. (Tables, racks)
|
||||
/atom/var/throwpass = 0 //Thanks to SkyMarshal
|
||||
|
||||
/atom/proc/throw_impact(atom/hit_atom)
|
||||
if(istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.visible_message("\red [hit_atom] has been hit by [src].")
|
||||
if(isobj(src))//Hate typecheckin for a child object but this is just fixing crap another guy broke so if someone wants to put the time in and make this proper feel free.
|
||||
M.take_organ_damage(src:throwforce)
|
||||
|
||||
|
||||
else if(isobj(hit_atom))
|
||||
var/obj/O = hit_atom
|
||||
if(!O.anchored)
|
||||
step(O, src.dir)
|
||||
O.hitby(src)
|
||||
|
||||
else if(isturf(hit_atom))
|
||||
var/turf/T = hit_atom
|
||||
if(T.density)
|
||||
spawn(2)
|
||||
step(src, turn(src.dir, 180))
|
||||
if(istype(src,/mob/living))
|
||||
var/mob/living/M = src
|
||||
M.take_organ_damage(20)
|
||||
|
||||
/atom/movable/Bump(atom/O)
|
||||
if(src.throwing)
|
||||
src.throw_impact(O)
|
||||
src.throwing = 0
|
||||
..()
|
||||
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed)
|
||||
if(!target || !src) return 0
|
||||
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
|
||||
|
||||
src.throwing = 1
|
||||
|
||||
if(usr)
|
||||
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
src.throwing = 2 // really strong throw!
|
||||
|
||||
var/dist_x = abs(target.x - src.x)
|
||||
var/dist_y = abs(target.y - src.y)
|
||||
|
||||
var/dx
|
||||
if (target.x > src.x)
|
||||
dx = EAST
|
||||
else
|
||||
dx = WEST
|
||||
|
||||
var/dy
|
||||
if (target.y > src.y)
|
||||
dy = NORTH
|
||||
else
|
||||
dy = SOUTH
|
||||
var/dist_travelled = 0
|
||||
var/dist_since_sleep = 0
|
||||
var/area/a = get_area(src.loc)
|
||||
if(dist_x > dist_y)
|
||||
var/error = dist_x/2 - dist_y
|
||||
|
||||
|
||||
|
||||
while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
a = get_area(src.loc)
|
||||
else
|
||||
var/error = dist_y/2 - dist_x
|
||||
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
|
||||
a = get_area(src.loc)
|
||||
|
||||
//done throwing, either because it hit something or it finished moving
|
||||
src.throwing = 0
|
||||
if(isobj(src)) src:throw_impact(get_turf(src))
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/world/Topic(T, addr, master, key)
|
||||
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
|
||||
|
||||
if (T == "ping")
|
||||
var/x = 1
|
||||
for (var/client/C)
|
||||
x++
|
||||
return x
|
||||
|
||||
else if(T == "players")
|
||||
var/n = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
n++
|
||||
return n
|
||||
|
||||
else if (T == "status")
|
||||
var/list/s = list()
|
||||
s["version"] = game_version
|
||||
s["mode"] = master_mode
|
||||
s["respawn"] = config ? abandon_allowed : 0
|
||||
s["enter"] = enter_allowed
|
||||
s["vote"] = config.allow_vote_mode
|
||||
s["ai"] = config.allow_ai
|
||||
s["host"] = host ? host : null
|
||||
s["players"] = list()
|
||||
var/n = 0
|
||||
var/admins = 0
|
||||
|
||||
for(var/client/C in client_list)
|
||||
if(C.holder)
|
||||
if(C.stealth)
|
||||
continue //so stealthmins aren't revealed by the hub
|
||||
admins++
|
||||
s["player[n]"] = C.key
|
||||
n++
|
||||
s["players"] = n
|
||||
|
||||
if(revdata) s["revision"] = revdata.revision
|
||||
s["admins"] = admins
|
||||
|
||||
return list2params(s)
|
||||
71
code/game/turfs/simulated.dm
Normal file
71
code/game/turfs/simulated.dm
Normal file
@@ -0,0 +1,71 @@
|
||||
/turf/simulated
|
||||
name = "station"
|
||||
var/wet = 0
|
||||
var/image/wet_overlay = null
|
||||
|
||||
var/thermite = 0
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/Entered(atom/A, atom/OL)
|
||||
if (istype(A,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = A
|
||||
if(M.lying) return
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes))
|
||||
if(H.m_intent == "run")
|
||||
if(H.footstep >= 2)
|
||||
H.footstep = 0
|
||||
else
|
||||
H.footstep++
|
||||
if(H.footstep == 0)
|
||||
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
|
||||
else
|
||||
playsound(src, "clownstep", 20, 1)
|
||||
|
||||
switch (src.wet)
|
||||
if(1)
|
||||
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
|
||||
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the wet floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
else if(!istype(M, /mob/living/carbon/metroid))
|
||||
if (M.m_intent == "run")
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the wet floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
|
||||
if(2) //lube
|
||||
if(!istype(M, /mob/living/carbon/metroid))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
spawn(1) step(M, M.dir)
|
||||
spawn(2) step(M, M.dir)
|
||||
spawn(3) step(M, M.dir)
|
||||
spawn(4) step(M, M.dir)
|
||||
M.take_organ_damage(2) // Was 5 -- TLE
|
||||
M << "\blue You slipped on the floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Weaken(10)
|
||||
|
||||
..()
|
||||
451
code/game/turfs/simulated/floor.dm
Normal file
451
code/game/turfs/simulated/floor.dm
Normal file
@@ -0,0 +1,451 @@
|
||||
//This is so damaged or burnt tiles or platings don't get remembered as the default tile
|
||||
var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4",
|
||||
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2",
|
||||
"platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2",
|
||||
"light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken",
|
||||
"light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4",
|
||||
"asteroid","asteroid_dug",
|
||||
"asteroid0","asteroid1","asteroid2","asteroid3","asteroid4",
|
||||
"asteroid5","asteroid6","asteroid7","asteroid8","asteroid9","asteroid10","asteroid11","asteroid12",
|
||||
"burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b", "wood", "wood-broken")
|
||||
|
||||
var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug")
|
||||
var/list/wood_icons = list("wood","wood-broken")
|
||||
|
||||
/turf/simulated/floor
|
||||
|
||||
//Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not.
|
||||
//Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "floor"
|
||||
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
|
||||
var/icon_plating = "plating"
|
||||
thermal_conductivity = 0.040
|
||||
heat_capacity = 10000
|
||||
var/broken = 0
|
||||
var/burnt = 0
|
||||
var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel
|
||||
|
||||
|
||||
/turf/simulated/floor/New()
|
||||
..()
|
||||
if(icon_state in icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default
|
||||
icon_regular_floor = "floor"
|
||||
else
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
// if (!( locate(/obj/machinery/mass_driver, src) ))
|
||||
// return 0
|
||||
// return ..()
|
||||
|
||||
/turf/simulated/floor/ex_act(severity)
|
||||
//set src in oview(1)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.ReplaceWithSpace()
|
||||
if(2.0)
|
||||
switch(pick(1,2;75,3))
|
||||
if (1)
|
||||
src.ReplaceWithLattice()
|
||||
if(prob(33)) new /obj/item/stack/sheet/metal(src)
|
||||
if(2)
|
||||
src.ReplaceWithSpace()
|
||||
if(3)
|
||||
if(prob(80))
|
||||
src.break_tile_to_plating()
|
||||
else
|
||||
src.break_tile()
|
||||
src.hotspot_expose(1000,CELL_VOLUME)
|
||||
if(prob(33)) new /obj/item/stack/sheet/metal(src)
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
src.break_tile()
|
||||
src.hotspot_expose(1000,CELL_VOLUME)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/blob_act()
|
||||
return
|
||||
|
||||
turf/simulated/floor/proc/update_icon()
|
||||
if(is_plasteel_floor())
|
||||
if(!broken && !burnt)
|
||||
icon_state = icon_regular_floor
|
||||
if(is_plating())
|
||||
if(!broken && !burnt)
|
||||
icon_state = icon_plating //Because asteroids are 'platings' too.
|
||||
if(is_light_floor())
|
||||
var/obj/item/stack/tile/light/T = floor_tile
|
||||
if(T.on)
|
||||
switch(T.state)
|
||||
if(0)
|
||||
icon_state = "light_on"
|
||||
SetLuminosity(5)
|
||||
if(1)
|
||||
var/num = pick("1","2","3","4")
|
||||
icon_state = "light_on_flicker[num]"
|
||||
SetLuminosity(5)
|
||||
if(2)
|
||||
icon_state = "light_on_broken"
|
||||
SetLuminosity(5)
|
||||
if(3)
|
||||
icon_state = "light_off"
|
||||
SetLuminosity(0)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
icon_state = "light_off"
|
||||
if(is_grass_floor())
|
||||
if(!broken && !burnt)
|
||||
if(!(icon_state in list("grass1","grass2","grass3","grass4")))
|
||||
icon_state = "grass[pick("1","2","3","4")]"
|
||||
if(is_wood_floor())
|
||||
if(!broken && !burnt)
|
||||
if( !(icon_state in wood_icons) )
|
||||
icon_state = "wood"
|
||||
//world << "[icon_state]y's got [icon_state]"
|
||||
spawn(1)
|
||||
if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through.
|
||||
if(air)
|
||||
update_visuals(air)
|
||||
|
||||
/turf/simulated/floor/return_siding_icon_state()
|
||||
..()
|
||||
if(is_grass_floor())
|
||||
var/dir_sum = 0
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!(T.is_grass_floor()))
|
||||
dir_sum += direction
|
||||
if(dir_sum)
|
||||
return "wood_siding[dir_sum]"
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/turf/simulated/floor/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/turf/simulated/floor/attack_hand(mob/user as mob)
|
||||
if (is_light_floor())
|
||||
var/obj/item/stack/tile/light/T = floor_tile
|
||||
T.on = !T.on
|
||||
update_icon()
|
||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
||||
return
|
||||
if (user.pulling.anchored)
|
||||
return
|
||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
||||
return
|
||||
if (ismob(user.pulling))
|
||||
var/mob/M = user.pulling
|
||||
|
||||
// if(M==user) //temporary hack to stop runtimes. ~Carn
|
||||
// user.stop_pulling() //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.stop_pulling()
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
return
|
||||
|
||||
/turf/simulated/floor/proc/gets_drilled()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/proc/break_tile_to_plating()
|
||||
if(!is_plating())
|
||||
make_plating()
|
||||
break_tile()
|
||||
|
||||
/turf/simulated/floor/is_plasteel_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/plasteel))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_light_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/light))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_grass_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/grass))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_wood_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/wood))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_plating()
|
||||
if(!floor_tile)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/proc/break_tile()
|
||||
if(istype(src,/turf/simulated/floor/engine)) return
|
||||
if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor))
|
||||
src.ReplaceWithPlating()
|
||||
if(broken) return
|
||||
if(is_plasteel_floor())
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
broken = 1
|
||||
else if(is_light_floor())
|
||||
src.icon_state = "light_broken"
|
||||
broken = 1
|
||||
else if(is_plating())
|
||||
src.icon_state = "platingdmg[pick(1,2,3)]"
|
||||
broken = 1
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
broken = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
broken = 1
|
||||
|
||||
/turf/simulated/floor/proc/burn_tile()
|
||||
if(istype(src,/turf/simulated/floor/engine)) return
|
||||
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
|
||||
if(broken || burnt) return
|
||||
if(is_plasteel_floor())
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
burnt = 1
|
||||
else if(is_plasteel_floor())
|
||||
src.icon_state = "floorscorched[pick(1,2)]"
|
||||
burnt = 1
|
||||
else if(is_plating())
|
||||
src.icon_state = "panelscorched"
|
||||
burnt = 1
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
burnt = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
burnt = 1
|
||||
|
||||
//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf
|
||||
//This proc auto corrects the grass tiles' siding.
|
||||
/turf/simulated/floor/proc/make_plating()
|
||||
if(istype(src,/turf/simulated/floor/engine)) return
|
||||
|
||||
if(is_grass_floor())
|
||||
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(!floor_tile) return
|
||||
del(floor_tile)
|
||||
icon_plating = "plating"
|
||||
SetLuminosity(0)
|
||||
floor_tile = null
|
||||
intact = 0
|
||||
broken = 0
|
||||
burnt = 0
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with
|
||||
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
|
||||
//this proc.
|
||||
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
SetLuminosity(0)
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/plasteel))
|
||||
floor_tile = T
|
||||
if (icon_regular_floor)
|
||||
icon_state = icon_regular_floor
|
||||
else
|
||||
icon_state = "floor"
|
||||
icon_regular_floor = icon_state
|
||||
update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_tile = new/obj/item/stack/tile/plasteel
|
||||
icon_state = "floor"
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with
|
||||
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
|
||||
//this proc.
|
||||
/turf/simulated/floor/proc/make_light_floor(var/obj/item/stack/tile/light/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/light))
|
||||
floor_tile = T
|
||||
update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_tile = new/obj/item/stack/tile/light
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
//This proc will make a turf into a grass patch. Fun eh? Insert the grass tile to be used as the argument
|
||||
//If no argument is given a new one will be made.
|
||||
/turf/simulated/floor/proc/make_grass_floor(var/obj/item/stack/tile/grass/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/grass))
|
||||
floor_tile = T
|
||||
update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_tile = new/obj/item/stack/tile/grass
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
//This proc will make a turf into a wood floor. Fun eh? Insert the wood tile to be used as the argument
|
||||
//If no argument is given a new one will be made.
|
||||
/turf/simulated/floor/proc/make_wood_floor(var/obj/item/stack/tile/wood/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/wood))
|
||||
floor_tile = T
|
||||
update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_tile = new/obj/item/stack/tile/wood
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if(!C || !user)
|
||||
return 0
|
||||
|
||||
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
|
||||
if(is_light_floor())
|
||||
var/obj/item/stack/tile/light/T = floor_tile
|
||||
if(T.state)
|
||||
user.drop_item(C)
|
||||
del(C)
|
||||
T.state = C //fixing it by bashing it with a light bulb, fun eh?
|
||||
update_icon()
|
||||
user << "\blue You replace the light bulb."
|
||||
else
|
||||
user << "\blue The lightbulb seems fine, no need to replace it."
|
||||
|
||||
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())))
|
||||
if(broken || burnt)
|
||||
user << "\red You remove the broken plating."
|
||||
else
|
||||
if(is_wood_floor())
|
||||
user << "\red You forcefully pry off the planks, destroying them in the process."
|
||||
else
|
||||
user << "\red You remove the [floor_tile.name]."
|
||||
new floor_tile.type(src)
|
||||
|
||||
make_plating()
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 80, 1)
|
||||
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/weapon/screwdriver) && is_wood_floor())
|
||||
if(broken || burnt)
|
||||
return
|
||||
else
|
||||
if(is_wood_floor())
|
||||
user << "\red You unscrew the planks."
|
||||
new floor_tile.type(src)
|
||||
|
||||
make_plating()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 80, 1)
|
||||
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = C
|
||||
if (is_plating())
|
||||
if (R.amount >= 2)
|
||||
user << "\blue Reinforcing the floor..."
|
||||
if(do_after(user, 30) && R && R.amount >= 2 && is_plating())
|
||||
ReplaceWithEngineFloor()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 80, 1)
|
||||
R.use(2)
|
||||
return
|
||||
else
|
||||
user << "\red You need more rods."
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/stack/tile))
|
||||
if(is_plating())
|
||||
if(!broken && !burnt)
|
||||
var/obj/item/stack/tile/T = C
|
||||
floor_tile = new T.type
|
||||
intact = 1
|
||||
if(istype(T,/obj/item/stack/tile/light))
|
||||
var/obj/item/stack/tile/light/L = T
|
||||
var/obj/item/stack/tile/light/F = floor_tile
|
||||
F.state = L.state
|
||||
F.on = L.on
|
||||
if(istype(T,/obj/item/stack/tile/grass))
|
||||
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 gets updated properly
|
||||
T.use(1)
|
||||
update_icon()
|
||||
levelupdate()
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
else
|
||||
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."
|
||||
|
||||
|
||||
if(istype(C, /obj/item/weapon/cable_coil))
|
||||
if(is_plating())
|
||||
var/obj/item/weapon/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
|
||||
if(istype(C, /obj/item/weapon/shovel))
|
||||
if(is_grass_floor())
|
||||
new /obj/item/weapon/ore/glass(src)
|
||||
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
|
||||
user << "\blue You shovel the grass."
|
||||
make_plating()
|
||||
else
|
||||
user << "\red You cannot shovel this."
|
||||
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = C
|
||||
if(welder.isOn() && (is_plating()))
|
||||
if(broken || burnt)
|
||||
if(welder.remove_fuel(0,user))
|
||||
user << "\red You fix some dents on the broken plating."
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 80, 1)
|
||||
icon_state = "plating"
|
||||
burnt = 0
|
||||
broken = 0
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
144
code/game/turfs/simulated/floor_types.dm
Normal file
144
code/game/turfs/simulated/floor_types.dm
Normal file
@@ -0,0 +1,144 @@
|
||||
/turf/simulated/floor/airless
|
||||
icon_state = "floor"
|
||||
name = "airless floor"
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
temperature = TCMB
|
||||
|
||||
New()
|
||||
..()
|
||||
name = "floor"
|
||||
|
||||
/turf/simulated/floor/light
|
||||
name = "Light floor"
|
||||
luminosity = 5
|
||||
icon_state = "light_on"
|
||||
floor_tile = new/obj/item/stack/tile/light
|
||||
|
||||
New()
|
||||
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
|
||||
var/n = name //just in case commands rename it in the ..() call
|
||||
..()
|
||||
spawn(4)
|
||||
if(src)
|
||||
update_icon()
|
||||
name = n
|
||||
|
||||
|
||||
|
||||
/turf/simulated/floor/wood
|
||||
name = "floor"
|
||||
icon_state = "wood"
|
||||
floor_tile = new/obj/item/stack/tile/wood
|
||||
|
||||
/turf/simulated/floor/vault
|
||||
icon_state = "rockvault"
|
||||
|
||||
New(location,type)
|
||||
..()
|
||||
icon_state = "[type]vault"
|
||||
|
||||
/turf/simulated/wall/vault
|
||||
icon_state = "rockvault"
|
||||
|
||||
New(location,type)
|
||||
..()
|
||||
icon_state = "[type]vault"
|
||||
|
||||
/turf/simulated/floor/engine
|
||||
name = "reinforced floor"
|
||||
icon_state = "engine"
|
||||
thermal_conductivity = 0.025
|
||||
heat_capacity = 325000
|
||||
|
||||
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
if(!C)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(istype(C, /obj/item/weapon/wrench))
|
||||
user << "\blue Removing rods..."
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 80, 1)
|
||||
if(do_after(user, 30))
|
||||
new /obj/item/stack/rods(src, 2)
|
||||
ReplaceWithFloor()
|
||||
var/turf/simulated/floor/F = src
|
||||
F.make_plating()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/engine/cult
|
||||
name = "engraved floor"
|
||||
icon_state = "cult"
|
||||
|
||||
|
||||
/turf/simulated/floor/engine/n20
|
||||
New()
|
||||
..()
|
||||
var/datum/gas_mixture/adding = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = 2000
|
||||
adding.trace_gases += trace_gas
|
||||
adding.temperature = T20C
|
||||
|
||||
assume_air(adding)
|
||||
|
||||
/turf/simulated/floor/engine/vacuum
|
||||
name = "vacuum floor"
|
||||
icon_state = "engine"
|
||||
oxygen = 0
|
||||
nitrogen = 0.001
|
||||
temperature = TCMB
|
||||
|
||||
/turf/simulated/floor/plating
|
||||
name = "plating"
|
||||
icon_state = "plating"
|
||||
floor_tile = null
|
||||
intact = 0
|
||||
|
||||
/turf/simulated/floor/plating/airless
|
||||
icon_state = "plating"
|
||||
name = "airless plating"
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
temperature = TCMB
|
||||
|
||||
New()
|
||||
..()
|
||||
name = "plating"
|
||||
|
||||
/turf/simulated/floor/bluegrid
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "bcircuit"
|
||||
|
||||
/turf/simulated/floor/greengrid
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "gcircuit"
|
||||
|
||||
|
||||
/turf/simulated/shuttle
|
||||
name = "shuttle"
|
||||
icon = 'icons/turf/shuttle.dmi'
|
||||
thermal_conductivity = 0.05
|
||||
heat_capacity = 0
|
||||
layer = 2
|
||||
|
||||
/turf/simulated/shuttle/wall
|
||||
name = "wall"
|
||||
icon_state = "wall1"
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
|
||||
/turf/simulated/shuttle/floor
|
||||
name = "floor"
|
||||
icon_state = "floor"
|
||||
|
||||
/turf/simulated/shuttle/plating
|
||||
name = "plating"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "plating"
|
||||
|
||||
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
|
||||
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
|
||||
icon_state = "floor4"
|
||||
358
code/game/turfs/simulated/walls.dm
Normal file
358
code/game/turfs/simulated/walls.dm
Normal file
@@ -0,0 +1,358 @@
|
||||
/turf/simulated/wall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
|
||||
|
||||
var/walltype = "metal"
|
||||
|
||||
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
|
||||
if(istype(src,/turf/simulated/wall/r_wall))
|
||||
if(!devastated)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
new /obj/structure/girder/reinforced(src)
|
||||
new /obj/item/stack/sheet/plasteel( src )
|
||||
else
|
||||
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, 'sound/items/Welder.ogg', 100, 1)
|
||||
new /obj/effect/decal/cleanable/blood(src)
|
||||
new /obj/structure/cultgirder(src)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/blood(src)
|
||||
new /obj/effect/decal/remains/human(src)
|
||||
|
||||
else
|
||||
if(!devastated)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
switch(mineral)
|
||||
if("metal")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("gold")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/gold( src )
|
||||
new /obj/item/stack/sheet/gold( src )
|
||||
if("silver")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/silver( src )
|
||||
new /obj/item/stack/sheet/silver( src )
|
||||
if("diamond")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/diamond( src )
|
||||
new /obj/item/stack/sheet/diamond( src )
|
||||
if("uranium")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/uranium( src )
|
||||
new /obj/item/stack/sheet/uranium( src )
|
||||
if("plasma")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/plasma( src )
|
||||
new /obj/item/stack/sheet/plasma( src )
|
||||
if("clown")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/clown( src )
|
||||
new /obj/item/stack/sheet/clown( src )
|
||||
if("sandstone")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/sandstone( src )
|
||||
new /obj/item/stack/sheet/sandstone( src )
|
||||
if("wood")
|
||||
new /obj/structure/girder(src)
|
||||
new /obj/item/stack/sheet/wood( src )
|
||||
new /obj/item/stack/sheet/wood( src )
|
||||
|
||||
else
|
||||
switch(mineral)
|
||||
if("metal")
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("gold")
|
||||
new /obj/item/stack/sheet/gold( src )
|
||||
new /obj/item/stack/sheet/gold( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("silver")
|
||||
new /obj/item/stack/sheet/silver( src )
|
||||
new /obj/item/stack/sheet/silver( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("diamond")
|
||||
new /obj/item/stack/sheet/diamond( src )
|
||||
new /obj/item/stack/sheet/diamond( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("uranium")
|
||||
new /obj/item/stack/sheet/uranium( src )
|
||||
new /obj/item/stack/sheet/uranium( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("plasma")
|
||||
new /obj/item/stack/sheet/plasma( src )
|
||||
new /obj/item/stack/sheet/plasma( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("clown")
|
||||
new /obj/item/stack/sheet/clown( src )
|
||||
new /obj/item/stack/sheet/clown( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("sandstone")
|
||||
new /obj/item/stack/sheet/sandstone( src )
|
||||
new /obj/item/stack/sheet/sandstone( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
if("wood")
|
||||
new /obj/item/stack/sheet/wood( src )
|
||||
new /obj/item/stack/sheet/wood( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
|
||||
for(var/obj/O in src.contents) //Eject contents!
|
||||
if(istype(O,/obj/effect/decal/poster))
|
||||
var/obj/effect/decal/poster/P = O
|
||||
P.roll_and_drop(src)
|
||||
else
|
||||
O.loc = src
|
||||
ReplaceWithPlating(explode)
|
||||
|
||||
/turf/simulated/wall/examine()
|
||||
set src in oview(1)
|
||||
|
||||
usr << "It looks like a regular wall."
|
||||
return
|
||||
|
||||
/turf/simulated/wall/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
src.ReplaceWithSpace()
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
dismantle_wall(0,1)
|
||||
else
|
||||
dismantle_wall(1,1)
|
||||
if(3.0)
|
||||
var/proba
|
||||
if (istype(src, /turf/simulated/wall/r_wall))
|
||||
proba = 15
|
||||
else
|
||||
proba = 40
|
||||
if (prob(proba))
|
||||
dismantle_wall(0,1)
|
||||
else
|
||||
return
|
||||
|
||||
/turf/simulated/wall/blob_act()
|
||||
if(prob(50))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/attack_paw(mob/user as mob)
|
||||
if ((HULK in user.mutations))
|
||||
if (prob(40))
|
||||
usr << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.wall_smash)
|
||||
if (istype(src, /turf/simulated/wall/r_wall))
|
||||
M << text("\blue This wall is far too strong for you to destroy.")
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
M << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
else
|
||||
M << text("\blue You smash against the wall.")
|
||||
return
|
||||
|
||||
M << "\blue You push the wall but nothing happens!"
|
||||
return
|
||||
|
||||
/turf/simulated/wall/attack_hand(mob/user as mob)
|
||||
if ((HULK in user.mutations) || (SUPRSTR in user.augmentations))
|
||||
if (prob(40))
|
||||
usr << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
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
|
||||
|
||||
//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
|
||||
|
||||
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, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
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) )
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == WT )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(60)
|
||||
if(mineral == "diamond")//Oh look, it's tougher
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == 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
|
||||
|
||||
//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(mineral == "diamond")
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == 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(mineral == "diamond")
|
||||
sleep(70)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
EB.spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'sound/weapons/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 if(istype(W,/obj/item/light_fixture_frame))
|
||||
var/obj/item/light_fixture_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/light_fixture_frame/small))
|
||||
var/obj/item/light_fixture_frame/small/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
place_poster(W,user)
|
||||
return
|
||||
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
|
||||
if(mineral == "diamond")
|
||||
return
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'icons/effects/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() //TODO: ~Carn
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
if (prob(15))
|
||||
dismantle_wall()
|
||||
else if(prob(70))
|
||||
ReplaceWithPlating()
|
||||
else
|
||||
ReplaceWithLattice()
|
||||
return 0
|
||||
136
code/game/turfs/simulated/walls_mineral.dm
Normal file
136
code/game/turfs/simulated/walls_mineral.dm
Normal file
@@ -0,0 +1,136 @@
|
||||
/turf/simulated/wall/mineral
|
||||
name = "mineral wall"
|
||||
desc = "This shouldn't exist"
|
||||
icon_state = ""
|
||||
var/last_event = 0
|
||||
var/active = null
|
||||
|
||||
/turf/simulated/wall/mineral/New()
|
||||
switch(mineral)
|
||||
if("gold")
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon_state = "gold0"
|
||||
walltype = "gold"
|
||||
// var/electro = 1
|
||||
// var/shocked = null
|
||||
if("silver")
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny!"
|
||||
icon_state = "silver0"
|
||||
walltype = "silver"
|
||||
// var/electro = 0.75
|
||||
// var/shocked = null
|
||||
if("diamond")
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon_state = "diamond0"
|
||||
walltype = "diamond"
|
||||
if("uranium")
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon_state = "uranium0"
|
||||
walltype = "uranium"
|
||||
if("plasma")
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = "plasma0"
|
||||
walltype = "plasma"
|
||||
if("clown")
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon_state = "clown0"
|
||||
walltype = "clown"
|
||||
if("sandstone")
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = "sandstone0"
|
||||
walltype = "sandstone"
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
for(var/mob/living/L in range(3,src))
|
||||
L.apply_effect(12,IRRADIATE,0)
|
||||
for(var/turf/simulated/wall/mineral/T in range(3,src))
|
||||
if(T.mineral == "uranium")
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
|
||||
/*/turf/simulated/wall/mineral/proc/shock()
|
||||
if (electrocute_mob(user, C, src))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
*/
|
||||
|
||||
/turf/simulated/wall/mineral/attack_hand(mob/user as mob)
|
||||
if(mineral == "uranium")
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if((mineral == "plasma") && W)
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
ignite(is_hot(W))
|
||||
return
|
||||
if(mineral == "uranium")
|
||||
radiate()
|
||||
// if((mineral == "gold") || (mineral == "silver"))
|
||||
// if(shocked)
|
||||
// shock()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/proc/PlasmaBurn(temperature)
|
||||
spawn(2)
|
||||
new /obj/structure/girder(src)
|
||||
src.ReplaceWithFloor()
|
||||
for(var/turf/simulated/floor/target_tile in range(0,src))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/toxinsToDeduce = 20
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 400+T0C
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
|
||||
var/turf/T = get_turf(F)
|
||||
T.ReplaceWithMineralWall("plasma")
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/W in range(3,src))
|
||||
if(mineral == "plasma")
|
||||
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
||||
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
|
||||
/turf/simulated/wall/mineral/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
if(mineral == "plasma")
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/simulated/wall/mineral/proc/ignite(exposed_temperature)
|
||||
if(mineral == "plasma")
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/simulated/wall/mineral/Bumped(AM as mob|obj)
|
||||
if(mineral == "uranium")
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(mineral == "plasma")
|
||||
if(istype(Proj,/obj/item/projectile/beam))
|
||||
PlasmaBurn(2500)
|
||||
else if(istype(Proj,/obj/item/projectile/ion))
|
||||
PlasmaBurn(500)
|
||||
..()
|
||||
5
code/game/turfs/simulated/walls_misc.dm
Normal file
5
code/game/turfs/simulated/walls_misc.dm
Normal file
@@ -0,0 +1,5 @@
|
||||
/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"
|
||||
273
code/game/turfs/simulated/walls_reinforced.dm
Normal file
273
code/game/turfs/simulated/walls_reinforced.dm
Normal file
@@ -0,0 +1,273 @@
|
||||
/turf/simulated/wall/r_wall
|
||||
name = "r wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon_state = "r_wall"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
walltype = "rwall"
|
||||
|
||||
var/d_state = 0
|
||||
|
||||
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
|
||||
if ((HULK in user.mutations) || (SUPRSTR in user.augmentations))
|
||||
if (prob(10))
|
||||
usr << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
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
|
||||
|
||||
//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
|
||||
|
||||
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, 'sound/weapons/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
|
||||
|
||||
var/turf/T = user.loc //get user's location for delay checks
|
||||
|
||||
//DECONSTRUCTION
|
||||
switch(d_state)
|
||||
if(0)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/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, 'sound/items/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.get_active_hand() == 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) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.get_active_hand() == 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, 'sound/items/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.get_active_hand() == 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, 'sound/items/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.get_active_hand() == 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, 'sound/items/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.get_active_hand() == 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) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the support rods.</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == 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, 'sound/items/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.get_active_hand() == 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, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == 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.get_active_hand() == 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.get_active_hand() == 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)
|
||||
|
||||
else if(istype(W,/obj/item/light_fixture_frame))
|
||||
var/obj/item/light_fixture_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/light_fixture_frame/small))
|
||||
var/obj/item/light_fixture_frame/small/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
place_poster(W,user)
|
||||
return
|
||||
|
||||
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
||||
else if(!d_state)
|
||||
return attack_hand(user)
|
||||
return
|
||||
228
code/game/turfs/space/space.dm
Normal file
228
code/game/turfs/space/space.dm
Normal file
@@ -0,0 +1,228 @@
|
||||
/turf/space
|
||||
icon = 'icons/turf/space.dmi'
|
||||
name = "\proper space"
|
||||
icon_state = "placeholder"
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 700000
|
||||
|
||||
/turf/space/New()
|
||||
if(!istype(src, /turf/space/transit))
|
||||
icon_state = "[pick(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)]"
|
||||
|
||||
/turf/space/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/turf/space/attack_hand(mob/user as mob)
|
||||
if ((user.restrained() || !( user.pulling )))
|
||||
return
|
||||
if (user.pulling.anchored)
|
||||
return
|
||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
||||
return
|
||||
if (ismob(user.pulling))
|
||||
var/mob/M = user.pulling
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
return
|
||||
|
||||
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if (istype(C, /obj/item/stack/rods))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
return
|
||||
var/obj/item/stack/rods/R = C
|
||||
user << "\blue Constructing support lattice ..."
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
ReplaceWithLattice()
|
||||
R.use(1)
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
del(L)
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
S.build(src)
|
||||
S.use(1)
|
||||
return
|
||||
else
|
||||
user << "\red The plating is going to need some support."
|
||||
return
|
||||
|
||||
|
||||
// Ported from unstable r355
|
||||
|
||||
/turf/space/Entered(atom/movable/A as mob|obj)
|
||||
..()
|
||||
if ((!(A) || src != A.loc)) return
|
||||
|
||||
inertial_drift(A)
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
|
||||
// Okay, so let's make it so that people can travel z levels but not nuke disks!
|
||||
// if(ticker.mode.name == "nuclear emergency") return
|
||||
if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1))
|
||||
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
|
||||
del(A)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level.
|
||||
del(A) //The disk's Del() proc ensures a new one is created
|
||||
return
|
||||
|
||||
if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/MM = A
|
||||
if(MM.client)
|
||||
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
|
||||
return
|
||||
|
||||
var/move_to_z_str = pickweight(accessable_z_levels)
|
||||
|
||||
var/move_to_z = text2num(move_to_z_str)
|
||||
|
||||
if(!move_to_z)
|
||||
return
|
||||
|
||||
A.z = move_to_z
|
||||
|
||||
if(src.x <= TRANSITIONEDGE)
|
||||
A.x = world.maxx - TRANSITIONEDGE - 2
|
||||
A.y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
|
||||
|
||||
else if (A.x >= (world.maxx - TRANSITIONEDGE - 1))
|
||||
A.x = TRANSITIONEDGE + 1
|
||||
A.y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
|
||||
|
||||
else if (src.y <= TRANSITIONEDGE)
|
||||
A.y = world.maxy - TRANSITIONEDGE -2
|
||||
A.x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
|
||||
|
||||
else if (A.y >= (world.maxy - TRANSITIONEDGE - 1))
|
||||
A.y = TRANSITIONEDGE + 1
|
||||
A.x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
|
||||
|
||||
|
||||
|
||||
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
|
||||
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
|
||||
var/cur_x
|
||||
var/cur_y
|
||||
var/next_x
|
||||
var/next_y
|
||||
var/target_z
|
||||
var/list/y_arr
|
||||
|
||||
if(src.x <= 1)
|
||||
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
|
||||
del(A)
|
||||
return
|
||||
|
||||
var/list/cur_pos = src.get_global_map_pos()
|
||||
if(!cur_pos) return
|
||||
cur_x = cur_pos["x"]
|
||||
cur_y = cur_pos["y"]
|
||||
next_x = (--cur_x||global_map.len)
|
||||
y_arr = global_map[next_x]
|
||||
target_z = y_arr[cur_y]
|
||||
/*
|
||||
//debug
|
||||
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
|
||||
world << "Target Z = [target_z]"
|
||||
world << "Next X = [next_x]"
|
||||
//debug
|
||||
*/
|
||||
if(target_z)
|
||||
A.z = target_z
|
||||
A.x = world.maxx - 2
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
else if (src.x >= world.maxx)
|
||||
if(istype(A, /obj/effect/meteor))
|
||||
del(A)
|
||||
return
|
||||
|
||||
var/list/cur_pos = src.get_global_map_pos()
|
||||
if(!cur_pos) return
|
||||
cur_x = cur_pos["x"]
|
||||
cur_y = cur_pos["y"]
|
||||
next_x = (++cur_x > global_map.len ? 1 : cur_x)
|
||||
y_arr = global_map[next_x]
|
||||
target_z = y_arr[cur_y]
|
||||
/*
|
||||
//debug
|
||||
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
|
||||
world << "Target Z = [target_z]"
|
||||
world << "Next X = [next_x]"
|
||||
//debug
|
||||
*/
|
||||
if(target_z)
|
||||
A.z = target_z
|
||||
A.x = 3
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
else if (src.y <= 1)
|
||||
if(istype(A, /obj/effect/meteor))
|
||||
del(A)
|
||||
return
|
||||
var/list/cur_pos = src.get_global_map_pos()
|
||||
if(!cur_pos) return
|
||||
cur_x = cur_pos["x"]
|
||||
cur_y = cur_pos["y"]
|
||||
y_arr = global_map[cur_x]
|
||||
next_y = (--cur_y||y_arr.len)
|
||||
target_z = y_arr[next_y]
|
||||
/*
|
||||
//debug
|
||||
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
|
||||
world << "Next Y = [next_y]"
|
||||
world << "Target Z = [target_z]"
|
||||
//debug
|
||||
*/
|
||||
if(target_z)
|
||||
A.z = target_z
|
||||
A.y = world.maxy - 2
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
|
||||
else if (src.y >= world.maxy)
|
||||
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
|
||||
del(A)
|
||||
return
|
||||
var/list/cur_pos = src.get_global_map_pos()
|
||||
if(!cur_pos) return
|
||||
cur_x = cur_pos["x"]
|
||||
cur_y = cur_pos["y"]
|
||||
y_arr = global_map[cur_x]
|
||||
next_y = (++cur_y > y_arr.len ? 1 : cur_y)
|
||||
target_z = y_arr[next_y]
|
||||
/*
|
||||
//debug
|
||||
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
|
||||
world << "Next Y = [next_y]"
|
||||
world << "Target Z = [target_z]"
|
||||
//debug
|
||||
*/
|
||||
if(target_z)
|
||||
A.z = target_z
|
||||
A.y = 3
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
return
|
||||
77
code/game/turfs/space/transit.dm
Normal file
77
code/game/turfs/space/transit.dm
Normal file
@@ -0,0 +1,77 @@
|
||||
/turf/space/transit
|
||||
var/pushdirection // push things that get caught in the transit tile this direction
|
||||
|
||||
//Overwrite because we dont want people building rods in space.
|
||||
/turf/space/transit/attackby(obj/O as obj, mob/user as mob)
|
||||
return
|
||||
|
||||
/turf/space/transit/north // moving to the north
|
||||
|
||||
pushdirection = SOUTH // south because the space tile is scrolling south
|
||||
|
||||
//IF ANYONE KNOWS A MORE EFFICIENT WAY OF MANAGING THESE SPRITES, BE MY GUEST.
|
||||
shuttlespace_ns1
|
||||
icon_state = "speedspace_ns_1"
|
||||
shuttlespace_ns2
|
||||
icon_state = "speedspace_ns_2"
|
||||
shuttlespace_ns3
|
||||
icon_state = "speedspace_ns_3"
|
||||
shuttlespace_ns4
|
||||
icon_state = "speedspace_ns_4"
|
||||
shuttlespace_ns5
|
||||
icon_state = "speedspace_ns_5"
|
||||
shuttlespace_ns6
|
||||
icon_state = "speedspace_ns_6"
|
||||
shuttlespace_ns7
|
||||
icon_state = "speedspace_ns_7"
|
||||
shuttlespace_ns8
|
||||
icon_state = "speedspace_ns_8"
|
||||
shuttlespace_ns9
|
||||
icon_state = "speedspace_ns_9"
|
||||
shuttlespace_ns10
|
||||
icon_state = "speedspace_ns_10"
|
||||
shuttlespace_ns11
|
||||
icon_state = "speedspace_ns_11"
|
||||
shuttlespace_ns12
|
||||
icon_state = "speedspace_ns_12"
|
||||
shuttlespace_ns13
|
||||
icon_state = "speedspace_ns_13"
|
||||
shuttlespace_ns14
|
||||
icon_state = "speedspace_ns_14"
|
||||
shuttlespace_ns15
|
||||
icon_state = "speedspace_ns_15"
|
||||
|
||||
/turf/space/transit/east // moving to the east
|
||||
|
||||
pushdirection = WEST
|
||||
|
||||
shuttlespace_ew1
|
||||
icon_state = "speedspace_ew_1"
|
||||
shuttlespace_ew2
|
||||
icon_state = "speedspace_ew_2"
|
||||
shuttlespace_ew3
|
||||
icon_state = "speedspace_ew_3"
|
||||
shuttlespace_ew4
|
||||
icon_state = "speedspace_ew_4"
|
||||
shuttlespace_ew5
|
||||
icon_state = "speedspace_ew_5"
|
||||
shuttlespace_ew6
|
||||
icon_state = "speedspace_ew_6"
|
||||
shuttlespace_ew7
|
||||
icon_state = "speedspace_ew_7"
|
||||
shuttlespace_ew8
|
||||
icon_state = "speedspace_ew_8"
|
||||
shuttlespace_ew9
|
||||
icon_state = "speedspace_ew_9"
|
||||
shuttlespace_ew10
|
||||
icon_state = "speedspace_ew_10"
|
||||
shuttlespace_ew11
|
||||
icon_state = "speedspace_ew_11"
|
||||
shuttlespace_ew12
|
||||
icon_state = "speedspace_ew_12"
|
||||
shuttlespace_ew13
|
||||
icon_state = "speedspace_ew_13"
|
||||
shuttlespace_ew14
|
||||
icon_state = "speedspace_ew_14"
|
||||
shuttlespace_ew15
|
||||
icon_state = "speedspace_ew_15"
|
||||
File diff suppressed because it is too large
Load Diff
5
code/game/turfs/unsimulated.dm
Normal file
5
code/game/turfs/unsimulated.dm
Normal file
@@ -0,0 +1,5 @@
|
||||
/turf/unsimulated
|
||||
intact = 1
|
||||
name = "command"
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
24
code/game/turfs/unsimulated/floor.dm
Normal file
24
code/game/turfs/unsimulated/floor.dm
Normal file
@@ -0,0 +1,24 @@
|
||||
/turf/unsimulated/floor
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "Floor3"
|
||||
|
||||
/turf/unsimulated/floor/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/turf/unsimulated/floor/attack_hand(var/mob/user as mob)
|
||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
||||
return
|
||||
if (user.pulling.anchored)
|
||||
return
|
||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
||||
return
|
||||
if (ismob(user.pulling))
|
||||
var/mob/M = user.pulling
|
||||
var/mob/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
M.start_pulling(t)
|
||||
else
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
return
|
||||
15
code/game/turfs/unsimulated/walls.dm
Normal file
15
code/game/turfs/unsimulated/walls.dm
Normal file
@@ -0,0 +1,15 @@
|
||||
/turf/unsimulated/wall
|
||||
name = "wall"
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "riveted"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
turf/unsimulated/wall/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = 'icons/misc/fullscreen.dmi'
|
||||
icon_state = "title"
|
||||
layer = FLY_LAYER
|
||||
|
||||
/turf/unsimulated/wall/other
|
||||
icon_state = "r_wall"
|
||||
31
code/game/verbs/atom_verbs.dm
Normal file
31
code/game/verbs/atom_verbs.dm
Normal file
@@ -0,0 +1,31 @@
|
||||
/atom/movable/verb/pull()
|
||||
set name = "Pull"
|
||||
set category = "IC"
|
||||
set src in oview(1)
|
||||
|
||||
usr.start_pulling(src)
|
||||
return
|
||||
|
||||
/atom/verb/point()
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
set src in oview()
|
||||
var/atom/this = src//detach proc from src
|
||||
src = null
|
||||
|
||||
if(!usr || !isturf(usr.loc))
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(usr.status_flags & FAKEDEATH)
|
||||
return
|
||||
|
||||
var/tile = get_turf(this)
|
||||
if (!tile)
|
||||
return
|
||||
|
||||
var/P = new /obj/effect/decal/point(tile)
|
||||
spawn (20)
|
||||
if(P) del(P)
|
||||
|
||||
usr.visible_message("<b>[usr]</b> points to [this]")
|
||||
@@ -1,345 +0,0 @@
|
||||
/datum/vote/New()
|
||||
|
||||
nextvotetime = world.timeofday // + 10*config.vote_delay
|
||||
|
||||
|
||||
/datum/vote/proc/canvote()//marker1
|
||||
var/excess = world.timeofday - vote.nextvotetime
|
||||
|
||||
if(excess < -10000) // handle clock-wrapping problems - very long delay (>20 hrs) if wrapped
|
||||
vote.nextvotetime = world.timeofday
|
||||
return 1
|
||||
return (excess >= 0)
|
||||
|
||||
/datum/vote/proc/nextwait()
|
||||
return timetext( round( (nextvotetime - world.timeofday)/10) )
|
||||
|
||||
/datum/vote/proc/endwait()
|
||||
return timetext( round( (votetime - world.timeofday)/10) )
|
||||
|
||||
/datum/vote/proc/timetext(var/interval)
|
||||
var/minutes = round(interval / 60)
|
||||
var/seconds = round(interval % 60)
|
||||
|
||||
var/tmin = "[minutes>0?num2text(minutes)+"min":null]"
|
||||
var/tsec = "[seconds>0?num2text(seconds)+"sec":null]"
|
||||
|
||||
if(tmin && tsec) // hack to skip inter-space if either field is blank
|
||||
return "[tmin] [tsec]"
|
||||
else
|
||||
if(!tmin && !tsec) // return '0sec' if 0 time left
|
||||
return "0sec"
|
||||
return "[tmin][tsec]"
|
||||
|
||||
/datum/vote/proc/getvotes()
|
||||
var/list/L = list()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
|
||||
L[M.client.vote] += 1
|
||||
|
||||
return L
|
||||
|
||||
|
||||
/datum/vote/proc/endvote()
|
||||
|
||||
if(!voting) // means that voting was aborted by an admin
|
||||
return
|
||||
|
||||
world << "\red <B>***Voting has closed.</B>"
|
||||
|
||||
log_vote("Voting closed, result was [winner]")
|
||||
voting = 0
|
||||
nextvotetime = world.timeofday + 10*config.vote_delay
|
||||
|
||||
for(var/mob/M in player_list) // clear vote window from all clients
|
||||
if(M.client)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
|
||||
calcwin()
|
||||
|
||||
if(mode)
|
||||
if(!ticker)
|
||||
if(!going)
|
||||
world << "<B>The game will start soon.</B>"
|
||||
going = 1
|
||||
var/wintext = capitalize(winner)
|
||||
if(winner=="default")
|
||||
world << "Result is \red No change."
|
||||
return
|
||||
|
||||
// otherwise change mode
|
||||
|
||||
|
||||
world << "Result is change to \red [wintext]"
|
||||
world.save_mode(winner)
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
world <<"\red <B>World will reboot in 10 seconds</B>"
|
||||
|
||||
feedback_set_details("end_error","mode vote - [winner]")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(100)
|
||||
log_game("Rebooting due to mode vote")
|
||||
world.Reboot()
|
||||
else
|
||||
master_mode = winner
|
||||
|
||||
else
|
||||
|
||||
if(winner=="default")
|
||||
world << "Result is \red No restart."
|
||||
return
|
||||
|
||||
world << "Result is \red Restart round."
|
||||
|
||||
world <<"\red <B>World will reboot in 5 seconds</B>"
|
||||
|
||||
feedback_set_details("end_error","restart vote")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(50)
|
||||
log_game("Rebooting due to restart vote")
|
||||
world.Reboot()
|
||||
return
|
||||
|
||||
|
||||
/datum/vote/proc/calcwin()
|
||||
|
||||
var/list/votes = getvotes()
|
||||
|
||||
if(vote.mode)
|
||||
var/best = -1
|
||||
|
||||
for(var/v in votes)
|
||||
if(v=="none")
|
||||
continue
|
||||
if(best < votes[v])
|
||||
best = votes[v]
|
||||
|
||||
|
||||
var/list/winners = list()
|
||||
|
||||
for(var/v in votes)
|
||||
if(votes[v] == best)
|
||||
winners += v
|
||||
|
||||
var/ret = ""
|
||||
|
||||
|
||||
for(var/w in winners)
|
||||
if(lentext(ret) > 0)
|
||||
ret += "/"
|
||||
if(w=="default")
|
||||
winners = list("default")
|
||||
ret = "No change"
|
||||
break
|
||||
else
|
||||
ret += capitalize(w)
|
||||
|
||||
|
||||
|
||||
if(winners.len != 1)
|
||||
ret = "Tie: " + ret
|
||||
|
||||
|
||||
if(winners.len == 0)
|
||||
vote.winner = "default"
|
||||
ret = "No change"
|
||||
else
|
||||
vote.winner = pick(winners)
|
||||
|
||||
return ret
|
||||
else
|
||||
|
||||
if(votes["default"] < votes["restart"])
|
||||
|
||||
vote.winner = "restart"
|
||||
return "Restart"
|
||||
else
|
||||
vote.winner = "default"
|
||||
return "No restart"
|
||||
|
||||
|
||||
/mob/verb/vote()
|
||||
set category = "OOC"
|
||||
set name = "Vote"
|
||||
usr.client.showvote = 1
|
||||
|
||||
|
||||
var/text = "<HTML><HEAD><TITLE>Voting</TITLE></HEAD><BODY scroll=no>"
|
||||
|
||||
var/footer = "<HR><A href='?src=\ref[vote];vclose=1'>Close</A></BODY></HTML>"
|
||||
|
||||
|
||||
if(config.vote_no_dead && usr.stat == 2)
|
||||
text += "Voting while dead has been disallowed."
|
||||
text += footer
|
||||
usr << browse(text, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
usr.client.vote = "none"
|
||||
return
|
||||
|
||||
if(vote.voting)
|
||||
// vote in progress, do the current
|
||||
|
||||
text += "Vote to [vote.mode?"change mode":"restart round"] in progress.<BR>"
|
||||
text += "[vote.endwait()] until voting is closed.<BR>"
|
||||
|
||||
var/list/votes = vote.getvotes()
|
||||
|
||||
if(vote.mode) // true if changing mode
|
||||
|
||||
text += "Current game mode is: <B>[master_mode]</B>.<BR>Select the mode to change to:<UL>"
|
||||
|
||||
for(var/md in config.votable_modes)
|
||||
var/disp = capitalize(md)
|
||||
if(md=="default")
|
||||
disp = "No change"
|
||||
|
||||
//world << "[md]|[disp]|[src.client.vote]|[votes[md]]"
|
||||
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
text += "</UL>"
|
||||
|
||||
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
|
||||
|
||||
text += footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
else // voting to restart
|
||||
|
||||
text += "Restart the world?<BR><UL>"
|
||||
|
||||
var/list/VL = list("default","restart")
|
||||
|
||||
for(var/md in VL)
|
||||
var/disp = (md=="default"? "No":"Yes")
|
||||
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
text += "</UL>"
|
||||
|
||||
text +="<p>Current winner: <B>[vote.calcwin()]</B><BR>"
|
||||
|
||||
text += footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
|
||||
else //no vote in progress
|
||||
|
||||
if(shuttlecoming == 1)
|
||||
usr << "\blue Cannot start Vote - Shuttle has been called."
|
||||
return
|
||||
|
||||
if(!config.allow_vote_restart && !config.allow_vote_mode)
|
||||
text += "<P>Player voting is disabled.</BODY></HTML>"
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
return
|
||||
|
||||
if(!vote.canvote()) // not time to vote yet
|
||||
if(config.allow_vote_restart) text+="Voting to restart is enabled.<BR>"
|
||||
if(config.allow_vote_mode) text+="Voting to change mode is enabled.<BR>"
|
||||
|
||||
text+="<BR><P>Next vote can begin in [vote.nextwait()]."
|
||||
text+=footer
|
||||
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
else // voting can begin
|
||||
if(config.allow_vote_restart)
|
||||
text += "<A href='?src=\ref[vote];vmode=1'>Begin restart vote.</A><BR>"
|
||||
if(config.allow_vote_mode)
|
||||
text += "<A href='?src=\ref[vote];vmode=2'>Begin change mode vote.</A><BR>"
|
||||
|
||||
text += footer
|
||||
usr << browse(text, "window=vote")
|
||||
|
||||
spawn(20)
|
||||
if(usr.client && usr.client.showvote)
|
||||
usr.vote()
|
||||
else
|
||||
usr << browse(null, "window=vote")
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/vote/Topic(href, href_list)
|
||||
..()
|
||||
//world << "[usr] has activated the vote Topic"
|
||||
|
||||
if(href_list["voter"])
|
||||
world << "[usr.ckey] has attempted to bypass the voting system." //ckey is easy key
|
||||
return
|
||||
|
||||
if(href_list["vclose"])
|
||||
|
||||
if(usr)
|
||||
usr << browse(null, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
return
|
||||
|
||||
if(href_list["vmode"])
|
||||
if(vote.voting)
|
||||
return
|
||||
|
||||
if(!vote.canvote() ) // double check even though this shouldn't happen
|
||||
return
|
||||
|
||||
vote.mode = text2num(href_list["vmode"])-1 // hack to yield 0=restart, 1=changemode
|
||||
if(!ticker && vote.mode == 1)
|
||||
if(going)
|
||||
world << "<B>The game start has been delayed.</B>"
|
||||
going = 0
|
||||
vote.voting = 1 // now voting
|
||||
vote.votetime = world.timeofday + config.vote_period*10 // when the vote will end
|
||||
|
||||
spawn(config.vote_period*10)
|
||||
vote.endvote()
|
||||
|
||||
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [usr.key].</B>"
|
||||
world << "\red You have [vote.timetext(config.vote_period)] to vote."
|
||||
|
||||
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [usr.name]/[usr.key]")
|
||||
|
||||
for(var/mob/CM in player_list)
|
||||
if(CM.client)
|
||||
if( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) )
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
if(usr) usr.vote()
|
||||
return
|
||||
|
||||
|
||||
return
|
||||
|
||||
if(href_list["vote"] && vote.voting)
|
||||
if(usr)
|
||||
usr.client.vote = href_list["vote"]
|
||||
|
||||
//world << "Setting client [usr.key]'s vote to: [href_list["vote"]]."
|
||||
|
||||
usr.vote()
|
||||
return
|
||||
@@ -325,3 +325,104 @@
|
||||
src << "You must be conscious to do this!"
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/clean_blood()
|
||||
. = ..()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.gloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0)
|
||||
else
|
||||
if(H.bloody_hands)
|
||||
H.bloody_hands = 0
|
||||
H.update_inv_gloves(0)
|
||||
update_icons() //apply the now updated overlays to the mob
|
||||
|
||||
|
||||
//Throwing stuff
|
||||
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
var/obj/item/W = get_active_hand()
|
||||
if( !W )//Not holding anything
|
||||
if( client && (TK in mutations) )
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
put_in_active_hand(O)
|
||||
O.host = src
|
||||
return
|
||||
|
||||
if( istype(W,/obj/item/tk_grab) )
|
||||
if(hand) del(l_hand)
|
||||
else del(r_hand)
|
||||
return
|
||||
|
||||
if (src.in_throw_mode)
|
||||
throw_mode_off()
|
||||
else
|
||||
throw_mode_on()
|
||||
|
||||
/mob/living/carbon/proc/throw_mode_off()
|
||||
src.in_throw_mode = 0
|
||||
src.throw_icon.icon_state = "act_throw_off"
|
||||
|
||||
/mob/living/carbon/proc/throw_mode_on()
|
||||
src.in_throw_mode = 1
|
||||
src.throw_icon.icon_state = "act_throw_on"
|
||||
|
||||
/mob/living/carbon/proc/throw_item(atom/target)
|
||||
src.throw_mode_off()
|
||||
if(usr.stat || !target)
|
||||
return
|
||||
if(target.type == /obj/screen) return
|
||||
|
||||
var/atom/movable/item = src.get_active_hand()
|
||||
|
||||
if(!item) return
|
||||
|
||||
if (istype(item, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = item
|
||||
item = G.throw() //throw the person instead of the grab
|
||||
if(ismob(item))
|
||||
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
|
||||
var/turf/end_T = get_turf(target)
|
||||
if(start_T && end_T)
|
||||
var/mob/M = item
|
||||
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
|
||||
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
|
||||
item.loc = src.loc
|
||||
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
|
||||
//actually throw it!
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
src.visible_message("\red [src] has thrown [item].")
|
||||
|
||||
if(!src.lastarea)
|
||||
src.lastarea = get_area(src.loc)
|
||||
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
|
||||
|
||||
/*
|
||||
if(istype(src.loc, /turf/space) || (src.flags & NOGRAV)) //they're in space, move em one space in the opposite direction
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed)
|
||||
@@ -1,3 +1,10 @@
|
||||
//Not sure why this is necessary...
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
if (subject!=null)
|
||||
for(var/mob/living/silicon/ai/M in player_list)
|
||||
if ((M.client && M.machine == subject))
|
||||
subject.attack_ai(M)
|
||||
|
||||
|
||||
/mob/living/silicon/ai
|
||||
name = "AI"
|
||||
|
||||
295
code/world.dm
Normal file
295
code/world.dm
Normal file
@@ -0,0 +1,295 @@
|
||||
/world
|
||||
mob = /mob/new_player
|
||||
turf = /turf/space
|
||||
area = /area
|
||||
view = "15x15"
|
||||
|
||||
hub = "Exadv1.spacestation13"
|
||||
hub_password = "SORRYNOPASSWORD"
|
||||
name = "/tg/ Station 13"
|
||||
/* This is for any host that would like their server to appear on the main SS13 hub.
|
||||
To use it, simply replace the password above, with the password found below, and it should work.
|
||||
If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.
|
||||
|
||||
hub = "Exadv1.spacestation13"
|
||||
hub_password = "kMZy3U5jJHSiBQjr"
|
||||
name = "Space Station 13"
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#define RECOMMENDED_VERSION 494
|
||||
/world/New()
|
||||
..()
|
||||
|
||||
src.load_configuration()
|
||||
|
||||
if (config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
// dumb and hardcoded but I don't care~
|
||||
config.server_name += " #[(world.port % 1000) / 100]"
|
||||
|
||||
src.load_mode()
|
||||
src.load_motd()
|
||||
src.load_admins()
|
||||
investigate_reset()
|
||||
if (config.usewhitelist)
|
||||
load_whitelist()
|
||||
LoadBansjob()
|
||||
Get_Holiday() //~Carn, needs to be here when the station is named so :P
|
||||
src.update_status()
|
||||
makepowernets()
|
||||
|
||||
sun = new /datum/sun()
|
||||
vote = new /datum/vote()
|
||||
radio_controller = new /datum/controller/radio()
|
||||
data_core = new /obj/effect/datacore()
|
||||
paiController = new /datum/paiController()
|
||||
|
||||
..()
|
||||
|
||||
sleep(50)
|
||||
|
||||
plmaster = new /obj/effect/overlay( )
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = 0
|
||||
|
||||
slmaster = new /obj/effect/overlay( )
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = 0
|
||||
|
||||
src.update_status()
|
||||
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
spawn(-1)
|
||||
master_controller.setup()
|
||||
lighting_controller.Initialize()
|
||||
|
||||
if(byond_version < RECOMMENDED_VERSION)
|
||||
world.log << "Your server's byond version does not meet the recommended requirements for TGstation code. Please update BYOND"
|
||||
|
||||
diary = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")].log")
|
||||
diary << {"
|
||||
|
||||
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
---------------------
|
||||
"}
|
||||
|
||||
diaryofmeanpeople = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] Attack.log")
|
||||
diaryofmeanpeople << {"
|
||||
|
||||
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
---------------------
|
||||
"}
|
||||
|
||||
href_logfile = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] hrefs.html")
|
||||
|
||||
jobban_loadbanfile()
|
||||
jobban_updatelegacybans()
|
||||
LoadBans()
|
||||
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
|
||||
process_teleport_locs() //Sets up the wizard teleport locations
|
||||
process_ghost_teleport_locs() //Sets up ghost teleport locations.
|
||||
sleep_offline = 1
|
||||
|
||||
spawn(3000) //so we aren't adding to the round-start lag
|
||||
if(config.ToRban)
|
||||
ToRban_autoupdate()
|
||||
if(config.kick_inactive)
|
||||
KickInactiveClients()
|
||||
|
||||
#undef RECOMMENDED_VERSION
|
||||
|
||||
return
|
||||
|
||||
//world/Topic(href, href_list[])
|
||||
// world << "Received a Topic() call!"
|
||||
// world << "[href]"
|
||||
// for(var/a in href_list)
|
||||
// world << "[a]"
|
||||
// if(href_list["hello"])
|
||||
// world << "Hello world!"
|
||||
// return "Hello world!"
|
||||
// world << "End of Topic() call."
|
||||
// ..()
|
||||
|
||||
/world/Topic(T, addr, master, key)
|
||||
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
|
||||
|
||||
if (T == "ping")
|
||||
var/x = 1
|
||||
for (var/client/C)
|
||||
x++
|
||||
return x
|
||||
|
||||
else if(T == "players")
|
||||
var/n = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
n++
|
||||
return n
|
||||
|
||||
else if (T == "status")
|
||||
var/list/s = list()
|
||||
s["version"] = game_version
|
||||
s["mode"] = master_mode
|
||||
s["respawn"] = config ? abandon_allowed : 0
|
||||
s["enter"] = enter_allowed
|
||||
s["vote"] = config.allow_vote_mode
|
||||
s["ai"] = config.allow_ai
|
||||
s["host"] = host ? host : null
|
||||
s["players"] = list()
|
||||
var/n = 0
|
||||
var/admins = 0
|
||||
|
||||
for(var/client/C in client_list)
|
||||
if(C.holder)
|
||||
if(C.stealth)
|
||||
continue //so stealthmins aren't revealed by the hub
|
||||
admins++
|
||||
s["player[n]"] = C.key
|
||||
n++
|
||||
s["players"] = n
|
||||
|
||||
if(revdata) s["revision"] = revdata.revision
|
||||
s["admins"] = admins
|
||||
|
||||
return list2params(s)
|
||||
|
||||
|
||||
/world/Reboot(var/reason)
|
||||
spawn(0)
|
||||
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy
|
||||
|
||||
for(var/client/C)
|
||||
if (config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[config.server]")
|
||||
else
|
||||
C << link("byond://[world.address]:[world.port]")
|
||||
|
||||
..(reason)
|
||||
|
||||
|
||||
#define INACTIVITY_KICK 6000 //10 minutes in ticks (approx.)
|
||||
/world/proc/KickInactiveClients()
|
||||
for(var/client/C)
|
||||
if( !C.holder && (C.inactivity >= INACTIVITY_KICK) )
|
||||
if(C.mob)
|
||||
if(!istype(C.mob, /mob/dead/))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "\red You have been inactive for more than 10 minutes and have been disconnected."
|
||||
del(C)
|
||||
spawn(3000) KickInactiveClients()//more or less five minutes
|
||||
#undef INACTIVITY_KICK
|
||||
|
||||
|
||||
/world/proc/load_mode()
|
||||
var/text = file2text("data/mode.txt")
|
||||
if (text)
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
if (lines[1])
|
||||
master_mode = lines[1]
|
||||
diary << "Saved mode is '[master_mode]'"
|
||||
|
||||
/world/proc/save_mode(var/the_mode)
|
||||
var/F = file("data/mode.txt")
|
||||
fdel(F)
|
||||
F << the_mode
|
||||
|
||||
/world/proc/load_motd()
|
||||
join_motd = file2text("config/motd.txt")
|
||||
|
||||
|
||||
/world/proc/load_admins()
|
||||
var/text = file2text("config/admins.txt")
|
||||
if (!text)
|
||||
diary << "Failed to load config/admins.txt\n"
|
||||
else
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
if (!line)
|
||||
continue
|
||||
|
||||
if (copytext(line, 1, 2) == ";")
|
||||
continue
|
||||
|
||||
var/pos = findtext(line, " - ", 1, null)
|
||||
if (pos)
|
||||
var/m_key = copytext(line, 1, pos)
|
||||
var/a_lev = copytext(line, pos + 3, length(line) + 1)
|
||||
admins[m_key] = a_lev
|
||||
diary << ("ADMIN: [m_key] = [a_lev]")
|
||||
|
||||
|
||||
/world/proc/load_configuration()
|
||||
config = new /datum/configuration()
|
||||
config.load("config/config.txt")
|
||||
config.load("config/game_options.txt","game_options")
|
||||
config.loadsql("config/dbconfig.txt")
|
||||
config.loadforumsql("config/forumdbconfig.txt")
|
||||
// apply some settings from config..
|
||||
abandon_allowed = config.respawn
|
||||
|
||||
|
||||
/world/proc/update_status()
|
||||
var/s = ""
|
||||
|
||||
if (config && config.server_name)
|
||||
s += "<b>[config.server_name]</b> — "
|
||||
|
||||
s += "<b>[station_name()]</b>";
|
||||
s += " ("
|
||||
s += "<a href=\"http://\">" //Change this to wherever you want the hub to link to.
|
||||
// s += "[game_version]"
|
||||
s += "Default" //Replace this with something else. Or ever better, delete it and uncomment the game version.
|
||||
s += "</a>"
|
||||
s += ")"
|
||||
|
||||
var/list/features = list()
|
||||
|
||||
if (!ticker)
|
||||
features += "<b>STARTING</b>"
|
||||
|
||||
if (ticker && master_mode)
|
||||
features += master_mode
|
||||
|
||||
if (!enter_allowed)
|
||||
features += "closed"
|
||||
|
||||
if (abandon_allowed)
|
||||
features += abandon_allowed ? "respawn" : "no respawn"
|
||||
|
||||
if (config && config.allow_vote_mode)
|
||||
features += "vote"
|
||||
|
||||
if (config && config.allow_ai)
|
||||
features += "AI allowed"
|
||||
|
||||
var/n = 0
|
||||
for (var/mob/M in player_list)
|
||||
if (M.client)
|
||||
n++
|
||||
|
||||
if (n > 1)
|
||||
features += "~[n] players"
|
||||
else if (n > 0)
|
||||
features += "~[n] player"
|
||||
|
||||
/*
|
||||
is there a reason for this? the byond site shows 'hosted by X' when there is a proper host already.
|
||||
if (host)
|
||||
features += "hosted by <b>[host]</b>"
|
||||
*/
|
||||
|
||||
if (!host && config && config.hostedby)
|
||||
features += "hosted by <b>[config.hostedby]</b>"
|
||||
|
||||
if (features)
|
||||
s += ": [dd_list2text(features, ", ")]"
|
||||
|
||||
/* does this help? I do not know */
|
||||
if (src.status != s)
|
||||
src.status = s
|
||||
@@ -1 +0,0 @@
|
||||
wark
|
||||
@@ -16,16 +16,14 @@
|
||||
#define FILE_DIR "code/datums"
|
||||
#define FILE_DIR "code/datums/diseases"
|
||||
#define FILE_DIR "code/datums/helper_datums"
|
||||
#define FILE_DIR "code/datums/organs"
|
||||
#define FILE_DIR "code/datums/spells"
|
||||
#define FILE_DIR "code/defines"
|
||||
#define FILE_DIR "code/defines/area"
|
||||
#define FILE_DIR "code/defines/obj"
|
||||
#define FILE_DIR "code/defines/procs"
|
||||
#define FILE_DIR "code/defines/tanning"
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/asteroid"
|
||||
#define FILE_DIR "code/game/gamemodes"
|
||||
#define FILE_DIR "code/game/gamemodes/blob"
|
||||
#define FILE_DIR "code/game/gamemodes/blob/blobs"
|
||||
@@ -86,6 +84,7 @@
|
||||
#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/turfs/simulated"
|
||||
#define FILE_DIR "code/game/turfs/space"
|
||||
#define FILE_DIR "code/game/turfs/unsimulated"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/vehicles/airtight"
|
||||
@@ -140,7 +139,6 @@
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/robot"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/mob/organ"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
#define FILE_DIR "code/modules/power/antimatter"
|
||||
@@ -208,7 +206,6 @@
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "music"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
@@ -234,6 +231,7 @@
|
||||
#include "code\names.dm"
|
||||
#include "code\setup.dm"
|
||||
#include "code\stylesheet.dm"
|
||||
#include "code\world.dm"
|
||||
#include "code\ATMOSPHERICS\atmospherics.dm"
|
||||
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
|
||||
#include "code\ATMOSPHERICS\datum_pipeline.dm"
|
||||
@@ -305,6 +303,8 @@
|
||||
#include "code\datums\helper_datums\global_iterator.dm"
|
||||
#include "code\datums\helper_datums\teleport.dm"
|
||||
#include "code\datums\helper_datums\topic_input.dm"
|
||||
#include "code\datums\organs\organ.dm"
|
||||
#include "code\datums\organs\organ_external.dm"
|
||||
#include "code\datums\spells\area_teleport.dm"
|
||||
#include "code\datums\spells\conjure.dm"
|
||||
#include "code\datums\spells\emplosion.dm"
|
||||
@@ -318,12 +318,7 @@
|
||||
#include "code\datums\spells\trigger.dm"
|
||||
#include "code\datums\spells\turf_teleport.dm"
|
||||
#include "code\datums\spells\wizard.dm"
|
||||
#include "code\defines\atom.dm"
|
||||
#include "code\defines\hub.dm"
|
||||
#include "code\defines\obj.dm"
|
||||
#include "code\defines\turf.dm"
|
||||
#include "code\defines\world.dm"
|
||||
#include "code\defines\area\Space Station 13 areas.dm"
|
||||
#include "code\defines\obj\hydro.dm"
|
||||
#include "code\defines\obj\machinery.dm"
|
||||
#include "code\defines\obj\storage.dm"
|
||||
@@ -351,40 +346,26 @@
|
||||
#include "code\defines\procs\statistics.dm"
|
||||
#include "code\defines\procs\syndicate_name.dm"
|
||||
#include "code\defines\procs\time_stamp.dm"
|
||||
#include "code\defines\tanning\leather.dm"
|
||||
#include "code\FEA\FEA_airgroup.dm"
|
||||
#include "code\FEA\FEA_fire.dm"
|
||||
#include "code\FEA\FEA_gas_mixture.dm"
|
||||
#include "code\FEA\FEA_group_helpers.dm"
|
||||
#include "code\FEA\FEA_system.dm"
|
||||
#include "code\FEA\FEA_turf_tile.dm"
|
||||
#include "code\game\algorithm.dm"
|
||||
#include "code\game\atom_procs.dm"
|
||||
#include "code\game\cellautomata.dm"
|
||||
#include "code\game\chemistry.dm"
|
||||
#include "code\game\asteroid.dm"
|
||||
#include "code\game\atoms.dm"
|
||||
#include "code\game\atoms_movable.dm"
|
||||
#include "code\game\communications.dm"
|
||||
#include "code\game\dna.dm"
|
||||
#include "code\game\hud.dm"
|
||||
#include "code\game\landmarks.dm"
|
||||
#include "code\game\prisonshuttle.dm"
|
||||
#include "code\game\shuttle_engines.dm"
|
||||
#include "code\game\skincmd.dm"
|
||||
#include "code\game\smoothwall.dm"
|
||||
#include "code\game\sound.dm"
|
||||
#include "code\game\specops_shuttle.dm"
|
||||
#include "code\game\status.dm"
|
||||
#include "code\game\step_triggers.dm"
|
||||
#include "code\game\supplyshuttle.dm"
|
||||
#include "code\game\syndicate_shuttle.dm"
|
||||
#include "code\game\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\throwing.dm"
|
||||
#include "code\game\topic.dm"
|
||||
#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\asteroid\asteroid.dm"
|
||||
#include "code\game\asteroid\turf.dm"
|
||||
#include "code\game\area\Space Station 13 areas.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -498,6 +479,7 @@
|
||||
#include "code\game\machinery\turrets.dm"
|
||||
#include "code\game\machinery\vending.dm"
|
||||
#include "code\game\machinery\washing_machine.dm"
|
||||
#include "code\game\machinery\wishgranter.dm"
|
||||
#include "code\game\machinery\atmoalter\area_atmos_computer.dm"
|
||||
#include "code\game\machinery\atmoalter\canister.dm"
|
||||
#include "code\game\machinery\atmoalter\meter.dm"
|
||||
@@ -538,10 +520,14 @@
|
||||
#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\prisonshuttle.dm"
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\shuttle.dm"
|
||||
#include "code\game\machinery\computer\specops_shuttle.dm"
|
||||
#include "code\game\machinery\computer\station_alert.dm"
|
||||
#include "code\game\machinery\computer\syndicate_shuttle.dm"
|
||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\machinery\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
#include "code\game\machinery\doors\brigdoors.dm"
|
||||
@@ -611,6 +597,7 @@
|
||||
#include "code\game\objects\effects\overlays.dm"
|
||||
#include "code\game\objects\effects\portals.dm"
|
||||
#include "code\game\objects\effects\signs.dm"
|
||||
#include "code\game\objects\effects\step_triggers.dm"
|
||||
#include "code\game\objects\effects\decals\cleanable.dm"
|
||||
#include "code\game\objects\effects\decals\contraband.dm"
|
||||
#include "code\game\objects\effects\decals\crayon.dm"
|
||||
@@ -622,6 +609,7 @@
|
||||
#include "code\game\objects\effects\decals\Cleanable\robots.dm"
|
||||
#include "code\game\objects\effects\spawners\bombspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\gibspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\vaultspawner.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
#include "code\game\objects\items\blueprints.dm"
|
||||
#include "code\game\objects\items\bodybag.dm"
|
||||
@@ -662,6 +650,7 @@
|
||||
#include "code\game\objects\items\stacks\rods.dm"
|
||||
#include "code\game\objects\items\stacks\stack.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\glass.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\leather.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\light.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\mineral.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\sheet_types.dm"
|
||||
@@ -784,13 +773,27 @@
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
#include "code\game\turfs\simulated\asteroid.dm"
|
||||
#include "code\game\turfs\simulated\beach.dm"
|
||||
#include "code\game\turfs\simulated\floor.dm"
|
||||
#include "code\game\turfs\simulated\floor_types.dm"
|
||||
#include "code\game\turfs\simulated\walls.dm"
|
||||
#include "code\game\turfs\simulated\walls_mineral.dm"
|
||||
#include "code\game\turfs\simulated\walls_misc.dm"
|
||||
#include "code\game\turfs\simulated\walls_reinforced.dm"
|
||||
#include "code\game\turfs\space\space.dm"
|
||||
#include "code\game\turfs\space\transit.dm"
|
||||
#include "code\game\turfs\unsimulated\beach.dm"
|
||||
#include "code\game\turfs\unsimulated\floor.dm"
|
||||
#include "code\game\turfs\unsimulated\walls.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\atom_verbs.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
#include "code\game\verbs\sound.dm"
|
||||
#include "code\game\verbs\suicide.dm"
|
||||
@@ -1097,8 +1100,6 @@
|
||||
#include "code\modules\mob\new_player\preferences_setup.dm"
|
||||
#include "code\modules\mob\new_player\savefile.dm"
|
||||
#include "code\modules\mob\new_player\sprite_accessories.dm"
|
||||
#include "code\modules\mob\organ\organ.dm"
|
||||
#include "code\modules\mob\organ\organ_external.dm"
|
||||
#include "code\modules\paperwork\clipboard.dm"
|
||||
#include "code\modules\paperwork\filingcabinet.dm"
|
||||
#include "code\modules\paperwork\folders.dm"
|
||||
|
||||
Reference in New Issue
Block a user