[MIRROR] Ports Rapid Cable Layers from /vg/ and paradise (#2162)
* Ports Rapid Cable Layers from /vg/ and paradise * rej clean up + manual sync * maps and .rej file cleanup * sprite and WGW memes * actual spellchecked memes * some other map fix memes * fuck it, let's just hard sync maps * dumb paperwork shit for maps * Revert "dumb paperwork shit for maps" This reverts commit 8e70bbec0f407c334cd81f5b92aafdb90544ca9d. * *autistic screeching* * REEEEEEEEEEEEEEEEEEEEE * Fuck off I want to do something else
This commit is contained in:
committed by
Poojawa
parent
76f7fcef9a
commit
8a4ddbe8a8
+57
-40
@@ -76,7 +76,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
d2 = text2num( copytext( icon_state, dash+1 ) )
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
var/turf/T = get_turf(src) // hide if turf is not intact
|
||||
|
||||
if(level==1) hide(T.intact)
|
||||
GLOB.cable_list += src //add it to the global cable list
|
||||
@@ -115,14 +115,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
icon_state = "[d1]-[d2]"
|
||||
|
||||
|
||||
// Items usable on a cable :
|
||||
// - Wirecutters : cut it duh !
|
||||
// - Cable coil : merge cables
|
||||
// - Multitool : get the power currently passing through the cable
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user, params)
|
||||
var/turf/T = src.loc
|
||||
/obj/structure/cable/proc/handlecable(obj/item/W, mob/user, params)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
@@ -141,6 +135,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
coil.cable_join(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/twohanded/rcl))
|
||||
var/obj/item/weapon/twohanded/rcl/R = W
|
||||
if(R.loaded)
|
||||
R.loaded.cable_join(src, user)
|
||||
R.is_empty(user)
|
||||
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
if(powernet && (powernet.avail > 0)) // is it powered?
|
||||
to_chat(user, "<span class='danger'>[powernet.avail]W in power network.</span>")
|
||||
@@ -150,6 +150,15 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
// Items usable on a cable :
|
||||
// - Wirecutters : cut it duh !
|
||||
// - Cable coil : merge cables
|
||||
// - Multitool : get the power currently passing through the cable
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user, params)
|
||||
handlecable(W, user, params)
|
||||
|
||||
|
||||
// shock the user with probability prb
|
||||
/obj/structure/cable/proc/shock(mob/user, prb, siemens_coeff = 1)
|
||||
if(!prob(prb))
|
||||
@@ -507,6 +516,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
// General procedures
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
//you can use wires to heal robotics
|
||||
/obj/item/stack/cable_coil/attack(mob/living/carbon/human/H, mob/user)
|
||||
if(!istype(H))
|
||||
@@ -564,11 +574,11 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
return new path (location)
|
||||
|
||||
// called when cable_coil is clicked on a turf
|
||||
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user)
|
||||
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user, dirnew)
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
|
||||
if(!T.can_have_cabling())
|
||||
if(!isturf(T) || T.intact || !T.can_have_cabling())
|
||||
to_chat(user, "<span class='warning'>You can only lay cables on catwalks and plating!</span>")
|
||||
return
|
||||
|
||||
@@ -580,47 +590,50 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
to_chat(user, "<span class='warning'>You can't lay cable at a place that far away!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
var/dirn
|
||||
|
||||
var/dirn
|
||||
if(!dirnew) //If we weren't given a direction, come up with one! (Called as null from catwalk.dm and floor.dm)
|
||||
if(user.loc == T)
|
||||
dirn = user.dir // if laying on the tile we're on, lay in the direction we're facing
|
||||
dirn = user.dir //If laying on the tile we're on, lay in the direction we're facing
|
||||
else
|
||||
dirn = get_dir(T, user)
|
||||
else
|
||||
dirn = dirnew
|
||||
|
||||
for(var/obj/structure/cable/LC in T)
|
||||
if(LC.d2 == dirn && LC.d1 == 0)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
return
|
||||
for(var/obj/structure/cable/LC in T)
|
||||
if(LC.d2 == dirn && LC.d1 == 0)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
return
|
||||
|
||||
var/obj/structure/cable/C = get_new_cable(T)
|
||||
var/obj/structure/cable/C = get_new_cable(T)
|
||||
|
||||
//set up the new cable
|
||||
C.d1 = 0 //it's a O-X node cable
|
||||
C.d2 = dirn
|
||||
C.add_fingerprint(user)
|
||||
C.update_icon()
|
||||
//set up the new cable
|
||||
C.d1 = 0 //it's a O-X node cable
|
||||
C.d2 = dirn
|
||||
C.add_fingerprint(user)
|
||||
C.update_icon()
|
||||
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/PN = new()
|
||||
PN.add_cable(C)
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/PN = new()
|
||||
PN.add_cable(C)
|
||||
|
||||
C.mergeConnectedNetworks(C.d2) //merge the powernet with adjacents powernets
|
||||
C.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
C.mergeConnectedNetworks(C.d2) //merge the powernet with adjacents powernets
|
||||
C.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
|
||||
if(C.d2 & (C.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
C.mergeDiagonalsNetworks(C.d2)
|
||||
if(C.d2 & (C.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
C.mergeDiagonalsNetworks(C.d2)
|
||||
|
||||
use(1)
|
||||
|
||||
use(1)
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new /obj/item/stack/cable_coil(get_turf(C), 1, C.color)
|
||||
C.deconstruct()
|
||||
|
||||
if (C.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
C.deconstruct()
|
||||
return C
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
// or click on a turf that already contains a "node" cable
|
||||
/obj/item/stack/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user)
|
||||
/obj/item/stack/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user, var/showerror = TRUE)
|
||||
var/turf/U = user.loc
|
||||
if(!isturf(U))
|
||||
return
|
||||
@@ -644,7 +657,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
// one end of the clicked cable is pointing towards us
|
||||
if(C.d1 == dirn || C.d2 == dirn)
|
||||
if(!U.can_have_cabling()) //checking if it's a plating or catwalk
|
||||
to_chat(user, "<span class='warning'>You can only lay cables on catwalks and plating!</span>")
|
||||
if (showerror)
|
||||
to_chat(user, "<span class='warning'>You can only lay cables on catwalks and plating!</span>")
|
||||
return
|
||||
if(U.intact) //can't place a cable if it's a plating with a tile on it
|
||||
to_chat(user, "<span class='warning'>You can't lay cable there unless the floor tiles are removed!</span>")
|
||||
@@ -657,7 +671,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
|
||||
for(var/obj/structure/cable/LC in U) // check to make sure there's not a cable there already
|
||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
if (showerror)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
return
|
||||
|
||||
var/obj/structure/cable/NC = get_new_cable (U)
|
||||
@@ -701,7 +716,9 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
if(LC == C) // skip the cable we're interacting with
|
||||
continue
|
||||
if((LC.d1 == nd1 && LC.d2 == nd2) || (LC.d1 == nd2 && LC.d2 == nd1) ) // make sure no cable matches either direction
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
if (showerror)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
var/locked = FALSE
|
||||
var/drainratio = 1
|
||||
|
||||
/obj/machinery/power/rad_collector/anchored
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/power/rad_collector/New()
|
||||
..()
|
||||
GLOB.rad_collectors += src
|
||||
|
||||
@@ -33,6 +33,19 @@
|
||||
|
||||
var/datum/effect_system/spark_spread/sparks
|
||||
|
||||
/obj/machinery/power/emitter/anchored
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/power/emitter/ctf
|
||||
name = "Energy Cannon"
|
||||
active = TRUE
|
||||
active_power_usage = FALSE
|
||||
idle_power_usage = FALSE
|
||||
locked = TRUE
|
||||
req_access_txt = "100"
|
||||
state = 2
|
||||
use_power = FALSE
|
||||
|
||||
/obj/machinery/power/emitter/New()
|
||||
..()
|
||||
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/emitter(null)
|
||||
|
||||
Reference in New Issue
Block a user