mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Merge remote-tracking branch 'remotes/upstream/master' into thaw
This commit is contained in:
@@ -90,6 +90,18 @@
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
while(Trajectory != epicenter)
|
||||
Trajectory = get_step_towards(Trajectory, epicenter)
|
||||
if(Trajectory.density && Trajectory.explosion_block)
|
||||
dist += Trajectory.explosion_block
|
||||
|
||||
for(var/obj/machinery/door/D in Trajectory)
|
||||
if(D.density && D.explosion_block)
|
||||
dist += D.explosion_block
|
||||
|
||||
var/flame_dist = 0
|
||||
var/throw_dist = dist
|
||||
|
||||
@@ -114,7 +126,7 @@
|
||||
var/throw_dir = get_dir(epicenter,T)
|
||||
for(var/obj/item/I in T)
|
||||
spawn(0) //Simultaneously not one at a time
|
||||
if(I)
|
||||
if(I && !I.anchored)
|
||||
var/throw_range = rand(throw_dist, max_range)
|
||||
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
|
||||
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
|
||||
@@ -138,3 +150,76 @@
|
||||
/proc/secondaryexplosion(turf/epicenter, range)
|
||||
for(var/turf/tile in trange(range, epicenter))
|
||||
tile.ex_act(2)
|
||||
|
||||
|
||||
/client/proc/check_bomb_impacts()
|
||||
set name = "Check Bomb Impact"
|
||||
set category = "Debug"
|
||||
|
||||
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
|
||||
var/turf/epicenter = get_turf(mob)
|
||||
if(!epicenter)
|
||||
return
|
||||
|
||||
var/dev = 0
|
||||
var/heavy = 0
|
||||
var/light = 0
|
||||
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
|
||||
var/choice = input("Bomb Size?") in choices
|
||||
switch(choice)
|
||||
if(null)
|
||||
return 0
|
||||
if("Small Bomb")
|
||||
dev = 1
|
||||
heavy = 2
|
||||
light = 3
|
||||
if("Medium Bomb")
|
||||
dev = 2
|
||||
heavy = 3
|
||||
light = 4
|
||||
if("Big Bomb")
|
||||
dev = 3
|
||||
heavy = 5
|
||||
light = 7
|
||||
if("Custom Bomb")
|
||||
dev = input("Devestation range (Tiles):") as num
|
||||
heavy = input("Heavy impact range (Tiles):") as num
|
||||
light = input("Light impact range (Tiles):") as num
|
||||
|
||||
var/max_range = max(dev, heavy, light)
|
||||
var/x0 = epicenter.x
|
||||
var/y0 = epicenter.y
|
||||
var/list/wipe_colours = list()
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
wipe_colours += T
|
||||
var/dist = cheap_pythag(T.x - x0, T.y - y0)
|
||||
|
||||
if(newmode == "Yes")
|
||||
var/turf/TT = T
|
||||
while(TT != epicenter)
|
||||
TT = get_step_towards(TT,epicenter)
|
||||
if(TT.density && TT.explosion_block)
|
||||
dist += TT.explosion_block
|
||||
|
||||
for(var/obj/machinery/door/D in TT)
|
||||
if(D.density && D.explosion_block)
|
||||
dist += D.explosion_block
|
||||
|
||||
if(dist < dev)
|
||||
T.color = "red"
|
||||
T.maptext = "Dev"
|
||||
else if (dist < heavy)
|
||||
T.color = "yellow"
|
||||
T.maptext = "Heavy"
|
||||
else if (dist < light)
|
||||
T.color = "blue"
|
||||
T.maptext = "Light"
|
||||
else
|
||||
continue
|
||||
|
||||
sleep(100)
|
||||
for(var/turf/T in wipe_colours)
|
||||
T.color = null
|
||||
T.maptext = ""
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/w_class = 3.0
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 5
|
||||
pressure_resistance = 3
|
||||
var/obj/item/master = null
|
||||
|
||||
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||
@@ -443,6 +443,7 @@
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(can_embed(src))
|
||||
if(prob(embed_chance) && !(PIERCEIMMUNE in H.dna.species.specflags))
|
||||
H.throw_alert("embeddedobject")
|
||||
var/obj/item/organ/limb/L = pick(H.organs)
|
||||
L.embedded_objects |= src
|
||||
add_blood(H)//it embedded itself in you, of course it's bloody!
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
. = ..()
|
||||
var/area/A = get_area()
|
||||
if(get_area_type() == AREA_STATION)
|
||||
. += "<p>According to \the [src], you are now in <b>\"[strip_html_properly(A.name)]\"</b>.</p>"
|
||||
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
|
||||
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
|
||||
popup.set_content(.)
|
||||
popup.open()
|
||||
@@ -83,8 +83,8 @@
|
||||
. = ..()
|
||||
var/area/A = get_area()
|
||||
if(get_area_type() == AREA_STATION)
|
||||
. += "<p>According to \the [src], you are now in <b>\"[strip_html_properly(A.name)]\"</b>.</p>"
|
||||
. += "<p>You may <a href='?src=\ref[src];edit_area=1'> move an amendment</a> to the drawing.</p>"
|
||||
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
|
||||
. += "<p>You may <a href='?src=\ref[src];edit_area=1'>move an amendment</a> to the drawing.</p>"
|
||||
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
|
||||
popup.set_content(.)
|
||||
popup.open()
|
||||
|
||||
@@ -97,10 +97,7 @@
|
||||
|
||||
/obj/item/toy/crayon/spraycan/New()
|
||||
..()
|
||||
if(gang)
|
||||
name = "Modified Paint Applicator"
|
||||
else
|
||||
name = "NanoTrasen-brand Rapid Paint Applicator"
|
||||
name = "spray can"
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/examine(mob/user)
|
||||
@@ -116,7 +113,7 @@
|
||||
if("Toggle Cap")
|
||||
user << "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>"
|
||||
capped = capped ? 0 : 1
|
||||
icon_state = "spraycan[gang ? "_gang" : ""][capped ? "_cap" : ""]"
|
||||
icon_state = "spraycan[capped ? "_cap" : ""]"
|
||||
update_icon()
|
||||
if("Change Drawing")
|
||||
..()
|
||||
@@ -155,8 +152,7 @@
|
||||
overlays += I
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang
|
||||
desc = "A suspicious-looking spraycan modified to use special paint used by gangsters to mark territory."
|
||||
icon_state = "spraycan_gang_cap"
|
||||
desc = "A modified container containing suspicious paint."
|
||||
gang = 1
|
||||
uses = 20
|
||||
instant = -1
|
||||
|
||||
@@ -904,16 +904,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
if(!user.drop_item())
|
||||
if(!user.unEquip(I))
|
||||
return 0
|
||||
I.loc = src
|
||||
id = I
|
||||
else
|
||||
var/obj/item/weapon/card/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
|
||||
var/obj/old_id = id
|
||||
if(!user.drop_item())
|
||||
if(!user.unEquip(I))
|
||||
return 0
|
||||
var/obj/old_id = id
|
||||
I.loc = src
|
||||
id = I
|
||||
user.put_in_hands(old_id)
|
||||
@@ -924,7 +924,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
..()
|
||||
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
|
||||
cartridge = C
|
||||
if(!user.drop_item())
|
||||
if(!user.unEquip(C))
|
||||
return
|
||||
cartridge.loc = src
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
@@ -952,7 +952,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
else if(istype(C, /obj/item/device/paicard) && !src.pai)
|
||||
if(!user.drop_item())
|
||||
if(!user.unEquip(C))
|
||||
return
|
||||
C.loc = src
|
||||
pai = C
|
||||
@@ -963,7 +963,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(O)
|
||||
user << "<span class='warning'>There is already a pen in \the [src]!</span>"
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.unEquip(C))
|
||||
return
|
||||
C.loc = src
|
||||
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
|
||||
@@ -1032,7 +1032,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
note = replacetext(note, "<li>", "\[*\]")
|
||||
note = replacetext(note, "<ul>", "\[list\]")
|
||||
note = replacetext(note, "</ul>", "\[/list\]")
|
||||
note = strip_html_properly(note)
|
||||
note = html_encode(note)
|
||||
notescanned = 1
|
||||
user << "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" //concept of scanning paper copyright brainoblivion 2009
|
||||
|
||||
@@ -1186,7 +1186,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
//ntrc handler proc
|
||||
/obj/item/device/pda/proc/msg_chat(channel as text, sender as text, message as text)
|
||||
var/msg = "<b>[strip_html_properly(sender)]</b>| [strip_html_properly(message)]<br>"
|
||||
var/msg = "<b>[html_encode(sender)]</b>| [html_encode(message)]<br>"
|
||||
if(!channel)
|
||||
for(var/C in ntrclog)
|
||||
ntrclog[C] = msg + ntrclog[C]
|
||||
|
||||
@@ -331,7 +331,7 @@ Code:
|
||||
var/count = 0
|
||||
for(var/obj/machinery/computer/monitor/pMon in powermonitors)
|
||||
count++
|
||||
menu += "<a href='byond://?src=\ref[src];choice=Power Select;target=[count]'> [pMon] </a><BR>"
|
||||
menu += "<a href='byond://?src=\ref[src];choice=Power Select;target=[count]'>[pMon] </a><BR>"
|
||||
|
||||
menu += "</FONT>"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ var/list/chatchannels = list(default_ntrc_chatroom.name = default_ntrc_chatroom)
|
||||
/datum/chatroom/proc/send_message(client,nick,message) //standard message
|
||||
if(!message)
|
||||
return 0
|
||||
logs.Insert(1,"[strip_html_properly(nick)]> [strip_html_properly(message)]")
|
||||
logs.Insert(1,"[html_encode(nick)]> [html_encode(message)]")
|
||||
log_chat("[usr]/([usr.ckey]) as [nick] sent to [name]: [message]")
|
||||
events.fireEvent("msg_chat",name,nick,message)
|
||||
return 1
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.radio_enabled ? "Disable" : "Enable"] Subspace Radio</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'>Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
onclose(user, "aicard")
|
||||
return
|
||||
|
||||
@@ -30,23 +30,24 @@
|
||||
..()
|
||||
SSobj.processing += src
|
||||
|
||||
|
||||
/obj/item/device/multitool/ai_detect/Destroy()
|
||||
SSobj.processing -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/multitool/ai_detect/process()
|
||||
|
||||
if(track_delay > world.time)
|
||||
return
|
||||
|
||||
var/found_eye = 0
|
||||
var/turf/our_turf = get_turf(src)
|
||||
|
||||
if(cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
for(var/mob/living/silicon/ai/AI in ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
found_eye = 1
|
||||
break
|
||||
|
||||
if(!found_eye && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
@@ -62,4 +63,3 @@
|
||||
|
||||
track_delay = world.time + 10 // 1 second
|
||||
return
|
||||
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
//gangtool device
|
||||
/obj/item/device/gangtool
|
||||
name = "suspicious device"
|
||||
desc = "A strange device of sorts. Hard to really make out what it actually does just by looking."
|
||||
icon_state = "recaller"
|
||||
item_state = "walkietalkie"
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
var/gang //Which gang uses this?
|
||||
var/boss = 1 //If it has the power to promote gang members
|
||||
var/recalling = 0
|
||||
var/promotions = 0
|
||||
|
||||
/obj/item/device/gangtool/New() //Initialize supply point income if it hasn't already been started
|
||||
if(!ticker.mode.gang_points)
|
||||
ticker.mode.gang_points = new /datum/gang_points(ticker.mode)
|
||||
ticker.mode.gang_points.start()
|
||||
if(boss)
|
||||
desc += " Looks important."
|
||||
|
||||
/obj/item/device/gangtool/attack_self(mob/user)
|
||||
if (!can_use(user))
|
||||
return
|
||||
|
||||
var/dat
|
||||
if(!gang)
|
||||
dat += "This device is not registered.<br>"
|
||||
if(user.mind in (ticker.mode.A_bosses | ticker.mode.B_bosses))
|
||||
dat += "Give this device to another member of your organization to use.<br>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
|
||||
else
|
||||
var/gang_size = ((gang == "A")? (ticker.mode.A_gang.len + ticker.mode.A_bosses.len) : (ticker.mode.B_gang.len + ticker.mode.B_bosses.len))
|
||||
var/gang_territory = ((gang == "A")? ticker.mode.A_territory.len : ticker.mode.B_territory.len)
|
||||
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
|
||||
|
||||
dat += "Registration: <B>[(gang == "A")? gang_name("A") : gang_name("B")] Gang [boss ? "Administrator" : "Lieutenant"]</B><br>"
|
||||
dat += "Organization Size: <B>[gang_size]</B><br>"
|
||||
dat += "Station Control: <B>[round((gang_territory/start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "Influence: <B>[points]</B><br>"
|
||||
dat += "Time until Influence grows: <B>[(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
|
||||
dat += "<B>Purchase Items:</B><br>"
|
||||
|
||||
dat += "(5 Influence) "
|
||||
if(points >= 5)
|
||||
dat += "<a href='?src=\ref[src];choice=ping'>Send Gang-wide Message</a><br>"
|
||||
else
|
||||
dat += "Send Gang-wide Message<br>"
|
||||
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=spraycan'><b>Territory Spraycan</b></a><br>"
|
||||
else
|
||||
dat += "<b>Territory Spraycan</b><br>"
|
||||
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=switchblade'>Switchblade</a><br>"
|
||||
else
|
||||
dat += "Switchblade<br>"
|
||||
|
||||
dat += "(25 Influence) "
|
||||
if(points >= 25)
|
||||
dat += "<a href='?src=\ref[src];purchase=pistol'>10mm Pistol</a><br>"
|
||||
else
|
||||
dat += "10mm Pistol<br>"
|
||||
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=ammo'>10mm Ammo</a><br>"
|
||||
else
|
||||
dat += "10mm Ammo<br>"
|
||||
|
||||
dat += "(40 Influence) "
|
||||
if(points >= 40)
|
||||
dat += "<a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
|
||||
else
|
||||
dat += "Recruitment Pen<br>"
|
||||
|
||||
if(boss)
|
||||
if(promotions >= 3)
|
||||
dat += "(Out of stock) Promote a Gangster<br>"
|
||||
else
|
||||
dat += "([(promotions*20)+10] Influence, [3-promotions] left) "
|
||||
if(points >= (promotions*20)+10)
|
||||
dat += "<a href='?src=\ref[src];purchase=gangtool'>Promote a Gangster</a><br>"
|
||||
else
|
||||
dat += "Promote a Gangster<br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
|
||||
|
||||
var/datum/browser/popup = new(user, "gangtool", "Welcome to GangTool v0.4")
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/item/device/gangtool/Topic(href, href_list)
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["register"])
|
||||
register_device(usr)
|
||||
|
||||
else if(!gang) //Gangtool must be registered before you can use the functions below
|
||||
return
|
||||
|
||||
if(href_list["purchase"])
|
||||
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
|
||||
var/item_type
|
||||
switch(href_list["purchase"])
|
||||
if("spraycan")
|
||||
if(points >= 10)
|
||||
item_type = /obj/item/toy/crayon/spraycan/gang
|
||||
points = 10
|
||||
if("switchblade")
|
||||
if(points >= 10)
|
||||
item_type = /obj/item/weapon/switchblade
|
||||
points = 10
|
||||
if("pistol")
|
||||
if(points >= 25)
|
||||
item_type = /obj/item/weapon/gun/projectile/automatic/pistol
|
||||
points = 25
|
||||
if("ammo")
|
||||
if(points >= 10)
|
||||
item_type = /obj/item/ammo_box/magazine/m10mm
|
||||
points = 10
|
||||
if("pen")
|
||||
if(points >= 40)
|
||||
item_type = /obj/item/weapon/pen/gang
|
||||
points = 40
|
||||
if("gangtool")
|
||||
if((promotions < 3) && (points >= (promotions*20)+10))
|
||||
item_type = /obj/item/device/gangtool/lt
|
||||
points = (promotions*20)+10
|
||||
promotions++
|
||||
|
||||
if(item_type)
|
||||
if(gang == "A")
|
||||
ticker.mode.gang_points.A -= points
|
||||
else if(gang == "B")
|
||||
ticker.mode.gang_points.B -= points
|
||||
var/obj/purchased = new item_type(get_turf(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.put_in_any_hand_if_possible(purchased)
|
||||
ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "A [href_list["purchase"]] was purchased by [usr] for [points] Influence.")
|
||||
log_game("A [href_list["purchase"]] was purchased by [key_name(usr)] for [points] Influence.")
|
||||
|
||||
else if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("recall")
|
||||
recall(usr)
|
||||
if("ping")
|
||||
ping_gang(usr)
|
||||
attack_self(usr)
|
||||
|
||||
|
||||
/obj/item/device/gangtool/proc/ping_gang(var/mob/user)
|
||||
if(!user)
|
||||
return
|
||||
var/message = stripped_input(user,"Discreetly send a gang-wide message.","Send Message") as null|text
|
||||
if(!message || (message == "") || !can_use(user))
|
||||
return
|
||||
if(user.z > 2)
|
||||
user << "<span class='info'>\icon[src]Error: Station out of range.</span>"
|
||||
return
|
||||
var/list/members = list()
|
||||
if(gang == "A")
|
||||
if(ticker.mode.gang_points.A >= 5)
|
||||
members += ticker.mode.A_bosses | ticker.mode.A_gang
|
||||
ticker.mode.gang_points.A -= 5
|
||||
else if(gang == "B")
|
||||
if(ticker.mode.gang_points.B >= 5)
|
||||
members += ticker.mode.B_bosses | ticker.mode.B_gang
|
||||
ticker.mode.gang_points.B -= 5
|
||||
if(members.len)
|
||||
for(var/datum/mind/ganger in members)
|
||||
if(ganger.current.z <= 2)
|
||||
ganger.current << "<span class='danger'><b>BOSS:</b> [message]</span>"
|
||||
message_admins("[key_name_admin(user)] sent a global message to the [gang_name(gang)] Gang ([gang]): [message].")
|
||||
log_game("[key_name(user)] sent a global message to the [gang_name(gang)] Gang ([gang]): [message].")
|
||||
|
||||
|
||||
/obj/item/device/gangtool/proc/register_device(var/mob/user)
|
||||
if(jobban_isbanned(user, "gangster") || jobban_isbanned(user, "Syndicate"))
|
||||
user << "<span class='warning'>\icon[src] ACCESS DENIED: Blacklisted user.</span>"
|
||||
return 0
|
||||
|
||||
var/promoted
|
||||
if(user.mind in (ticker.mode.A_gang | ticker.mode.A_bosses))
|
||||
ticker.mode.A_tools += src
|
||||
gang = "A"
|
||||
if(!(user.mind in ticker.mode.A_bosses))
|
||||
ticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
ticker.mode.A_bosses += user.mind
|
||||
user.mind.special_role = "[gang_name("A")] Gang (A) Lieutenant"
|
||||
ticker.mode.update_gang_icons_added(user.mind, "A")
|
||||
log_game("[key_name(user)] has been promoted to Lieutenant in the [gang_name("A")] Gang (A)")
|
||||
promoted = 1
|
||||
else if(user.mind in (ticker.mode.B_gang | ticker.mode.B_bosses))
|
||||
ticker.mode.B_tools += src
|
||||
gang = "B"
|
||||
if(!(user.mind in ticker.mode.B_bosses))
|
||||
ticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
ticker.mode.B_bosses += user.mind
|
||||
user.mind.special_role = "[gang_name("B")] Gang (B) Lieutenant"
|
||||
ticker.mode.update_gang_icons_added(user.mind, "B")
|
||||
log_game("[key_name(user)] has been promoted to Lieutenant in the [gang_name("B")] Gang (B)")
|
||||
promoted = 1
|
||||
if(promoted)
|
||||
ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "[user] has been promoted to Lieutenant.")
|
||||
user << "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>"
|
||||
ticker.mode.forge_gang_objectives(user.mind)
|
||||
ticker.mode.greet_gang(user.mind,0)
|
||||
user << "The <b>Gangtool</b> you registered will allow you to use your gang's influence to purchase items and prevent the station from evacuating before your gang can take over. Use it to recall the emergency shuttle from anywhere on the station."
|
||||
user << "You may also now use <b>recruitment pens</b> to grow your gang membership. Use them on unsuspecting crew members to recruit them."
|
||||
if(!gang)
|
||||
usr << "<span class='warning'>ACCESS DENIED: Unauthorized user.</span>"
|
||||
|
||||
/obj/item/device/gangtool/proc/recall(mob/user)
|
||||
if(recalling || !can_use(user))
|
||||
return
|
||||
|
||||
recalling = 1
|
||||
loc << "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>"
|
||||
|
||||
sleep(rand(10,30))
|
||||
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_CALL) //Shuttle can only be recalled when it's moving to the station
|
||||
user << "<span class='info'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>"
|
||||
recalling = 0
|
||||
return
|
||||
loc << "<span class='info'>\icon[src]Shuttle recall order generated. Accessing station long-range communication arrays...</span>"
|
||||
|
||||
sleep(rand(10,30))
|
||||
|
||||
var/turf/userturf = get_turf(user)
|
||||
if(userturf.z != 1) //Shuttle can only be recalled while on station
|
||||
user << "<span class='info'>\icon[src]Error: Device out of range of station communication arrays.</span>"
|
||||
recalling = 0
|
||||
return
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
if((100 * start_state.score(end_state)) < 70) //Shuttle cannot be recalled if the station is too damaged
|
||||
user << "<span class='info'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>"
|
||||
recalling = 0
|
||||
return
|
||||
loc << "<span class='info'>\icon[src]Comm arrays accessed. Broadcasting recall signal...</span>"
|
||||
|
||||
sleep(rand(10,30))
|
||||
|
||||
recalling = 0
|
||||
log_game("[key_name(user)] has tried to recall the shuttle with a gangtool.")
|
||||
message_admins("[key_name_admin(user)] has tried to recall the shuttle with a gangtool.", 1)
|
||||
if(!SSshuttle.cancelEvac(user))
|
||||
loc << "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>"
|
||||
|
||||
/obj/item/device/gangtool/proc/can_use(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.restrained() || user.lying || user.stat || user.stunned || user.weakened)
|
||||
return
|
||||
if(!(src in user.contents))
|
||||
return
|
||||
|
||||
var/success
|
||||
if(user.mind)
|
||||
if(gang)
|
||||
if((gang == "A") && (user.mind in ticker.mode.A_bosses))
|
||||
success = 1
|
||||
else if((gang == "B") && (user.mind in ticker.mode.B_bosses))
|
||||
success = 1
|
||||
else
|
||||
success = 1
|
||||
if(success)
|
||||
return 1
|
||||
user << "<span class='warning'>\icon[src] ACCESS DENIED: Unauthorized user.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/device/gangtool/lt
|
||||
boss = 0
|
||||
@@ -80,10 +80,10 @@ MASS SPECTROMETER
|
||||
|
||||
/obj/item/device/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanchems)
|
||||
user << "<span class = 'notice'>You switch the health analyzer to scan chemical contents.</span>"
|
||||
user << "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>"
|
||||
scanchems = 1
|
||||
else
|
||||
user << "<span class = 'notice'>You switch the health analyzer to check physical health.</span>"
|
||||
user << "<span class='notice'>You switch the health analyzer to check physical health.</span>"
|
||||
scanchems = 0
|
||||
return
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/carbon/human/user as mob)
|
||||
@@ -198,9 +198,9 @@ MASS SPECTROMETER
|
||||
if(H.reagents.reagent_list.len)
|
||||
user << "<span class='notice'>Subject contains the following reagents:</span>"
|
||||
for(var/datum/reagent/R in H.reagents.reagent_list)
|
||||
user << "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class = 'boldannounce'>OVERDOSING</span>" : ".</span>"]"
|
||||
user << "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]"
|
||||
else
|
||||
user << "<span class = 'notice'>Subject contains no reagents.</span>"
|
||||
user << "<span class='notice'>Subject contains no reagents.</span>"
|
||||
if(H.reagents.addiction_list.len)
|
||||
user << "<span class='boldannounce'>Subject is addicted to the following reagents:</span>"
|
||||
for(var/datum/reagent/R in H.reagents.addiction_list)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [strip_html_properly(message)]"
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [html_encode(message)]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
|
||||
@@ -153,6 +153,8 @@
|
||||
charging = 0
|
||||
|
||||
/obj/item/holotape/Bumped(var/mob/M)
|
||||
if(!ismob(M))
|
||||
return
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.m_intent == "walk")
|
||||
@@ -227,11 +229,11 @@
|
||||
|
||||
/obj/item/holotape/proc/breaktape()
|
||||
var/dir[2]
|
||||
var/icon_dir = src.icon_state
|
||||
if(icon_dir == "[src.icon_base]_h")
|
||||
var/icon_dir = icon_state
|
||||
if(icon_dir == "[icon_base]_h")
|
||||
dir[1] = EAST
|
||||
dir[2] = WEST
|
||||
if(icon_dir == "[src.icon_base]_v")
|
||||
if(icon_dir == "[icon_base]_v")
|
||||
dir[1] = NORTH
|
||||
dir[2] = SOUTH
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
item_state = "latexballon"
|
||||
user.update_inv_r_hand()
|
||||
user.update_inv_l_hand()
|
||||
user << "<span class='notice'> You blow up [src] with [tank].</span>"
|
||||
user << "<span class='notice'>You blow up [src] with [tank].</span>"
|
||||
air_contents = tank.remove_air_volume(3)
|
||||
|
||||
/obj/item/latexballon/proc/burst()
|
||||
|
||||
@@ -8,18 +8,4 @@
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
var/perunit = MINERAL_MATERIAL_AMOUNT
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
|
||||
|
||||
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
|
||||
// item/attackby() properly, making this unnecessary
|
||||
|
||||
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
|
||||
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
|
||||
if(!S.mode)
|
||||
S.add(src,user)
|
||||
else
|
||||
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
|
||||
S.add(stack,user)
|
||||
..()*/
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
@@ -168,7 +168,7 @@
|
||||
src.bullets--
|
||||
user.visible_message("<span class='danger'>[user] fires [src] at [target]!</span>", \
|
||||
"<span class='danger'>You fire [src] at [target]!</span>", \
|
||||
"<span class='italics'> You hear a gunshot!</span>")
|
||||
"<span class='italics'>You hear a gunshot!</span>")
|
||||
|
||||
/obj/item/toy/ammo/gun
|
||||
name = "capgun ammo"
|
||||
@@ -533,7 +533,7 @@
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
src.visible_message("<span class='suicide'> The [src.name] explodes!</span>","<span class='italics'>You hear a snap!</span>")
|
||||
src.visible_message("<span class='suicide'>The [src.name] explodes!</span>","<span class='italics'>You hear a snap!</span>")
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -239,11 +239,13 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
target.clear_inherent_laws()
|
||||
target.clear_zeroth_law(0)
|
||||
|
||||
/******************* Full Core Boards *******************/
|
||||
|
||||
/obj/item/weapon/aiModule/core/full/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) //These boards replace inherent laws.
|
||||
target.clear_inherent_laws()
|
||||
target.clear_zeroth_law(0)
|
||||
..()
|
||||
|
||||
/******************** Asimov ********************/
|
||||
|
||||
@@ -185,8 +185,5 @@
|
||||
/obj/item/weapon/melee/energy/blade/dropped()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/proc/throw()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
|
||||
return
|
||||
|
||||
@@ -335,3 +335,17 @@
|
||||
..()
|
||||
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = 1
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
|
||||
@@ -68,11 +68,9 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
|
||||
/obj/item/weapon/storage/book/bible/proc/setupbiblespecifics(var/obj/item/weapon/storage/book/bible/B, var/mob/living/carbon/human/H)
|
||||
switch(B.icon_state)
|
||||
if("honk1","honk2")
|
||||
new /obj/item/weapon/grown/bananapeel(B)
|
||||
new /obj/item/weapon/grown/bananapeel(B)
|
||||
|
||||
if(B.icon_state == "honk1")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
|
||||
new /obj/item/weapon/bikehorn(B)
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
|
||||
|
||||
if("bible")
|
||||
for(var/area/chapel/main/A in world)
|
||||
@@ -204,11 +202,11 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
|
||||
A.reagents.del_reagent("water")
|
||||
A.reagents.add_reagent("holywater",water2holy)
|
||||
if(A.reagents && A.reagents.has_reagent("unholywater")) //yeah yeah, copy pasted code - sue me
|
||||
user << "<span class='notice'> You purify [A].</span>"
|
||||
user << "<span class='notice'>You purify [A].</span>"
|
||||
var/unholy2clean = A.reagents.get_reagent_amount("unholywater")
|
||||
A.reagents.del_reagent("unholywater")
|
||||
A.reagents.add_reagent("holywater",unholy2clean)
|
||||
|
||||
/obj/item/weapon/storage/book/bible/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
*/
|
||||
/obj/item/weapon/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by NanoTrasen."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
@@ -162,6 +163,7 @@
|
||||
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
|
||||
/obj/item/weapon/weldingtool/New()
|
||||
..()
|
||||
@@ -223,7 +225,8 @@
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
SSobj.processing.Remove(src)
|
||||
if(!can_off_process)
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
@@ -369,6 +372,7 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
g_amt = 60
|
||||
@@ -382,6 +386,7 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = 1
|
||||
@@ -395,6 +400,7 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/hugetank
|
||||
name = "upgraded industrial welding tool"
|
||||
desc = "An upgraded welder based of the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
@@ -404,19 +410,22 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
m_amt = 70
|
||||
g_amt = 120
|
||||
origin_tech = "engineering=4;plasmatech=3"
|
||||
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=3"
|
||||
var/last_gen = 0
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
|
||||
|
||||
//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
|
||||
//i don't think this is actually used, yaaaaay -Pete
|
||||
/obj/item/weapon/weldingtool/experimental/proc/fuel_gen()
|
||||
if(!last_gen)
|
||||
if(!welding && !last_gen)
|
||||
last_gen = 1
|
||||
reagents.add_reagent("welding_fuel",1)
|
||||
spawn(10)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/weapon/banhammer/attack(mob/M, mob/user)
|
||||
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
|
||||
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
|
||||
user << "<font color='red'>You have <b>BANNED</b> [M]</font>"
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj
|
||||
languages = HUMAN
|
||||
//var/datum/module/mod //not used
|
||||
var/crit_fail = 0
|
||||
var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj.
|
||||
animate_movement = 2
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/structure
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
pressure_resistance = 8
|
||||
|
||||
/obj/structure/blob_act()
|
||||
if(prob(50))
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
/obj/structure/AIcore
|
||||
density = 1
|
||||
anchored = 0
|
||||
name = "\improper AI core"
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "0"
|
||||
var/state = 0
|
||||
var/datum/ai_laws/laws = new()
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/obj/item/device/mmi/brain = null
|
||||
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start wrenching the frame into place...</span>"
|
||||
if(do_after(user, 20))
|
||||
user << "<span class='notice'>You wrench the frame into place.</span>"
|
||||
anchored = 1
|
||||
state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.isOn())
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to deconstruct the frame...</span>"
|
||||
if(do_after(user, 20))
|
||||
if(!src || !WT.remove_fuel(0, user)) return
|
||||
user << "<span class='notice'>You deconstruct the frame.</span>"
|
||||
new /obj/item/stack/sheet/plasteel( loc, 4)
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to unfasten the frame...</span>"
|
||||
if(do_after(user, 20))
|
||||
user << "<span class='notice'>You unfasten the frame.</span>"
|
||||
anchored = 0
|
||||
state = 0
|
||||
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
|
||||
icon_state = "1"
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You screw the circuit board into place.</span>"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
if(istype(P, /obj/item/weapon/crowbar) && circuit)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the circuit board.</span>"
|
||||
state = 1
|
||||
icon_state = "0"
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to add cables to the frame...</span>"
|
||||
if(do_after(user, 20))
|
||||
if (C.get_amount() >= 5 && state == 2)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the AI core!</span>"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if (brain)
|
||||
user << "<span class='warning'>Get that brain out of there first!</span>"
|
||||
else
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
var/obj/item/stack/sheet/rglass/G = P
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to put in the glass panel...</span>"
|
||||
if(do_after(user, 20))
|
||||
if (G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
user << "<span class='notice'>You put in the glass panel.</span>"
|
||||
state = 4
|
||||
icon_state = "4"
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of reinforced glass to insert them into AI core!</span>"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/core/full)) //Allows any full core boards to be applied to AI cores.
|
||||
var/obj/item/weapon/aiModule/core/M = P
|
||||
laws.clear_inherent_laws()
|
||||
laws.clear_zeroth_law(0)
|
||||
for(var/templaw in M.laws)
|
||||
laws.add_inherent_law(templaw)
|
||||
usr << "<span class='notice'>Law module applied.</span>"
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/reset/purge))
|
||||
laws.clear_inherent_laws()
|
||||
laws.clear_zeroth_law(0)
|
||||
usr << "<span class='notice'>Laws cleared applied.</span>"
|
||||
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/supplied/freeform) || istype(P, /obj/item/weapon/aiModule/core/freeformcore))
|
||||
var/obj/item/weapon/aiModule/supplied/freeform/M = P
|
||||
if(M.laws[1] == "")
|
||||
return
|
||||
laws.add_inherent_law(M.laws[1])
|
||||
usr << "<span class='notice'>Added a freeform law.</span>"
|
||||
|
||||
if(istype(P, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = P
|
||||
if(!M.brainmob)
|
||||
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
if(M.brainmob.stat == DEAD)
|
||||
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
|
||||
if(!M.brainmob.client)
|
||||
user << "<span class='warning'>Sticking an inactive brain into the frame would sort of defeat the purpose.</span>"
|
||||
return
|
||||
|
||||
if((config) && (!config.allow_ai))
|
||||
user << "<span class='warning'>This MMI does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(jobban_isbanned(M.brainmob, "AI"))
|
||||
user << "<span class='warning'>This MMI does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(!M.brainmob.mind)
|
||||
user << "<span class='warning'>This MMI is mindless!</span>"
|
||||
return
|
||||
|
||||
ticker.mode.remove_cultist(M.brainmob.mind, 1)
|
||||
ticker.mode.remove_revolutionary(M.brainmob.mind, 1)
|
||||
ticker.mode.remove_gangster(M.brainmob.mind, 1)
|
||||
|
||||
user.drop_item()
|
||||
M.loc = src
|
||||
brain = M
|
||||
usr << "<span class='notice'>Added a brain.</span>"
|
||||
icon_state = "3b"
|
||||
|
||||
if(istype(P, /obj/item/weapon/crowbar) && brain)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the brain.</span>"
|
||||
brain.loc = loc
|
||||
brain = null
|
||||
icon_state = "3"
|
||||
|
||||
if(4)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the glass panel.</span>"
|
||||
state = 3
|
||||
if (brain)
|
||||
icon_state = "3b"
|
||||
else
|
||||
icon_state = "3"
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You connect the monitor.</span>"
|
||||
if(!laws.inherent.len) //If laws isn't set to null but nobody supplied a board, the AI would normally be created lawless. We don't want that.
|
||||
laws = null
|
||||
new /mob/living/silicon/ai (loc, laws, brain)
|
||||
feedback_inc("cyborg_ais_created",1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/AIcore/deactivated
|
||||
name = "inactive AI"
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "ai-empty"
|
||||
anchored = 1
|
||||
state = 20//So it doesn't interact based on the above. Not really necessary.
|
||||
|
||||
/obj/structure/AIcore/deactivated/attackby(var/obj/item/A as obj, var/mob/user as mob, params)
|
||||
if(istype(A, /obj/item/device/aicard))//Is it?
|
||||
A.transfer_ai("INACTIVE","AICARD",src,user)
|
||||
if(istype(A, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \
|
||||
"<span class='notice'>You start to [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor...</span>")
|
||||
switch(anchored)
|
||||
if(0)
|
||||
if(do_after(user, 20))
|
||||
user << "<span class='notice'>You fasten the core into place.</span>"
|
||||
anchored = 1
|
||||
if(1)
|
||||
if(do_after(user, 20))
|
||||
user << "<span class='notice'>You unfasten the core.</span>"
|
||||
anchored = 0
|
||||
return
|
||||
|
||||
/*
|
||||
This is a good place for AI-related object verbs so I'm sticking it here.
|
||||
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
|
||||
That prevents a few funky behaviors.
|
||||
*/
|
||||
//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc.
|
||||
/obj/item/proc/transfer_ai(var/choice as text, var/interaction as text, var/target, var/mob/U as mob)
|
||||
if(istype(src, /obj/item/device/aicard))
|
||||
var/obj/item/device/aicard/icard = src
|
||||
if(icard.flush)
|
||||
U << "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol."
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
if("AICORE")//AI mob.
|
||||
var/mob/living/silicon/ai/T = target
|
||||
if(!T.mind)
|
||||
U << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
|
||||
return
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
if(C.contents.len)//If there is an AI on card.
|
||||
U << "<span class='boldannounce'>Transfer failed</span>: Existing AI found on this terminal. Remove existing AI to install a new one."
|
||||
else
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (T.mind == malfai)
|
||||
U << "<span class='boldannounce'>ERROR</span>: Remote transfer interface disabled."//Do ho ho ho~
|
||||
return
|
||||
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location.
|
||||
T.aiRestorePowerRoutine = 0//So the AI initially has power.
|
||||
T.control_disabled = 1//Can't control things remotely if you're stuck in a card!
|
||||
T.radio_enabled = 0 //No talking on the built-in radio for you either!
|
||||
T.loc = C//Throw AI into the card.
|
||||
C.name = "intelliCard - [T.name]"
|
||||
if (T.stat == 2)
|
||||
C.icon_state = "aicard-404"
|
||||
else
|
||||
C.icon_state = "aicard-full"
|
||||
T.cancel_camera()
|
||||
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
U << "<span class='boldnotice'>Transfer successful</span>: [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
if("INACTIVE")//Inactive AI object.
|
||||
var/obj/structure/AIcore/deactivated/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever.
|
||||
if(A)//If AI exists on the card. Else nothing since both are empty.
|
||||
A.control_disabled = 0
|
||||
A.radio_enabled = 1
|
||||
A.loc = T.loc//To replace the terminal.
|
||||
C.icon_state = "aicard"
|
||||
C.name = "intelliCard"
|
||||
C.overlays.Cut()
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "<span class='boldnotice'>Transfer successful</span>: [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
qdel(T)
|
||||
|
||||
if("AIFIXER")//AI Fixer terminal.
|
||||
var/obj/machinery/computer/aifixer/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
if(!T.contents.len)
|
||||
if (!C.contents.len)
|
||||
U << "No AI to copy over!"//Well duh
|
||||
else for(var/mob/living/silicon/ai/A in C)
|
||||
C.icon_state = "aicard"
|
||||
C.name = "intelliCard"
|
||||
C.overlays.Cut()
|
||||
A.loc = T
|
||||
T.occupier = A
|
||||
A.control_disabled = 1
|
||||
A.radio_enabled = 0
|
||||
if (A.stat == 2)
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
else
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
U << "<span class='boldnotice'>Transfer successful</span>: [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
else
|
||||
if(!C.contents.len && T.occupier && !T.active)
|
||||
C.name = "intelliCard - [T.occupier.name]"
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
if (T.occupier.stat == 2)
|
||||
C.icon_state = "aicard-404"
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
else
|
||||
C.icon_state = "aicard-full"
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.occupier << "You have been downloaded to a mobile storage device. Still no remote access."
|
||||
U << "<span class='boldnotice'>Transfer successful</span>: [T.occupier.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
T.occupier.loc = C
|
||||
T.occupier.cancel_camera()
|
||||
T.occupier = null
|
||||
else if (C.contents.len)
|
||||
U << "<span class='boldannounce'>ERROR</span>: Artificial intelligence detected on terminal."
|
||||
else if (T.active)
|
||||
U << "<span class='boldannounce'>ERROR</span>: Reconstruction in progress."
|
||||
else if (!T.occupier)
|
||||
U << "<span class='boldannounce'>ERROR</span>: Unable to locate artificial intelligence."
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user as mob)
|
||||
if (!src.allowed(user))
|
||||
user << "<span class = 'info'>Access denied.</span>"
|
||||
user << "<span class='info'>Access denied.</span>"
|
||||
return
|
||||
if (broken)
|
||||
user << "<span class ='danger'>The controls seem unresponsive.</span>"
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!allowed(user))
|
||||
user << "<span class = 'info'>Access denied.</span>"
|
||||
user << "<span class='info'>Access denied.</span>"
|
||||
return
|
||||
if( istype(I, /obj/item/weapon/screwdriver))
|
||||
if(!panel_open)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(src.welded || src.locked)
|
||||
if(welded || locked)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -81,32 +81,32 @@
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
O.loc = loc
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
M.loc = loc
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
|
||||
for(var/atom/movable/AM in src.loc)
|
||||
for(var/atom/movable/AM in loc)
|
||||
if(insert(AM) == -1) // limit reached
|
||||
break
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(src.opened)
|
||||
if(opened)
|
||||
return 0
|
||||
if(!src.can_open())
|
||||
if(!can_open())
|
||||
return 0
|
||||
src.dump_contents()
|
||||
dump_contents()
|
||||
|
||||
src.opened = 1
|
||||
opened = 1
|
||||
if(istype(src, /obj/structure/closet/body_bag))
|
||||
playsound(src.loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -139,25 +139,25 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!src.opened)
|
||||
if(!opened)
|
||||
return 0
|
||||
if(!src.can_close())
|
||||
if(!can_close())
|
||||
return 0
|
||||
take_contents()
|
||||
|
||||
src.opened = 0
|
||||
opened = 0
|
||||
if(istype(src, /obj/structure/closet/body_bag))
|
||||
playsound(src.loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 1
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle()
|
||||
if(src.opened)
|
||||
return src.close()
|
||||
return src.open()
|
||||
if(opened)
|
||||
return close()
|
||||
return open()
|
||||
|
||||
/obj/structure/closet/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
@@ -192,9 +192,9 @@
|
||||
return
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
if(src.large)
|
||||
if(large)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
else
|
||||
user << "<span class='notice'>The locker is too small to stuff [W] into!</span>"
|
||||
@@ -210,7 +210,7 @@
|
||||
if( !opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
visible_message("[user] has cut \the [src] apart with \the [WT].", "<span class='italics'>You hear welding.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
@@ -239,10 +239,10 @@
|
||||
user << "<span class='notice'>The locker appears to be broken.</span>"
|
||||
return
|
||||
if(!place(user, W) && !isnull(W))
|
||||
src.attack_hand(user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/proc/place(var/mob/user, var/obj/item/I)
|
||||
if(!src.opened && secure)
|
||||
if(!opened && secure)
|
||||
togglelock(user)
|
||||
return 1
|
||||
return 0
|
||||
@@ -258,21 +258,21 @@
|
||||
return 0
|
||||
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc? Will also check for null loc
|
||||
return 0
|
||||
if(needs_opened && !src.opened)
|
||||
if(needs_opened && !opened)
|
||||
return 0
|
||||
if(istype(O, /obj/structure/closet))
|
||||
return 0
|
||||
if(move_them)
|
||||
step_towards(O, src.loc)
|
||||
step_towards(O, loc)
|
||||
if(show_message && user != O)
|
||||
user.show_viewers("<span class='danger'>[user] stuffs [O] into [src]!</span>")
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user as mob)
|
||||
if(user.stat || !isturf(src.loc))
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
if(!src.open())
|
||||
if(!open())
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
@@ -281,19 +281,20 @@
|
||||
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!src.toggle())
|
||||
return src.attackby(null, user)
|
||||
if(!toggle())
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
@@ -304,7 +305,7 @@
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr))
|
||||
src.attack_hand(usr)
|
||||
attack_hand(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
@@ -322,7 +323,7 @@
|
||||
if(istype(user.loc, /obj/structure/closet/critter) && !welded)
|
||||
breakout_time = 0.75 //45 seconds if it's an unwelded critter crate
|
||||
|
||||
if( opened || (!welded && !locked && !istype(src.loc, /obj/mecha)) )
|
||||
if( opened || (!welded && !locked && !istype(loc, /obj/mecha)) )
|
||||
return //Door's open, not locked or welded or inside a mech, no point in resisting.
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
@@ -332,7 +333,7 @@
|
||||
for(var/mob/O in viewers(src))
|
||||
O << "<span class='warning'>[src] begins to shake violently!</span>"
|
||||
if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded && !istype(src.loc, /obj/mecha)) )
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded && !istype(loc, /obj/mecha)) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
|
||||
@@ -340,11 +341,11 @@
|
||||
locked = 0 //applies to critter crates and secure lockers only
|
||||
broken = 1 //applies to secure lockers only
|
||||
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>", "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
if(istype( src.loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/D = src.loc
|
||||
if(istype( loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/D = loc
|
||||
qdel(D)
|
||||
else if(istype( src.loc, /obj/mecha))
|
||||
src.loc = get_turf(src.loc)
|
||||
else if(istype( loc, /obj/mecha))
|
||||
loc = get_turf(loc)
|
||||
open()
|
||||
else
|
||||
user << "<span class='warning'>You fail to break out of [src]!</span>"
|
||||
@@ -354,7 +355,7 @@
|
||||
if(!user.canUseTopic(user) || broken)
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(src.opened || !secure || !in_range(src, user))
|
||||
if(opened || !secure || !in_range(src, user))
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
@@ -364,20 +365,20 @@
|
||||
O.emp_act(severity)
|
||||
if(secure && !broken)
|
||||
if(prob(50/severity))
|
||||
src.locked = !src.locked
|
||||
src.update_icon()
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20/severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/proc/togglelock(mob/user as mob)
|
||||
if(secure)
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.eye_blind )))
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
if (isrobot(user) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "<span class = 'caution'> Resetting circuitry...</span>"
|
||||
user << "<span class='caution'>Resetting circuitry...</span>"
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
src.locked = 0
|
||||
user << "<span class = 'caution'> You disable the locking modules.</span>"
|
||||
user << "<span class='caution'>You disable the locking modules.</span>"
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
@@ -43,7 +43,7 @@
|
||||
user.do_attack_animation(src)
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "<span class = 'warning'> The cabinet's protective glass glances off the hit.</span>"
|
||||
user << "<span class='warning'>The cabinet's protective glass glances off the hit.</span>"
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
@@ -56,12 +56,12 @@
|
||||
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "<span class = 'warning'> Unwield the axe first.</span>"
|
||||
user << "<span class='warning'>Unwield the axe first.</span>"
|
||||
return
|
||||
fireaxe = O
|
||||
user.drop_item()
|
||||
src.contents += O
|
||||
user << "<span class = 'caution'> You place the fire axe back in the [src.name].</span>"
|
||||
user << "<span class='caution'>You place the fire axe back in the [src.name].</span>"
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
@@ -84,11 +84,11 @@
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "<span class = 'caution'> Resetting circuitry...</span>"
|
||||
user << "<span class='caution'>Resetting circuitry...</span>"
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
src.locked = 1
|
||||
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
|
||||
user << "<span class='caution'>You re-enable the locking modules.</span>"
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
@@ -144,13 +144,13 @@
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"<span class = 'warning'> The cabinet won't budge!</span>"
|
||||
user <<"<span class='warning'>The cabinet won't budge!</span>"
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "<span class = 'caution'> You take the fire axe from the [name].</span>"
|
||||
user << "<span class='caution'>You take the fire axe from the [name].</span>"
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
@@ -177,7 +177,7 @@
|
||||
/obj/structure/closet/fireaxecabinet/attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.loc = loc
|
||||
user << "<span class = 'caution'> You telekinetically remove the fire axe.</span>"
|
||||
user << "<span class='caution'>You telekinetically remove the fire axe.</span>"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -221,14 +221,14 @@
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "<span class = 'warning'> The security of the cabinet is compromised.</span>"
|
||||
user << "<span class='warning'>The security of the cabinet is compromised.</span>"
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "<span class = 'caution'> Cabinet locked.</span>"
|
||||
user << "<span class='caution'>Cabinet locked.</span>"
|
||||
else
|
||||
user << "<span class = 'caution'> Cabinet unlocked.</span>"
|
||||
user << "<span class='caution'>Cabinet unlocked.</span>"
|
||||
return
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
|
||||
|
||||
@@ -311,6 +311,8 @@
|
||||
new /obj/item/weapon/storage/backpack/chemistry(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/weapon/storage/bag/chemistry(src)
|
||||
new /obj/item/weapon/storage/bag/chemistry(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
|
||||
if(mineral && mineral != "glass")
|
||||
mineral = null //I know this is stupid, but until we change glass to a boolean it's how this code works.
|
||||
user << "<span class='notice'> You change the paintjob on the airlock assembly.</span>"
|
||||
user << "<span class='notice'>You change the paintjob on the airlock assembly.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
@@ -448,7 +448,7 @@
|
||||
if(do_after(user, 40))
|
||||
if( !WT.isOn() )
|
||||
return
|
||||
user << "<span class='notice'> You disassemble the airlock assembly.</span>"
|
||||
user << "<span class='notice'>You disassemble the airlock assembly.</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
||||
if (mineral)
|
||||
if (mineral == "glass")
|
||||
@@ -480,7 +480,7 @@
|
||||
if(do_after(user, 40))
|
||||
if( src.anchored )
|
||||
return
|
||||
user << "<span class='notice'> You secure the airlock assembly.</span>"
|
||||
user << "<span class='notice'>You secure the airlock assembly.</span>"
|
||||
src.name = "secured airlock assembly"
|
||||
src.anchored = 1
|
||||
else
|
||||
@@ -494,7 +494,7 @@
|
||||
if(do_after(user, 40))
|
||||
if( !src.anchored )
|
||||
return
|
||||
user << "<span class='notice'> You unsecure the airlock assembly.</span>"
|
||||
user << "<span class='notice'>You unsecure the airlock assembly.</span>"
|
||||
src.name = "airlock assembly"
|
||||
src.anchored = 0
|
||||
|
||||
@@ -520,7 +520,7 @@
|
||||
if(do_after(user, 40))
|
||||
if( src.state != 1 )
|
||||
return
|
||||
user << "<span class='notice'> You cut the wires from the airlock assembly.</span>"
|
||||
user << "<span class='notice'>You cut the wires from the airlock assembly.</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
@@ -535,7 +535,7 @@
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "<span class='notice'> You install the airlock electronics.</span>"
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
src.state = 2
|
||||
src.name = "near finished airlock assembly"
|
||||
src.electronics = W
|
||||
@@ -549,7 +549,7 @@
|
||||
if(do_after(user, 40))
|
||||
if( src.state != 2 )
|
||||
return
|
||||
user << "<span class='notice'> You remove the airlock electronics.</span>"
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
@@ -614,7 +614,7 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(src.loc && state == 2)
|
||||
user << "<span class='notice'> You finish the airlock.</span>"
|
||||
user << "<span class='notice'>You finish the airlock.</span>"
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(mineral == "glass")
|
||||
door = new src.glass_type( src.loc )
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
user << "<span class='warning'>[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(mop, 5) //
|
||||
user << "<span class='notice'>You wet [mop] in [src].</span>"
|
||||
|
||||
@@ -106,7 +106,20 @@
|
||||
name = "magic mirror"
|
||||
desc = "Turn and face the strange... face."
|
||||
icon_state = "magic_mirror"
|
||||
var/list/races_blacklist = list("skeleton")
|
||||
var/list/choosable_races = list()
|
||||
|
||||
/obj/structure/mirror/magic/New()
|
||||
if(!choosable_races.len)
|
||||
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
|
||||
if(!(S.id in races_blacklist))
|
||||
choosable_races += S
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/badmin/New()
|
||||
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
|
||||
choosable_races += S
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user as mob)
|
||||
if(!ishuman(user))
|
||||
@@ -130,7 +143,7 @@
|
||||
|
||||
if("race")
|
||||
var/newrace
|
||||
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in species_list
|
||||
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races
|
||||
newrace = species_list[racechoice]
|
||||
|
||||
if(!newrace || !H.dna)
|
||||
@@ -150,7 +163,7 @@
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
|
||||
H.dna.mutant_color = sanitize_hexcolor(new_mutantcolor)
|
||||
H.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
|
||||
else
|
||||
H << "<span class='notice'>Invalid color. Your color is not bright enough.</span>"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
pressure_resistance = 5
|
||||
flags = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
|
||||
@@ -348,20 +348,20 @@
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'> You begin to tighten \the [src] to the floor...</span>"
|
||||
user << "<span class='notice'>You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You tighten \the [src]'s casters. Now it can be played again.</span>", \
|
||||
"<span class='notice'>You tighten \the [src]'s casters. Now it can be played again.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'> You begin to loosen \the [src]'s casters...</span>"
|
||||
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You loosen \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='notice'>You loosen \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 0
|
||||
else
|
||||
|
||||
@@ -11,10 +11,18 @@
|
||||
name = "\improper Centcom identification console"
|
||||
desc = "You can use this to change ID's."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "id"
|
||||
icon_state = "computer"
|
||||
|
||||
/obj/structure/showcase/fakeid/New()
|
||||
overlays += "id"
|
||||
overlays += "id_key"
|
||||
|
||||
/obj/structure/showcase/fakesec
|
||||
name = "\improper Centcom security records"
|
||||
desc = "Used to view and edit personnel's security records"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "security"
|
||||
icon_state = "computer"
|
||||
|
||||
/obj/structure/showcase/fakesec/New()
|
||||
overlays += "security"
|
||||
overlays += "security_key"
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
anchored = 1.0
|
||||
pressure_resistance = 5
|
||||
|
||||
/obj/structure/stool/ex_act(severity, target)
|
||||
switch(severity)
|
||||
|
||||
@@ -32,28 +32,37 @@
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one plasteel sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [P] to [src]...</span>"
|
||||
if(do_after(user, 50))
|
||||
P.use(1)
|
||||
new /obj/structure/table/reinforced(src.loc)
|
||||
qdel(src)
|
||||
P.use(1)
|
||||
return
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one metal sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [M] to [src]...</span>"
|
||||
if(do_after(user, 20))
|
||||
M.use(1)
|
||||
new /obj/structure/table(src.loc)
|
||||
qdel(src)
|
||||
M.use(1)
|
||||
return
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one glass sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [G] to [src]...</span>"
|
||||
if(do_after(user, 20))
|
||||
G.use(1)
|
||||
new /obj/structure/table/glass(src.loc)
|
||||
qdel(src)
|
||||
G.use(1)
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
* Wooden Frames
|
||||
@@ -71,17 +80,23 @@
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
||||
var/obj/item/stack/sheet/mineral/wood/W = I
|
||||
if(W.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one wood sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [W] to [src]...</span>"
|
||||
if(do_after(user, 20))
|
||||
W.use(1)
|
||||
new /obj/structure/table/wood(src.loc)
|
||||
qdel(src)
|
||||
W.use(1)
|
||||
return
|
||||
return
|
||||
if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one carpet sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [C] to [src]...</span>"
|
||||
if(do_after(user, 20))
|
||||
C.use(1)
|
||||
new /obj/structure/table/wood/poker(src.loc)
|
||||
qdel(src)
|
||||
C.use(1)
|
||||
return
|
||||
return
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/structure/windoor_assembly/New(dir=NORTH)
|
||||
..()
|
||||
src.ini_dir = src.dir
|
||||
ini_dir = dir
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/windoor_assembly/Destroy()
|
||||
@@ -77,7 +77,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
@@ -93,41 +93,41 @@
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/weapon/wrench) && !anchored)
|
||||
for(var/obj/machinery/door/window/WD in src.loc)
|
||||
if(WD.dir == src.dir)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
user << "<span class='warning'>There is already a windoor in that location!</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || src.anchored)
|
||||
if(!src || anchored)
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in src.loc)
|
||||
if(WD.dir == src.dir)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
user << "<span class='warning'>There is already a windoor in that location!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You secure the windoor assembly.</span>"
|
||||
src.anchored = 1
|
||||
if(src.secure)
|
||||
src.name = "secure anchored windoor assembly"
|
||||
anchored = 1
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
src.name = "anchored windoor assembly"
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !src.anchored)
|
||||
if(!src || !anchored)
|
||||
return
|
||||
user << "<span class='notice'>You unsecure the windoor assembly.</span>"
|
||||
src.anchored = 0
|
||||
if(src.secure)
|
||||
src.name = "secure windoor assembly"
|
||||
anchored = 0
|
||||
if(secure)
|
||||
name = "secure windoor assembly"
|
||||
else
|
||||
src.name = "windoor assembly"
|
||||
name = "windoor assembly"
|
||||
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
@@ -143,27 +143,29 @@
|
||||
|
||||
P.use(2)
|
||||
user << "<span class='notice'>You reinforce the windoor.</span>"
|
||||
src.secure = 1
|
||||
if(src.anchored)
|
||||
src.name = "secure anchored windoor assembly"
|
||||
secure = 1
|
||||
if(anchored)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
src.name = "secure windoor assembly"
|
||||
name = "secure windoor assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "<span class='notice'>You start to wire the windoor assembly...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !src.anchored || src.state != "01")
|
||||
if(!src || !anchored || state != "01")
|
||||
return
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
CC.use(1)
|
||||
if(!CC.use(1))
|
||||
user << "<span class='warning'>You need more cable to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You wire the windoor.</span>"
|
||||
src.state = "02"
|
||||
if(src.secure)
|
||||
src.name = "secure wired windoor assembly"
|
||||
state = "02"
|
||||
if(secure)
|
||||
name = "secure wired windoor assembly"
|
||||
else
|
||||
src.name = "wired windoor assembly"
|
||||
name = "wired windoor assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -171,61 +173,61 @@
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || src.state != "02")
|
||||
if(!src || state != "02")
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You cut the windoor wires.</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
src.name = "secure anchored windoor assembly"
|
||||
state = "01"
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
src.name = "anchored windoor assembly"
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || src.electronics)
|
||||
W.loc = src.loc
|
||||
if(!src || electronics)
|
||||
W.loc = loc
|
||||
return
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
src.name = "near finished windoor assembly"
|
||||
src.electronics = W
|
||||
name = "near finished windoor assembly"
|
||||
electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
W.loc = loc
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !electronics)
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
src.name = "wired windoor assembly"
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
ae.loc = loc
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", src.name, src.created_name,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter the name for the door.", name, created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
@@ -234,37 +236,37 @@
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(!src.electronics)
|
||||
if(!electronics)
|
||||
usr << "<span class='warning'>The assembly is missing electronics!</span>"
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
|
||||
if(src.loc && src.electronics)
|
||||
if(loc && electronics)
|
||||
|
||||
density = 1 //Shouldn't matter but just incase
|
||||
user << "<span class='notice'>You finish the windoor.</span>"
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
if(src.facing == "l")
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.dir = src.dir
|
||||
windoor.dir = dir
|
||||
windoor.density = 0
|
||||
|
||||
if(src.electronics.use_one_access)
|
||||
windoor.req_one_access = src.electronics.conf_access
|
||||
if(electronics.use_one_access)
|
||||
windoor.req_one_access = electronics.conf_access
|
||||
else
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
windoor.req_access = electronics.conf_access
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
@@ -272,19 +274,19 @@
|
||||
|
||||
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(src.loc)
|
||||
if(src.facing == "l")
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.dir = src.dir
|
||||
windoor.dir = dir
|
||||
windoor.density = 0
|
||||
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
windoor.req_access = electronics.conf_access
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
@@ -305,18 +307,18 @@
|
||||
set src in oview(1)
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (src.anchored)
|
||||
if (anchored)
|
||||
usr << "<span class='warning'>It is fastened to the floor; therefore, you can't rotate it!</span>"
|
||||
return 0
|
||||
//if(src.state != "01")
|
||||
//if(state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.dir = turn(src.dir, 270)
|
||||
dir = turn(dir, 270)
|
||||
|
||||
//if(src.state != "01")
|
||||
//if(state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
src.ini_dir = src.dir
|
||||
ini_dir = dir
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -328,11 +330,11 @@
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if(src.facing == "l")
|
||||
if(facing == "l")
|
||||
usr << "<span class='notice'>The windoor will now slide to the right.</span>"
|
||||
src.facing = "r"
|
||||
facing = "r"
|
||||
else
|
||||
src.facing = "l"
|
||||
facing = "l"
|
||||
usr << "<span class='notice'>The windoor will now slide to the left.</span>"
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'> You begin to disassemble [src]...</span>"
|
||||
user << "<span class='notice'>You begin to disassemble [src]...</span>"
|
||||
if(do_after(user, 40))
|
||||
if(disassembled)
|
||||
return //Prevents multiple deconstruction attempts
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
disassembled = 1
|
||||
user << "<span class='notice'> You successfully disassemble [src].</span>"
|
||||
user << "<span class='notice'>You successfully disassemble [src].</span>"
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user