Skip to content

Commit

Permalink
Merge branch 'interior-fix' into 'dev'
Browse files Browse the repository at this point in the history
Vehicle interior and verbs fixes

Closes #15836

See merge request cmdevs/ColonialMarines!5096
  • Loading branch information
Vampmare committed Nov 6, 2020
2 parents b94c1b8 + 5379fb8 commit 7671f0a
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 17 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
open(user)
return 0

if(master_item.flags_item & NODROP) return
if(istype(master_item, /obj/item) && master_item.flags_item & NODROP) return

if(!istype(over_object, /obj/screen))
return 1
Expand Down
3 changes: 3 additions & 0 deletions code/game/turfs/open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
mouse_opacity = FALSE
can_bloody = FALSE

/turf/open/void/is_weedable()
return FALSE

/turf/open/river
can_bloody = FALSE

Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
return FALSE
if(!check_plasma(total_resin_cost))
return FALSE
if(interior_manager && interior_manager.interior_z == z)
to_chat(src, SPAN_XENOWARNING("It's too tight in here to build."))
return FALSE

var/turf/current_turf = get_turf(A)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
to_chat(X, SPAN_XENOWARNING("You need to be on resin to grow an ovipositor."))
return

if(interior_manager && interior_manager.interior_z == X.z)
to_chat(X, SPAN_XENOWARNING("It's too tight in here to grow an ovipositor."))
return

if(alien_weeds.linked_hive.hivenumber != X.hivenumber)
to_chat(X, SPAN_XENOWARNING("These weeds don't belong to your hive! You can't grow an ovipositor here."))
return
Expand Down
3 changes: 2 additions & 1 deletion code/modules/vehicles/interior/interior_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ var/global/datum/interior_manager/interior_manager = new
for(var/turf/T in block(min, max))
for(var/atom/A in T)
qdel(A)
qdel(T)
T.ChangeTurf(/turf/open/void)


chunk_availability[chunk_id] = TRUE
interiors[chunk_id] = null
Expand Down
34 changes: 22 additions & 12 deletions code/modules/vehicles/multitile/multitile_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,45 @@ This one currently doesn't work. Will rework adn readd it during interior update
R.remove_all_players()
message_staff("[src] forcibly removed all players from [R]")
*/
/client/proc/cmd_admin_remove_clamp(obj/vehicle/multitile/M as obj in all_multi_vehicles)
set name = "Vehicle Remove Clamp"
set category = null
/client/proc/cmd_admin_remove_clamp()
set name = "V - Vehicle Remove Clamp"
set desc = "Forcibly removes vehicle clamp from selected vehicle. dropping it under the vehicle."
set category = "Event"
set popup_menu = FALSE

if(!admin_holder || !(admin_holder.rights & R_MOD))
to_chat(src, "Only administrators may use this command.")
return
if(!istype(M))

var/obj/vehicle/multitile/Vehicle = input("Select a vehicle.", "Remove Clamp", null, null) as null|anything in all_multi_vehicles

if(!istype(Vehicle))
alert("Not a vehicle.")
return

M.detach_clamp()
Vehicle.detach_clamp()

message_staff(WRAP_STAFF_LOG(usr, "forcibly removed vehicle clamp from [M] in [get_area(M)] ([M.x],[M.y],[M.z])."), M.x, M.y, M.z)
message_staff(WRAP_STAFF_LOG(usr, "forcibly removed vehicle clamp from [Vehicle] in [get_area(Vehicle)] ([Vehicle.x],[Vehicle.y],[Vehicle.z])."), Vehicle.x, Vehicle.y, Vehicle.z)

/client/proc/cmd_admin_repair_multitile(obj/vehicle/multitile/M as obj in all_multi_vehicles)
set name = "Vehicle Rejuvenate"
set category = null
/client/proc/cmd_admin_repair_multitile()
set name = "V - Vehicle Rejuvenate"
set desc = "Fully restores vehicle modules and hull."
set category = "Event"
set popup_menu = FALSE

