mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -140,6 +140,7 @@
|
||||
#define FILE_DIR "code/unused/pda2"
|
||||
#define FILE_DIR "code/unused/spacecraft"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
#define FILE_DIR "code/WorkInProgress/Mini"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
|
||||
189
code/WorkInProgress/Cael_Aislinn/MultiZ.dm
Normal file
189
code/WorkInProgress/Cael_Aislinn/MultiZ.dm
Normal file
@@ -0,0 +1,189 @@
|
||||
/obj/multiz
|
||||
icon = 'multiz.dmi'
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
var/istop = 1
|
||||
|
||||
CanPass(obj/mover, turf/source, height, airflow)
|
||||
return airflow || !density
|
||||
|
||||
/obj/multiz/proc/targetZ()
|
||||
return src.z + (istop ? 1 : -1)
|
||||
|
||||
/obj/multiz/ladder
|
||||
icon_state = "ladderdown"
|
||||
name = "ladder"
|
||||
desc = "A Ladder. You climb up and down it."
|
||||
|
||||
/obj/multiz/ladder/New()
|
||||
..()
|
||||
if (!istop)
|
||||
icon_state = "ladderup"
|
||||
else
|
||||
icon_state = "ladderdown"
|
||||
|
||||
/obj/multiz/ladder/attack_paw(var/mob/M)
|
||||
return attack_hand(M)
|
||||
|
||||
/obj/multiz/ladder/attackby(var/W, var/mob/M)
|
||||
return attack_hand(M)
|
||||
|
||||
/obj/multiz/ladder/attack_hand(var/mob/M)
|
||||
M.Move(locate(src.x, src.y, targetZ()))
|
||||
/*
|
||||
/obj/multiz/ladder/blob_act()
|
||||
var/newblob = 1
|
||||
for(var/obj/blob in locate(src.x, src.y, targetZ()))
|
||||
newblob = 0
|
||||
if(newblob)
|
||||
new /obj/blob(locate(src.x, src.y, targetZ()))
|
||||
*/
|
||||
//Stairs. var/dir on all four component objects should be the dir you'd walk from top to bottom
|
||||
//active = bump to move down
|
||||
//active/bottom = bump to move up
|
||||
//enter = decorative downwards stairs
|
||||
//enter/bottom = decorative upward stairs
|
||||
/obj/multiz/stairs
|
||||
name = "Stairs"
|
||||
desc = "Stairs. You walk up and down them."
|
||||
icon_state = "ramptop"
|
||||
|
||||
/obj/multiz/stairs/New()
|
||||
icon_state = istop ^ istype(src, /obj/multiz/stairs/active) ? "ramptop" : "rampbottom"
|
||||
|
||||
/obj/multiz/stairs/enter/bottom
|
||||
istop = 0
|
||||
|
||||
/obj/multiz/stairs/active
|
||||
density = 1
|
||||
|
||||
/obj/multiz/stairs/active/Bumped(var/atom/movable/M)
|
||||
if(istype(src, /obj/multiz/stairs/active/bottom) && !locate(/obj/multiz/stairs/enter) in M.loc)
|
||||
return //If on bottom, only let them go up stairs if they've moved to the entry tile first.
|
||||
//If it's the top, they can fall down just fine.
|
||||
if(ismob(M) && M:client)
|
||||
M:client.moving = 1
|
||||
M.Move(locate(src.x, src.y, targetZ()))
|
||||
if (ismob(M) && M:client)
|
||||
M:client.moving = 0
|
||||
|
||||
/obj/multiz/stairs/active/Click()
|
||||
if(!istype(usr,/mob/dead/observer))
|
||||
return ..()
|
||||
usr.client.moving = 1
|
||||
usr.Move(locate(src.x, src.y, targetZ()))
|
||||
usr.client.moving = 0
|
||||
/obj/multiz/stairs/active/bottom
|
||||
istop = 0
|
||||
opacity = 1
|
||||
|
||||
/turf/simulated/floor/open
|
||||
name = "open space"
|
||||
intact = 0
|
||||
icon_state = "open"
|
||||
pathweight = 100000 //Seriously, don't try and path over this one numbnuts
|
||||
var/icon/darkoverlays = null
|
||||
var/turf/floorbelow
|
||||
//floorstrength = 1
|
||||
mouse_opacity = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(1)
|
||||
if(!istype(src, /turf/simulated/floor/open)) //This should not be needed but is.
|
||||
return
|
||||
floorbelow = locate(x, y, z + 1)
|
||||
if(floorbelow)
|
||||
//Fortunately, I've done this before. - Aryn
|
||||
if(istype(floorbelow,/turf/space) || floorbelow.z > 4)
|
||||
new/turf/space(src)
|
||||
else if(!istype(floorbelow,/turf/simulated/floor))
|
||||
new/turf/simulated/floor/plating(src)
|
||||
else
|
||||
//if(ticker)
|
||||
//find_zone()
|
||||
update()
|
||||
else
|
||||
new/turf/space(src)
|
||||
|
||||
Del()
|
||||
. = ..()
|
||||
|
||||
Enter(var/atom/movable/AM)
|
||||
if (..()) //TODO make this check if gravity is active (future use) - Sukasa
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.Move(locate(x, y, z + 1))
|
||||
if (istype(AM, /mob))
|
||||
AM:bruteloss += 20 //You were totally doin it wrong. 5 damage? Really? - Aryn
|
||||
AM:weakened = max(AM:weakened,5)
|
||||
AM:updatehealth()
|
||||
return ..()
|
||||
|
||||
attackby()
|
||||
//nothing
|
||||
|
||||
proc/update() //Update the overlayss to make the openspace turf show what's down a level
|
||||
if(!floorbelow) return
|
||||
/*src.clearoverlays()
|
||||
src.addoverlay(floorbelow)
|
||||
for(var/obj/o in floorbelow.contents)
|
||||
src.addoverlay(image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer))
|
||||
var/image/I = image('ULIcons.dmi', "[min(max(floorbelow.LightLevelRed - 4, 0), 7)]-[min(max(floorbelow.LightLevelGreen - 4, 0), 7)]-[min(max(floorbelow.LightLevelBlue - 4, 0), 7)]")
|
||||
I.layer = TURF_LAYER + 0.2
|
||||
src.addoverlay(I)
|
||||
I = image('ULIcons.dmi', "1-1-1")
|
||||
I.layer = TURF_LAYER + 0.2
|
||||
src.addoverlay(I)*/
|
||||
|
||||
var/maxZ = 1
|
||||
var/minZ = 1
|
||||
|
||||
// Maybe it's best to have this hardcoded for whatever we'd add to the map, in order to avoid exploits
|
||||
// (such as mining base => admin station)
|
||||
// Note that this assumes the ship's top is at z=1 and bottom at z=4
|
||||
/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob)
|
||||
if (user.z > 1)
|
||||
user << "\red There is nothing of interest in that direction."
|
||||
return
|
||||
if(allow_thrust(0.01, user))
|
||||
switch(cardinal)
|
||||
if (UP) // Going up!
|
||||
if(user.z > maxZ) // If we aren't at the very top of the ship
|
||||
var/turf/T = locate(user.x, user.y, user.z - 1)
|
||||
// You can only jetpack up if there's space above, and you're sitting on either hull (on the exterior), or space
|
||||
//if(T && istype(T, /turf/space) && (istype(user.loc, /turf/space) || istype(user.loc, /turf/space/*/hull*/)))
|
||||
//check through turf contents to make sure there's nothing blocking the way
|
||||
if(T && istype(T, /turf/space))
|
||||
var/blocked = 0
|
||||
for(var/atom/A in T.contents)
|
||||
if(T.density)
|
||||
blocked = 1
|
||||
user << "\red You bump into [T.name]."
|
||||
break
|
||||
if(!blocked)
|
||||
user.Move(T)
|
||||
else
|
||||
user << "\red You bump into the ship's plating."
|
||||
else
|
||||
user << "\red The ship's gravity well keeps you in orbit!" // Assuming the ship starts on z level 1, you don't want to go past it
|
||||
|
||||
if (DOWN) // Going down!
|
||||
if (user.z < 1) // If we aren't at the very bottom of the ship, or out in space
|
||||
var/turf/T = locate(user.x, user.y, user.z + 1)
|
||||
// You can only jetpack down if you're sitting on space and there's space down below, or hull
|
||||
if(T && (istype(T, /turf/space) || istype(T, /turf/space/*/hull*/)) && istype(user.loc, /turf/space))
|
||||
var/blocked = 0
|
||||
for(var/atom/A in T.contents)
|
||||
if(T.density)
|
||||
blocked = 1
|
||||
user << "\red You bump into [T.name]."
|
||||
break
|
||||
if(!blocked)
|
||||
user.Move(T)
|
||||
else
|
||||
user << "\red You bump into the ship's plating."
|
||||
else
|
||||
user << "\red The ship's gravity well keeps you in orbit!"
|
||||
|
||||
BIN
code/WorkInProgress/Cael_Aislinn/multiz.dmi
Normal file
BIN
code/WorkInProgress/Cael_Aislinn/multiz.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
code/WorkInProgress/Cael_Aislinn/multiz_pipe.dmi
Normal file
BIN
code/WorkInProgress/Cael_Aislinn/multiz_pipe.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -10,6 +10,7 @@
|
||||
anchored = 1.0
|
||||
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
|
||||
var/obj/machinery/alarm/current = ""
|
||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||
if(..())
|
||||
@@ -36,7 +37,7 @@
|
||||
return ""
|
||||
var/dat = "<h3>[current.name]</h3><hr>"
|
||||
dat += current.return_status()
|
||||
if(current.remote_control)
|
||||
if(current.remote_control || overridden && current.rcon_setting)
|
||||
dat += "<hr>[src.return_controls()]"
|
||||
return dat
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
username = ""
|
||||
yesno_state = ""
|
||||
yesno_param = ""
|
||||
print("Hi! I'm [callsign], how are you doing?")
|
||||
print("Hi! I'm [callsign], how are you doing? You can talk to me by beginning your statements with \"[callsign],\"")
|
||||
|
||||
/datum/text_parser/parser/eliza/process_line()
|
||||
..()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
"Oh, I*",
|
||||
"You're not really talking about me, are you?")),
|
||||
new/datum/text_parser/keyword(
|
||||
list("i want"),
|
||||
list("i want","i like"),
|
||||
list(
|
||||
"What would it mean if you got*",
|
||||
"Why do you want*",
|
||||
@@ -397,7 +397,7 @@
|
||||
pda.overlays = null
|
||||
pda.overlays += image('pda.dmi', "pda-r")
|
||||
|
||||
return "Told [name] that [object]."
|
||||
return "Told [name], [object]."
|
||||
|
||||
/datum/text_parser/keyword/yes
|
||||
process(object)
|
||||
|
||||
@@ -239,7 +239,7 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
e.runeffect(mob,stage)
|
||||
clicks+=speed
|
||||
|
||||
if(prob(5)) spread_airborne(mob)
|
||||
if(prob(50)) spread_airborne(mob)
|
||||
|
||||
proc/cure(var/mob/living/carbon/mob)
|
||||
var/datum/disease2/effectholder/E
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "dna"
|
||||
var/curing
|
||||
var/virusing
|
||||
var/virusing = 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = null
|
||||
|
||||
@@ -40,6 +40,20 @@
|
||||
container = I
|
||||
C.drop_item()
|
||||
I.loc = src
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
if(virusing)
|
||||
user << "<b>The pathogen materializer is still recharging.."
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
|
||||
|
||||
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
|
||||
data["virus2"] = I:virus2
|
||||
product.reagents.add_reagent("blood",30,data)
|
||||
|
||||
virusing = 1
|
||||
spawn(1200) virusing = 0
|
||||
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
|
||||
//else
|
||||
src.attack_hand(user)
|
||||
|
||||
@@ -46,4 +46,4 @@
|
||||
|
||||
|
||||
// comment out the line below when debugging locally to enable the options & messages menu
|
||||
control_freak = 1
|
||||
//control_freak = 1
|
||||
@@ -1453,3 +1453,21 @@ proc/safepick(list/list)
|
||||
return
|
||||
return pick(list)
|
||||
|
||||
proc/get_opposite(var/checkdir)
|
||||
switch(checkdir)
|
||||
if(NORTH)
|
||||
return SOUTH
|
||||
if(SOUTH)
|
||||
return NORTH
|
||||
if(EAST)
|
||||
return WEST
|
||||
if(WEST)
|
||||
return EAST
|
||||
if(NORTHEAST)
|
||||
return SOUTHWEST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
if(SOUTHEAST)
|
||||
return NORTHWEST
|
||||
if(SOUTHWEST)
|
||||
return NORTHEAST
|
||||
@@ -17,10 +17,10 @@
|
||||
SpawnEvent()
|
||||
del src
|
||||
return
|
||||
command_alert("Warning: Ship approaching high-density radiation cloud. Seek cover immediately.")
|
||||
command_alert("Warning: station approaching high-density radiation cloud. Seek cover immediately.")
|
||||
Tick()
|
||||
if(ActiveFor == 50)
|
||||
command_alert("Ship has entered radiation cloud. Do not leave cover until it has passed.")
|
||||
command_alert("Station has entered radiation cloud. Do not leave cover until it has passed.")
|
||||
if(ActiveFor == 100 || ActiveFor == 150) //1/2 and 2/2 f the way after it start proper make peope be half dead mostly
|
||||
for(var/mob/living/carbon/M in world)
|
||||
var/area = M.loc.loc
|
||||
@@ -31,4 +31,4 @@
|
||||
if(!M.stat)
|
||||
M.radiate(100)
|
||||
Die()
|
||||
command_alert("The ship has cleared the radiation cloud. It is now safe to leave cover.")
|
||||
command_alert("The station has cleared the radiation cloud. It is now safe to leave cover.")
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
Announce()
|
||||
Lifetime = rand(90, 300)
|
||||
command_alert("The ship is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
|
||||
command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
|
||||
|
||||
for (var/datum/radio_frequency/Freq in radio_controller.frequencies)
|
||||
if(prob(35))
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
|
||||
Die()
|
||||
command_alert("The ship has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
|
||||
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
|
||||
for (var/datum/radio_frequency/Freq in ScrambledFrequencies)
|
||||
radio_controller.UnregisterScrambler(Freq)
|
||||
DisruptedFrequencies = list( )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/event/power_offline
|
||||
Announce()
|
||||
command_alert("The ship is performing an automated power system grid check, please stand by.", "Maintenance alert")
|
||||
command_alert("The station is performing an automated power system grid check, please stand by.", "Maintenance alert")
|
||||
for(var/obj/machinery/power/apc/a in world)
|
||||
if(!a.crit)
|
||||
a.eventoff = 1
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/datum/event/radiation
|
||||
Lifetime = 10
|
||||
Announce()
|
||||
command_alert("The ship is now travelling through a radiation belt", "Medical Alert")
|
||||
command_alert("The station is now travelling through a radiation belt", "Medical Alert")
|
||||
|
||||
Tick()
|
||||
for(var/mob/living/carbon/L in world)
|
||||
L.radiation += rand(1,7)
|
||||
if (prob(4))
|
||||
if (L && prob(4))
|
||||
if (prob(75))
|
||||
randmutb(L)
|
||||
domutcheck(L,null,1)
|
||||
@@ -15,4 +15,4 @@
|
||||
domutcheck(L,null,1)
|
||||
|
||||
Die()
|
||||
command_alert("The ship has cleared the radiation belt", "Medical Alert")
|
||||
command_alert("The station has cleared the radiation belt", "Medical Alert")
|
||||
|
||||
@@ -30,7 +30,7 @@ proc/makejson()
|
||||
var/admins = "no"
|
||||
for(var/client/C)
|
||||
playerscount++
|
||||
if(C.holder)
|
||||
if(C.holder && C.holder.level >= 0) // make sure retired admins don't make nt think admins are on
|
||||
if(!C.stealth)
|
||||
admins = "yes"
|
||||
players += "[C.key];"
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
//var/skipprocess = 0 //Experimenting
|
||||
var/alarm_frequency = 1437
|
||||
var/remote_control = 0
|
||||
#define RCON_NO 1
|
||||
#define RCON_AUTO 2
|
||||
#define RCON_YES 3
|
||||
var/rcon_setting = 2
|
||||
var/rcon_time = 0
|
||||
#define AALARM_REPORT_TIMEOUT 100
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/locked = 1
|
||||
@@ -212,9 +217,9 @@
|
||||
|
||||
/obj/machinery/alarm/proc/return_text()
|
||||
if(!(istype(usr, /mob/living/silicon)) && locked)
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
else
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr>[return_controls()]</body></html>"
|
||||
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
|
||||
|
||||
/obj/machinery/alarm/proc/return_status()
|
||||
var/turf/location = src.loc
|
||||
@@ -298,6 +303,24 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
|
||||
|
||||
return output
|
||||
|
||||
/obj/machinery/alarm/proc/rcon_text()
|
||||
var/dat = "<b>Remote Control:</b><br>"
|
||||
if(src.rcon_setting == RCON_NO)
|
||||
dat += "Off"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
|
||||
dat += " | "
|
||||
if(src.rcon_setting == RCON_AUTO)
|
||||
dat += "Auto"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
|
||||
dat += " | "
|
||||
if(src.rcon_setting == RCON_YES)
|
||||
dat += "On"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/alarm/proc/return_controls()
|
||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
||||
|
||||
@@ -492,8 +515,8 @@ table tr:first-child th:first-child { border: none;}
|
||||
/obj/machinery/alarm/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["ctrl"])
|
||||
remote_control = !remote_control
|
||||
if(href_list["rcon"])
|
||||
rcon_setting = text2num(href_list["rcon"])
|
||||
src.updateUsrDialog()
|
||||
if(href_list["command"])
|
||||
var/device_id = href_list["id_tag"]
|
||||
@@ -675,6 +698,21 @@ table tr:first-child th:first-child { border: none;}
|
||||
mode=AALARM_MODE_SCRUBBING
|
||||
apply_mode()
|
||||
|
||||
//atmos computer remote controll stuff
|
||||
switch(rcon_setting)
|
||||
if(RCON_NO)
|
||||
remote_control = 0
|
||||
if(RCON_AUTO)
|
||||
if(danger_level == 2)
|
||||
remote_control = 1
|
||||
rcon_time = 60
|
||||
if(RCON_YES)
|
||||
remote_control = 1
|
||||
if(rcon_time > 0)
|
||||
rcon_time--
|
||||
else if(rcon_setting == RCON_AUTO)
|
||||
remote_control = 0
|
||||
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -1888,16 +1888,20 @@
|
||||
if (H.wear_id)
|
||||
var/obj/item/weapon/card/id/id
|
||||
|
||||
if(istype(H.wear_id, /obj/item/weapon/card/id))
|
||||
id = H.wear_id // The ID is on the ID slot
|
||||
else if(istype(H.wear_id, /obj/item/device/pda))
|
||||
if(istype(H.wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = H.wear_id
|
||||
id = PDA.id // The ID is contained inside the PDA
|
||||
|
||||
if(M.mind.assigned_role == id.assignment) // Polymorph
|
||||
dat += "<td>[M.mind.assigned_role]</td>"
|
||||
id = PDA.id // The ID is contained inside the PDA
|
||||
else
|
||||
dat += "<td>[M.mind.assigned_role] ([id.assignment])"
|
||||
id = H.wear_id
|
||||
|
||||
if(isnull(id.assignment))
|
||||
usr << "<font color=red>ERROR:</font> Inform the coders that an [id.name] was checked for its assignment variable."
|
||||
dat += "<td><font color=red>ERROR</font></td>"
|
||||
else
|
||||
if(M.mind.assigned_role == id.assignment) // Polymorph
|
||||
dat += "<td>[M.mind.assigned_role]</td>"
|
||||
else
|
||||
dat += "<td>[M.mind.assigned_role] ([id.assignment])"
|
||||
|
||||
else
|
||||
dat += "<td>[M.mind.assigned_role] (No ID)</td>"
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
reset_view(null)
|
||||
client.adminobs = 0
|
||||
else
|
||||
if(ticker)
|
||||
if(ticker && ticker.mode)
|
||||
// world << "there's a ticker"
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
// world << "ticker says its malf"
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
M.animate_movement = 2
|
||||
return
|
||||
|
||||
else if(mob.confused)
|
||||
else if(mob.confused && prob(30))
|
||||
step(mob, pick(cardinal))
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -9,46 +9,71 @@
|
||||
anchored = 1
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/forwards // this is the default (forward) direction, set by the map dir
|
||||
var/backwards // hopefully self-explanatory
|
||||
var/forwards // this is the default (forward) direction, set by the map dir, can be 0
|
||||
var/backwards // hopefully self-explanatory, can be 0
|
||||
var/movedir // the actual direction to move stuff in
|
||||
|
||||
var/list/affecting // the list of all items that will be moved this ptick
|
||||
var/id = "" // the control ID - must match controller ID
|
||||
|
||||
//these ones below for backwards compatibility
|
||||
|
||||
// following two only used if a diverter is present
|
||||
var/divert_from = 0 // if non-zero, direction to divert items
|
||||
var/divert_to = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
|
||||
var/basedir // this is the default (forward) direction, set by the map dir
|
||||
// note dir var can vary when the direction changes
|
||||
|
||||
//cael - corner icon bug that needs a manual fix
|
||||
//note: for now, the sprites/anis and their directions are mostly independant from the actual conveyor move directions
|
||||
//if no conveyor move directions are specified, they are calculated from the sprite dir
|
||||
var/reverseSpriteMoveDir = 0
|
||||
|
||||
// create a conveyor
|
||||
/obj/machinery/conveyor/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
forwards = NORTH
|
||||
backwards = SOUTH
|
||||
if(SOUTH)
|
||||
forwards = SOUTH
|
||||
backwards = NORTH
|
||||
if(EAST)
|
||||
forwards = EAST
|
||||
backwards = WEST
|
||||
if(WEST)
|
||||
forwards = WEST
|
||||
backwards = EAST
|
||||
if(NORTHEAST)
|
||||
forwards = EAST
|
||||
backwards = SOUTH
|
||||
if(NORTHWEST)
|
||||
forwards = SOUTH
|
||||
backwards = WEST
|
||||
if(SOUTHEAST)
|
||||
forwards = NORTH
|
||||
backwards = EAST
|
||||
if(SOUTHWEST)
|
||||
forwards = WEST
|
||||
backwards = NORTH
|
||||
//added these to allow for custom conveyor dirs defined in map
|
||||
if(!forwards)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
forwards = NORTH
|
||||
if(SOUTH)
|
||||
forwards = SOUTH
|
||||
if(EAST)
|
||||
forwards = EAST
|
||||
if(WEST)
|
||||
forwards = WEST
|
||||
if(NORTHEAST)
|
||||
forwards = EAST
|
||||
if(NORTHWEST)
|
||||
forwards = WEST
|
||||
if(SOUTHEAST)
|
||||
forwards = EAST
|
||||
if(SOUTHWEST)
|
||||
forwards = WEST
|
||||
if(!backwards)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
backwards = SOUTH
|
||||
if(SOUTH)
|
||||
backwards = NORTH
|
||||
if(EAST)
|
||||
backwards = WEST
|
||||
if(WEST)
|
||||
backwards = EAST
|
||||
if(NORTHEAST)
|
||||
backwards = SOUTH
|
||||
if(NORTHWEST)
|
||||
backwards = SOUTH
|
||||
if(SOUTHEAST)
|
||||
backwards = NORTH
|
||||
if(SOUTHWEST)
|
||||
backwards = NORTH
|
||||
|
||||
/obj/machinery/conveyor/proc/setmove()
|
||||
if(operating == 1)
|
||||
if(operating > 0)
|
||||
movedir = forwards
|
||||
else
|
||||
else if(operating < 0)
|
||||
movedir = backwards
|
||||
update()
|
||||
|
||||
@@ -61,7 +86,7 @@
|
||||
operating = 0
|
||||
if(stat & NOPOWER)
|
||||
operating = 0
|
||||
icon_state = "conveyor[operating]"
|
||||
icon_state = "conveyor[operating * (reverseSpriteMoveDir?-1:1)]"
|
||||
|
||||
// machine process
|
||||
// move items to the target location
|
||||
@@ -72,6 +97,17 @@
|
||||
return
|
||||
use_power(100)
|
||||
|
||||
// update if diverter present
|
||||
// if movedir == forwards, therefore if divert_to != 0 and divert_from == backwards, then set movedir = divert_to
|
||||
// if movedir == backwards, therefore if divert_to != 0 and divert_from == forwards, then set movedir = divert_to
|
||||
//if(divert_to && divert_from == (movedir == backwards ? forwards : backwards ) )
|
||||
//movedir = divert_to
|
||||
if(divert_to)
|
||||
if( movedir == forwards && divert_from == backwards )
|
||||
movedir = divert_to
|
||||
else if( movedir == backwards && divert_from == forwards )
|
||||
movedir = divert_to
|
||||
|
||||
affecting = loc.contents - src // moved items will be all in loc
|
||||
spawn(1) // slight delay to prevent infinite propagation due to map order
|
||||
var/items_moved = 0
|
||||
@@ -221,3 +257,129 @@
|
||||
if(S.id == src.id)
|
||||
S.position = position
|
||||
S.update()
|
||||
|
||||
// converyor diverter
|
||||
// extendable arm that can be switched so items on the conveyer are diverted sideways
|
||||
// situate in same turf as conveyor
|
||||
// only works if belts is running proper direction
|
||||
//
|
||||
//
|
||||
/obj/machinery/diverter
|
||||
icon = 'recycling.dmi'
|
||||
icon_state = "diverter0"
|
||||
name = "diverter"
|
||||
desc = "A diverter arm for a conveyor belt."
|
||||
anchored = 1
|
||||
layer = FLY_LAYER
|
||||
var/obj/machinery/conveyor/conv // the conveyor this diverter works on
|
||||
var/deployed = 0 // true if diverter arm is extended
|
||||
var/operating = 0 // true if arm is extending/contracting
|
||||
var/divert_to // the dir that diverted items will be moved
|
||||
var/divert_from // the dir items must be moving to divert
|
||||
|
||||
// create a diverter
|
||||
// set up divert_to and divert_from directions depending on dir state
|
||||
/obj/machinery/diverter/New()
|
||||
..()
|
||||
//cael - the icon states are all derped, so these won't make sense.
|
||||
//just place the diverter according to which icon state is correct
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
divert_to = WEST//
|
||||
divert_from = SOUTH//
|
||||
if(SOUTH)
|
||||
divert_to = EAST//
|
||||
divert_from = SOUTH//NORTH
|
||||
if(EAST)
|
||||
divert_to = EAST//
|
||||
divert_from = NORTH//SOUTH
|
||||
if(WEST)
|
||||
divert_to = WEST//
|
||||
divert_from = NORTH//
|
||||
if(NORTHEAST)
|
||||
divert_to = NORTH//
|
||||
divert_from = WEST//EAST
|
||||
if(NORTHWEST)
|
||||
divert_to = NORTH//
|
||||
divert_from = EAST//WEST
|
||||
if(SOUTHEAST)
|
||||
divert_to = SOUTH//
|
||||
divert_from = WEST//EAST
|
||||
if(SOUTHWEST)
|
||||
divert_to = SOUTH//
|
||||
divert_from = EAST//WEST
|
||||
spawn(2)
|
||||
// wait for map load then find the conveyor in this turf
|
||||
conv = locate() in src.loc
|
||||
if(conv) // divert_from dir must match possible conveyor movement
|
||||
if(conv.backwards != divert_from && conv.backwards != turn(divert_from,180) )
|
||||
del(src) // if no dir match, then delete self
|
||||
set_divert()
|
||||
update()
|
||||
|
||||
// update the icon state depending on whether the diverter is extended
|
||||
/obj/machinery/diverter/proc/update()
|
||||
icon_state = "diverter[deployed]"
|
||||
|
||||
// call to set the diversion vars of underlying conveyor
|
||||
/obj/machinery/diverter/proc/set_divert()
|
||||
if(conv)
|
||||
if(deployed)
|
||||
conv.divert_to = divert_to
|
||||
conv.divert_from = divert_from
|
||||
else
|
||||
conv.divert_to = 0
|
||||
conv.divert_from = 0
|
||||
conv.setmove()
|
||||
|
||||
|
||||
// *** TESTING click to toggle
|
||||
/obj/machinery/diverter/Click()
|
||||
toggle()
|
||||
|
||||
|
||||
// toggle between arm deployed and not deployed, showing animation
|
||||
//
|
||||
/obj/machinery/diverter/proc/toggle()
|
||||
if( stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(operating)
|
||||
return
|
||||
|
||||
use_power(50)
|
||||
operating = 1
|
||||
if(deployed)
|
||||
flick("diverter10",src)
|
||||
icon_state = "diverter0"
|
||||
sleep(10)
|
||||
deployed = 0
|
||||
else
|
||||
flick("diverter01",src)
|
||||
icon_state = "diverter1"
|
||||
sleep(10)
|
||||
deployed = 1
|
||||
operating = 0
|
||||
update()
|
||||
set_divert()
|
||||
|
||||
// don't allow movement into the 'backwards' direction if deployed
|
||||
/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target)
|
||||
var/direct = get_dir(O, target)
|
||||
if(direct == divert_to) // prevent movement through body of diverter
|
||||
return 0
|
||||
if(!deployed)
|
||||
return 1
|
||||
return(direct != divert_from)
|
||||
|
||||
// don't allow movement through the arm if deployed
|
||||
/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target)
|
||||
var/direct = get_dir(O, target)
|
||||
if(direct == turn(divert_to,180)) // prevent movement through body of diverter
|
||||
return 0
|
||||
if(!deployed)
|
||||
return 1
|
||||
return(direct != turn(divert_from,180))
|
||||
|
||||
//divert_to = NORTH
|
||||
//divert_from = EAST
|
||||
@@ -227,11 +227,13 @@ atom/proc/Del()
|
||||
|
||||
return
|
||||
|
||||
atom/proc/movable/Move()
|
||||
// formerly atom/proc/movable/Move(), this now overwrites other shit causing random inexplicable problems.
|
||||
// need to find a way to plug it in to the root without overriding, might just do the snowflake treatment
|
||||
/*atom/proc/Move()
|
||||
ul_Extinguish()
|
||||
..()
|
||||
ul_Illuminate()
|
||||
return
|
||||
return*/
|
||||
|
||||
turf
|
||||
var
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
abi79 - Game Master
|
||||
arcalane - Game Admin
|
||||
bobbehluvspropane - Game Admin
|
||||
cacophony - Game Admin
|
||||
cajoes - Game Admin
|
||||
cib - Game Master
|
||||
@@ -13,6 +14,8 @@ megacaesar - Game Admin
|
||||
miniature - Game Master
|
||||
misterfox - Retired Admin
|
||||
mloc - Game Master
|
||||
skymarshal - Game Master
|
||||
spaceman96 - Game Admin
|
||||
strumpetplaya - Retired Admin
|
||||
tastyfish - Game Master
|
||||
uristqwerty - Game Master
|
||||
@@ -41,16 +41,16 @@ SQL_ENABLED 0
|
||||
## set to 0 to disable that mode
|
||||
## Cult mode is in alpha test, enable at your own risk
|
||||
PROBABILITY EXTENDED 0
|
||||
PROBABILITY TRAITOR 3
|
||||
PROBABILITY TRAITOR 4
|
||||
PROBABILITY METEOR 0
|
||||
PROBABILITY MALFUNCTION 1
|
||||
PROBABILITY BLOB 0
|
||||
PROBABILITY NUCLEAR 1
|
||||
PROBABILITY BLOB 1
|
||||
PROBABILITY NUCLEAR 0
|
||||
PROBABILITY SANDBOX 0
|
||||
PROBABILITY WIZARD 0
|
||||
PROBABILITY RESTRUCTURING 0
|
||||
PROBABILITY REVOLUTION 1
|
||||
PROBABILITY CHANGELING 1
|
||||
PROBABILITY CHANGELING 0
|
||||
PROBABILITY CULT 1
|
||||
PROBABILITY MONKEY 0
|
||||
PROBABILITY TRAITORCHAN 0
|
||||
@@ -109,4 +109,4 @@ GUEST_JOBBAN 1
|
||||
# FEATURE_OBJECT_SPELL_SYSTEM
|
||||
|
||||
##Toggle for having jobs load up from the .txt
|
||||
# LOAD_JOBS_FROM_TXT
|
||||
# LOAD_JOBS_FROM_TXT
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.6 KiB |
980
maps/Antiqua.dmm
980
maps/Antiqua.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user