mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Merge pull request #12240 from phil235/BugFixBoogalooD
some simple Bugfixes
This commit is contained in:
@@ -52,17 +52,11 @@
|
||||
if(usr.canmove && !usr.stat && !usr.restrained() && can_toggle)
|
||||
if(world.time > cooldown + toggle_cooldown)
|
||||
cooldown = world.time
|
||||
up = !up
|
||||
if(up)
|
||||
up = !up
|
||||
flags |= (visor_flags)
|
||||
flags_inv |= (visor_flags_inv)
|
||||
icon_state = initial(icon_state)
|
||||
usr << "[toggle_message] \the [src]."
|
||||
usr.update_inv_head()
|
||||
else
|
||||
up = !up
|
||||
flags &= ~(visor_flags)
|
||||
flags_inv &= ~(visor_flags_inv)
|
||||
flags_cover &= 0
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
usr << "[alt_toggle_message] \the [src]"
|
||||
usr.update_inv_head()
|
||||
@@ -70,6 +64,14 @@
|
||||
while(up)
|
||||
playsound(src.loc, "[active_sound]", 100, 0, 4)
|
||||
sleep(15)
|
||||
else
|
||||
flags |= (visor_flags)
|
||||
flags_inv |= (visor_flags_inv)
|
||||
flags_cover = initial(flags_cover)
|
||||
icon_state = initial(icon_state)
|
||||
usr << "[toggle_message] \the [src]."
|
||||
usr.update_inv_head()
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/justice
|
||||
name = "helmet of justice"
|
||||
|
||||
@@ -56,46 +56,49 @@
|
||||
else
|
||||
possible_tools += I.type
|
||||
possible_tools += table_contents
|
||||
var/i = R.tools.len
|
||||
var/I
|
||||
for(var/A in R.tools)
|
||||
I = possible_tools.Find(A)
|
||||
if(I)
|
||||
possible_tools.Cut(I, I+1)
|
||||
i--
|
||||
else
|
||||
break
|
||||
return !i
|
||||
main_loop:
|
||||
for(var/A in R.tools)
|
||||
for(var/I in possible_tools)
|
||||
if(ispath(I,A))
|
||||
possible_tools -= I
|
||||
continue main_loop
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/construct_item(mob/user, datum/table_recipe/R)
|
||||
check_table()
|
||||
var/send_feedback = 1
|
||||
if(check_contents(R) && check_tools(user, R))
|
||||
if(do_after(user, R.time, target = src))
|
||||
if(!check_contents(R) || !check_tools(user, R))
|
||||
if(check_contents(R))
|
||||
if(check_tools(user, R))
|
||||
if(do_after(user, R.time, target = src))
|
||||
if(!check_contents(R))
|
||||
return ", missing component."
|
||||
if(!check_tools(user, R))
|
||||
return ", missing tool."
|
||||
var/atom/movable/I = new R.result (loc)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = I
|
||||
S.create_reagents(S.volume)
|
||||
feedback_add_details("food_made","[S.type]")
|
||||
send_feedback = 0
|
||||
var/list/parts = del_reqs(R, I)
|
||||
for(var/A in parts)
|
||||
if(istype(A, /obj/item))
|
||||
var/atom/movable/B = A
|
||||
B.loc = I
|
||||
B.pixel_x = initial(B.pixel_x)
|
||||
B.pixel_y = initial(B.pixel_y)
|
||||
else
|
||||
if(!I.reagents)
|
||||
I.reagents = new /datum/reagents()
|
||||
I.reagents.reagent_list.Add(A)
|
||||
I.CheckParts()
|
||||
if(send_feedback)
|
||||
feedback_add_details("object_crafted","[I.type]")
|
||||
return 0
|
||||
var/atom/movable/I = new R.result (loc)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = I
|
||||
S.create_reagents(S.volume)
|
||||
feedback_add_details("food_made","[S.type]")
|
||||
send_feedback = 0
|
||||
var/list/parts = del_reqs(R, I)
|
||||
for(var/A in parts)
|
||||
if(istype(A, /obj/item))
|
||||
var/atom/movable/B = A
|
||||
B.loc = I
|
||||
B.pixel_x = initial(B.pixel_x)
|
||||
B.pixel_y = initial(B.pixel_y)
|
||||
else
|
||||
if(!I.reagents)
|
||||
I.reagents = new /datum/reagents()
|
||||
I.reagents.reagent_list.Add(A)
|
||||
I.CheckParts()
|
||||
if(send_feedback)
|
||||
feedback_add_details("object_crafted","[I.type]")
|
||||
return 1
|
||||
return 0
|
||||
return "."
|
||||
return ", missing tool."
|
||||
return ", missing component."
|
||||
|
||||
/obj/structure/table/proc/del_reqs(datum/table_recipe/R, atom/movable/resultobject)
|
||||
var/list/Deletion = list()
|
||||
@@ -224,10 +227,11 @@
|
||||
var/datum/table_recipe/TR = locate(href_list["make"])
|
||||
busy = 1
|
||||
interact(usr)
|
||||
if(construct_item(usr, TR))
|
||||
var/fail_msg = construct_item(usr, TR)
|
||||
if(!fail_msg)
|
||||
usr << "<span class='notice'>[TR.name] constructed.</span>"
|
||||
else
|
||||
usr << "<span class ='warning'>Construction failed.</span>"
|
||||
usr << "<span class ='warning'>Construction failed[fail_msg]</span>"
|
||||
busy = 0
|
||||
interact(usr)
|
||||
if(href_list["forwardCat"])
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/datum/table_recipe/fuegoburrito
|
||||
name ="Fuego plasma burrito"
|
||||
reqs = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tortilla = 1,,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tortilla = 1,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili = 2,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans = 1
|
||||
)
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W) || !user) return
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
@@ -177,7 +176,7 @@
|
||||
stability -= W.force/2
|
||||
check_stability()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/attack_hand(mob/user)
|
||||
|
||||
@@ -126,13 +126,10 @@
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W) || !user) return
|
||||
if(W.force > 10)
|
||||
stability -= W.force/2
|
||||
check_stability()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
//Call this to link a detected shilding unit to the controller
|
||||
|
||||
@@ -557,22 +557,16 @@
|
||||
opened = 1
|
||||
update_icon()
|
||||
else
|
||||
if ( ((stat & BROKEN) || malfhack) \
|
||||
&& !opened \
|
||||
&& W.force >= 5 \
|
||||
&& W.w_class >= 3 \
|
||||
&& prob(20) )
|
||||
if((!opened && wiresexposed && wires.IsInteractionTool(W)) || (issilicon(user) && !(stat & BROKEN) &&!malfhack))
|
||||
return attack_hand(user)
|
||||
|
||||
..()
|
||||
if( ((stat & BROKEN) || malfhack) && !opened && W.force >= 5 && W.w_class >= 3 && prob(20) )
|
||||
opened = 2
|
||||
user.visible_message("<span class='warning'>[user.name] has knocked down the APC cover with the [W.name].</span>", \
|
||||
"<span class='danger'>You knock down the APC cover with your [W.name]!</span>", \
|
||||
"<span class='italics'>You hear bang.</span>")
|
||||
update_icon()
|
||||
else
|
||||
if (istype(user, /mob/living/silicon))
|
||||
return src.attack_hand(user)
|
||||
if (!opened && wiresexposed && wires.IsInteractionTool(W))
|
||||
return src.attack_hand(user)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/emag_act(mob/user)
|
||||
if(!emagged && !malfhack)
|
||||
|
||||
@@ -54,81 +54,69 @@
|
||||
user << "The casing is closed."
|
||||
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W, mob/user, params)
|
||||
src.add_fingerprint(user)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.stage == 1)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
usr << "<span class='notice'>You begin deconstructing [src]...</span>"
|
||||
if (!do_after(usr, 30, target = src))
|
||||
add_fingerprint(user)
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
usr << "<span class='notice'>You begin deconstructing [src]...</span>"
|
||||
if (!do_after(usr, 30, target = src))
|
||||
return
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
user.visible_message("[user.name] deconstructs [src].", \
|
||||
"<span class='notice'>You deconstruct [src].</span>", "<span class='italics'>You hear a ratchet.</span>")
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||
qdel(src)
|
||||
return
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
user.visible_message("[user.name] deconstructs [src].", \
|
||||
"<span class='notice'>You deconstruct [src].</span>", "<span class='italics'>You hear a ratchet.</span>")
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||
qdel(src)
|
||||
if (src.stage == 2)
|
||||
usr << "<span class='warning'>You have to remove the wires first!</span>"
|
||||
return
|
||||
|
||||
if (src.stage == 3)
|
||||
usr << "<span class='warning'>You have to unscrew the case first!</span>"
|
||||
return
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.use(1))
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
icon_state = "tube-construct-stage2"
|
||||
if("bulb")
|
||||
icon_state = "bulb-construct-stage2"
|
||||
stage = 2
|
||||
user.visible_message("[user.name] adds wires to [src].", \
|
||||
"<span class='notice'>You add wires to [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need one length of cable to wire [src]!</span>"
|
||||
return
|
||||
if(2)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
usr << "<span class='warning'>You have to remove the wires first!</span>"
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if (src.stage != 2) return
|
||||
src.stage = 1
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
src.icon_state = "tube-construct-stage1"
|
||||
if("bulb")
|
||||
src.icon_state = "bulb-construct-stage1"
|
||||
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
|
||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||
"<span class='notice'>You remove the wiring from [src].</span>", "<span class='italics'>You hear clicking.</span>")
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
stage = 1
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
icon_state = "tube-construct-stage1"
|
||||
if("bulb")
|
||||
icon_state = "bulb-construct-stage1"
|
||||
new /obj/item/stack/cable_coil(get_turf(loc), 1, "red")
|
||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||
"<span class='notice'>You remove the wiring from [src].</span>", "<span class='italics'>You hear clicking.</span>")
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if (src.stage != 1) return
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (coil.use(1))
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
src.icon_state = "tube-construct-stage2"
|
||||
if("bulb")
|
||||
src.icon_state = "bulb-construct-stage2"
|
||||
src.stage = 2
|
||||
user.visible_message("[user.name] adds wires to [src].", \
|
||||
"<span class='notice'>You add wires to [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need one length of cable to wire [src]!</span>"
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if (src.stage == 2)
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
src.icon_state = "tube-empty"
|
||||
if("bulb")
|
||||
src.icon_state = "bulb-empty"
|
||||
src.stage = 3
|
||||
user.visible_message("[user.name] closes [src]'s casing.", \
|
||||
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
|
||||
switch(fixture_type)
|
||||
|
||||
if("tube")
|
||||
newlight = new /obj/machinery/light/built(src.loc)
|
||||
if ("bulb")
|
||||
newlight = new /obj/machinery/light/small/built(src.loc)
|
||||
|
||||
newlight.dir = src.dir
|
||||
src.transfer_fingerprints_to(newlight)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
user.visible_message("[user.name] closes [src]'s casing.", \
|
||||
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
switch(fixture_type)
|
||||
if("tube")
|
||||
newlight = new /obj/machinery/light/built(loc)
|
||||
if ("bulb")
|
||||
newlight = new /obj/machinery/light/small/built(loc)
|
||||
newlight.dir = dir
|
||||
transfer_fingerprints_to(newlight)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/light_construct/small
|
||||
name = "small light fixture frame"
|
||||
icon_state = "bulb-construct-stage1"
|
||||
@@ -323,7 +311,7 @@
|
||||
//If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N
|
||||
|
||||
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(W.damtype == STAMINA)
|
||||
return
|
||||
@@ -357,9 +345,7 @@
|
||||
newlight.icon_state = "bulb-construct-stage2"
|
||||
newlight.dir = src.dir
|
||||
newlight.stage = 2
|
||||
newlight.fingerprints = src.fingerprints
|
||||
newlight.fingerprintshidden = src.fingerprintshidden
|
||||
newlight.fingerprintslast = src.fingerprintslast
|
||||
transfer_fingerprints_to(newlight)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -150,7 +150,6 @@ field_generator power level display
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field/generator/emp_act()
|
||||
|
||||
@@ -144,11 +144,11 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istool(W))
|
||||
if(src.process_tool_hit(W,user))
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/Move()
|
||||
|
||||
@@ -160,8 +160,11 @@
|
||||
user << "<span class='warning'>No cups left!</span>"
|
||||
return
|
||||
cups--
|
||||
user.put_in_hands(new /obj/item/weapon/reagent_containers/food/drinks/sillycup)
|
||||
user.visible_message("[user] gets a cup from [src].","<span class='notice'>You get a cup from [src].</span>")
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/sillycup/SC = new(loc)
|
||||
if(Adjacent(user)) //not TK
|
||||
user.put_in_hands(SC)
|
||||
user.visible_message("[user] gets a cup from [src].","<span class='notice'>You get a cup from [src].</span>")
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/paper))
|
||||
|
||||
@@ -367,9 +367,9 @@
|
||||
unacidable = 1
|
||||
layer = TURF_LAYER
|
||||
|
||||
New()
|
||||
..()
|
||||
SSobj.processing |= src
|
||||
/obj/effect/golemrune/New()
|
||||
..()
|
||||
SSobj.processing |= src
|
||||
|
||||
/obj/effect/golemrune/process()
|
||||
var/mob/dead/observer/ghost
|
||||
@@ -397,6 +397,7 @@
|
||||
G.set_species(/datum/species/golem/adamantine)
|
||||
G.set_cloned_appearance()
|
||||
G.real_name = "Adamantine Golem ([rand(1, 1000)])"
|
||||
G.name = G.real_name
|
||||
G.dna.unique_enzymes = G.dna.generate_unique_enzymes()
|
||||
G.dna.species.auto_equip(G)
|
||||
G.loc = src.loc
|
||||
|
||||
Reference in New Issue
Block a user