mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
Merge pull request #1269 from Erthilo/TGUpdates
TG Updates r3721 to r3745 Redo
This commit is contained in:
@@ -9,13 +9,7 @@
|
||||
|
||||
//SYSTEM
|
||||
/proc/investigate_subject2file(var/subject)
|
||||
switch(subject)
|
||||
if("singulo")
|
||||
return file("[INVESTIGATE_DIR]singulo.html")
|
||||
if("silicon")
|
||||
return file("[INVESTIGATE_DIR]silicon.html")
|
||||
else
|
||||
return
|
||||
return file("[INVESTIGATE_DIR][subject].html")
|
||||
|
||||
/proc/investigate_reset()
|
||||
if(fdel(INVESTIGATE_DIR)) return 1
|
||||
@@ -27,17 +21,26 @@
|
||||
if(!F) return
|
||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("singulo","silicon") )
|
||||
/client/proc/investigate_show( subject in list("hrefs","singulo") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
return
|
||||
src << browse(F,"window=investigate;size=800x300")
|
||||
|
||||
switch(subject)
|
||||
if("singulo") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("hrefs") //persistant logs and stuff
|
||||
if(config && config.log_hrefs)
|
||||
if(href_logfile)
|
||||
src << browse(href_logfile,"window=investigate[subject];size=800x300")
|
||||
else
|
||||
src << "<font color='red'>Error: admin_investigate: No href logfile found.</font>"
|
||||
return
|
||||
else
|
||||
src << "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>"
|
||||
return
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
|
||||
verbs += /client/proc/cinematic //show a cinematic sequence
|
||||
verbs += /client/proc/startSinglo //Used to prevent the station from losing power while testing stuff out.
|
||||
verbs += /client/proc/toggle_log_hrefs
|
||||
verbs += /client/proc/enable_debug_verbs
|
||||
verbs += /client/proc/kill_air
|
||||
verbs += /client/proc/callprocgen
|
||||
@@ -440,7 +441,8 @@
|
||||
verbs -= /client/proc/getserverlog
|
||||
verbs -= /client/proc/cinematic //show a cinematic sequence
|
||||
verbs -= /client/proc/admin_memo
|
||||
verbs -= /client/proc/investigate_show
|
||||
verbs -= /client/proc/investigate_show //investigate in-game mishaps using various logs.
|
||||
verbs -= /client/proc/toggle_log_hrefs
|
||||
verbs -= /client/proc/cmd_admin_change_custom_event
|
||||
verbs -= /client/proc/admin_invis
|
||||
verbs -= /client/proc/callprocgen
|
||||
@@ -881,6 +883,18 @@
|
||||
// feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
if(config.log_hrefs)
|
||||
config.log_hrefs = 0
|
||||
src << "<b>Stopped logging hrefs</b>"
|
||||
else
|
||||
config.log_hrefs = 1
|
||||
src << "<b>Started logging hrefs</b>"
|
||||
|
||||
/client/proc/admin_invis()
|
||||
set category = "Admin"
|
||||
set name = "Invisibility"
|
||||
|
||||
@@ -215,7 +215,7 @@ proc/check_panel(mob/M)
|
||||
return 1
|
||||
return 0*/
|
||||
|
||||
/obj/fake_attacker
|
||||
/obj/effect/fake_attacker
|
||||
icon = null
|
||||
icon_state = null
|
||||
name = ""
|
||||
@@ -358,8 +358,8 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
|
||||
if(!possible_clones.len) return
|
||||
clone = pick(possible_clones)
|
||||
//var/obj/fake_attacker/F = new/obj/fake_attacker(outside_range(target))
|
||||
var/obj/fake_attacker/F = new/obj/fake_attacker(target.loc)
|
||||
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
|
||||
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(target.loc)
|
||||
if(clone.l_hand)
|
||||
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
|
||||
clone_weapon = clone.l_hand.name
|
||||
|
||||
@@ -85,7 +85,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
if(NewLoc)
|
||||
loc = NewLoc
|
||||
for(var/obj/step_trigger/S in NewLoc)
|
||||
for(var/obj/effect/step_trigger/S in NewLoc)
|
||||
S.HasEntered(src)
|
||||
|
||||
return
|
||||
@@ -99,7 +99,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if((direct & WEST) && x > 1)
|
||||
x--
|
||||
|
||||
for(var/obj/step_trigger/S in locate(x, y, z))
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z))
|
||||
S.HasEntered(src)
|
||||
|
||||
/mob/dead/observer/examine()
|
||||
|
||||
@@ -294,6 +294,14 @@
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "equip"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_equip"
|
||||
using.screen_loc = ui_equip
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "intent"
|
||||
|
||||
@@ -942,10 +942,6 @@
|
||||
client.screen -= hud_used.intents
|
||||
client.screen -= hud_used.mov_int
|
||||
|
||||
|
||||
//Screenlocs for these slots are handled by the huds other_update()
|
||||
//because theyre located on the 'other' inventory bar.
|
||||
|
||||
// Gloves
|
||||
var/datum/organ/external/lo = organs["l_hand"]
|
||||
var/datum/organ/external/ro = organs["r_hand"]
|
||||
@@ -1067,9 +1063,10 @@
|
||||
clothing_overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = BACK_LAYER)
|
||||
back.screen_loc = ui_back
|
||||
|
||||
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
//to hide / show them.
|
||||
// WHAT IS THIS DOING IN UPDATE_CLOTHING(), AHHHHHHHHHHHHH
|
||||
if(client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
//to hide / show them.
|
||||
if (handcuffed)
|
||||
pulling = null
|
||||
var/h1 = handcuffed.icon_state
|
||||
@@ -1128,6 +1125,11 @@
|
||||
clothing_overlays += image("icon" = stain_icon, "layer" = B_SUIT_LAYER)
|
||||
wear_suit.screen_loc = ui_oclothing
|
||||
|
||||
//Update_other() MUST be called after all the storage slots get updated. This is because all the storage slots assign their
|
||||
//respective items a screen_loc, which other_update() will then override if needed.
|
||||
if(client)
|
||||
hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
|
||||
switch(shielded)
|
||||
if(1)
|
||||
overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = SHIELD_LAYER)
|
||||
@@ -1225,11 +1227,13 @@
|
||||
|
||||
if(lying)
|
||||
icon = lying_icon
|
||||
overlays += body_overlays_lying
|
||||
if(damageicon_lying)
|
||||
overlays += body_overlays_lying
|
||||
|
||||
if(!lying)
|
||||
icon = stand_icon
|
||||
overlays += body_overlays_standing
|
||||
if(damageicon_standing)
|
||||
overlays += body_overlays_standing
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(sleeping || paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
|
||||
if(stat || sleeping || paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
|
||||
canmove = 0
|
||||
|
||||
else
|
||||
|
||||
@@ -67,6 +67,25 @@
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if ("twitch")
|
||||
message = "<B>[src]</B> twitches violently."
|
||||
m_type = 1
|
||||
@@ -189,25 +208,7 @@
|
||||
playsound(src.loc, 'biamthelaw.ogg', 50, 0)
|
||||
m_type = 2
|
||||
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
|
||||
if("help")
|
||||
src << "beep-(none)/mob, ping-(none)/mob, buzz-(none)/mob, look-(none)/mob, stare-(none)/mob, glare-(none)/mob, twitch, twitch_s, law"
|
||||
|
||||
@@ -420,11 +420,12 @@
|
||||
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(getBruteLoss() == 0)
|
||||
user << "There are no dents to fix here!"
|
||||
return
|
||||
else if (W:remove_fuel(0))
|
||||
else if (WT.remove_fuel(0))
|
||||
adjustBruteLoss(-30)
|
||||
if(getBruteLoss() < 0) bruteloss = 0
|
||||
updatehealth()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//MOB overhaul
|
||||
|
||||
//Not in use yet
|
||||
// var/obj/organstructure/organStructure = null
|
||||
// var/obj/effect/organstructure/organStructure = null
|
||||
|
||||
//Vars that have been relocated to organStructure
|
||||
//Vars that have been relocated to organStructure ++END
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/mob/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
@@ -107,9 +105,6 @@
|
||||
usr.hud_used.help_intent.icon_state = "help_small_active"
|
||||
usr.hud_used.grab_intent.icon_state = "grab_small"
|
||||
usr.hud_used.disarm_intent.icon_state = "disarm_small"
|
||||
usr << "\blue Your intent is now \"[usr.a_intent]\"."
|
||||
else
|
||||
usr << "\red This mob type does not use intents."
|
||||
|
||||
//This gets called when you press the delete button.
|
||||
/client/verb/delete_key_pressed()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
#define UI_OLD 0
|
||||
#define UI_NEW 1
|
||||
@@ -439,14 +439,48 @@ datum/preferences
|
||||
if(job.title != new_title)
|
||||
job_alt_titles[job.title] = new_title
|
||||
|
||||
proc/SetChoices(mob/user, changedjob)
|
||||
proc/SetChoices(mob/user, limit = 17, list/splitJobs, width = 550, height = 500)
|
||||
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
|
||||
//splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice.
|
||||
//width - Screen' width. Defaults to 550 to make it look nice.
|
||||
//height - Screen's height. Defaults to 500 to make it look nice.
|
||||
|
||||
// Modify this if you added more jobs and it looks like a mess. Add the jobs in the splitJobs that you want to trigger and intitate a new table.
|
||||
|
||||
if(splitJobs == null)
|
||||
if (ticker.current_state >= GAME_STATE_PLAYING
|
||||
)
|
||||
splitJobs = list()
|
||||
else
|
||||
splitJobs = list("Chief Engineer")
|
||||
|
||||
|
||||
var/HTML = "<body>"
|
||||
HTML += "<tt><center>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br>"
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0' align='center'>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br><br>"
|
||||
HTML += "<a align='center' href=\"byond://?src=\ref[user];preferences=1;occ=0;job=cancel\">\[Done\]</a><br><br>" // Easier to press up here.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'><a> </a></td><td><a> </a></td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[BANNED]</b></font></td></tr>"
|
||||
continue
|
||||
@@ -483,12 +517,10 @@ datum/preferences
|
||||
else
|
||||
HTML += "</a></td></tr>"
|
||||
|
||||
HTML += "</table><br>"
|
||||
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;occ=0;job=cancel\">\[Done\]</a>"
|
||||
HTML += "</center></tt>"
|
||||
|
||||
user << browse(null, "window=preferences")
|
||||
user << browse(HTML, "window=mob_occupation;size=320x600")
|
||||
user << browse(HTML, "window=mob_occupation;size=[width]x[height]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -303,6 +303,15 @@
|
||||
|
||||
usr.hud_used.other_update()
|
||||
|
||||
if("equip")
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(!I)
|
||||
usr << "\blue You are not holding anything to equip."
|
||||
return
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.equip_to_appropriate_slot(I)
|
||||
|
||||
if("maprefresh")
|
||||
var/obj/machinery/computer/security/seccomp = usr.machine
|
||||
|
||||
|
||||
+20
-22
@@ -394,29 +394,27 @@
|
||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||
user << "\red You cannot put the board inside, the frame is damaged."
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && W:welding && opened && has_electronics==0 && !terminal)
|
||||
if (W:get_fuel() < 3)
|
||||
user << "\blue You need more welding fuel to do this."
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.get_fuel() < 3)
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return
|
||||
user << "You start welding APC frame..."
|
||||
if(W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
|
||||
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
user.visible_message(\
|
||||
"\red \The [src] has been cut apart by [user.name] with the welding tool.",\
|
||||
"You disassemble the broken APC frame.",\
|
||||
"\red You hear welding.")
|
||||
else
|
||||
new /obj/item/apc_frame(loc)
|
||||
user.visible_message(\
|
||||
"\red \The [src] has been cut from the wall by [user.name] with the welding tool.",\
|
||||
"You cut APC frame from the wall.",\
|
||||
"\red You hear welding.")
|
||||
W:welding = 1
|
||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut apart by [user.name] with the weldingtool.",\
|
||||
"You disassembled the broken APC frame.",\
|
||||
"\red You hear welding.")
|
||||
else
|
||||
new /obj/item/apc_frame(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut from the wall by [user.name] with the weldingtool.",\
|
||||
"You cut APC frame from the wall.",\
|
||||
"\red You hear welding.")
|
||||
del(src)
|
||||
return
|
||||
else if (istype(W, /obj/item/apc_frame) && opened && emagged)
|
||||
@@ -769,7 +767,7 @@
|
||||
(istype(robot) && (robot in malfai.connected_robots)) \
|
||||
) \
|
||||
)
|
||||
user << "\red \The [src] has it's AI control disabled!"
|
||||
user << "\red \The [src] has its AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
return 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/* new portable generator - work in progress
|
||||
|
||||
@@ -57,15 +57,14 @@ display round(lastgen) and plasmatank amount
|
||||
var/recent_fault = 0
|
||||
var/power_output = 1
|
||||
|
||||
proc
|
||||
HasFuel() //Placeholder for fuel check.
|
||||
return 1
|
||||
proc/HasFuel() //Placeholder for fuel check.
|
||||
return 1
|
||||
|
||||
UseFuel() //Placeholder for fuel use.
|
||||
return
|
||||
proc/UseFuel() //Placeholder for fuel use.
|
||||
return
|
||||
|
||||
handleInactive()
|
||||
return
|
||||
proc/handleInactive()
|
||||
return
|
||||
|
||||
process()
|
||||
if(active && HasFuel() && !crit_fail && anchored)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/obj/machinery/emitter
|
||||
name = "Emitter"
|
||||
@@ -149,7 +149,8 @@
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(active)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
@@ -157,29 +158,27 @@
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
if(1)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
W:welding = 1
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
W:welding = 1
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
var/containment_fail_announced = 0
|
||||
|
||||
@@ -119,35 +119,34 @@ field_generator power level display
|
||||
if(2)
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
switch(state)
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
return
|
||||
if(1)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the field generator to the floor."
|
||||
W:welding = 1
|
||||
else
|
||||
return
|
||||
if(2)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
W:welding = 2
|
||||
else
|
||||
return
|
||||
else
|
||||
@@ -356,4 +355,5 @@ field_generator power level display
|
||||
if((world.time - O.last_warning) > 50) //to stop message-spam
|
||||
temp = 0
|
||||
message_admins("A singulo exists and a containment field has failed.",1)
|
||||
investigate_log("has <font color='red'>failed</font> whilst a singulo exists.","singulo")
|
||||
O.last_warning = world.time
|
||||
|
||||
@@ -87,8 +87,11 @@
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
usr << "You must unfasten the pipe before rotating it."
|
||||
return
|
||||
|
||||
dir = turn(dir, -90)
|
||||
update()
|
||||
|
||||
@@ -100,6 +103,7 @@
|
||||
|
||||
if(anchored)
|
||||
usr << "You must unfasten the pipe before flipping it."
|
||||
return
|
||||
|
||||
dir = turn(dir, 180)
|
||||
if(ptype == 2)
|
||||
@@ -194,41 +198,44 @@
|
||||
update()
|
||||
|
||||
else if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
user << "Welding the [nicetype] in place."
|
||||
W:welding = 2
|
||||
if(do_after(user, 20))
|
||||
user << "The [nicetype] has been welded in place!"
|
||||
update() // TODO: Make this neat
|
||||
if(ispipe) // Pipe
|
||||
if(anchored)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
user << "Welding the [nicetype] in place."
|
||||
if(do_after(user, 20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "The [nicetype] has been welded in place!"
|
||||
update() // TODO: Make this neat
|
||||
if(ispipe) // Pipe
|
||||
|
||||
var/pipetype = dpipetype()
|
||||
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
|
||||
P.base_icon_state = base_state
|
||||
P.dir = dir
|
||||
P.dpdir = dpdir
|
||||
P.updateicon()
|
||||
var/pipetype = dpipetype()
|
||||
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
|
||||
P.base_icon_state = base_state
|
||||
P.dir = dir
|
||||
P.dpdir = dpdir
|
||||
P.updateicon()
|
||||
|
||||
else if(ptype==6) // Disposal bin
|
||||
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
|
||||
P.mode = 0 // start with pump off
|
||||
else if(ptype==6) // Disposal bin
|
||||
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
|
||||
P.mode = 0 // start with pump off
|
||||
|
||||
else if(ptype==7) // Disposal outlet
|
||||
else if(ptype==7) // Disposal outlet
|
||||
|
||||
var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc)
|
||||
P.dir = dir
|
||||
Trunk.linked = P
|
||||
var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc)
|
||||
P.dir = dir
|
||||
Trunk.linked = P
|
||||
|
||||
else if(ptype==8) // Disposal outlet
|
||||
else if(ptype==8) // Disposal outlet
|
||||
|
||||
var/obj/machinery/disposal/deliveryChute/P = new /obj/machinery/disposal/deliveryChute(src.loc)
|
||||
P.dir = dir
|
||||
var/obj/machinery/disposal/deliveryChute/P = new /obj/machinery/disposal/deliveryChute(src.loc)
|
||||
P.dir = dir
|
||||
|
||||
del(src)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
return
|
||||
W:welding = 1
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
user << "You need to attach it to the plating first!"
|
||||
return
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
if(isrobot(user) && !istype(I, /obj/item/weapon/trashbag))
|
||||
return
|
||||
if(mode<=0) // It's off
|
||||
if(contents.len > 0)
|
||||
user << "Eject the items first!"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(mode==0) // It's off but still not unscrewed
|
||||
mode=-1 // Set it to doubleoff l0l
|
||||
@@ -64,8 +68,9 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the disposal unit."
|
||||
W:welding = 2
|
||||
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the disposal unit."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
C.ptype = 6 // 6 = disposal unit
|
||||
@@ -73,7 +78,6 @@
|
||||
C.density = 1
|
||||
C.update()
|
||||
del(src)
|
||||
W:welding = 1
|
||||
return
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
@@ -896,23 +900,21 @@
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
|
||||
if(W.welding)
|
||||
if(W.remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
// check if anything changed over 2 seconds
|
||||
var/turf/uloc = user.loc
|
||||
var/atom/wloc = W.loc
|
||||
user << "Slicing the disposal pipe."
|
||||
sleep(30)
|
||||
if(user.loc == uloc && wloc == W.loc)
|
||||
welded()
|
||||
else
|
||||
user << "You must stay still while welding the pipe."
|
||||
W:welding = 1
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
// check if anything changed over 2 seconds
|
||||
var/turf/uloc = user.loc
|
||||
var/atom/wloc = W.loc
|
||||
user << "Slicing the disposal pipe."
|
||||
sleep(30)
|
||||
if(!W.isOn()) return
|
||||
if(user.loc == uloc && wloc == W.loc)
|
||||
welded()
|
||||
else
|
||||
user << "You need more welding fuel to cut the pipe."
|
||||
return
|
||||
user << "You must stay still while welding the pipe."
|
||||
else
|
||||
user << "You need more welding fuel to cut the pipe."
|
||||
return
|
||||
|
||||
// called when pipe is cut with welder
|
||||
proc/welded()
|
||||
@@ -1238,95 +1240,114 @@
|
||||
|
||||
return P
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//a trunk joining to a disposal bin or outlet on the same turf
|
||||
/obj/structure/disposalpipe/trunk
|
||||
icon_state = "pipe-t"
|
||||
var/obj/linked // the linked obj/machinery/disposal or obj/disposaloutlet
|
||||
|
||||
New()
|
||||
..()
|
||||
dpdir = dir
|
||||
spawn(1)
|
||||
getlinked()
|
||||
/obj/structure/disposalpipe/trunk/New()
|
||||
..()
|
||||
dpdir = dir
|
||||
spawn(1)
|
||||
getlinked()
|
||||
|
||||
update()
|
||||
return
|
||||
update()
|
||||
return
|
||||
|
||||
proc/getlinked()
|
||||
linked = null
|
||||
var/obj/machinery/disposal/D = locate() in src.loc
|
||||
if(D)
|
||||
linked = D
|
||||
if (!D.trunk)
|
||||
D.trunk = src
|
||||
/obj/structure/disposalpipe/trunk/proc/getlinked()
|
||||
linked = null
|
||||
var/obj/machinery/disposal/D = locate() in src.loc
|
||||
if(D)
|
||||
linked = D
|
||||
if (!D.trunk)
|
||||
D.trunk = src
|
||||
|
||||
var/obj/structure/disposaloutlet/O = locate() in src.loc
|
||||
if(O)
|
||||
linked = O
|
||||
var/obj/structure/disposaloutlet/O = locate() in src.loc
|
||||
if(O)
|
||||
linked = O
|
||||
|
||||
update()
|
||||
return
|
||||
update()
|
||||
return
|
||||
|
||||
// Override attackby so we disallow trunkremoval when somethings ontop
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/structure/disposalpipe/trunk/attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
if(linked != null)
|
||||
//Disposal bins or chutes
|
||||
/*
|
||||
These shouldn't be required
|
||||
var/obj/machinery/disposal/D = locate() in src.loc
|
||||
if(D && D.anchored)
|
||||
return
|
||||
|
||||
//Disposal outlet
|
||||
var/obj/structure/disposaloutlet/O = locate() in src.loc
|
||||
if(O && O.anchored)
|
||||
return
|
||||
*/
|
||||
|
||||
//Disposal constructors
|
||||
var/obj/structure/disposalconstruct/C = locate() in src.loc
|
||||
if(C && C.anchored)
|
||||
return
|
||||
|
||||
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
// check if anything changed over 2 seconds
|
||||
var/turf/uloc = user.loc
|
||||
var/atom/wloc = W.loc
|
||||
user << "Slicing the disposal pipe."
|
||||
sleep(30)
|
||||
if(!W.isOn()) return
|
||||
if(user.loc == uloc && wloc == W.loc)
|
||||
welded()
|
||||
else
|
||||
user << "You must stay still while welding the pipe."
|
||||
else
|
||||
user << "You need more welding fuel to cut the pipe."
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
|
||||
if(W.welding)
|
||||
if(W.remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
// check if anything changed over 2 seconds
|
||||
var/turf/uloc = user.loc
|
||||
var/atom/wloc = W.loc
|
||||
user << "Slicing the disposal pipe."
|
||||
sleep(30)
|
||||
if(user.loc == uloc && wloc == W.loc)
|
||||
welded()
|
||||
else
|
||||
user << "You must stay still while welding the pipe."
|
||||
W:welding = 1
|
||||
else
|
||||
user << "You need more welding fuel to cut the pipe."
|
||||
return
|
||||
|
||||
// would transfer to next pipe segment, but we are in a trunk
|
||||
// if not entering from disposal bin,
|
||||
// transfer to linked object (outlet or bin)
|
||||
|
||||
transfer(var/obj/structure/disposalholder/H)
|
||||
/obj/structure/disposalpipe/trunk/transfer(var/obj/structure/disposalholder/H)
|
||||
|
||||
if(H.dir == DOWN) // we just entered from a disposer
|
||||
return ..() // so do base transfer proc
|
||||
// otherwise, go to the linked object
|
||||
if(linked)
|
||||
var/obj/structure/disposaloutlet/O = linked
|
||||
if(istype(O) && (H))
|
||||
O.expel(H) // expel at outlet
|
||||
else
|
||||
var/obj/machinery/disposal/D = linked
|
||||
if(H)
|
||||
D.expel(H) // expel at disposal
|
||||
if(H.dir == DOWN) // we just entered from a disposer
|
||||
return ..() // so do base transfer proc
|
||||
// otherwise, go to the linked object
|
||||
if(linked)
|
||||
var/obj/structure/disposaloutlet/O = linked
|
||||
if(istype(O) && (H))
|
||||
O.expel(H) // expel at outlet
|
||||
else
|
||||
var/obj/machinery/disposal/D = linked
|
||||
if(H)
|
||||
src.expel(H, src.loc, 0) // expel at turf
|
||||
return null
|
||||
D.expel(H) // expel at disposal
|
||||
else
|
||||
if(H)
|
||||
src.expel(H, src.loc, 0) // expel at turf
|
||||
return null
|
||||
|
||||
// nextdir
|
||||
|
||||
nextdir(var/fromdir)
|
||||
if(fromdir == DOWN)
|
||||
return dir
|
||||
else
|
||||
return 0
|
||||
/obj/structure/disposalpipe/trunk/nextdir(var/fromdir)
|
||||
if(fromdir == DOWN)
|
||||
return dir
|
||||
else
|
||||
return 0
|
||||
|
||||
// a broken pipe
|
||||
/obj/structure/disposalpipe/broken
|
||||
@@ -1369,6 +1390,11 @@
|
||||
spawn(1)
|
||||
target = get_ranged_target_turf(src, dir, 10)
|
||||
|
||||
|
||||
var/obj/structure/disposalpipe/trunk/trunk = locate() in src.loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
// expel the contents of the holder object, then delete it
|
||||
// called when the holder exits the outlet
|
||||
proc/expel(var/obj/structure/disposalholder/H)
|
||||
@@ -1419,8 +1445,8 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the disposal outlet."
|
||||
W:welding = 2
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the disposal outlet."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
C.ptype = 7 // 7 = outlet
|
||||
@@ -1428,7 +1454,6 @@
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
W:welding = 1
|
||||
return
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
|
||||
@@ -375,6 +375,14 @@
|
||||
var/defaultDestination = "Disposals"
|
||||
|
||||
var/c_mode = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in src.loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
interact()
|
||||
return
|
||||
|
||||
@@ -451,8 +459,8 @@
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||
user << "You start slicing the floorweld off the delivery chute."
|
||||
W:welding = 2
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "You sliced the floorweld off the delivery chute."
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
C.ptype = 8 // 8 = Delivery chute
|
||||
@@ -460,7 +468,6 @@
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
W:welding = 1
|
||||
return
|
||||
else
|
||||
user << "You need more welding fuel to complete this task."
|
||||
|
||||
Reference in New Issue
Block a user