mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
TG: - Added a middleclick function that swaps your hands.
- Some reorganization of DNA display in DNA modifiers. It's much easier to see where blocks start and end now. - Tried to clean up some mob stuff, mostly dead humans unnecessarily grabbing their atmosphere. - Made turret controls emaggeable. I've also committed Invisty's new ending station animations. They're pretty cool, check them out! Revision: r3621 Author: vageyenaman
This commit is contained in:
@@ -348,6 +348,7 @@
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/atom/Click(location,control,params)
|
||||
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
|
||||
if(!istype(src,/obj/item/weapon/gun))
|
||||
@@ -652,25 +653,6 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
if ( !animal.restrained() )
|
||||
attack_animal(animal)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE
|
||||
// world << "checking if this shit gets called at all"
|
||||
|
||||
@@ -760,6 +742,14 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
return
|
||||
}
|
||||
|
||||
// ------- MIDDLE-CLICK -------
|
||||
|
||||
if(parameters["middle"]){
|
||||
if(!isAI(usr))
|
||||
MiddleClick(usr)
|
||||
return
|
||||
}
|
||||
|
||||
// ------- THROW -------
|
||||
if(usr.in_throw_mode)
|
||||
return usr:throw_item(src)
|
||||
@@ -1083,6 +1073,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
return
|
||||
|
||||
/atom/proc/MiddleClick(var/mob/M as mob) // switch hands
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/U = M
|
||||
U.swap_hand()
|
||||
|
||||
/*
|
||||
/atom/proc/get_global_map_pos()
|
||||
if(!islist(global_map) || isemptylist(global_map)) return
|
||||
|
||||
@@ -181,6 +181,30 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/getblockstring(input,block,subblock,blocksize)
|
||||
var/string
|
||||
var/subpos = 1 // keeps track of the current sub block
|
||||
var/blockpos = 1 // keeps track of the current block
|
||||
|
||||
for(var/i = 1, i <= length(input), i++) // loop through each letter
|
||||
|
||||
var/pushstring = copytext(input, i, i+1)
|
||||
|
||||
if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
|
||||
pushstring = "</font color><b>[copytext(input, i, i+1)]</b><font color='blue'>"
|
||||
|
||||
string += pushstring // push the string to the return string
|
||||
|
||||
if(subpos >= blocksize) // add a line break for every block
|
||||
string += " </font color><font color='#285B5B'>|</font color><font color='blue'> "
|
||||
subpos = 0
|
||||
blockpos++
|
||||
|
||||
subpos++
|
||||
|
||||
return string
|
||||
|
||||
|
||||
/proc/getblock(input,blocknumber,blocksize)
|
||||
var/result
|
||||
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
||||
@@ -1009,13 +1033,17 @@
|
||||
////////////////////////////////////////////////////////
|
||||
if (href_list["unimenu"])
|
||||
//src.temphtml = text("Unique Identifier: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.uni_identity)
|
||||
src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
|
||||
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
|
||||
|
||||
// New way of displaying DNA blocks
|
||||
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3)]</FONT><br><br>")
|
||||
|
||||
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.uniblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];unimenuminus=1'><-</A> Block <A href='?src=\ref[];unimenuplus=1'>-></A><BR><BR>", src, src)
|
||||
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];unimenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];unimenusubplus=1'>-></A><BR><BR>", src, src)
|
||||
src.temphtml += "<B>Modify Block:</B><BR>"
|
||||
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Radiation</A><BR>", src)
|
||||
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Irradiate</A><BR>", src)
|
||||
src.delete = 0
|
||||
if (href_list["unimenuplus"])
|
||||
if (src.uniblock < 13)
|
||||
@@ -1091,14 +1119,19 @@
|
||||
var/temp2 = ""
|
||||
for(var/i = 3, i <= length(temp_string2), i += 3)
|
||||
temp2 += copytext(temp_string2, i-2, i+1) + " "
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[temp1] [src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]</FONT><BR><BR>")
|
||||
//src.temphtml = text("Structural Enzymes: <font color='blue'>[temp1] [src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]</FONT><BR><BR>")
|
||||
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)
|
||||
|
||||
// New shit, it doesn't suck (as much)
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[getblockstring(src.connected.occupant.dna.struc_enzymes,strucblock,subblock,3)]</FONT><br><br>")
|
||||
// SE of occupant, selected block, selected subblock, block size (3 subblocks)
|
||||
|
||||
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.strucblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucmenuminus=1'><-</A> <A href='?src=\ref[];strucmenuchoose=1'>Block</A> <A href='?src=\ref[];strucmenuplus=1'>-></A><BR><BR>", src, src, src)
|
||||
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucmenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];strucmenusubplus=1'>-></A><BR><BR>", src, src)
|
||||
src.temphtml += "<B>Modify Block:</B><BR>"
|
||||
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Radiation</A><BR>", src)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Irradiate</A><BR>", src)
|
||||
src.delete = 0
|
||||
if (href_list["strucmenuplus"])
|
||||
if (src.strucblock < 27)
|
||||
|
||||
@@ -150,10 +150,10 @@ var/datum/roundinfo/roundinfo = new()
|
||||
//initialise our cinematic screen object
|
||||
cinematic = new(src)
|
||||
cinematic.icon = 'station_explosion.dmi'
|
||||
cinematic.icon_state = "start"
|
||||
cinematic.icon_state = "station_intact"
|
||||
cinematic.layer = 20
|
||||
cinematic.mouse_opacity = 0
|
||||
cinematic.screen_loc = "1,3" //TODO resize them
|
||||
cinematic.screen_loc = "1,0"
|
||||
|
||||
var/obj/structure/stool/bed/temp_buckle = new(src)
|
||||
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
|
||||
@@ -179,63 +179,61 @@ var/datum/roundinfo/roundinfo = new()
|
||||
|
||||
//Now animate the cinematic
|
||||
switch(station_missed)
|
||||
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
|
||||
sleep(50)
|
||||
world << sound('explosionfar.ogg')
|
||||
|
||||
if(1) //nuke was nearby but (mostly) missed
|
||||
if( mode && !override )
|
||||
override = mode.name
|
||||
switch( override )
|
||||
if("nuclear emergency")
|
||||
flick("start_nuke",cinematic)
|
||||
sleep(50)
|
||||
if("nuclear emergency") //Nuke wasn't on station when it blew up
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
world << sound('explosionfar.ogg')
|
||||
flick("explode2",cinematic)
|
||||
cinematic.icon_state = "loss_nuke2"
|
||||
flick("station_intact_fade_red",cinematic)
|
||||
cinematic.icon_state = "summary_nukefail"
|
||||
else
|
||||
sleep(50)
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
world << sound('explosionfar.ogg')
|
||||
flick("explode2",cinematic)
|
||||
//flick("end",cinematic)
|
||||
|
||||
|
||||
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
|
||||
sleep(50)
|
||||
world << sound('explosionfar.ogg')
|
||||
|
||||
|
||||
else //station was destroyed
|
||||
if( mode && !override )
|
||||
override = mode.name
|
||||
switch( override )
|
||||
if("nuclear emergency")
|
||||
flick("start_nuke",cinematic)
|
||||
sleep(50)
|
||||
if("nuclear emergency") //Nuke Ops successfully bombed the station
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
flick("station_explode_fade_red",cinematic)
|
||||
world << sound('explosionfar.ogg')
|
||||
cinematic.icon_state = "end"
|
||||
flick("explode",cinematic)
|
||||
cinematic.icon_state = "loss_nuke"
|
||||
|
||||
if("AI malfunction")
|
||||
flick("start_malf",cinematic)
|
||||
sleep(50)
|
||||
cinematic.icon_state = "summary_nukewin"
|
||||
if("AI malfunction") //Malf (screen,explosion,summary)
|
||||
flick("intro_malf",cinematic)
|
||||
sleep(76)
|
||||
flick("station_explode_fade_red",cinematic)
|
||||
world << sound('explosionfar.ogg')
|
||||
cinematic.icon_state = "end"
|
||||
flick("explode",cinematic)
|
||||
cinematic.icon_state = "loss_malf"
|
||||
|
||||
if("blob")
|
||||
flick("start_blob",cinematic) //TODO: make a blob one
|
||||
sleep(50)
|
||||
cinematic.icon_state = "summary_malf"
|
||||
if("blob") //Station nuked (nuke,explosion,summary)
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
flick("station_explode_fade_red",cinematic)
|
||||
world << sound('explosionfar.ogg')
|
||||
cinematic.icon_state = "end"
|
||||
flick("explode",cinematic)
|
||||
cinematic.icon_state = "loss_blob" //TODO: make a blob one
|
||||
|
||||
else
|
||||
//default station-destroyed ending
|
||||
sleep(50)
|
||||
cinematic.icon_state = "summary_selfdes"
|
||||
else //Station nuked (nuke,explosion,summary)
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
flick("station_explode_fade_red", cinematic)
|
||||
world << sound('explosionfar.ogg')
|
||||
cinematic.icon_state = "end"
|
||||
flick("explode",cinematic)
|
||||
cinematic.icon_state = "loss_general"
|
||||
sleep(100)
|
||||
cinematic.icon_state = "summary_selfdes"
|
||||
|
||||
//If its actually the end of the round, wait for it to end.
|
||||
//Otherwise if its a verb it will continue on afterwards.
|
||||
sleep(300)
|
||||
|
||||
//Tidy-up time!
|
||||
if(cinematic) del(cinematic) //end the cinematic
|
||||
if(temp_buckle) del(temp_buckle) //release everybody
|
||||
return
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
viewingcode.Add(usr)
|
||||
winshow(usr, "Telecomms IDE", 1) // show the IDE
|
||||
winset(usr, "tcscode", "is-disabled=true")
|
||||
winset(editingcode, "tcscode", "text=\"\"")
|
||||
var/showcode = dd_replacetext(storedcode, "\"", "\\\"")
|
||||
winset(usr, "tcscode", "text=\"[showcode]\"")
|
||||
|
||||
|
||||
@@ -334,8 +334,22 @@
|
||||
if(stat & BROKEN) return
|
||||
if (istype(user, /mob/living/silicon))
|
||||
return src.attack_hand(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "\red You short out the turret controls' access analysis module."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
if(user.machine==src)
|
||||
src.attack_hand(user)
|
||||
|
||||
return
|
||||
|
||||
else if( get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
if (src.allowed(usr))
|
||||
if(emagged)
|
||||
user << "<span class='notice'>The turret control is unresponsive.</span>"
|
||||
return
|
||||
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
|
||||
if (locked)
|
||||
@@ -344,7 +358,7 @@
|
||||
user << browse(null, "window=turretid")
|
||||
else
|
||||
if (user.machine==src)
|
||||
src.attack_hand(usr)
|
||||
src.attack_hand(user)
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
if (stat != 2) //still breathing
|
||||
|
||||
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
|
||||
@@ -34,6 +34,7 @@ em {font-style: normal; font-weight: bold;}
|
||||
h1.alert, h2.alert {color: #000000;}
|
||||
|
||||
.emote { font-style: italic;}
|
||||
.selecteddna {color: #FFFFFF; background-color: #001B1B}
|
||||
|
||||
.attack {color: #ff0000;}
|
||||
.moderate {color: #CC0000;}
|
||||
|
||||
Reference in New Issue
Block a user