Various fixes (#16176)

-Patches map-spawn random objects inside loot piles
-Adds counter-clockwise rotation to many objects
-Prevents borers from crashing VR
-Tweaks blood drying to not queue dry timers on mapload
-Prevents adding grabs to crates
-Fixes look up verb when outdoors
-Lets vehicles fall through open space
-Lets the cargo tug dangerously use stairs
-Fixes med/sec bot runtimes
-Fixes TECH_MAGNETS incorrect define
-Fixes damage/stumblevore procing every step when riding taurs/borgs while confused
This commit is contained in:
Nadyr
2024-08-11 15:20:18 -04:00
committed by GitHub
parent eb76812cfb
commit 90720f8a67
30 changed files with 339 additions and 116 deletions
@@ -49,7 +49,13 @@ var/global/list/image/splatter_cache=list()
if (B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
qdel(B)
addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1))
//VOREstation edit - Moved timer call to Init, and made it not call on mapload
/obj/effect/decal/cleanable/blood/Initialize(var/mapload, var/_age)
. = ..()
if(!mapload)
addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1))
//VOREstation edit end
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = get_random_colour(1)
+91 -84
View File
@@ -7,90 +7,97 @@
w_class = ITEMSIZE_HUGE
/obj/item/stolenpackage/attack_self(mob/user as mob)
// Another way of doing this. Commented out because the other method is better for this application.
/*var/spawn_chance = rand(1,100)
switch(spawn_chance)
if(0 to 49)
new /obj/random/gun/guarenteed(usr.loc)
to_chat(usr, "You got a thing!")
if(50 to 99)
new /obj/item/weapon/bikehorn/rubberducky(usr.loc)
new /obj/item/weapon/bikehorn(usr.loc)
to_chat(usr, "You got two things!")
if(100)
to_chat(usr, "The box contained nothing!")
return
*/
var/loot = pick(/obj/effect/landmark/costume,
/obj/item/clothing/glasses/thermal,
/obj/item/clothing/gloves/combat,
/obj/item/clothing/head/bearpelt,
/obj/item/clothing/mask/balaclava,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/muzzle,
/obj/item/clothing/suit/armor/heavy,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/vest,
/obj/item/device/chameleon,
/obj/item/device/pda/clown,
/obj/item/device/pda/mime,
/obj/item/device/pda/syndicate,
/obj/item/mecha_parts/chassis/phazon,
/obj/item/mecha_parts/part/phazon_head,
/obj/item/mecha_parts/part/phazon_left_arm,
/obj/item/mecha_parts/part/phazon_left_leg,
/obj/item/mecha_parts/part/phazon_right_arm,
/obj/item/mecha_parts/part/phazon_right_leg,
/obj/item/mecha_parts/part/phazon_torso,
/obj/item/weapon/circuitboard/mecha/phazon/targeting,
/obj/item/weapon/circuitboard/mecha/phazon/peripherals,
/obj/item/weapon/circuitboard/mecha/phazon/main,
/obj/item/device/bodysnatcher,
/obj/item/weapon/bluespace_harpoon,
/obj/item/clothing/accessory/permit/gun,
/obj/item/device/perfect_tele,
/obj/item/device/sleevemate,
/obj/item/weapon/disk/nifsoft/compliance,
/obj/item/weapon/implanter/compliance,
/obj/item/seeds/ambrosiadeusseed,
/obj/item/seeds/ambrosiavulgarisseed,
/obj/item/seeds/libertymycelium,
/obj/fiftyspawner/platinum,
/obj/item/toy/nanotrasenballoon,
/obj/item/toy/syndicateballoon,
/obj/item/weapon/aiModule/syndicate,
/obj/item/weapon/book/manual/engineering_hacking,
/obj/item/weapon/card/emag,
/obj/item/weapon/card/emag_broken,
/obj/item/weapon/card/id/syndicate,
/obj/item/poster,
/obj/item/weapon/disposable_teleporter,
/obj/item/weapon/grenade/flashbang/clusterbang,
/obj/item/weapon/grenade/flashbang/clusterbang,
/obj/item/weapon/grenade/spawnergrenade/spesscarp,
/obj/item/weapon/melee/energy/sword,
/obj/item/weapon/melee/telebaton,
/obj/item/weapon/pen/reagent/paralysis,
/obj/item/weapon/pickaxe/diamonddrill,
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine,
/obj/item/weapon/reagent_containers/food/snacks/carpmeat,
/obj/item/weapon/reagent_containers/food/snacks/clownstears,
/obj/item/weapon/reagent_containers/food/snacks/xenomeat,
/obj/item/weapon/reagent_containers/glass/beaker/neurotoxin,
/obj/item/weapon/rig/combat,
/obj/item/weapon/shield/energy,
/obj/item/weapon/stamp/centcomm,
/obj/item/weapon/stamp/solgov,
/obj/item/weapon/storage/fancy/cigar/havana,
/obj/item/xenos_claw,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/weapon/guarenteed)
new loot(usr.loc)
to_chat(user, "You unwrap the package.")
qdel(src)
// Another way of doing this. Commented out because the other method is better for this application.
/*var/spawn_chance = rand(1,100)
switch(spawn_chance)
if(0 to 49)
new /obj/random/gun/guarenteed(usr.loc)
to_chat(usr, "You got a thing!")
if(50 to 99)
new /obj/item/weapon/bikehorn/rubberducky(usr.loc)
new /obj/item/weapon/bikehorn(usr.loc)
to_chat(usr, "You got two things!")
if(100)
to_chat(usr, "The box contained nothing!")
return
*/
var/loot = pick(/obj/effect/landmark/costume,
/obj/item/clothing/glasses/thermal,
/obj/item/clothing/gloves/combat,
/obj/item/clothing/head/bearpelt,
/obj/item/clothing/mask/balaclava,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/muzzle,
/obj/item/clothing/suit/armor/heavy,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/vest,
/obj/item/device/chameleon,
/obj/item/device/pda/clown,
/obj/item/device/pda/mime,
/obj/item/device/pda/syndicate,
/obj/item/mecha_parts/chassis/phazon,
/obj/item/mecha_parts/part/phazon_head,
/obj/item/mecha_parts/part/phazon_left_arm,
/obj/item/mecha_parts/part/phazon_left_leg,
/obj/item/mecha_parts/part/phazon_right_arm,
/obj/item/mecha_parts/part/phazon_right_leg,
/obj/item/mecha_parts/part/phazon_torso,
/obj/item/weapon/circuitboard/mecha/phazon/targeting,
/obj/item/weapon/circuitboard/mecha/phazon/peripherals,
/obj/item/weapon/circuitboard/mecha/phazon/main,
/obj/item/device/bodysnatcher,
/obj/item/weapon/bluespace_harpoon,
/obj/item/clothing/accessory/permit/gun,
/obj/item/device/perfect_tele,
/obj/item/device/sleevemate,
/obj/item/weapon/disk/nifsoft/compliance,
/obj/item/weapon/implanter/compliance,
/obj/item/seeds/ambrosiadeusseed,
/obj/item/seeds/ambrosiavulgarisseed,
/obj/item/seeds/libertymycelium,
/obj/fiftyspawner/platinum,
/obj/item/toy/nanotrasenballoon,
/obj/item/toy/syndicateballoon,
/obj/item/weapon/aiModule/syndicate,
/obj/item/weapon/book/manual/engineering_hacking,
/obj/item/weapon/card/emag,
/obj/item/weapon/card/emag_broken,
/obj/item/weapon/card/id/syndicate,
/obj/item/poster,
/obj/item/weapon/disposable_teleporter,
/obj/item/weapon/grenade/flashbang/clusterbang,
/obj/item/weapon/grenade/flashbang/clusterbang,
/obj/item/weapon/grenade/spawnergrenade/spesscarp,
/obj/item/weapon/melee/energy/sword,
/obj/item/weapon/melee/telebaton,
/obj/item/weapon/pen/reagent/paralysis,
/obj/item/weapon/pickaxe/diamonddrill,
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine,
/obj/item/weapon/reagent_containers/food/snacks/carpmeat,
/obj/item/weapon/reagent_containers/food/snacks/clownstears,
/obj/item/weapon/reagent_containers/food/snacks/xenomeat,
/obj/item/weapon/reagent_containers/glass/beaker/neurotoxin,
/obj/item/weapon/rig/combat,
/obj/item/weapon/shield/energy,
/obj/item/weapon/stamp/centcomm,
/obj/item/weapon/stamp/solgov,
/obj/item/weapon/storage/fancy/cigar/havana,
/obj/item/xenos_claw,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/contraband,
/obj/random/weapon/guarenteed)
//VOREstation edit - Randomized map objects were put in loot piles, so handle them...
if(istype(loot,/obj/random))
var/obj/random/randy = loot
var/new_I = randy.spawn_item()
qdel(loot)
loot = new_I // swap it
//VOREstation edit end
new loot(usr.loc)
to_chat(user, "You unwrap the package.")
qdel(src)
/obj/item/weapon/miscdisc
name = "strange artefact"
@@ -97,6 +97,8 @@
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
if(istype(W, /obj/item/weapon/grab)) //VOREstation edit: we don't want to drop grabs into the crate
return
user.drop_item()
if(W)
W.forceMove(src.loc)
@@ -740,4 +742,4 @@
icon = 'icons/obj/closets/miningcar.dmi'
closet_appearance = null
open_sound = 'sound/effects/wooden_closet_open.ogg'
close_sound = 'sound/effects/wooden_closet_close.ogg'
close_sound = 'sound/effects/wooden_closet_close.ogg'
+20 -1
View File
@@ -126,4 +126,23 @@
return
src.set_dir(turn(src.dir, 270))
return
return
//VOREstation edit: counter-clockwise rotation
/obj/structure/gravemarker/verb/rotate_counterclockwise()
set name = "Rotate Grave Marker Counter-Clockwise"
set category = "Object"
set src in oview(1)
if(anchored)
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(ismouse(usr) || (isobserver(usr) && !config.ghost_interaction))
return
src.set_dir(turn(src.dir, 90))
return
@@ -93,6 +93,14 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
else // Welp.
loot = produce_common_item()
//VOREstation edit - Randomized map objects were put in loot piles, so handle them...
if(istype(loot,/obj/random))
var/obj/random/randy = loot
var/new_I = randy.spawn_item()
qdel(loot)
loot = new_I // swap it
//VOREstation edit end
if(loot)
searched_by |= user.ckey
loot.forceMove(get_turf(src))
@@ -158,6 +158,14 @@
else if(luck <= chance_alpha+chance_beta+chance_gamma)
I = produce_gamma_item()
//VOREstation edit - Randomized map objects were put in loot piles, so handle them...
if(istype(I,/obj/random))
var/obj/random/randy = I
var/new_I = randy.spawn_item()
qdel(I)
I = new_I // swap it
//VOREstation edit end
//We either have an item to hand over or we don't, at this point!
if(I)
searchedby += user.ckey
@@ -290,6 +290,27 @@
update_icon()
return
//VOREstation edit: counter-clockwise rotation
/obj/structure/windoor_assembly/verb/rotate_counterclockwise()
set name = "Rotate Windoor Assembly Counter-Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.set_dir(turn(src.dir, 90))
if(src.state != "01")
update_nearby_tiles(need_rebuild=1)
update_icon()
return
//VOREstation edit end
//Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip()
set name = "Flip Windoor Assembly"