if(!admin_holder || !(admin_holder.rights & R_MOD))
to_chat(src, "Only administrators may use this command.")
return
if(!istype(M))

var/obj/vehicle/multitile/Vehicle = input("Select a vehicle.", "Rejuvenate", null, null) as null|anything in all_multi_vehicles

if(!istype(Vehicle))
alert("Not a vehicle.")
return

M.rejuvenate_vehicle()
Vehicle.rejuvenate_vehicle()

message_staff(WRAP_STAFF_LOG(usr, "arepaired [M] in [get_area(M)] ([M.x],[M.y],[M.z])."), M.x, M.y, M.z)
message_staff(WRAP_STAFF_LOG(usr, "admin-repaired [Vehicle] in [get_area(Vehicle)]. ([Vehicle.x],[Vehicle.y],[Vehicle.z])"), Vehicle.x, Vehicle.y, Vehicle.z)

//used only for admin verb proc that repairs vehicles.
/obj/vehicle/multitile/proc/rejuvenate_vehicle()
Expand Down
2 changes: 0 additions & 2 deletions code/modules/vehicles/multitile/multitile_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,8 @@
dragged_atom = G.grabbed_thing

var/enter_time = SECONDS_1
to_chat(M, SPAN_NOTICE("1 second"))
if(dragged_atom)
enter_time = SECONDS_2
to_chat(M, SPAN_NOTICE("switched to 2 seconds"))

to_chat(M, SPAN_NOTICE(enter_msg))
if(!do_after(M, enter_time, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC))
Expand Down
5 changes: 4 additions & 1 deletion code/modules/vehicles/multitile/multitile_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
to_chat(user, SPAN_WARNING("Vehicle already has a \"[V.nickname]\" nickname."))
return

var/new_nickname = stripped_input(user, "Enter a unique name or callsign to add to your vehicle's name. 26 characters maximum. SINGLE USE ONLY.", "Name your vehicle", "", MAX_NAME_LEN)
var/new_nickname = stripped_input(user, "Enter a unique name or callsign to add to your vehicle's name. 26 characters maximum. \n\nThis is IC nickname/callsign for your vehicle.\nSINGLE USE ONLY.", "Name your vehicle", "", MAX_NAME_LEN)
if(!new_nickname)
return
if(alert(user, "Vehicle's name will be [initial(V.name) + "\"[new_nickname]\""]. Confirm?", "Confirmation?", "Yes", "No") == "No")
Expand All @@ -273,6 +273,9 @@
V.nickname = new_nickname
V.name = initial(V.name) + " \"[V.nickname]\""
to_chat(user, SPAN_NOTICE("You've added \"[V.nickname]\" nickname to your vehicle."))

message_staff(WRAP_STAFF_LOG(user, "added \"[V.nickname]\" nickname to their [initial(V.name)]. ([V.x],[V.y],[V.z])"), V.x, V.y, V.z)

V.initialize_cameras(TRUE)

//Activates vehicle horn. Yes, it is annoying.
Expand Down
12 changes: 12 additions & 0 deletions html/changelogs/interior-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
author: Jeser

delete-after: True

changes:
- bugfix: "Fixed void turfs being weedable, allowing weeds escape the bounds of vehicle interios. No space magic allowed here."
- bugfix: "Fixed being able to build resin structures inside of vehicle interiors."
- bugfix: "Fixed being able to grow an ovipositor inside of vehicle interiors."
- bugfix: "Fixed several bugs with Vehicle Remove Clamp and Vehicle Rejuvenate verbs. They now reside in Event tab."
- bugfix: "Fixed being able to build resin structures inside of vehicle interiors."
- bugfix: "Fixed interiors not changing turfs to void upon their deletion."
- tweak: "Added explanation to Name Vehicle verb input window, saying that it's supposed to be vehicle's IC nickname or callsign. Added admin log for using this verb."

0 comments on commit 7671f0a

Please sign in to comment.