mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into zefix
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/*ALL DEFINES RELATED TO CONSTRUCTION, CONSTRUCTING THINGS, OR CONSTRUCTED OBJECTS GO HERE*/
|
||||
|
||||
//Defines for construction states
|
||||
|
||||
//plastic flaps construction states
|
||||
#define PLASTIC_FLAPS_NORMAL 0
|
||||
#define PLASTIC_FLAPS_DETACHED 1
|
||||
@@ -3,15 +3,18 @@
|
||||
//PUBLIC - call these wherever you want
|
||||
|
||||
|
||||
/mob/proc/throw_alert(category, type, severity, obj/new_master)
|
||||
/mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE)
|
||||
|
||||
/* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
|
||||
/*
|
||||
Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
|
||||
category is a text string. Each mob may only have one alert per category; the previous one will be replaced
|
||||
path is a type path of the actual alert type to throw
|
||||
severity is an optional number that will be placed at the end of the icon_state for this alert
|
||||
For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2"
|
||||
new_master is optional and sets the alert's icon state to "template" in the ui_style icons with the master as an overlay.
|
||||
Clicks are forwarded to master */
|
||||
Clicks are forwarded to master
|
||||
Override makes it so the alert is not replaced until cleared by a clear_alert with clear_override, and it's used for hallucinations.
|
||||
*/
|
||||
|
||||
if(!category)
|
||||
return
|
||||
@@ -19,6 +22,8 @@
|
||||
var/obj/screen/alert/alert
|
||||
if(alerts[category])
|
||||
alert = alerts[category]
|
||||
if(alert.override_alerts)
|
||||
return 0
|
||||
if(new_master && new_master != alert.master)
|
||||
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [alert.master]")
|
||||
clear_alert(category)
|
||||
@@ -33,7 +38,10 @@
|
||||
else //no need to update
|
||||
return 0
|
||||
else
|
||||
alert = new type
|
||||
alert = new type()
|
||||
alert.override_alerts = override
|
||||
if(override)
|
||||
alert.timeout = null
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
@@ -63,10 +71,12 @@
|
||||
return alert
|
||||
|
||||
// Proc to clear an existing alert.
|
||||
/mob/proc/clear_alert(category)
|
||||
/mob/proc/clear_alert(category, clear_override = FALSE)
|
||||
var/obj/screen/alert/alert = alerts[category]
|
||||
if(!alert)
|
||||
return 0
|
||||
if(alert.override_alerts && !clear_override)
|
||||
return 0
|
||||
|
||||
alerts -= category
|
||||
if(client && hud_used)
|
||||
@@ -83,6 +93,7 @@
|
||||
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
|
||||
var/severity = 0
|
||||
var/alerttooltipstyle = ""
|
||||
var/override_alerts = FALSE //If it is overriding other alerts of the same type
|
||||
|
||||
|
||||
/obj/screen/alert/MouseEntered(location,control,params)
|
||||
@@ -197,12 +208,12 @@ The box in your backpack has an oxygen tank and gas mask in it."
|
||||
name = "High Pressure"
|
||||
desc = "The air around you is hazardously thick. A fire suit would protect you."
|
||||
icon_state = "highpressure"
|
||||
|
||||
|
||||
/obj/screen/alert/lightexposure
|
||||
name = "Light Exposure"
|
||||
desc = "You're exposed to light."
|
||||
icon_state = "lightexposure"
|
||||
|
||||
|
||||
/obj/screen/alert/nolight
|
||||
name = "No Light"
|
||||
desc = "You're not exposed to any light."
|
||||
|
||||
@@ -1173,7 +1173,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
|
||||
/datum/supply_packs/materials/plastic30
|
||||
name = "30 Plastic Sheets Crate"
|
||||
contains = list(/obj/item/stack/sheet/mineral/plastic)
|
||||
contains = list(/obj/item/stack/sheet/plastic)
|
||||
amount = 30
|
||||
cost = 25
|
||||
containername = "plastic sheets crate"
|
||||
|
||||
@@ -81,8 +81,10 @@
|
||||
for(var/obj/O in T.contents)
|
||||
if(istype(O, /obj/structure/window))
|
||||
src.window += 1
|
||||
else if(istype(O, /obj/structure/grille) && (!O:destroyed))
|
||||
src.grille += 1
|
||||
else if(istype(O, /obj/structure/grille))
|
||||
var/obj/structure/grille/GR = O
|
||||
if(!GR.broken)
|
||||
grille += 1
|
||||
else if(istype(O, /obj/machinery/door))
|
||||
src.door += 1
|
||||
else if(istype(O, /obj/machinery))
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
dat += "Please choose the chant to be imbued into the fabric of reality.<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='?src=[UID()];rune=newtome'>N'ath reth sh'yro eth d'raggathnor!</A> - Summons an arcane tome, used to scribe runes and communicate with other cultists.<BR>"
|
||||
dat += "<A href='?src=[UID()];rune=metal'>Bar'tea eas!</A> - Provides 5 runed metal.<BR>"
|
||||
dat += "<A href='?src=[UID()];rune=teleport'>Sas'so c'arta forbici!</A> - Allows you to move to a selected teleportation rune.<BR>"
|
||||
dat += "<A href='?src=[UID()];rune=emp'>Ta'gh fara'qha fel d'amar det!</A> - Allows you to destroy technology in a short range.<BR>"
|
||||
dat += "<A href='?src=[UID()];rune=runestun'>Fuu ma'jin!</A> - Allows you to stun a person by attacking them with the talisman.<BR>"
|
||||
@@ -79,6 +80,12 @@
|
||||
if("newtome")
|
||||
var/obj/item/weapon/tome/T = new(usr)
|
||||
usr.put_in_hands(T)
|
||||
if("metal")
|
||||
if(istype(src, /obj/item/weapon/paper/talisman/supply/weak))
|
||||
usr.visible_message("<span class='cultitalic'>Lesser supply talismans lack the strength to materialize runed metal!</span>")
|
||||
return
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(usr,5)
|
||||
usr.put_in_hands(R)
|
||||
if("teleport")
|
||||
var/obj/item/weapon/paper/talisman/teleport/T = new(usr)
|
||||
usr.put_in_hands(T)
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/gravcatapult
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/phazon/Bump(var/atom/obstacle)
|
||||
if(phasing && get_charge() >= phasing_energy_drain)
|
||||
spawn()
|
||||
if(can_move)
|
||||
can_move = 0
|
||||
flick("phazon-phase", src)
|
||||
forceMove(get_step(src, dir))
|
||||
use_power(phasing_energy_drain)
|
||||
sleep(step_in * 3)
|
||||
can_move = 1
|
||||
else
|
||||
. = ..()
|
||||
/obj/mecha/combat/phazon/mechstep(direction)
|
||||
. = ..()
|
||||
if(!. && phasing && get_charge() >= phasing_energy_drain)
|
||||
if(can_move)
|
||||
can_move = 0
|
||||
flick("phazon-phase", src)
|
||||
forceMove(get_step(src, direction))
|
||||
use_power(phasing_energy_drain)
|
||||
playsound(src,stepsound,40,1)
|
||||
sleep(step_in * 3)
|
||||
can_move = 1
|
||||
return 1
|
||||
|
||||
/obj/mecha/combat/phazon/click_action(atom/target,mob/user)
|
||||
if(phasing)
|
||||
@@ -62,7 +62,7 @@
|
||||
if("Torch")
|
||||
damtype = "fire"
|
||||
occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
|
||||
if("Toxic injector")
|
||||
if("Toxic Injector")
|
||||
damtype = "tox"
|
||||
occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
|
||||
playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1)
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
else if(istype(obstacle, /obj/structure/grille/))
|
||||
var/obj/structure/grille/G = obstacle
|
||||
G.health = (0.25*initial(G.health))
|
||||
G.destroyed = 1
|
||||
G.broken = 1
|
||||
G.icon_state = "[initial(G.icon_state)]-b"
|
||||
G.density = 0
|
||||
new /obj/item/stack/rods(get_turf(G.loc))
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "uglyminearmed"
|
||||
var/triggered = 0
|
||||
var/faction = "syndicate"
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/living/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
@@ -15,6 +16,8 @@
|
||||
return
|
||||
if(isanimal(AM))
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(faction && (faction in SA.faction))
|
||||
return
|
||||
if(!SA.flying)
|
||||
triggermine(SA)
|
||||
else
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
return 0
|
||||
on = !on
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_brightness(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building, or something."
|
||||
@@ -11,7 +15,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=1000)
|
||||
max_amount = 60
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
toolspeed = 1
|
||||
@@ -20,9 +24,9 @@
|
||||
/obj/item/stack/rods/cyborg
|
||||
materials = list()
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/rods/New(loc, amount=null)
|
||||
..()
|
||||
|
||||
recipes = rod_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
@@ -32,12 +36,12 @@
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
@@ -47,9 +51,9 @@
|
||||
// stack was moved into another one on the pile
|
||||
new_item = locate() in user.loc
|
||||
|
||||
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
user.visible_message("[user.name] shape [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
|
||||
var/replace = user.get_inactive_hand() == src
|
||||
use(2)
|
||||
@@ -59,34 +63,3 @@
|
||||
user.put_in_hands(new_item)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/stack/rods/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
|
||||
if(locate(/obj/structure/grille, usr.loc))
|
||||
for(var/obj/structure/grille/G in usr.loc)
|
||||
if(G.destroyed)
|
||||
G.health = 10
|
||||
G.density = 1
|
||||
G.destroyed = 0
|
||||
G.icon_state = "grille"
|
||||
use(1)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if(amount < 2)
|
||||
to_chat(user, "\blue You need at least two rods to do this.")
|
||||
return
|
||||
to_chat(usr, "\blue Assembling grille...")
|
||||
|
||||
if(!do_after(usr, 10, target = user))
|
||||
return
|
||||
|
||||
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
to_chat(usr, "\blue You assemble a grille")
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ Mineral Sheets
|
||||
- Diamond
|
||||
- Uranium
|
||||
- Plasma
|
||||
- Plastic
|
||||
- Gold
|
||||
- Silver
|
||||
- Bananium
|
||||
@@ -77,23 +76,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
new/datum/stack_recipe("Xenomorph Statue", /obj/structure/statue/plasma/xeno, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/bananium_recipes = list ( \
|
||||
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
|
||||
null, \
|
||||
@@ -196,19 +178,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic
|
||||
name = "Plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
origin_tech = "materials=3"
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/New()
|
||||
..()
|
||||
recipes = plastic_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/cyborg
|
||||
name = "plastic sheets"
|
||||
icon_state = "sheet-plastic"
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Runed Metal (cult)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -290,3 +292,39 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
origin_tech = "materials=2;biotech=2"
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plastic
|
||||
name = "plastic"
|
||||
desc = "Compress dinosaur over millions of years, then refine, split and mold, and voila! You have plastic."
|
||||
singular_name = "plastic sheet"
|
||||
icon_state = "sheet-plastic"
|
||||
throwforce = 7
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
|
||||
/obj/item/stack/sheet/plastic/New()
|
||||
recipes = plastic_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/sheet/plastic/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/plastic/five
|
||||
amount = 5
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/obj/item/weapon/twohanded/rcl
|
||||
name = "rapid cable layer (RCL)"
|
||||
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
opacity = 0
|
||||
force = 5 //Plastic is soft
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
origin_tech = "engineering=4;materials=4"
|
||||
var/max_amount = 90
|
||||
var/active = 0
|
||||
var/obj/structure/cable/last = null
|
||||
var/obj/item/stack/cable_coil/loaded = null
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(!loaded)
|
||||
if(user.drop_item())
|
||||
loaded = W
|
||||
loaded.forceMove(src)
|
||||
loaded.max_amount = max_amount //We store a lot.
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[user.get_active_hand()] is stuck to your hand!</span>")
|
||||
return
|
||||
else
|
||||
if(loaded.amount < max_amount)
|
||||
var/amount = min(loaded.amount + C.amount, max_amount)
|
||||
C.use(amount - loaded.amount)
|
||||
loaded.amount = amount
|
||||
else
|
||||
return
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You add the cables to the [src]. It now contains [loaded.amount].</span>")
|
||||
else if(isscrewdriver(W))
|
||||
if(!loaded)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
|
||||
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
|
||||
var/diff = loaded.amount % 30
|
||||
if(diff)
|
||||
loaded.use(diff)
|
||||
new /obj/item/stack/cable_coil(user.loc, diff)
|
||||
else
|
||||
loaded.use(30)
|
||||
new /obj/item/stack/cable_coil(user.loc, 30)
|
||||
loaded.max_amount = initial(loaded.max_amount)
|
||||
loaded.forceMove(user.loc)
|
||||
user.put_in_hands(loaded)
|
||||
loaded = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/examine(mob/user)
|
||||
..()
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>")
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/Destroy()
|
||||
if(loaded)
|
||||
qdel(loaded)
|
||||
loaded = null
|
||||
last = null
|
||||
active = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
return
|
||||
switch(loaded.amount)
|
||||
if(61 to INFINITY)
|
||||
icon_state = "rcl-30"
|
||||
item_state = "rcl"
|
||||
if(31 to 60)
|
||||
icon_state = "rcl-20"
|
||||
item_state = "rcl"
|
||||
if(1 to 30)
|
||||
icon_state = "rcl-10"
|
||||
item_state = "rcl"
|
||||
else
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
if(!loaded || !loaded.amount)
|
||||
if(loud)
|
||||
to_chat(user, "<span class='notice'>The last of the cables unreel from [src].</span>")
|
||||
if(loaded)
|
||||
qdel(loaded)
|
||||
loaded = null
|
||||
unwield(user)
|
||||
active = wielded
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/dropped(mob/wearer)
|
||||
..()
|
||||
active = 0
|
||||
last = null
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/attack_self(mob/user)
|
||||
..()
|
||||
active = wielded
|
||||
if(!active)
|
||||
last = null
|
||||
else if(!last)
|
||||
for(var/obj/structure/cable/C in get_turf(user))
|
||||
if(C.d1 == 0 || C.d2 == 0)
|
||||
last = C
|
||||
break
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/moved(mob/user, turf/old_loc, direct)
|
||||
if(active)
|
||||
trigger(user)
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/proc/trigger(mob/user)
|
||||
if(is_empty(user, 0))
|
||||
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
|
||||
return
|
||||
if(last)
|
||||
if(get_dist(last, user) == 1) //hacky, but it works
|
||||
var/turf/T = get_turf(user)
|
||||
if(!isturf(T) || T.intact || !T.can_have_cabling())
|
||||
last = null
|
||||
return
|
||||
if(get_dir(last, user) == last.d2)
|
||||
//Did we just walk backwards? Well, that's the one direction we CAN'T complete a stub.
|
||||
last = null
|
||||
return
|
||||
loaded.cable_join(last, user)
|
||||
if(is_empty(user))
|
||||
return //If we've run out, display message and exit
|
||||
else
|
||||
last = null
|
||||
last = loaded.place_turf(get_turf(loc), user, turn(user.dir, 180))
|
||||
is_empty(user) //If we've run out, display message
|
||||
|
||||
/obj/item/weapon/twohanded/rcl/pre_loaded/New() //Comes preloaded with cable, for testing stuff
|
||||
..()
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
@@ -7,11 +7,16 @@
|
||||
anchored = 1
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = 2.9
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
layer = BELOW_OBJ_LAYER
|
||||
level = 3
|
||||
|
||||
var/health = 10
|
||||
var/broken = 0
|
||||
var/can_deconstruct = TRUE
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
var/grille_type = null
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
|
||||
/obj/structure/grille/fence/
|
||||
var/width = 3
|
||||
@@ -26,7 +31,6 @@
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
|
||||
/obj/structure/grille/fence/east_west
|
||||
//width=80
|
||||
//height=42
|
||||
@@ -38,19 +42,23 @@
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
qdel(src)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(5,10), BRUTE, 0)
|
||||
|
||||
/obj/structure/grille/blob_act()
|
||||
qdel(src)
|
||||
if(!broken)
|
||||
obj_break()
|
||||
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user)) shock(user, 70)
|
||||
if(ismob(user))
|
||||
shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user as mob)
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='warning'>You kick [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
@@ -58,26 +66,23 @@
|
||||
if(shock(user, 70))
|
||||
return
|
||||
if(HULK in user.mutations)
|
||||
health -= 5
|
||||
take_damage(5)
|
||||
else
|
||||
health -= 1
|
||||
healthcheck()
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
if(istype(user, /mob/living/carbon/alien/larva))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
if(!shock(user, 70))
|
||||
health -= 5
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/living/user as mob)
|
||||
/obj/structure/grille/attack_slime(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
@@ -89,12 +94,11 @@
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= rand(2,3)
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
/obj/structure/grille/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
|
||||
return
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -102,18 +106,15 @@
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type)
|
||||
|
||||
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
health -= M.force * 0.5
|
||||
healthcheck()
|
||||
take_damage(M.force * 0.5, M.damtype)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
@@ -128,118 +129,144 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
..()
|
||||
if((Proj.damage_type != STAMINA)) //Grilles can't be exhausted to death
|
||||
src.health -= Proj.damage*0.3
|
||||
healthcheck()
|
||||
return
|
||||
/obj/structure/grille/bullet_act(obj/item/projectile/Proj)
|
||||
. = ..()
|
||||
take_damage(Proj.damage*0.3, Proj.damage_type)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(!destroyed)
|
||||
new /obj/item/stack/rods(loc, 2)
|
||||
else
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
deconstruct()
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
|
||||
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods) && broken)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(!shock(user, 90))
|
||||
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
|
||||
"<span class='notice'>You rebuild the broken grille.</span>")
|
||||
new grille_type(loc)
|
||||
R.use(1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass) )
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
|
||||
if( x == user.x )
|
||||
if( y > user.y )
|
||||
dir_to_set = 2
|
||||
else
|
||||
dir_to_set = 1
|
||||
else if( y == user.y )
|
||||
if( x > user.x )
|
||||
dir_to_set = 8
|
||||
else
|
||||
dir_to_set = 4
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
|
||||
if(!broken)
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window.</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!src) return //Grille destroyed while waiting
|
||||
var/dir_to_set = NORTH
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions.
|
||||
if(x == user.x)
|
||||
if(y > user.y)
|
||||
dir_to_set = SOUTH
|
||||
else
|
||||
dir_to_set = NORTH
|
||||
else if(y == user.y)
|
||||
if(x > user.x)
|
||||
dir_to_set = WEST
|
||||
else
|
||||
dir_to_set = EAST
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
var/obj/item/stack/ST = W
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window...</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.setDir(dir_to_set)
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
//window placing end
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return attacked_by(W, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
health -= W.force * 0.1
|
||||
else if(!shock(user, 70))
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
health -= W.force
|
||||
if("brute")
|
||||
health -= W.force * 0.1
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
/obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!(I.flags&NOBLUDGEON))
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
var/obj/R = new rods_type(loc, rods_amount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/healthcheck()
|
||||
/obj/structure/grille/proc/obj_break()
|
||||
if(!broken && can_deconstruct)
|
||||
new broken_type(loc)
|
||||
var/obj/R = new rods_type(loc, rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
if(!destroyed)
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
new /obj/item/stack/rods(loc)
|
||||
|
||||
if(!broken)
|
||||
obj_break()
|
||||
else
|
||||
if(health <= -6)
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
||||
if(!anchored || destroyed) // deanchored/destroyed grilles are never connected
|
||||
/obj/structure/grille/proc/shock(mob/user, prb)
|
||||
if(!anchored || broken) // unanchored/broken grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
@@ -258,8 +285,27 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!destroyed)
|
||||
if(!broken)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
health -= 1
|
||||
healthcheck()
|
||||
take_damage(1)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/hitby(atom/movable/AM)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 5
|
||||
else if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = max(0, I.throwforce * 0.5)
|
||||
take_damage(tforce)
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
health = 0
|
||||
broken = 1
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille
|
||||
broken_type = null
|
||||
|
||||
@@ -138,24 +138,20 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
return 1
|
||||
if(..())
|
||||
return 1
|
||||
if(intact && istype(C, /obj/item/weapon/crowbar))
|
||||
if(broken || burnt)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
to_chat(user, "<span class='danger'>You remove the broken plating.</span>")
|
||||
else
|
||||
if(istype(src, /turf/simulated/floor/wood))
|
||||
to_chat(user, "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>")
|
||||
else if(!builtin_tile)
|
||||
to_chat(user, "<span class='notice'>You are unable to pry up \the [src] with a crowbar.</span>")
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You remove \the [builtin_tile.singular_name].</span>")
|
||||
builtin_tile.loc = src
|
||||
builtin_tile = null //deassociate tile, it no longer belongs to this turf
|
||||
make_plating()
|
||||
playsound(src, C.usesound, 80, 1)
|
||||
if(intact && iscrowbar(C))
|
||||
pry_tile(C, user)
|
||||
return 1
|
||||
if(intact && istype(C, /obj/item/stack/tile))
|
||||
var/obj/item/stack/tile/T = C
|
||||
if(T.turf_type == type)
|
||||
return
|
||||
var/obj/item/weapon/crowbar/CB = user.get_inactive_hand(/obj/item/weapon/crowbar)
|
||||
if(!CB)
|
||||
return
|
||||
var/turf/simulated/floor/plating/P = pry_tile(CB, user, TRUE)
|
||||
if(!istype(P))
|
||||
return
|
||||
P.attackby(T, user, params)
|
||||
if(istype(C, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = C
|
||||
if(P.pipe_type != -1) // ANY PIPE
|
||||
@@ -181,6 +177,24 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/proc/pry_tile(obj/item/C, mob/user, silent = FALSE)
|
||||
playsound(src, C.usesound, 80, 1)
|
||||
return remove_tile(user, silent)
|
||||
|
||||
/turf/simulated/floor/proc/remove_tile(mob/user, silent = FALSE, make_tile = TRUE)
|
||||
if(broken || burnt)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You remove the broken plating.</span>")
|
||||
else
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You remove the floor tile.</span>")
|
||||
if(builtin_tile && make_tile)
|
||||
builtin_tile.forceMove(src)
|
||||
builtin_tile = null
|
||||
return make_plating()
|
||||
|
||||
/turf/simulated/floor/singularity_pull(S, current_size)
|
||||
if(current_size == STAGE_THREE)
|
||||
if(prob(30))
|
||||
|
||||
@@ -11,15 +11,33 @@
|
||||
/turf/simulated/floor/wood/attackby(obj/item/C, mob/user, params)
|
||||
if(..())
|
||||
return
|
||||
if(istype(C, /obj/item/weapon/screwdriver))
|
||||
if(broken || burnt)
|
||||
return
|
||||
to_chat(user, "<span class='danger'>You unscrew the planks.</span>")
|
||||
new floor_tile(src)
|
||||
make_plating()
|
||||
playsound(src, C.usesound, 80, 1)
|
||||
if(isscrewdriver(C))
|
||||
pry_tile(C, user)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/wood/pry_tile(obj/item/C, mob/user, silent = FALSE)
|
||||
var/is_screwdriver = isscrewdriver(C)
|
||||
playsound(src, C.usesound, 80, 1)
|
||||
return remove_tile(user, silent, make_tile = is_screwdriver)
|
||||
|
||||
/turf/simulated/floor/wood/remove_tile(mob/user, silent = FALSE, make_tile = TRUE)
|
||||
if(broken || burnt)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You remove the broken planks.</span>")
|
||||
else
|
||||
if(make_tile)
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You unscrew the planks.</span>")
|
||||
if(builtin_tile)
|
||||
builtin_tile.forceMove(src)
|
||||
builtin_tile = null
|
||||
else
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>")
|
||||
return make_plating()
|
||||
|
||||
/turf/simulated/floor/grass
|
||||
name = "grass patch"
|
||||
icon_state = "grass1"
|
||||
@@ -45,7 +63,7 @@
|
||||
to_chat(user, "<span class='notice'>You shovel the grass.</span>")
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
make_plating()
|
||||
|
||||
|
||||
// NEEDS TO BE UPDATED
|
||||
/turf/simulated/floor/basalt //By your powers combined, I am captain planet
|
||||
name = "volcanic floor"
|
||||
@@ -54,7 +72,7 @@
|
||||
oxygen = 14
|
||||
nitrogen = 23
|
||||
temperature = 300
|
||||
|
||||
|
||||
/turf/simulated/floor/basalt/attackby(obj/item/W, mob/user, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -313,4 +313,3 @@
|
||||
else
|
||||
smooth = SMOOTH_TRUE
|
||||
icon_state = ""
|
||||
|
||||
|
||||
+19
-9
@@ -386,15 +386,25 @@
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/turf/attackby(obj/item/C, mob/user, params)
|
||||
if(can_lay_cable() && istype(C, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
for(var/obj/structure/cable/LC in src)
|
||||
if((LC.d1==0)||(LC.d2==0))
|
||||
LC.attackby(C,user)
|
||||
return
|
||||
coil.place_turf(src, user)
|
||||
return 1
|
||||
/turf/attackby(obj/item/I, mob/user, params)
|
||||
if(can_lay_cable())
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
for(var/obj/structure/cable/LC in src)
|
||||
if(LC.d1 == 0 || LC.d2==0)
|
||||
LC.attackby(C,user)
|
||||
return
|
||||
C.place_turf(src, user)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/weapon/twohanded/rcl))
|
||||
var/obj/item/weapon/twohanded/rcl/R = I
|
||||
if(R.loaded)
|
||||
for(var/obj/structure/cable/LC in src)
|
||||
if(LC.d1 == 0 || LC.d2==0)
|
||||
LC.attackby(R, user)
|
||||
return
|
||||
R.loaded.place_turf(src, user)
|
||||
R.is_empty(user)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
//Handles repairs (and also upgrades).
|
||||
|
||||
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal))
|
||||
if(istype(W,/obj/item/stack/sheet/plastic) || istype(W,/obj/item/stack/sheet/metal))
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
to_chat(user, "\red How do you intend to patch a hardsuit while someone is wearing it?")
|
||||
@@ -188,10 +188,10 @@ var/global/list/breach_burn_descriptors = list(
|
||||
var/obj/item/stack/sheet/P = W
|
||||
if(P.amount < 3)
|
||||
P.use(P.amount)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.amount : (P.amount*2) ), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? P.amount : (P.amount*2) ), user)
|
||||
else
|
||||
P.use(3)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? 3 : 5), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? 3 : 5), user)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -135,12 +135,24 @@
|
||||
desc = "A paramedic EVA helmet. Used in the recovery of bodies from space."
|
||||
icon_state = "paramedic-eva-helmet"
|
||||
item_state = "paramedic-eva-helmet"
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/hats.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/space/eva/paramedic
|
||||
name = "Paramedic EVA suit"
|
||||
icon_state = "paramedic-eva"
|
||||
item_state = "paramedic-eva"
|
||||
desc = "A paramedic EVA suit. Used in the recovery of bodies from space."
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/space/eva
|
||||
name = "EVA suit"
|
||||
@@ -149,12 +161,13 @@
|
||||
desc = "A lightweight space suit with the basic ability to protect the wearer from the vacuum of space during emergencies."
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox")
|
||||
species_fit = list("Vox", "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/suit.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi',
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva
|
||||
@@ -166,9 +179,10 @@
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
flash_protect = 0
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox")
|
||||
species_fit = list("Vox", "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/helmet.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/hats.dmi'
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
time = 150
|
||||
reqs = list(/obj/item/stack/rods = 3,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stack/sheet/mineral/plastic = 3,
|
||||
/obj/item/stack/sheet/plastic = 3,
|
||||
/obj/item/stack/sheet/wood = 5)
|
||||
tools = list(/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/screwdriver)
|
||||
|
||||
@@ -17,7 +17,19 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
|
||||
var/obj/effect/spacevine_controller/SC = new /obj/effect/spacevine_controller(T, , rand(30,70),rand(5,2)) //spawn a controller at turf
|
||||
|
||||
// Make the event start fun - give the vine a random hostile mutation
|
||||
if(SC.vines.len)
|
||||
SV = SC.vines[1]
|
||||
var/list/mutations = SC.mutations_list.Copy()
|
||||
while(mutations.len)
|
||||
var/datum/spacevine_mutation/SM = pick_n_take(mutations)
|
||||
if(SM.quality == NEGATIVE && !SM.nofun)
|
||||
SM.add_mutation_to_vinepiece(SV)
|
||||
break
|
||||
mutations.Cut()
|
||||
mutations = null
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -25,11 +37,22 @@
|
||||
var/severity = 1
|
||||
var/hue
|
||||
var/quality
|
||||
// For stuff that isn't fun as a random-event vine
|
||||
var/nofun = FALSE
|
||||
|
||||
/datum/spacevine_mutation/proc/add_mutation_to_vinepiece(obj/effect/spacevine/holder)
|
||||
holder.mutations |= src
|
||||
holder.color = hue
|
||||
|
||||
/datum/spacevine_mutation/proc/remove_mutation_from_vinepiece(obj/effect/spacevine/holder)
|
||||
holder.mutations -= src
|
||||
var/datum/spacevine_mutation/oldmutation
|
||||
if(holder.mutations.len)
|
||||
oldmutation = pick(holder.mutations)
|
||||
holder.color = oldmutation.hue
|
||||
else
|
||||
holder.color = ""
|
||||
|
||||
/datum/spacevine_mutation/proc/process_mutation(obj/effect/spacevine/holder)
|
||||
return
|
||||
|
||||
@@ -136,6 +159,11 @@
|
||||
/datum/spacevine_mutation/space_covering/on_grow(obj/effect/spacevine/holder)
|
||||
process_mutation(holder)
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(target.type == /turf/space && !locate(/obj/effect/spacevine) in target)
|
||||
holder.master.spawn_spacevine_piece(target, holder)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/space_covering/process_mutation(obj/effect/spacevine/holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
if(is_type_in_typecache(T, coverable_turfs))
|
||||
@@ -155,7 +183,12 @@
|
||||
|
||||
/datum/spacevine_mutation/bluespace/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(holder.energy > 1 && !locate(/obj/effect/spacevine) in target)
|
||||
// Lose bluespace upon piercing a single tile, and drop it from our own mutations too
|
||||
// Representing a loss in "high potential"
|
||||
// also conveniently prevents this from spreading too crazily
|
||||
remove_mutation_from_vinepiece(holder)
|
||||
holder.master.spawn_spacevine_piece(target, holder)
|
||||
playsound(holder, 'sound/misc/interference.ogg', 50, 1)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/light
|
||||
@@ -190,6 +223,8 @@
|
||||
hue = "#ff0000"
|
||||
quality = NEGATIVE
|
||||
severity = 2
|
||||
// kaboom events aren't fun
|
||||
nofun = TRUE
|
||||
|
||||
/datum/spacevine_mutation/explosive/on_explosion(explosion_severity, obj/effect/spacevine/holder)
|
||||
if(explosion_severity < 3)
|
||||
@@ -234,6 +269,15 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
// Too tough to pierce - should lead to interesting spread patterns
|
||||
return
|
||||
// Bust through windows or other stuff blocking the way
|
||||
if(!target.Enter(holder))
|
||||
for(var/atom/movable/AM in target)
|
||||
if(istype(AM, /obj/effect/spacevine) || !AM.density)
|
||||
continue
|
||||
AM.ex_act(severity)
|
||||
target.ex_act(severity) // vine immunity handled at /mob/ex_act
|
||||
. = TRUE
|
||||
|
||||
@@ -348,7 +392,7 @@
|
||||
name = "plasticine"
|
||||
hue = "#222288"
|
||||
mineral_results = list(
|
||||
/obj/item/stack/sheet/mineral/plastic = 1
|
||||
/obj/item/stack/sheet/plastic = 1
|
||||
)
|
||||
|
||||
/datum/spacevine_mutation/mineral/wood
|
||||
@@ -406,8 +450,8 @@
|
||||
if(!master.vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(loc)
|
||||
KZ.mutations |= mutations
|
||||
KZ.set_potency(master.mutativeness * 10)
|
||||
KZ.set_production((master.spread_cap / initial(master.spread_cap)) * 5)
|
||||
KZ.set_potency(10 ** sqrt(master.mutativeness))
|
||||
KZ.set_production(10 - (master.spread_cap / 10))
|
||||
qdel(master)
|
||||
master = null
|
||||
mutations.Cut()
|
||||
@@ -499,11 +543,19 @@
|
||||
spawn_spacevine_piece(loc, , muts)
|
||||
processing_objects.Add(src)
|
||||
init_subtypes(/datum/spacevine_mutation/, mutations_list)
|
||||
if(potency != null)
|
||||
mutativeness = potency / 10
|
||||
if(potency != null && potency > 0)
|
||||
// 1 mutativeness at 10 potency
|
||||
// 4 mutativeness at 100 potency
|
||||
mutativeness = log(10, potency) ** 2
|
||||
if(production != null)
|
||||
spread_cap /= production / 5
|
||||
spread_multiplier *= production / 5
|
||||
// 1 production is crazy powerful
|
||||
var/spread_value = max(10 - production, 1)
|
||||
// 40 at 6 production
|
||||
// 90 at 1 production
|
||||
spread_cap = spread_value * 10
|
||||
// 6 vines/spread at 6 production
|
||||
// ~2.5 vines/spread at 1 production
|
||||
spread_multiplier /= spread_value / 5
|
||||
..()
|
||||
|
||||
|
||||
@@ -618,7 +670,8 @@
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
spread_success |= SM.on_spread(src, stepturf) // If this returns 1, spreading succeeded
|
||||
if(!locate(/obj/effect/spacevine, stepturf))
|
||||
if(stepturf.Enter(src))
|
||||
// snowflake for space turf, but space turf is super common and a big deal
|
||||
if(!istype(stepturf, /turf/space) && stepturf.Enter(src))
|
||||
if(master)
|
||||
master.spawn_spacevine_piece(stepturf, src)
|
||||
spread_success = TRUE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -179,7 +179,7 @@
|
||||
con_type = "glass bottle"
|
||||
max_define = MAX_GLASS
|
||||
mat_ratio = RATIO_GLASS
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral/plastic))
|
||||
else if(istype(S, /obj/item/stack/sheet/plastic))
|
||||
con_type = "plastic bottle"
|
||||
max_define = MAX_PLAST
|
||||
mat_ratio = RATIO_PLAST
|
||||
|
||||
@@ -528,9 +528,9 @@
|
||||
H.healths.icon_state = "health7"
|
||||
else
|
||||
switch(H.hal_screwyhud)
|
||||
if(1) H.healths.icon_state = "health6"
|
||||
if(2) H.healths.icon_state = "health7"
|
||||
if(5) H.healths.icon_state = "health0"
|
||||
if(SCREWYHUD_CRIT) H.healths.icon_state = "health6"
|
||||
if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
|
||||
if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
|
||||
else
|
||||
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
|
||||
if(100 to INFINITY) H.healths.icon_state = "health0"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
amount = amount * species.stun_mod
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/SetSleeping(amount, updating = 1)
|
||||
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
|
||||
if(species)
|
||||
amount = amount * species.stun_mod
|
||||
..()
|
||||
@@ -1202,7 +1202,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
if(tail_marking_icon && !tail_marking_style.tails_allowed)
|
||||
tail_s.Blend(tail_marking_icon, ICON_OVERLAY)
|
||||
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
|
||||
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
|
||||
@@ -1270,7 +1270,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]w_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
if(tail_marking_icon && !tail_marking_style.tails_allowed)
|
||||
tailw_s.Blend(tail_marking_icon, ICON_OVERLAY)
|
||||
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
|
||||
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
if(..())
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
if(prob(10) && health && !hal_crit)
|
||||
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
// Keep SSD people asleep
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
req_access = list(access_engine, access_robotics)
|
||||
ventcrawler = 2
|
||||
magpulse = 1
|
||||
|
||||
|
||||
default_language = "Drone"
|
||||
|
||||
// We need to keep track of a few module items so we don't need to do list operations
|
||||
@@ -23,7 +23,7 @@
|
||||
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
|
||||
var/obj/item/stack/sheet/wood/stack_wood = null
|
||||
var/obj/item/stack/sheet/glass/cyborg/stack_glass = null
|
||||
var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null
|
||||
var/obj/item/stack/sheet/plastic/stack_plastic = null
|
||||
var/obj/item/weapon/matter_decompiler/decompiler = null
|
||||
|
||||
//Used for self-mailing.
|
||||
@@ -43,7 +43,7 @@
|
||||
remove_language("Galactic Common")
|
||||
add_language("Drone Talk", 1)
|
||||
add_language("Drone", 1)
|
||||
|
||||
|
||||
// Disable the microphone wire on Drones
|
||||
if(radio)
|
||||
radio.wires.CutWireIndex(WIRE_TRANSMIT)
|
||||
@@ -70,7 +70,7 @@
|
||||
stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module
|
||||
stack_wood = locate(/obj/item/stack/sheet/wood) in src.module
|
||||
stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module
|
||||
stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module
|
||||
stack_plastic = locate(/obj/item/stack/sheet/plastic) in src.module
|
||||
|
||||
//Grab decompiler.
|
||||
decompiler = locate(/obj/item/weapon/matter_decompiler) in src.module
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
// /obj/item/weapon/paper_bundle,
|
||||
/obj/item/weapon/card/id
|
||||
)
|
||||
|
||||
|
||||
/obj/item/weapon/gripper/New()
|
||||
..()
|
||||
can_hold = typecacheof(can_hold)
|
||||
@@ -374,7 +374,7 @@
|
||||
stack = stack_wood
|
||||
if("plastic")
|
||||
if(!stack_plastic)
|
||||
stack_plastic = new /obj/item/stack/sheet/mineral/plastic/cyborg(src.module)
|
||||
stack_plastic = new /obj/item/stack/sheet/plastic(src.module)
|
||||
stack_plastic.amount = 1
|
||||
stack = stack_plastic
|
||||
|
||||
|
||||
@@ -354,19 +354,19 @@
|
||||
|
||||
// SLEEPING
|
||||
|
||||
/mob/living/Sleeping(amount, updating = 1)
|
||||
SetSleeping(max(sleeping, amount), updating)
|
||||
/mob/living/Sleeping(amount, updating = 1, no_alert = FALSE)
|
||||
SetSleeping(max(sleeping, amount), updating, no_alert)
|
||||
|
||||
/mob/living/SetSleeping(amount, updating = 1)
|
||||
/mob/living/SetSleeping(amount, updating = 1, no_alert = FALSE)
|
||||
sleeping = max(amount, 0)
|
||||
update_sleeping_effects()
|
||||
update_sleeping_effects(no_alert)
|
||||
if(updating)
|
||||
update_stat()
|
||||
update_canmove()
|
||||
|
||||
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1)
|
||||
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, no_alert = FALSE)
|
||||
var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper)
|
||||
SetSleeping(new_value, updating)
|
||||
SetSleeping(new_value, updating, no_alert)
|
||||
|
||||
// SLOWED
|
||||
|
||||
|
||||
@@ -30,9 +30,10 @@
|
||||
else
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
/mob/living/update_sleeping_effects()
|
||||
/mob/living/update_sleeping_effects(no_alert = FALSE)
|
||||
if(sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(!no_alert)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
else
|
||||
clear_alert("asleep")
|
||||
|
||||
|
||||
@@ -199,6 +199,10 @@
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
|
||||
if(istype(mob.get_active_hand(), /obj/item))
|
||||
var/obj/item/I = mob.get_active_hand()
|
||||
I.moved(mob, n, direct)
|
||||
|
||||
if(!mob.Process_Spacemove(direct))
|
||||
return 0
|
||||
|
||||
|
||||
+44
-67
@@ -114,7 +114,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
return
|
||||
|
||||
@@ -149,7 +149,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(c.d1 == 12 || c.d2 == 12)
|
||||
c.qdel()*/
|
||||
///// Z-Level Stuff
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [user.loc.loc]([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)","wires")
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [get_area(user)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires")
|
||||
|
||||
qdel(src) // qdel
|
||||
return
|
||||
@@ -162,6 +162,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?
|
||||
@@ -197,12 +203,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
qdel(src) // qdel
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
qdel(src) // qdel
|
||||
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
qdel(src) // qdel
|
||||
return
|
||||
|
||||
@@ -505,7 +511,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
// General procedures
|
||||
///////////////////////////////////
|
||||
//you can use wires to heal robotics
|
||||
/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/stack/cable_coil/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
|
||||
@@ -613,11 +619,11 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
return C
|
||||
|
||||
// called when cable_coil is clicked on a turf/simulated/floor
|
||||
/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
|
||||
|
||||
@@ -629,44 +635,46 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
to_chat(user, "<span class='warning'>You can't lay cable at a place that far away!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
var/dirn
|
||||
|
||||
var/dirn = null
|
||||
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.updateicon()
|
||||
//set up the new cable
|
||||
C.d1 = 0 //it's a O-X node cable
|
||||
C.d2 = dirn
|
||||
C.add_fingerprint(user)
|
||||
C.updateicon()
|
||||
|
||||
//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)
|
||||
qdel(C) // qdel
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(C.loc, 1, C.color)
|
||||
qdel(C) // qdel
|
||||
return C
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
// or click on a turf that already contains a "node" cable
|
||||
@@ -675,7 +683,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
if(!isturf(U))
|
||||
return
|
||||
|
||||
var/turf/T = C.loc
|
||||
var/turf/T = get_turf(C)
|
||||
|
||||
if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
return
|
||||
@@ -700,38 +708,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
// cable is pointing at us, we're standing on an open tile
|
||||
// so create a stub pointing at the clicked cable on our tile
|
||||
|
||||
var/fdirn = turn(dirn, 180) // the opposite direction
|
||||
|
||||
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, "There's already a cable at that position.")
|
||||
return
|
||||
|
||||
var/obj/structure/cable/NC = new(U)
|
||||
NC.cableColor(color)
|
||||
|
||||
NC.d1 = 0
|
||||
NC.d2 = fdirn
|
||||
NC.add_fingerprint()
|
||||
NC.updateicon()
|
||||
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/newPN = new()
|
||||
newPN.add_cable(NC)
|
||||
|
||||
NC.mergeConnectedNetworks(NC.d2) //merge the powernet with adjacents powernets
|
||||
NC.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
|
||||
if(NC.d2 & (NC.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
NC.mergeDiagonalsNetworks(NC.d2)
|
||||
|
||||
use(1)
|
||||
|
||||
if(NC.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(NC.loc, 1, NC.color)
|
||||
qdel(NC) // qdel
|
||||
|
||||
place_turf(T, user, turn(dirn, 180))
|
||||
return
|
||||
|
||||
// exisiting cable doesn't point at our position, so see if it's a stub
|
||||
@@ -777,7 +754,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(C.loc, 2, C.color)
|
||||
new/obj/item/stack/cable_coil(get_turf(C), 2, C.color)
|
||||
qdel(C) // qdel
|
||||
return
|
||||
|
||||
|
||||
@@ -81,13 +81,14 @@
|
||||
|
||||
/obj/item/projectile/bullet/pellet
|
||||
name = "pellet"
|
||||
damage = 15
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/New()
|
||||
range = rand(8)
|
||||
range = rand(1, 8)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/on_range()
|
||||
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
|
||||
@@ -99,7 +100,8 @@
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/New()
|
||||
range = rand(10)
|
||||
range = rand(1, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/plastication/on_reaction(datum/reagents/holder)
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/mineral/plastic
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/plastic
|
||||
M.amount = 10
|
||||
M.forceMove(get_turf(holder.my_atom))
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
item_state = "cespace_suit"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
species_fit = null
|
||||
sprite_sheets = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva/anomaly
|
||||
name = "Excavation hood"
|
||||
@@ -30,3 +33,6 @@
|
||||
icon_state = "cespace_helmet"
|
||||
item_state = "cespace_helmet"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100)
|
||||
species_fit = null
|
||||
sprite_sheets = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
@@ -789,6 +789,54 @@
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
var/can_deconstruct = TRUE
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(PLASTIC_FLAPS_NORMAL)
|
||||
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] from the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
@@ -844,6 +892,11 @@
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/proc/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "\improper Airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
Reference in New Issue
Block a user