Tg 2 11 sync (#215)

* first series of updates

* datums

* games folder

* admin and atmosia stuffs

* moar

* mob updates borg riding

* sprites and stuff

* fixes for various things

* oops. some missed fixes
This commit is contained in:
Poojawa
2017-02-12 03:56:14 -06:00
committed by GitHub
parent 30b3dff395
commit 6674f9fc15
153 changed files with 1651 additions and 1368 deletions
@@ -30,4 +30,6 @@
update_icons()
sql_report_death(src)
unbuckle_all_mobs(TRUE)
sql_report_death(src)
@@ -69,4 +69,4 @@
"You announce you are operating in low power mode.")
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
else
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
+90 -1
View File
@@ -89,7 +89,9 @@
/obj/item/clothing/head/sombrero,
/obj/item/clothing/head/witchunter_hat)
can_buckle = TRUE
buckle_lying = FALSE
var/datum/riding/cyborg/riding_datum = null
/mob/living/silicon/robot/New(loc)
spark_system = new /datum/effect_system/spark_spread()
@@ -995,3 +997,90 @@
hat = new_hat
new_hat.forceMove(src)
update_icons()
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(!(M in buckled_mobs))
buckle_mob(M)
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!riding_datum)
riding_datum = new /datum/riding/cyborg
riding_datum.ridden = src
if(buckled_mobs)
if(buckled_mobs.len >= max_buckled_mobs)
return
if(M in buckled_mobs)
return
if(stat)
return
if(incapacitated())
return
if(M.restrained())
return
if(iscyborg(M))
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
return
if(isbot(M))
M.visible_message("<span class='boldwarning'>No. Just... no.</span>")
return
if(module)
if(!module.allow_riding)
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
return
if(iscarbon(M))
if(!equip_buckle_inhands(M)) //MAKE SURE THIS IS LAST!
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
return
. = ..(M, force, check_loc)
riding_datum.handle_vehicle_offsets()
/mob/living/silicon/robot/unbuckle_mob(mob/user)
if(iscarbon(user))
unequip_buckle_inhands(user)
. = ..(user)
riding_datum.restore_position(user)
/mob/living/silicon/robot/proc/unequip_buckle_inhands(mob/living/carbon/user)
for(var/obj/item/cyborgride_offhand/O in user.contents)
if(O.ridden != src)
CRASH("RIDING OFFHAND ON WRONG MOB")
continue
if(O.selfdeleting)
continue
else
qdel(O)
return TRUE
/mob/living/silicon/robot/proc/equip_buckle_inhands(mob/living/carbon/user)
var/obj/item/cyborgride_offhand/inhand = new /obj/item/cyborgride_offhand(user)
inhand.rider = user
inhand.ridden = src
return user.put_in_hands(inhand, TRUE)
/obj/item/cyborgride_offhand
name = "offhand"
icon = 'icons/obj/weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | DROPDEL | NOBLUDGEON
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/rider
var/mob/living/silicon/robot/ridden
var/selfdeleting = FALSE
/obj/item/cyborgride_offhand/dropped()
selfdeleting = TRUE
. = ..()
/obj/item/cyborgride_offhand/equipped()
if(loc != rider)
selfdeleting = TRUE
qdel(src)
. = ..()
/obj/item/cyborgride_offhand/Destroy()
if(selfdeleting)
if(rider in ridden.buckled_mobs)
ridden.unbuckle_mob(rider)
. = ..()
@@ -26,6 +26,11 @@
var/hat_offset = -3
var/list/ride_offset_x = list("north" = 0, "south" = 0, "east" = -6, "west" = 6)
var/list/ride_offset_y = list("north" = 4, "south" = 4, "east" = 3, "west" = 3)
var/ride_allow_incapacitated = FALSE
var/allow_riding = TRUE
/obj/item/weapon/robot_module/New()
..()
for(var/i in basic_modules)
@@ -17,3 +17,8 @@
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
if(!magpulse)
return ..()
/mob/living/silicon/robot/Moved()
. = ..()
if(riding_datum)
riding_datum.on_vehicle_move()