mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #7801 from Mloc/bs12-glowypipes
refactor buckling + glowy HE pipes
This commit is contained in:
@@ -489,6 +489,7 @@
|
|||||||
#include "code\game\mecha\working\hoverpod.dm"
|
#include "code\game\mecha\working\hoverpod.dm"
|
||||||
#include "code\game\mecha\working\ripley.dm"
|
#include "code\game\mecha\working\ripley.dm"
|
||||||
#include "code\game\mecha\working\working.dm"
|
#include "code\game\mecha\working\working.dm"
|
||||||
|
#include "code\game\objects\buckling.dm"
|
||||||
#include "code\game\objects\empulse.dm"
|
#include "code\game\objects\empulse.dm"
|
||||||
#include "code\game\objects\explosion.dm"
|
#include "code\game\objects\explosion.dm"
|
||||||
#include "code\game\objects\explosion_recursive.dm"
|
#include "code\game\objects\explosion_recursive.dm"
|
||||||
|
|||||||
@@ -3,18 +3,23 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
|||||||
icon = 'icons/atmos/heat.dmi'
|
icon = 'icons/atmos/heat.dmi'
|
||||||
icon_state = "intact"
|
icon_state = "intact"
|
||||||
pipe_icon = "hepipe"
|
pipe_icon = "hepipe"
|
||||||
|
color = "#404040"
|
||||||
level = 2
|
level = 2
|
||||||
var/initialize_directions_he
|
var/initialize_directions_he
|
||||||
var/surface = 2 //surface area in m^2
|
var/surface = 2 //surface area in m^2
|
||||||
|
var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
|
||||||
|
|
||||||
minimum_temperature_difference = 20
|
minimum_temperature_difference = 20
|
||||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||||
|
|
||||||
|
buckle_lying = 1
|
||||||
|
|
||||||
// BubbleWrap
|
// BubbleWrap
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
|
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
|
||||||
// BubbleWrap END
|
// BubbleWrap END
|
||||||
|
color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default.
|
||||||
|
|
||||||
initialize()
|
initialize()
|
||||||
normalize_dir()
|
normalize_dir()
|
||||||
@@ -48,19 +53,53 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
|||||||
if(!parent)
|
if(!parent)
|
||||||
..()
|
..()
|
||||||
else
|
else
|
||||||
var/environment_temperature = 0
|
var/datum/gas_mixture/pipe_air = return_air()
|
||||||
if(istype(loc, /turf/simulated/))
|
if(istype(loc, /turf/simulated/))
|
||||||
|
var/environment_temperature = 0
|
||||||
if(loc:blocks_air)
|
if(loc:blocks_air)
|
||||||
environment_temperature = loc:temperature
|
environment_temperature = loc:temperature
|
||||||
else
|
else
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
environment_temperature = environment.temperature
|
environment_temperature = environment.temperature
|
||||||
var/datum/gas_mixture/pipe_air = return_air()
|
|
||||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||||
else if(istype(loc, /turf/space/))
|
else if(istype(loc, /turf/space/))
|
||||||
parent.radiate_heat_to_space(surface, 1)
|
parent.radiate_heat_to_space(surface, 1)
|
||||||
|
|
||||||
|
if(buckled_mob)
|
||||||
|
var/hc = pipe_air.heat_capacity()
|
||||||
|
var/avg_temp = (pipe_air.temperature * hc + buckled_mob.bodytemperature * 3500) / (hc + 3500)
|
||||||
|
pipe_air.temperature = avg_temp
|
||||||
|
buckled_mob.bodytemperature = avg_temp
|
||||||
|
|
||||||
|
var/heat_limit = 1000
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/H = buckled_mob
|
||||||
|
if(istype(H) && H.species)
|
||||||
|
heat_limit = H.species.heat_level_3
|
||||||
|
|
||||||
|
if(pipe_air.temperature > heat_limit + 1)
|
||||||
|
buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest", used_weapon = "Excessive Heat")
|
||||||
|
|
||||||
|
//fancy radiation glowing
|
||||||
|
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
|
||||||
|
if(abs(pipe_air.temperature - icon_temperature) > 10)
|
||||||
|
icon_temperature = pipe_air.temperature
|
||||||
|
|
||||||
|
var/h_r = heat2color_r(icon_temperature)
|
||||||
|
var/h_g = heat2color_g(icon_temperature)
|
||||||
|
var/h_b = heat2color_b(icon_temperature)
|
||||||
|
|
||||||
|
if(icon_temperature < 2000) //scale up overlay until 2000K
|
||||||
|
var/scale = (icon_temperature - 500) / 1500
|
||||||
|
h_r = 64 + (h_r - 64)*scale
|
||||||
|
h_g = 64 + (h_g - 64)*scale
|
||||||
|
h_b = 64 + (h_b - 64)*scale
|
||||||
|
|
||||||
|
animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||||
icon = 'icons/atmos/junction.dmi'
|
icon = 'icons/atmos/junction.dmi'
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
var/alert_pressure = 80*ONE_ATMOSPHERE
|
var/alert_pressure = 80*ONE_ATMOSPHERE
|
||||||
//minimum pressure before check_pressure(...) should be called
|
//minimum pressure before check_pressure(...) should be called
|
||||||
|
|
||||||
|
can_buckle = 1
|
||||||
|
buckle_require_restraints = 1
|
||||||
|
buckle_lying = -1
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/drain_power()
|
/obj/machinery/atmospherics/pipe/drain_power()
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ proc/tg_list2text(list/list, glue=",")
|
|||||||
. += copytext(text, last_found, found)
|
. += copytext(text, last_found, found)
|
||||||
last_found = found + delim_len
|
last_found = found + delim_len
|
||||||
while(found)
|
while(found)
|
||||||
|
|
||||||
/proc/text2numlist(text, delimiter="\n")
|
/proc/text2numlist(text, delimiter="\n")
|
||||||
var/list/num_list = list()
|
var/list/num_list = list()
|
||||||
for(var/x in text2list(text, delimiter))
|
for(var/x in text2list(text, delimiter))
|
||||||
@@ -339,3 +339,31 @@ proc/tg_list2text(list/list, glue=",")
|
|||||||
if("Orange") return 'icons/mob/screen1_Orange.dmi'
|
if("Orange") return 'icons/mob/screen1_Orange.dmi'
|
||||||
if("Midnight") return 'icons/mob/screen1_Midnight.dmi'
|
if("Midnight") return 'icons/mob/screen1_Midnight.dmi'
|
||||||
else return 'icons/mob/screen1_White.dmi'
|
else return 'icons/mob/screen1_White.dmi'
|
||||||
|
|
||||||
|
//adapted from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
|
||||||
|
/proc/heat2color(temp)
|
||||||
|
return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp))
|
||||||
|
|
||||||
|
/proc/heat2color_r(temp)
|
||||||
|
temp /= 100
|
||||||
|
if(temp <= 66)
|
||||||
|
. = 255
|
||||||
|
else
|
||||||
|
. = max(0, min(255, 329.698727446 * (temp - 60) ** -0.1332047592))
|
||||||
|
|
||||||
|
/proc/heat2color_g(temp)
|
||||||
|
temp /= 100
|
||||||
|
if(temp <= 66)
|
||||||
|
. = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661))
|
||||||
|
else
|
||||||
|
. = max(0, min(255, 288.1221695283 * ((temp - 60) ** -0.0755148492)))
|
||||||
|
|
||||||
|
/proc/heat2color_b(temp)
|
||||||
|
temp /= 100
|
||||||
|
if(temp >= 66)
|
||||||
|
. = 255
|
||||||
|
else
|
||||||
|
if(temp <= 16)
|
||||||
|
. = 0
|
||||||
|
else
|
||||||
|
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(target && target.buckled)
|
if(target && target.buckled)
|
||||||
target.buckled.unbuckle()
|
target.buckled.unbuckle_mob()
|
||||||
|
|
||||||
var/list/tempL = L
|
var/list/tempL = L
|
||||||
var/attempt = null
|
var/attempt = null
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
if(target.buckled)
|
if(target.buckled)
|
||||||
var/obj/structure/stool/bed/buckled_to = target.buckled.
|
var/obj/structure/stool/bed/buckled_to = target.buckled.
|
||||||
buckled_to.unbuckle()
|
buckled_to.unbuckle_mob()
|
||||||
|
|
||||||
var/mobloc = get_turf(target.loc)
|
var/mobloc = get_turf(target.loc)
|
||||||
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
|
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ Class Procs:
|
|||||||
|
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
return 0
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
|
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
|
||||||
return
|
return
|
||||||
|
|||||||
86
code/game/objects/buckling.dm
Normal file
86
code/game/objects/buckling.dm
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/obj
|
||||||
|
var/can_buckle = 0
|
||||||
|
var/buckle_movable = 0
|
||||||
|
var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
|
||||||
|
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||||
|
var/mob/living/buckled_mob = null
|
||||||
|
|
||||||
|
/obj/attack_hand(mob/living/user)
|
||||||
|
. = ..()
|
||||||
|
if(can_buckle && buckled_mob)
|
||||||
|
user_unbuckle_mob(user)
|
||||||
|
|
||||||
|
/obj/MouseDrop_T(mob/living/M, mob/living/user)
|
||||||
|
. = ..()
|
||||||
|
if(can_buckle && istype(M))
|
||||||
|
user_buckle_mob(M, user)
|
||||||
|
|
||||||
|
/obj/Del()
|
||||||
|
unbuckle_mob()
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/proc/buckle_mob(mob/living/M)
|
||||||
|
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
M.buckled = src
|
||||||
|
M.set_dir(dir)
|
||||||
|
M.update_canmove()
|
||||||
|
buckled_mob = M
|
||||||
|
post_buckle_mob(M)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/proc/unbuckle_mob()
|
||||||
|
if(buckled_mob && buckled_mob.buckled == src)
|
||||||
|
. = buckled_mob
|
||||||
|
buckled_mob.buckled = null
|
||||||
|
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||||
|
buckled_mob.update_canmove()
|
||||||
|
buckled_mob = null
|
||||||
|
|
||||||
|
post_buckle_mob(.)
|
||||||
|
|
||||||
|
/obj/proc/post_buckle_mob(mob/living/M)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
|
||||||
|
if(!ticker)
|
||||||
|
user << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
|
||||||
|
if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(istype(M, /mob/living/carbon/slime))
|
||||||
|
user << "<span class='warning'>The [M] is too squishy to buckle in.</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
add_fingerprint(user)
|
||||||
|
unbuckle_mob()
|
||||||
|
|
||||||
|
if(buckle_mob(M))
|
||||||
|
if(M == user)
|
||||||
|
M.visible_message(\
|
||||||
|
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
|
||||||
|
"<span class='notice'>You buckle yourself to [src].</span>",\
|
||||||
|
"<span class='notice'>You hear metal clanking.</span>")
|
||||||
|
else
|
||||||
|
M.visible_message(\
|
||||||
|
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
|
||||||
|
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||||
|
"<span class='notice'>You hear metal clanking.</span>")
|
||||||
|
|
||||||
|
/obj/proc/user_unbuckle_mob(mob/user)
|
||||||
|
var/mob/living/M = unbuckle_mob()
|
||||||
|
world << 3
|
||||||
|
if(M)
|
||||||
|
if(M != user)
|
||||||
|
M.visible_message(\
|
||||||
|
"<span class='notice'>[M.name] was unbuckled by [user.name]!</span>",\
|
||||||
|
"<span class='notice'>You were unbuckled from [src] by [user.name].</span>",\
|
||||||
|
"<span class='notice'>You hear metal clanking.</span>")
|
||||||
|
else
|
||||||
|
M.visible_message(\
|
||||||
|
"<span class='notice'>[M.name] unbuckled themselves!</span>",\
|
||||||
|
"<span class='notice'>You unbuckle yourself from [src].</span>",\
|
||||||
|
"<span class='notice'>You hear metal clanking.</span>")
|
||||||
|
add_fingerprint(user)
|
||||||
|
return M
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
if (source.handcuffed)
|
if (source.handcuffed)
|
||||||
var/obj/item/weapon/W = source.handcuffed
|
var/obj/item/weapon/W = source.handcuffed
|
||||||
source.handcuffed = null
|
source.handcuffed = null
|
||||||
|
if(source.buckled && source.buckled.buckle_require_restraints)
|
||||||
|
source.buckled.unbuckle_mob()
|
||||||
source.update_inv_handcuffed()
|
source.update_inv_handcuffed()
|
||||||
if (source.client)
|
if (source.client)
|
||||||
source.client.screen -= W
|
source.client.screen -= W
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(user && user.buckled)
|
if(user && user.buckled)
|
||||||
user.buckled.unbuckle()
|
user.buckled.unbuckle_mob()
|
||||||
|
|
||||||
var/list/tempL = L
|
var/list/tempL = L
|
||||||
var/attempt = null
|
var/attempt = null
|
||||||
|
|||||||
@@ -119,6 +119,8 @@
|
|||||||
"You cut \the [C]'s restraints with \the [src]!",\
|
"You cut \the [C]'s restraints with \the [src]!",\
|
||||||
"You hear cable being cut.")
|
"You hear cable being cut.")
|
||||||
C.handcuffed = null
|
C.handcuffed = null
|
||||||
|
if(C.buckled && C.buckled.buckle_require_restraints)
|
||||||
|
C.buckled.unbuckle_mob()
|
||||||
C.update_inv_handcuffed()
|
C.update_inv_handcuffed()
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
@@ -531,4 +533,4 @@
|
|||||||
if(!resolved && tool && target)
|
if(!resolved && tool && target)
|
||||||
tool.afterattack(target,user,1)
|
tool.afterattack(target,user,1)
|
||||||
if(tool)
|
if(tool)
|
||||||
tool.loc = src*/
|
tool.loc = src*/
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.species.can_shred(user))
|
if(H.species.can_shred(user))
|
||||||
attack_generic(user,1,"slices")
|
attack_generic(user,1,"slices")
|
||||||
return
|
return ..()
|
||||||
|
|
||||||
/obj/structure/blob_act()
|
/obj/structure/blob_act()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
@@ -67,10 +67,10 @@
|
|||||||
/obj/structure/MouseDrop_T(mob/target, mob/user)
|
/obj/structure/MouseDrop_T(mob/target, mob/user)
|
||||||
|
|
||||||
var/mob/living/H = user
|
var/mob/living/H = user
|
||||||
if(!istype(H) || target != user) // No making other people climb onto tables.
|
if(istype(H) && can_climb(H) && target == user)
|
||||||
return
|
do_climb(target)
|
||||||
|
else
|
||||||
do_climb(target)
|
return ..()
|
||||||
|
|
||||||
/obj/structure/proc/can_climb(var/mob/living/user)
|
/obj/structure/proc/can_climb(var/mob/living/user)
|
||||||
if (!can_touch(user) || !climbable)
|
if (!can_touch(user) || !climbable)
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
||||||
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
||||||
step(src, direction)
|
step(src, direction)
|
||||||
update_mob()
|
update_mob()
|
||||||
@@ -226,22 +226,9 @@
|
|||||||
buckled_mob.loc = loc
|
buckled_mob.loc = loc
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user)
|
/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
||||||
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
|
|
||||||
return
|
|
||||||
|
|
||||||
unbuckle()
|
|
||||||
|
|
||||||
M.visible_message(\
|
|
||||||
"<span class='notice'>[M] climbs onto the [callme]!</span>",\
|
|
||||||
"<span class='notice'>You climb onto the [callme]!</span>")
|
|
||||||
M.buckled = src
|
|
||||||
M.loc = loc
|
|
||||||
M.set_dir(dir)
|
|
||||||
M.update_canmove()
|
|
||||||
buckled_mob = M
|
|
||||||
update_mob()
|
update_mob()
|
||||||
add_fingerprint(user)
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/update_layer()
|
/obj/structure/stool/bed/chair/janicart/update_layer()
|
||||||
@@ -251,11 +238,12 @@
|
|||||||
layer = OBJ_LAYER
|
layer = OBJ_LAYER
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/unbuckle()
|
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
|
||||||
if(buckled_mob)
|
var/mob/living/M = ..()
|
||||||
buckled_mob.pixel_x = 0
|
if(M)
|
||||||
buckled_mob.pixel_y = 0
|
M.pixel_x = 0
|
||||||
..()
|
M.pixel_y = 0
|
||||||
|
return M
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/set_dir()
|
/obj/structure/stool/bed/chair/janicart/set_dir()
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
icon_state = "nest"
|
icon_state = "nest"
|
||||||
var/health = 100
|
var/health = 100
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
|
/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob)
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
if(buckled_mob.buckled == src)
|
if(buckled_mob.buckled == src)
|
||||||
if(buckled_mob != user)
|
if(buckled_mob != user)
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"<span class='notice'>You hear squelching...</span>")
|
"<span class='notice'>You hear squelching...</span>")
|
||||||
buckled_mob.pixel_y = 0
|
buckled_mob.pixel_y = 0
|
||||||
buckled_mob.old_y = 0
|
buckled_mob.old_y = 0
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
else
|
else
|
||||||
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
|
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
|
||||||
return
|
return
|
||||||
@@ -32,16 +32,15 @@
|
|||||||
buckled_mob.last_special = world.time
|
buckled_mob.last_special = world.time
|
||||||
buckled_mob.pixel_y = 0
|
buckled_mob.pixel_y = 0
|
||||||
buckled_mob.old_y = 0
|
buckled_mob.old_y = 0
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
||||||
|
|
||||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||||
return
|
return
|
||||||
|
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
|
|
||||||
var/mob/living/carbon/xenos = user
|
var/mob/living/carbon/xenos = user
|
||||||
var/mob/living/carbon/victim = M
|
var/mob/living/carbon/victim = M
|
||||||
|
|||||||
@@ -11,8 +11,10 @@
|
|||||||
name = "bed"
|
name = "bed"
|
||||||
desc = "This is used to lie in, sleep in or strap on."
|
desc = "This is used to lie in, sleep in or strap on."
|
||||||
icon_state = "bed"
|
icon_state = "bed"
|
||||||
var/mob/living/buckled_mob
|
can_buckle = 1
|
||||||
var/movable = 0 // For mobility checks
|
buckle_lying = 1
|
||||||
|
//var/mob/living/buckled_mob
|
||||||
|
//var/movable = 0 // For mobility checks
|
||||||
|
|
||||||
/obj/structure/stool/bed/psych
|
/obj/structure/stool/bed/psych
|
||||||
name = "psychiatrists couch"
|
name = "psychiatrists couch"
|
||||||
@@ -24,7 +26,7 @@
|
|||||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||||
icon_state = "abed"
|
icon_state = "abed"
|
||||||
|
|
||||||
/obj/structure/stool/bed/Del()
|
/*/obj/structure/stool/bed/Del()
|
||||||
unbuckle()
|
unbuckle()
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
@@ -80,7 +82,7 @@
|
|||||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||||
if (!ticker)
|
if (!ticker)
|
||||||
user << "You can't buckle anyone in before the game starts."
|
user << "You can't buckle anyone in before the game starts."
|
||||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
|
if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
|
||||||
return
|
return
|
||||||
|
|
||||||
if (istype(M, /mob/living/carbon/slime))
|
if (istype(M, /mob/living/carbon/slime))
|
||||||
@@ -106,7 +108,7 @@
|
|||||||
src.buckled_mob = M
|
src.buckled_mob = M
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
afterbuckle(M)
|
afterbuckle(M)
|
||||||
return
|
return*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Roller beds
|
* Roller beds
|
||||||
@@ -120,7 +122,7 @@
|
|||||||
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/roller_holder))
|
if(istype(W,/obj/item/roller_holder))
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
manual_unbuckle()
|
user_unbuckle_mob(user)
|
||||||
else
|
else
|
||||||
visible_message("[user] collapses \the [src.name].")
|
visible_message("[user] collapses \the [src.name].")
|
||||||
new/obj/item/roller(get_turf(src))
|
new/obj/item/roller(get_turf(src))
|
||||||
@@ -185,29 +187,19 @@
|
|||||||
else
|
else
|
||||||
buckled_mob = null
|
buckled_mob = null
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob)
|
||||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
|
if(M == buckled_mob)
|
||||||
return
|
M.pixel_y = 6
|
||||||
M.pixel_y = 6
|
M.old_y = 6
|
||||||
M.old_y = 6
|
density = 1
|
||||||
density = 1
|
icon_state = "up"
|
||||||
icon_state = "up"
|
else
|
||||||
..()
|
buckled_mob.pixel_y = 0
|
||||||
return
|
buckled_mob.old_y = 0
|
||||||
|
density = 0
|
||||||
|
icon_state = "down"
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
|
return ..()
|
||||||
if(buckled_mob)
|
|
||||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
|
||||||
buckled_mob.pixel_y = 0
|
|
||||||
buckled_mob.old_y = 0
|
|
||||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
|
||||||
buckled_mob.buckled = null
|
|
||||||
buckled_mob.update_canmove()
|
|
||||||
buckled_mob = null
|
|
||||||
density = 0
|
|
||||||
icon_state = "down"
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -2,12 +2,10 @@
|
|||||||
name = "chair"
|
name = "chair"
|
||||||
desc = "You sit in this. Either by will or force."
|
desc = "You sit in this. Either by will or force."
|
||||||
icon_state = "chair"
|
icon_state = "chair"
|
||||||
|
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||||
|
|
||||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||||
|
|
||||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/New()
|
/obj/structure/stool/bed/chair/New()
|
||||||
..()
|
..()
|
||||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||||
@@ -68,11 +66,6 @@
|
|||||||
src.set_dir(turn(src.dir, 90))
|
src.set_dir(turn(src.dir, 90))
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
|
||||||
if(!istype(M)) return
|
|
||||||
buckle_mob(M, user)
|
|
||||||
return
|
|
||||||
|
|
||||||
// Chair types
|
// Chair types
|
||||||
/obj/structure/stool/bed/chair/wood/normal
|
/obj/structure/stool/bed/chair/wood/normal
|
||||||
icon_state = "wooden_chair"
|
icon_state = "wooden_chair"
|
||||||
@@ -105,7 +98,7 @@
|
|||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/afterbuckle()
|
/obj/structure/stool/bed/chair/comfy/post_buckle_mob()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
overlays += armrest
|
overlays += armrest
|
||||||
else
|
else
|
||||||
@@ -122,7 +115,7 @@
|
|||||||
|
|
||||||
/obj/structure/stool/bed/chair/office
|
/obj/structure/stool/bed/chair/office
|
||||||
anchored = 0
|
anchored = 0
|
||||||
movable = 1
|
buckle_movable = 1
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/black
|
/obj/structure/stool/bed/chair/comfy/black
|
||||||
color = rgb(167,164,153)
|
color = rgb(167,164,153)
|
||||||
@@ -143,15 +136,14 @@
|
|||||||
if (O != occupant)
|
if (O != occupant)
|
||||||
Bump(O)
|
Bump(O)
|
||||||
else
|
else
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office/Bump(atom/A)
|
/obj/structure/stool/bed/chair/office/Bump(atom/A)
|
||||||
..()
|
..()
|
||||||
if(!buckled_mob) return
|
if(!buckled_mob) return
|
||||||
|
|
||||||
if(propelled)
|
if(propelled)
|
||||||
var/mob/living/occupant = buckled_mob
|
var/mob/living/occupant = unbuckle_mob()
|
||||||
unbuckle()
|
|
||||||
|
|
||||||
var/def_zone = ran_zone()
|
var/def_zone = ran_zone()
|
||||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
/obj/structure/stool/MouseDrop(atom/over_object)
|
||||||
if (istype(over_object, /mob/living/carbon/human))
|
if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it
|
||||||
var/mob/living/carbon/human/H = over_object
|
var/mob/living/carbon/human/H = over_object
|
||||||
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
|
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
|
||||||
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
|
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
|
||||||
@@ -42,6 +42,8 @@
|
|||||||
src.loc = S
|
src.loc = S
|
||||||
H.put_in_hands(S)
|
H.put_in_hands(S)
|
||||||
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
|
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
|
||||||
|
return
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/weapon/stool
|
/obj/item/weapon/stool
|
||||||
name = "stool"
|
name = "stool"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
desc = "You sit in this. Either by will or force."
|
desc = "You sit in this. Either by will or force."
|
||||||
icon_state = "wheelchair"
|
icon_state = "wheelchair"
|
||||||
anchored = 0
|
anchored = 0
|
||||||
movable = 1
|
buckle_movable = 1
|
||||||
|
|
||||||
var/driving = 0
|
var/driving = 0
|
||||||
var/mob/living/pulling = null
|
var/mob/living/pulling = null
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
if (O != occupant)
|
if (O != occupant)
|
||||||
Bump(O)
|
Bump(O)
|
||||||
else
|
else
|
||||||
unbuckle()
|
unbuckle_mob()
|
||||||
if (pulling && (get_dist(src, pulling) > 1))
|
if (pulling && (get_dist(src, pulling) > 1))
|
||||||
pulling.pulledby = null
|
pulling.pulledby = null
|
||||||
pulling << "\red You lost your grip!"
|
pulling << "\red You lost your grip!"
|
||||||
@@ -102,11 +102,11 @@
|
|||||||
if (occupant && (src.loc != occupant.loc))
|
if (occupant && (src.loc != occupant.loc))
|
||||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
|
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||||
if (pulling)
|
if (pulling)
|
||||||
MouseDrop(usr)
|
MouseDrop(usr)
|
||||||
else
|
else
|
||||||
manual_unbuckle(user)
|
user_unbuckle_mob(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||||
@@ -138,8 +138,7 @@
|
|||||||
if(!buckled_mob) return
|
if(!buckled_mob) return
|
||||||
|
|
||||||
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
||||||
var/mob/living/occupant = buckled_mob
|
var/mob/living/occupant = unbuckle_mob()
|
||||||
unbuckle()
|
|
||||||
|
|
||||||
if (pulling && (pulling.a_intent == "hurt"))
|
if (pulling && (pulling.a_intent == "hurt"))
|
||||||
occupant.throw_at(A, 3, 3, pulling)
|
occupant.throw_at(A, 3, 3, pulling)
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
// Life vars/
|
// Life vars/
|
||||||
var/energy = 0
|
var/energy = 0
|
||||||
var/obj/effect/plant_controller/master = null
|
var/obj/effect/plant_controller/master = null
|
||||||
var/mob/living/buckled_mob
|
|
||||||
var/datum/seed/seed
|
var/datum/seed/seed
|
||||||
|
|
||||||
/obj/effect/plantsegment/New()
|
/obj/effect/plantsegment/New()
|
||||||
@@ -56,7 +55,7 @@
|
|||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if(WT.remove_fuel(0, user)) del src
|
if(WT.remove_fuel(0, user)) del src
|
||||||
else
|
else
|
||||||
manual_unbuckle(user)
|
user_unbuckle_mob(user)
|
||||||
return
|
return
|
||||||
// Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
|
// Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
|
||||||
..()
|
..()
|
||||||
@@ -71,39 +70,7 @@
|
|||||||
update()
|
update()
|
||||||
return
|
return
|
||||||
|
|
||||||
manual_unbuckle(user)
|
user_unbuckle_mob(user)
|
||||||
|
|
||||||
/obj/effect/plantsegment/proc/unbuckle()
|
|
||||||
if(buckled_mob)
|
|
||||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
|
||||||
buckled_mob.buckled = null
|
|
||||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
|
||||||
buckled_mob.update_canmove()
|
|
||||||
buckled_mob = null
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/effect/plantsegment/proc/manual_unbuckle(mob/user as mob)
|
|
||||||
if(buckled_mob)
|
|
||||||
if(prob(seed ? min(max(0,100 - seed.potency),100) : 50))
|
|
||||||
if(buckled_mob.buckled == src)
|
|
||||||
if(buckled_mob != user)
|
|
||||||
buckled_mob.visible_message(\
|
|
||||||
"<span class='notice'>[user.name] frees [buckled_mob.name] from [src].</span>",\
|
|
||||||
"<span class='notice'>[user.name] frees you from [src].</span>",\
|
|
||||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
|
||||||
else
|
|
||||||
buckled_mob.visible_message(\
|
|
||||||
"<span class='notice'>[buckled_mob.name] struggles free of [src].</span>",\
|
|
||||||
"<span class='notice'>You untangle [src] from around yourself.</span>",\
|
|
||||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
|
||||||
unbuckle()
|
|
||||||
else
|
|
||||||
var/text = pick("rips","tears","pulls")
|
|
||||||
user.visible_message(\
|
|
||||||
"<span class='notice'>[user.name] [text] at [src].</span>",\
|
|
||||||
"<span class='notice'>You [text] at [src].</span>",\
|
|
||||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/effect/plantsegment/proc/grow()
|
/obj/effect/plantsegment/proc/grow()
|
||||||
|
|
||||||
|
|||||||
@@ -354,6 +354,8 @@
|
|||||||
else if (W == handcuffed)
|
else if (W == handcuffed)
|
||||||
handcuffed = null
|
handcuffed = null
|
||||||
update_inv_handcuffed()
|
update_inv_handcuffed()
|
||||||
|
if(buckled && buckled.buckle_require_restraints)
|
||||||
|
buckled.unbuckle_mob()
|
||||||
|
|
||||||
else if (W == legcuffed)
|
else if (W == legcuffed)
|
||||||
legcuffed = null
|
legcuffed = null
|
||||||
|
|||||||
@@ -131,6 +131,10 @@
|
|||||||
else
|
else
|
||||||
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] handcuffed!</span>\n"
|
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] handcuffed!</span>\n"
|
||||||
|
|
||||||
|
//buckled
|
||||||
|
if(buckled)
|
||||||
|
msg += "<span class='warning'>[t_He] [t_is] \icon[buckled] buckled to [buckled]!</span>\n"
|
||||||
|
|
||||||
//belt
|
//belt
|
||||||
if(belt)
|
if(belt)
|
||||||
if(belt.blood_DNA)
|
if(belt.blood_DNA)
|
||||||
|
|||||||
@@ -167,6 +167,8 @@
|
|||||||
update_inv_back()
|
update_inv_back()
|
||||||
else if (W == handcuffed)
|
else if (W == handcuffed)
|
||||||
handcuffed = null
|
handcuffed = null
|
||||||
|
if(buckled && buckled.buckle_require_restraints)
|
||||||
|
buckled.unbuckle_mob()
|
||||||
success = 1
|
success = 1
|
||||||
update_inv_handcuffed()
|
update_inv_handcuffed()
|
||||||
else if (W == legcuffed)
|
else if (W == legcuffed)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
var/cold_level_3 = 120 // Cold damage level 3 below this point.
|
var/cold_level_3 = 120 // Cold damage level 3 below this point.
|
||||||
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
||||||
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
||||||
var/heat_level_3 = 1000 // Heat damage level 2 above this point.
|
var/heat_level_3 = 1000 // Heat damage level 3 above this point.
|
||||||
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
|
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
|
||||||
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
||||||
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
|
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
|
||||||
|
|||||||
@@ -555,9 +555,9 @@
|
|||||||
for(var/mob/O in viewers(C))
|
for(var/mob/O in viewers(C))
|
||||||
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
|
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
|
||||||
C << "\blue You successfully unbuckle yourself."
|
C << "\blue You successfully unbuckle yourself."
|
||||||
C.buckled.manual_unbuckle(C)
|
C.buckled.user_unbuckle_mob(C)
|
||||||
else
|
else
|
||||||
L.buckled.manual_unbuckle(L)
|
L.buckled.user_unbuckle_mob(L)
|
||||||
|
|
||||||
//Breaking out of a locker?
|
//Breaking out of a locker?
|
||||||
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
||||||
@@ -657,6 +657,8 @@
|
|||||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||||
del(CM.handcuffed)
|
del(CM.handcuffed)
|
||||||
CM.handcuffed = null
|
CM.handcuffed = null
|
||||||
|
if(buckled && buckled.buckle_require_restraints)
|
||||||
|
buckled.unbuckle_mob()
|
||||||
CM.update_inv_handcuffed()
|
CM.update_inv_handcuffed()
|
||||||
else
|
else
|
||||||
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
|
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
|
||||||
|
|||||||
@@ -853,21 +853,17 @@ note dizziness decrements automatically in the mob's Life() proc.
|
|||||||
canmove = 0
|
canmove = 0
|
||||||
pixel_y = V.mob_offset_y - 5
|
pixel_y = V.mob_offset_y - 5
|
||||||
else
|
else
|
||||||
lying = 0
|
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
|
||||||
canmove = 1
|
canmove = 1
|
||||||
pixel_y = V.mob_offset_y
|
pixel_y = V.mob_offset_y
|
||||||
else if(buckled)
|
else if(buckled)
|
||||||
if (!buckled.movable)
|
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
|
||||||
|
if (!buckled.buckle_movable)
|
||||||
anchored = 1
|
anchored = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
if(istype(buckled,/obj/structure/stool/bed/chair) )
|
|
||||||
lying = 0
|
|
||||||
else
|
|
||||||
lying = 1
|
|
||||||
else
|
else
|
||||||
anchored = 0
|
anchored = 0
|
||||||
canmove = 1
|
canmove = 1
|
||||||
lying = 0
|
|
||||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
||||||
lying = 1
|
lying = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -904,7 +900,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
|||||||
if(!canface() || client.moving || world.time < client.move_delay)
|
if(!canface() || client.moving || world.time < client.move_delay)
|
||||||
return 0
|
return 0
|
||||||
set_dir(ndir)
|
set_dir(ndir)
|
||||||
if(buckled && buckled.movable)
|
if(buckled && buckled.buckle_movable)
|
||||||
buckled.set_dir(ndir)
|
buckled.set_dir(ndir)
|
||||||
client.move_delay += movement_delay()
|
client.move_delay += movement_delay()
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
if(prob(100 * weakness))
|
if(prob(100 * weakness))
|
||||||
user << "\red You are suddenly zapped away elsewhere!"
|
user << "\red You are suddenly zapped away elsewhere!"
|
||||||
if (user.buckled)
|
if (user.buckled)
|
||||||
user.buckled.unbuckle()
|
user.buckled.unbuckle_mob()
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||||
sparks.set_up(3, 0, get_turf(user))
|
sparks.set_up(3, 0, get_turf(user))
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
if(prob(100 * weakness))
|
if(prob(100 * weakness))
|
||||||
M << "\red You are displaced by a strange force!"
|
M << "\red You are displaced by a strange force!"
|
||||||
if(M.buckled)
|
if(M.buckled)
|
||||||
M.buckled.unbuckle()
|
M.buckled.unbuckle_mob()
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||||
sparks.set_up(3, 0, get_turf(M))
|
sparks.set_up(3, 0, get_turf(M))
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
if(prob(100 * weakness))
|
if(prob(100 * weakness))
|
||||||
M << "\red You are displaced by a strange force!"
|
M << "\red You are displaced by a strange force!"
|
||||||
if(M.buckled)
|
if(M.buckled)
|
||||||
M.buckled.unbuckle()
|
M.buckled.unbuckle_mob()
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||||
sparks.set_up(3, 0, get_turf(M))
|
sparks.set_up(3, 0, get_turf(M))
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
animate_movement=1
|
animate_movement=1
|
||||||
luminosity = 3
|
luminosity = 3
|
||||||
|
|
||||||
|
can_buckle = 1
|
||||||
|
buckle_movable = 1
|
||||||
|
buckle_lying = 0
|
||||||
|
|
||||||
var/attack_log = null
|
var/attack_log = null
|
||||||
var/on = 0
|
var/on = 0
|
||||||
var/health = 0 //do not forget to set health for your vehicle!
|
var/health = 0 //do not forget to set health for your vehicle!
|
||||||
@@ -25,7 +29,6 @@
|
|||||||
var/emagged = 0
|
var/emagged = 0
|
||||||
var/powered = 0 //set if vehicle is powered and should use fuel when moving
|
var/powered = 0 //set if vehicle is powered and should use fuel when moving
|
||||||
var/move_delay = 1 //set this to limit the speed of the vehicle
|
var/move_delay = 1 //set this to limit the speed of the vehicle
|
||||||
var/movable = 1
|
|
||||||
|
|
||||||
var/obj/item/weapon/cell/cell
|
var/obj/item/weapon/cell/cell
|
||||||
var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move
|
var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move
|
||||||
@@ -298,9 +301,7 @@
|
|||||||
C.layer = layer + 0.1 //so it sits above the vehicle
|
C.layer = layer + 0.1 //so it sits above the vehicle
|
||||||
|
|
||||||
if(ismob(C))
|
if(ismob(C))
|
||||||
var/mob/M = C
|
buckle_mob(C)
|
||||||
M.buckled = src
|
|
||||||
M.update_canmove()
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -343,10 +344,7 @@
|
|||||||
load.layer = initial(load.layer)
|
load.layer = initial(load.layer)
|
||||||
|
|
||||||
if(ismob(load))
|
if(ismob(load))
|
||||||
var/mob/M = load
|
unbuckle_mob(load)
|
||||||
M.buckled = null
|
|
||||||
M.anchored = initial(M.anchored)
|
|
||||||
M.update_canmove()
|
|
||||||
|
|
||||||
load = null
|
load = null
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
Reference in New Issue
Block a user